diff --git a/.buildkite/pipelines/performance/daily.yml b/.buildkite/pipelines/performance/daily.yml index fdc4ae17d69a2..28f58d6c814ef 100644 --- a/.buildkite/pipelines/performance/daily.yml +++ b/.buildkite/pipelines/performance/daily.yml @@ -19,11 +19,11 @@ steps: depends_on: build key: tests - # - label: ':shipit: Performance Tests dataset extraction for scalability benchmarking' - # command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh - # agents: - # queue: n2-2 - # depends_on: tests + - label: ':shipit: Performance Tests dataset extraction for scalability benchmarking' + command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh + agents: + queue: n2-2 + depends_on: tests - label: ':chart_with_upwards_trend: Report performance metrics to ci-stats' command: .buildkite/scripts/steps/functional/report_performance_metrics.sh diff --git a/.buildkite/pull_requests.json b/.buildkite/pull_requests.json index a27cbcff8b7e4..0391c20304e25 100644 --- a/.buildkite/pull_requests.json +++ b/.buildkite/pull_requests.json @@ -34,10 +34,12 @@ "^src/dev/prs/kibana_qa_pr_list\\.json$", "^\\.buildkite/pull_requests\\.json$" ], - "always_require_ci_on_changed": [ - "^docs/developer/plugin-list.asciidoc$" - ], - "kibana_versions_check": true + "always_require_ci_on_changed": ["^docs/developer/plugin-list.asciidoc$"], + "kibana_versions_check": true, + "kibana_build_reuse": true, + "kibana_build_reuse_pipeline_slugs": ["kibana-pull-request", "kibana-on-merge"], + "kibana_build_reuse_regexes": ["^test/", "^x-pack/test/"], + "kibana_build_reuse_label": "ci:reuse-kibana-build" } ] } diff --git a/.buildkite/scripts/steps/checks.sh b/.buildkite/scripts/steps/checks.sh index 9937a25758e41..4af63d318c804 100755 --- a/.buildkite/scripts/steps/checks.sh +++ b/.buildkite/scripts/steps/checks.sh @@ -11,7 +11,6 @@ export DISABLE_BOOTSTRAP_VALIDATION=false .buildkite/scripts/steps/checks/telemetry.sh .buildkite/scripts/steps/checks/ts_projects.sh .buildkite/scripts/steps/checks/jest_configs.sh -.buildkite/scripts/steps/checks/kbn_pm_dist.sh .buildkite/scripts/steps/checks/plugin_list_docs.sh .buildkite/scripts/steps/checks/bundle_limits.sh .buildkite/scripts/steps/checks/i18n.sh diff --git a/.buildkite/scripts/steps/checks/kbn_pm_dist.sh b/.buildkite/scripts/steps/checks/kbn_pm_dist.sh deleted file mode 100755 index 6f75bd9ea4e29..0000000000000 --- a/.buildkite/scripts/steps/checks/kbn_pm_dist.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -source .buildkite/scripts/common/util.sh - -echo "--- Building kbn-pm distributable" -yarn kbn run build -i @kbn/pm - -check_for_changed_files 'yarn kbn run build -i @kbn/pm' true diff --git a/.buildkite/scripts/steps/checks/test_projects.sh b/.buildkite/scripts/steps/checks/test_projects.sh index 4c7d9094cb0c3..76625b23ac335 100755 --- a/.buildkite/scripts/steps/checks/test_projects.sh +++ b/.buildkite/scripts/steps/checks/test_projects.sh @@ -6,4 +6,4 @@ source .buildkite/scripts/common/util.sh echo --- Test Projects checks-reporter-with-killswitch "Test Projects" \ - yarn kbn run test --exclude kibana --oss --skip-kibana-plugins --skip-missing + yarn kbn run-in-packages test diff --git a/.eslintrc.js b/.eslintrc.js index 385d241e52fff..8b3ccafe37f6f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -979,7 +979,7 @@ module.exports = { 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks 'react-hooks/exhaustive-deps': [ 'error', - { additionalHooks: '^(useFetcher|useProgressiveFetcher)$' }, + { additionalHooks: '^(useFetcher|useProgressiveFetcher|useBreadcrumb)$' }, ], }, }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3fb8a5f2d1b8e..16f86540a4de2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -106,6 +106,7 @@ /x-pack/plugins/observability/public/pages/alerts @elastic/actionable-observability /x-pack/plugins/observability/public/pages/cases @elastic/actionable-observability /x-pack/plugins/observability/public/pages/rules @elastic/actionable-observability +/x-pack/plugins/observability/public/pages/rule_details @elastic/actionable-observability # Infra Monitoring /x-pack/plugins/infra/ @elastic/infra-monitoring-ui @@ -371,6 +372,7 @@ /x-pack/test/cases_api_integration/ @elastic/response-ops /x-pack/test/functional/services/cases/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/cases/ @elastic/response-ops +/x-pack/test/api_integration/apis/cases @elastic/response-ops # Enterprise Search /x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 8f02d3224b66c..c39e6292c7e4b 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,7 +1,7 @@ on: pull_request_target: - branches: ["main"] - types: ["labeled", "closed"] + branches: ['main'] + types: ['labeled', 'closed'] jobs: backport: @@ -16,7 +16,7 @@ jobs: ) steps: - name: Backport Action - uses: sqren/backport-github-action@v8.8.0 + uses: sqren/backport-github-action@v8.9.2 with: github_token: ${{secrets.KIBANAMACHINE_TOKEN}} diff --git a/api_docs/actions.devdocs.json b/api_docs/actions.devdocs.json index 62e98fed14cdf..8c3b40d809b7c 100644 --- a/api_docs/actions.devdocs.json +++ b/api_docs/actions.devdocs.json @@ -1553,7 +1553,7 @@ "label": "ActionParamsType", "description": [], "signature": [ - "{ readonly message: string; readonly to: string[]; readonly subject: string; readonly cc: string[]; readonly bcc: string[]; readonly kibanaFooterLink: Readonly<{} & { text: string; path: string; }>; }" + "{ readonly to: string[]; readonly message: string; readonly subject: string; readonly cc: string[]; readonly bcc: string[]; readonly kibanaFooterLink: Readonly<{} & { path: string; text: string; }>; }" ], "path": "x-pack/plugins/actions/server/builtin_action_types/email.ts", "deprecated": false, @@ -1581,7 +1581,7 @@ "label": "ActionParamsType", "description": [], "signature": [ - "{ readonly source?: string | undefined; readonly group?: string | undefined; readonly component?: string | undefined; readonly summary?: string | undefined; readonly timestamp?: string | undefined; readonly eventAction?: \"resolve\" | \"trigger\" | \"acknowledge\" | undefined; readonly dedupKey?: string | undefined; readonly severity?: \"error\" | \"warning\" | \"info\" | \"critical\" | undefined; readonly class?: string | undefined; }" + "{ readonly group?: string | undefined; readonly source?: string | undefined; readonly component?: string | undefined; readonly summary?: string | undefined; readonly timestamp?: string | undefined; readonly eventAction?: \"resolve\" | \"trigger\" | \"acknowledge\" | undefined; readonly dedupKey?: string | undefined; readonly severity?: \"error\" | \"warning\" | \"info\" | \"critical\" | undefined; readonly class?: string | undefined; }" ], "path": "x-pack/plugins/actions/server/builtin_action_types/pagerduty.ts", "deprecated": false, @@ -1665,7 +1665,7 @@ "label": "ActionParamsType", "description": [], "signature": [ - "Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { description: string | null; name: string; externalId: string | null; incidentTypes: number[] | null; severityCode: number | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"incidentTypes\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"severity\"; subActionParams: Readonly<{} & {}>; }>" + "Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { name: string; description: string | null; externalId: string | null; incidentTypes: number[] | null; severityCode: number | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"incidentTypes\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"severity\"; subActionParams: Readonly<{} & {}>; }>" ], "path": "x-pack/plugins/actions/server/builtin_action_types/resilient/index.ts", "deprecated": false, @@ -1707,7 +1707,17 @@ "label": "ActionsClient", "description": [], "signature": [ - "{ create: ({ action: { actionTypeId, name, config, secrets }, }: ", + "{ execute: ({ actionId, params, source, relatedSavedObjects, }: Omit<", + "ExecuteOptions", + ", \"request\">) => Promise<", + { + "pluginId": "actions", + "scope": "common", + "docId": "kibActionsPluginApi", + "section": "def-common.ActionTypeExecutorResult", + "text": "ActionTypeExecutorResult" + }, + ">; create: ({ action: { actionTypeId, name, config, secrets }, }: ", "CreateOptions", ") => Promise<", { @@ -1741,17 +1751,7 @@ }, "<", "ActionTypeConfig", - ">>; execute: ({ actionId, params, source, relatedSavedObjects, }: Omit<", - "ExecuteOptions", - ", \"request\">) => Promise<", - { - "pluginId": "actions", - "scope": "common", - "docId": "kibActionsPluginApi", - "section": "def-common.ActionTypeExecutorResult", - "text": "ActionTypeExecutorResult" - }, - ">; getAll: () => Promise<", + ">>; getAll: () => Promise<", { "pluginId": "actions", "scope": "server", diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index e8945cef729e1..ddaefd73d9610 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github summary: API docs for the actions plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 5022616c6831d..ba797c480d7d2 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github summary: API docs for the advancedSettings plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 785d17c4eab03..21147bb932d8e 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github summary: API docs for the aiops plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index a295486b63bc0..c83dcfe0367ec 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -43,7 +43,7 @@ "The rule to view" ], "signature": [ - "{ id: string; monitoring?: ", + "{ id: string; name: string; monitoring?: ", { "pluginId": "alerting", "scope": "common", @@ -51,7 +51,7 @@ "section": "def-common.RuleMonitoring", "text": "RuleMonitoring" }, - " | undefined; name: string; tags: string[]; enabled: boolean; params: never; actions: ", + " | undefined; tags: string[]; enabled: boolean; params: never; actions: ", { "pluginId": "alerting", "scope": "common", @@ -4381,7 +4381,7 @@ "label": "freq", "description": [], "signature": [ - "0 | 2 | 1 | 4 | 3 | 5 | 6 | undefined" + "0 | 2 | 1 | 6 | 4 | 3 | 5 | undefined" ], "path": "x-pack/plugins/alerting/common/rule_snooze_type.ts", "deprecated": false @@ -5320,6 +5320,19 @@ ], "path": "x-pack/plugins/alerting/common/rule_snooze_type.ts", "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.RuleSnoozeSchedule.skipRecurrences", + "type": "Array", + "tags": [], + "label": "skipRecurrences", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "x-pack/plugins/alerting/common/rule_snooze_type.ts", + "deprecated": false } ], "initialIsOpen": false @@ -6025,7 +6038,7 @@ "label": "RuleSnooze", "description": [], "signature": [ - "{ duration: number; rRule: SnoozeRRule; id?: string | undefined; }[]" + "{ duration: number; rRule: SnoozeRRule; id?: string | undefined; skipRecurrences?: string[] | undefined; }[]" ], "path": "x-pack/plugins/alerting/common/rule_snooze_type.ts", "deprecated": false, @@ -6109,7 +6122,7 @@ "label": "SanitizedRule", "description": [], "signature": [ - "{ id: string; monitoring?: ", + "{ id: string; name: string; monitoring?: ", { "pluginId": "alerting", "scope": "common", @@ -6117,7 +6130,7 @@ "section": "def-common.RuleMonitoring", "text": "RuleMonitoring" }, - " | undefined; name: string; tags: string[]; enabled: boolean; params: Params; actions: ", + " | undefined; tags: string[]; enabled: boolean; params: Params; actions: ", { "pluginId": "alerting", "scope": "common", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 17f5b697744b4..2bd0e72e60a71 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github summary: API docs for the alerting plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 365 | 0 | 356 | 20 | +| 366 | 0 | 357 | 20 | ## Client diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 97812e861a663..20d50a5ecb433 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -772,7 +772,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/dynamic\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/backend\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/profiling/timeline\" | \"GET /internal/apm/services/{serviceName}/profiling/statistics\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/backends/top_backends\" | \"GET /internal/apm/backends/upstream_services\" | \"GET /internal/apm/backends/metadata\" | \"GET /internal/apm/backends/charts/latency\" | \"GET /internal/apm/backends/charts/throughput\" | \"GET /internal/apm/backends/charts/error_rate\" | \"GET /internal/apm/backends/operations\" | \"GET /internal/apm/backends/charts/distribution\" | \"GET /internal/apm/backends/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/dynamic\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/profiling/timeline\" | \"GET /internal/apm/services/{serviceName}/profiling/statistics\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\"" ], "path": "x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -1518,9 +1518,9 @@ }, ", { fieldCandidates: string[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/operations/spans\": ", + ">; \"GET /internal/apm/dependencies/operations/spans\": ", "ServerRoute", - "<\"GET /internal/apm/backends/operations/spans\", ", + "<\"GET /internal/apm/dependencies/operations/spans\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1550,7 +1550,7 @@ "StringC", "; }>, ", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; spanName: ", "StringC", @@ -1569,18 +1569,18 @@ "text": "APMRouteHandlerResources" }, ", { spans: ", - "BackendSpan", + "DependencySpan", "[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/charts/distribution\": ", + ">; \"GET /internal/apm/dependencies/charts/distribution\": ", "ServerRoute", - "<\"GET /internal/apm/backends/charts/distribution\", ", + "<\"GET /internal/apm/dependencies/charts/distribution\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; spanName: ", "StringC", @@ -1624,9 +1624,9 @@ "OverallLatencyDistributionResponse", "; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/operations\": ", + ">; \"GET /internal/apm/dependencies/operations\": ", "ServerRoute", - "<\"GET /internal/apm/backends/operations\", ", + "<\"GET /internal/apm/dependencies/operations\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1660,7 +1660,7 @@ "StringC", "; }>, ", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; }>]>; }>, ", { @@ -1671,18 +1671,18 @@ "text": "APMRouteHandlerResources" }, ", { operations: ", - "BackendOperation", + "DependencyOperation", "[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/charts/error_rate\": ", + ">; \"GET /internal/apm/dependencies/charts/error_rate\": ", "ServerRoute", - "<\"GET /internal/apm/backends/charts/error_rate\", ", + "<\"GET /internal/apm/dependencies/charts/error_rate\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; spanName: ", "StringC", @@ -1726,15 +1726,15 @@ }, ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/charts/throughput\": ", + ">; \"GET /internal/apm/dependencies/charts/throughput\": ", "ServerRoute", - "<\"GET /internal/apm/backends/charts/throughput\", ", + "<\"GET /internal/apm/dependencies/charts/throughput\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; spanName: ", "StringC", @@ -1778,15 +1778,15 @@ }, ", { currentTimeseries: { x: number; y: number | null; }[]; comparisonTimeseries: { x: number; y: number | null; }[] | null; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/charts/latency\": ", + ">; \"GET /internal/apm/dependencies/charts/latency\": ", "ServerRoute", - "<\"GET /internal/apm/backends/charts/latency\", ", + "<\"GET /internal/apm/dependencies/charts/latency\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; spanName: ", "StringC", @@ -1830,15 +1830,15 @@ }, ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/metadata\": ", + ">; \"GET /internal/apm/dependencies/metadata\": ", "ServerRoute", - "<\"GET /internal/apm/backends/metadata\", ", + "<\"GET /internal/apm/dependencies/metadata\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; }>, ", "TypeC", @@ -1856,9 +1856,9 @@ }, ", { metadata: { spanType: string | undefined; spanSubtype: string | undefined; }; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/upstream_services\": ", + ">; \"GET /internal/apm/dependencies/upstream_services\": ", "ServerRoute", - "<\"GET /internal/apm/backends/upstream_services\", ", + "<\"GET /internal/apm/dependencies/upstream_services\", ", "IntersectionC", "<[", "TypeC", @@ -1866,7 +1866,7 @@ "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; }>, ", "TypeC", @@ -1932,9 +1932,9 @@ "Node", "; }[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/backends/top_backends\": ", + ">; \"GET /internal/apm/dependencies/top_dependencies\": ", "ServerRoute", - "<\"GET /internal/apm/backends/top_backends\", ", + "<\"GET /internal/apm/dependencies/top_dependencies\", ", "IntersectionC", "<[", "TypeC", @@ -1982,7 +1982,7 @@ "section": "def-server.APMRouteHandlerResources", "text": "APMRouteHandlerResources" }, - ", { backends: { currentStats: { latency: { value: number | null; timeseries: ", + ", { dependencies: { currentStats: { latency: { value: number | null; timeseries: ", "Coordinate", "[]; }; throughput: { value: number | null; timeseries: ", "Coordinate", @@ -4598,15 +4598,15 @@ }, ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/service-map/backend\": ", + ">; \"GET /internal/apm/service-map/dependency\": ", "ServerRoute", - "<\"GET /internal/apm/service-map/backend\", ", + "<\"GET /internal/apm/service-map/dependency\", ", "TypeC", "<{ query: ", "IntersectionC", "<[", "TypeC", - "<{ backendName: ", + "<{ dependencyName: ", "StringC", "; }>, ", "TypeC", @@ -4904,6 +4904,60 @@ "OverallLatencyDistributionResponse", ", ", "APMRouteCreateOptions", + ">; \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\": ", + "ServerRoute", + "<\"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ serviceName: ", + "StringC", + "; groupId: ", + "StringC", + "; }>; query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ environment: ", + "UnionC", + "<[", + "LiteralC", + "<\"ENVIRONMENT_NOT_DEFINED\">, ", + "LiteralC", + "<\"ENVIRONMENT_ALL\">, ", + "BrandC", + "<", + "StringC", + ", ", + "NonEmptyStringBrand", + ">]>; }>, ", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>, ", + "PartialC", + "<{ offset: ", + "StringC", + "; }>, ", + "TypeC", + "<{ numBuckets: ", + "Type", + "; }>]>; }>, ", + { + "pluginId": "apm", + "scope": "server", + "docId": "kibApmPluginApi", + "section": "def-server.APMRouteHandlerResources", + "text": "APMRouteHandlerResources" + }, + ", { topErroneousTransactions: { transactionName: string; currentPeriodTimeseries: { x: number; y: number; }[]; previousPeriodTimeseries: { x: number; y: number; }[]; transactionType: string | undefined; occurrences: number; }[]; }, ", + "APMRouteCreateOptions", ">; \"GET /internal/apm/services/{serviceName}/errors/distribution\": ", "ServerRoute", "<\"GET /internal/apm/services/{serviceName}/errors/distribution\", ", @@ -5068,6 +5122,58 @@ "Maybe", "; }[]; groupId: string; }>; }, ", "APMRouteCreateOptions", + ">; \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\": ", + "ServerRoute", + "<\"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ serviceName: ", + "StringC", + "; }>; query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ transactionType: ", + "StringC", + "; transactionName: ", + "StringC", + "; maxNumberOfErrorGroups: ", + "Type", + "; }>, ", + "TypeC", + "<{ environment: ", + "UnionC", + "<[", + "LiteralC", + "<\"ENVIRONMENT_NOT_DEFINED\">, ", + "LiteralC", + "<\"ENVIRONMENT_ALL\">, ", + "BrandC", + "<", + "StringC", + ", ", + "NonEmptyStringBrand", + ">]>; }>, ", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>]>; }>, ", + { + "pluginId": "apm", + "scope": "server", + "docId": "kibApmPluginApi", + "section": "def-server.APMRouteHandlerResources", + "text": "APMRouteHandlerResources" + }, + ", { errorGroups: { groupId: string; name: string; lastSeen: number; occurrences: number; culprit: string | undefined; handled: boolean | undefined; type: string | undefined; }[]; }, ", + "APMRouteCreateOptions", ">; \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\": ", "ServerRoute", "<\"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\", ", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 8730e14f8beb5..a897de724a61a 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github summary: API docs for the apm plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/banners.devdocs.json b/api_docs/banners.devdocs.json index d370967767d93..eae41491a43d2 100644 --- a/api_docs/banners.devdocs.json +++ b/api_docs/banners.devdocs.json @@ -38,7 +38,7 @@ "label": "placement", "description": [], "signature": [ - "\"disabled\" | \"top\"" + "\"top\" | \"disabled\"" ], "path": "x-pack/plugins/banners/common/types.ts", "deprecated": false @@ -129,7 +129,7 @@ "label": "BannerPlacement", "description": [], "signature": [ - "\"disabled\" | \"top\"" + "\"top\" | \"disabled\"" ], "path": "x-pack/plugins/banners/common/types.ts", "deprecated": false, diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index d8f2405083928..1098b7e9128a8 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github summary: API docs for the banners plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 463a6033a3fa2..51707411e4a75 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github summary: API docs for the bfetch plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 986d62a680b9b..437d6b528adb7 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github summary: API docs for the canvas plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cases.devdocs.json b/api_docs/cases.devdocs.json index 9cffcdc9c4385..01257a8b90c82 100644 --- a/api_docs/cases.devdocs.json +++ b/api_docs/cases.devdocs.json @@ -490,7 +490,15 @@ "signature": [ "{ features?: Partial<", "CasesContextFeatures", - "> | undefined; basePath?: string | undefined; onClose?: (() => void) | undefined; owner: string[]; permissions: { all: boolean; read: boolean; }; releasePhase?: ", + "> | undefined; basePath?: string | undefined; onClose?: (() => void) | undefined; owner: string[]; permissions: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; releasePhase?: ", "ReleasePhase", " | undefined; hiddenStatuses?: ", "CaseStatusWithAllStatus", @@ -518,7 +526,15 @@ "signature": [ "{ features?: Partial<", "CasesContextFeatures", - "> | undefined; basePath?: string | undefined; owner: string[]; permissions: { all: boolean; read: boolean; }; onComponentInitialized?: (() => void) | undefined; actionsNavigation?: ", + "> | undefined; basePath?: string | undefined; owner: string[]; permissions: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; onComponentInitialized?: (() => void) | undefined; actionsNavigation?: ", "CasesNavigation", " | undefined; ruleDetailsNavigation?: ", "CasesNavigation", @@ -552,7 +568,15 @@ "signature": [ "{ features?: Partial<", "CasesContextFeatures", - "> | undefined; basePath?: string | undefined; onClose?: (() => void) | undefined; owner: string[]; permissions: { all: boolean; read: boolean; }; releasePhase?: ", + "> | undefined; basePath?: string | undefined; onClose?: (() => void) | undefined; owner: string[]; permissions: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; releasePhase?: ", "ReleasePhase", " | undefined; afterCaseCreated?: ((theCase: ", { @@ -596,7 +620,15 @@ "signature": [ "{ features?: Partial<", "CasesContextFeatures", - "> | undefined; basePath?: string | undefined; owner: string[]; permissions: { all: boolean; read: boolean; }; releasePhase?: ", + "> | undefined; basePath?: string | undefined; owner: string[]; permissions: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; releasePhase?: ", "ReleasePhase", " | undefined; maxCasesToShow: number; }" ], @@ -818,7 +850,23 @@ "signature": [ "{ canUseCases: (owners?: ", "CasesOwners", - "[] | undefined) => { crud: boolean; read: boolean; }; getRuleIdFromEvent: (event: Event) => { id: string; name: string; }; groupAlertsByRule: (items: Event[], owner: string) => ", + "[]) => ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; getUICapabilities: (featureCapabilities?: Partial>> | undefined) => ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CasesPermissions", + "text": "CasesPermissions" + }, + "; getRuleIdFromEvent: (event: Event) => { id: string; name: string; }; groupAlertsByRule: (items: Event[], owner: string) => ", { "pluginId": "cases", "scope": "public", @@ -1057,6 +1105,24 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "cases", + "id": "def-common.createUICapabilities", + "type": "Function", + "tags": [], + "label": "createUICapabilities", + "description": [ + "\nReturn the UI capabilities for each type of operation. These strings must match the values defined in the UI\nhere: x-pack/plugins/cases/public/client/helpers/capabilities.ts" + ], + "signature": [ + "() => { all: readonly [\"create_cases\", \"read_cases\", \"update_cases\", \"push_cases\"]; read: readonly [\"read_cases\"]; delete: readonly [\"delete_cases\"]; }" + ], + "path": "x-pack/plugins/cases/common/utils/capabilities.ts", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.getAllConnectorsUrl", @@ -1163,6 +1229,79 @@ } ], "interfaces": [ + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions", + "type": "Interface", + "tags": [], + "label": "CasesPermissions", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.all", + "type": "boolean", + "tags": [], + "label": "all", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.create", + "type": "boolean", + "tags": [], + "label": "create", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.read", + "type": "boolean", + "tags": [], + "label": "read", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.update", + "type": "boolean", + "tags": [], + "label": "update", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.delete", + "type": "boolean", + "tags": [], + "label": "delete", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesPermissions.push", + "type": "boolean", + "tags": [], + "label": "push", + "description": [], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.Ecs", @@ -1398,6 +1537,64 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "cases", + "id": "def-common.CREATE_CASES_CAPABILITY", + "type": "string", + "tags": [], + "label": "CREATE_CASES_CAPABILITY", + "description": [ + "\nCases UI Capabilities" + ], + "signature": [ + "\"create_cases\"" + ], + "path": "x-pack/plugins/cases/common/constants.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.DELETE_CASES_CAPABILITY", + "type": "string", + "tags": [], + "label": "DELETE_CASES_CAPABILITY", + "description": [], + "signature": [ + "\"delete_cases\"" + ], + "path": "x-pack/plugins/cases/common/constants.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.PUSH_CASES_CAPABILITY", + "type": "string", + "tags": [], + "label": "PUSH_CASES_CAPABILITY", + "description": [], + "signature": [ + "\"push_cases\"" + ], + "path": "x-pack/plugins/cases/common/constants.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.READ_CASES_CAPABILITY", + "type": "string", + "tags": [], + "label": "READ_CASES_CAPABILITY", + "description": [], + "signature": [ + "\"read_cases\"" + ], + "path": "x-pack/plugins/cases/common/constants.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.SECURITY_SOLUTION_OWNER", @@ -1427,6 +1624,20 @@ "path": "x-pack/plugins/cases/common/ui/types.ts", "deprecated": false, "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.UPDATE_CASES_CAPABILITY", + "type": "string", + "tags": [], + "label": "UPDATE_CASES_CAPABILITY", + "description": [], + "signature": [ + "\"update_cases\"" + ], + "path": "x-pack/plugins/cases/common/constants.ts", + "deprecated": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 51472be3d0720..1a948652ee7fd 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github summary: API docs for the cases plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) for qu | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 68 | 0 | 54 | 28 | +| 81 | 0 | 65 | 28 | ## Client diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 2adb2fc9eccbf..d7473dab06bba 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github summary: API docs for the charts plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 2afff6557bcab..6f8a35078abe5 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloud plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index c26f1d8683db9..54d35e45def45 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloudSecurityPosture plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 094305df01eee..7ea5b3bdcff93 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github summary: API docs for the console plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json index 2e20885112df4..b1189a4f4c829 100644 --- a/api_docs/controls.devdocs.json +++ b/api_docs/controls.devdocs.json @@ -2832,7 +2832,7 @@ "label": "chainingSystem", "description": [], "signature": [ - "\"HIERARCHICAL\" | \"NONE\"" + "\"NONE\" | \"HIERARCHICAL\"" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false @@ -3831,7 +3831,7 @@ "section": "def-common.RawControlGroupAttributes", "text": "RawControlGroupAttributes" }, - ", \"id\" | \"type\">" + ", \"type\" | \"id\">" ], "path": "src/plugins/controls/common/control_group/control_group_persistence.ts", "deprecated": false, @@ -3893,7 +3893,7 @@ "label": "chainingSystem", "description": [], "signature": [ - "\"HIERARCHICAL\" | \"NONE\"" + "\"NONE\" | \"HIERARCHICAL\"" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 988a33e511c60..ec30188443d86 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github summary: API docs for the controls plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index d2573ca167afc..685eb20cf0799 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -645,6 +645,9 @@ "description": [ "\nAnalytics client's public APIs" ], + "signature": [ + "AnalyticsClient" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -1675,6 +1678,9 @@ "description": [ "\nContains all the required information to apply Kibana's theme at the various levels it can be used.\n" ], + "signature": [ + "CoreTheme" + ], "path": "node_modules/@types/kbn__core-theme-browser/index.d.ts", "deprecated": false, "children": [ @@ -1702,6 +1708,9 @@ "description": [ "\nDeprecationsService provides methods to fetch domain deprecation details from\nthe Kibana server.\n" ], + "signature": [ + "DeprecationsServiceStart" + ], "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [ @@ -1838,6 +1847,9 @@ "tags": [], "label": "DocLinksStart", "description": [], + "signature": [ + "DocLinksStart" + ], "path": "node_modules/@types/kbn__core-doc-links-browser/index.d.ts", "deprecated": false, "children": [ @@ -1884,6 +1896,9 @@ "tags": [], "label": "EnvironmentMode", "description": [], + "signature": [ + "EnvironmentMode" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -1991,6 +2006,9 @@ "description": [ "\nDefinition of the full event structure" ], + "signature": [ + "Event" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -2060,6 +2078,9 @@ "description": [ "\nDefinition of the context that can be appended to the events through the {@link IAnalyticsClient.registerContextProvider}." ], + "signature": [ + "EventContext" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -2288,6 +2309,9 @@ "description": [ "\nKibana execution context.\nUsed to provide execution context to Elasticsearch, reporting, performance monitoring, etc." ], + "signature": [ + "ExecutionContextSetup" + ], "path": "node_modules/@types/kbn__core-execution-context-browser/index.d.ts", "deprecated": false, "children": [ @@ -2444,6 +2468,9 @@ "description": [ "\nRepresents the `message` and `stack` of a fatal Error\n" ], + "signature": [ + "FatalErrorInfo" + ], "path": "node_modules/@types/kbn__core-fatal-errors-browser/index.d.ts", "deprecated": false, "children": [ @@ -2482,6 +2509,9 @@ "description": [ "\nFatalErrors stop the Kibana Public Core and displays a fatal error screen\nwith details about the Kibana build and the error.\n" ], + "signature": [ + "FatalErrorsSetup" + ], "path": "node_modules/@types/kbn__core-fatal-errors-browser/index.d.ts", "deprecated": false, "children": [ @@ -2707,6 +2737,9 @@ "tags": [], "label": "HttpFetchQuery", "description": [], + "signature": [ + "HttpFetchQuery" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -2715,12 +2748,12 @@ "id": "def-public.HttpFetchQuery.Unnamed", "type": "IndexSignature", "tags": [], - "label": "[key: string]: string | number | boolean | string[] | number[] | boolean[] | null | undefined", + "label": "[key: string]: string | number | boolean | number[] | string[] | boolean[] | null | undefined", "description": [ "\nTypeScript note: Technically we should use this interface instead, but @types/node uses the below stricter\ndefinition, so to avoid TypeScript errors, we'll restrict our version.\n\n[key: string]:\n | string\n | number\n | boolean\n | Array\n | undefined\n | null;" ], "signature": [ - "[key: string]: string | number | boolean | string[] | number[] | boolean[] | null | undefined" + "[key: string]: string | number | boolean | number[] | string[] | boolean[] | null | undefined" ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false @@ -2737,6 +2770,9 @@ "description": [ "\nA function for making an HTTP requests to Kibana's backend. See {@link HttpFetchOptions} for options and\n{@link HttpResponse} for the response.\n" ], + "signature": [ + "HttpHandler" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -2804,6 +2840,9 @@ "description": [ "\nHeaders to append to the request. Any headers that begin with `kbn-` are considered private to Core and will cause\n{@link HttpHandler} to throw an error." ], + "signature": [ + "HttpHeadersInit" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -2832,6 +2871,9 @@ "description": [ "\nAn object that may define global interceptor functions for different parts of the request and response lifecycle.\nSee {@link IHttpInterceptController}.\n" ], + "signature": [ + "HttpInterceptor" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3078,6 +3120,9 @@ "tags": [], "label": "HttpInterceptorRequestError", "description": [], + "signature": [ + "HttpInterceptorRequestError" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3172,6 +3217,9 @@ "description": [ "\nFetch API options available to {@link HttpHandler}s.\n" ], + "signature": [ + "HttpRequestInit" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3464,6 +3512,9 @@ "tags": [], "label": "HttpSetup", "description": [], + "signature": [ + "HttpSetup" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3736,6 +3787,9 @@ "description": [ "\nI18nStart.Context is required by any localizable React component from \\@kbn/i18n and \\@elastic/eui packages\nand is supposed to be used as the topmost component for any i18n-compatible React tree.\n" ], + "signature": [ + "I18nStart" + ], "path": "node_modules/@types/kbn__core-i18n-browser/index.d.ts", "deprecated": false, "children": [ @@ -3794,6 +3848,9 @@ "description": [ "\nAPIs for denoting paths as not requiring authentication" ], + "signature": [ + "IAnonymousPaths" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3873,6 +3930,9 @@ "description": [ "\nAPIs for manipulating the basePath on URL segments." ], + "signature": [ + "IBasePath" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -3996,6 +4056,9 @@ "description": [ "\nAPIs for working with external URLs.\n" ], + "signature": [ + "IExternalUrl" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -4201,6 +4264,9 @@ "description": [ "\nUsed to halt a request Promise chain in a {@link HttpInterceptor}." ], + "signature": [ + "IHttpInterceptController" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -4294,6 +4360,9 @@ "description": [ "\nBasic structure of a Shipper" ], + "signature": [ + "IShipper" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -4451,6 +4520,9 @@ "description": [ "\nClient-side client that provides access to the advanced settings stored in elasticsearch.\nThe settings provide control over the behavior of the Kibana application.\nFor example, a user can specify how to display numeric or date fields.\nUsers can adjust the settings via Management UI.\n{@link IUiSettingsClient}\n" ], + "signature": [ + "IUiSettingsClient" + ], "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ @@ -5173,6 +5245,9 @@ "description": [ "\n" ], + "signature": [ + "OptInConfig" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -5508,7 +5583,7 @@ "label": "size", "description": [], "signature": [ - "\"m\" | \"s\" | \"l\" | undefined" + "\"s\" | \"m\" | \"l\" | undefined" ], "path": "src/core/public/overlays/flyout/flyout_service.tsx", "deprecated": false @@ -6459,6 +6534,9 @@ "tags": [], "label": "PackageInfo", "description": [], + "signature": [ + "PackageInfo" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -6749,6 +6827,9 @@ "tags": [], "label": "ResponseErrorBody", "description": [], + "signature": [ + "ResponseErrorBody" + ], "path": "node_modules/@types/kbn__core-http-browser/index.d.ts", "deprecated": false, "children": [ @@ -8595,6 +8676,9 @@ "description": [ "\nShape of the events emitted by the telemetryCounter$ observable" ], + "signature": [ + "TelemetryCounter" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -8671,6 +8755,9 @@ "tags": [], "label": "ThemeServiceSetup", "description": [], + "signature": [ + "ThemeServiceSetup" + ], "path": "node_modules/@types/kbn__core-theme-browser/index.d.ts", "deprecated": false, "children": [ @@ -8700,6 +8787,9 @@ "tags": [], "label": "ThemeServiceStart", "description": [], + "signature": [ + "ThemeServiceStart" + ], "path": "node_modules/@types/kbn__core-theme-browser/index.d.ts", "deprecated": false, "children": [ @@ -8831,14 +8921,14 @@ { "parentPluginId": "core", "id": "def-public.UiSettingsParams.options", - "type": "Array", + "type": "CompoundType", "tags": [], "label": "options", "description": [ "array of permitted values for this setting" ], "signature": [ - "string[] | undefined" + "number[] | string[] | undefined" ], "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false @@ -9009,6 +9099,9 @@ "tags": [], "label": "UiSettingsState", "description": [], + "signature": [ + "UiSettingsState" + ], "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ @@ -9531,7 +9624,7 @@ "signature": [ "{ metric?: { type: string; name: string; } | undefined; type?: ", "UiSettingsType", - " | undefined; value?: unknown; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + " | undefined; name?: string | undefined; order?: number | undefined; value?: unknown; description?: string | undefined; options?: number[] | string[] | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", "DeprecationSettings", " | undefined; }" ], @@ -9632,7 +9725,7 @@ "\nThe namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive:\n * single (default): This type of saved object is namespace-isolated, e.g., it exists in only one namespace.\n * multiple: This type of saved object is shareable, e.g., it can exist in one or more namespaces.\n * multiple-isolated: This type of saved object is namespace-isolated, e.g., it exists in only one namespace, but object IDs must be\n unique across all namespaces. This is intended to be an intermediate step when objects with a \"single\" namespace type are being\n converted to a \"multiple\" namespace type. In other words, objects with a \"multiple-isolated\" namespace type will be *share-capable*,\n but will not actually be shareable until the namespace type is changed to \"multiple\".\n * agnostic: This type of saved object is global.\n" ], "signature": [ - "\"multiple\" | \"single\" | \"multiple-isolated\" | \"agnostic\"" + "\"single\" | \"multiple\" | \"multiple-isolated\" | \"agnostic\"" ], "path": "src/core/server/saved_objects/types.ts", "deprecated": false, @@ -9690,7 +9783,7 @@ "signature": [ "Pick<", "Toast", - ", \"children\" | \"color\" | \"className\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\" | \"data-test-subj\"> & { title?: string | ", + ", \"children\" | \"color\" | \"className\" | \"lang\" | \"style\" | \"role\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"hidden\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\"> & { title?: string | ", { "pluginId": "core", "scope": "public", @@ -9747,7 +9840,7 @@ "signature": [ "Pick<", "Toast", - ", \"children\" | \"color\" | \"className\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\" | \"data-test-subj\"> & { title?: string | ", + ", \"children\" | \"color\" | \"className\" | \"lang\" | \"style\" | \"role\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"hidden\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\"> & { title?: string | ", { "pluginId": "core", "scope": "public", @@ -10751,6 +10844,9 @@ "description": [ "\nAnalytics client's public APIs" ], + "signature": [ + "AnalyticsClient" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -11314,6 +11410,9 @@ "description": [ "\nResult of auth redirection." ], + "signature": [ + "AuthRedirectedParams" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -11375,6 +11474,9 @@ "tags": [], "label": "AuthResultNotHandled", "description": [], + "signature": [ + "AuthResultNotHandled" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -11404,6 +11506,9 @@ "description": [ "\nResult of successful authentication." ], + "signature": [ + "AuthResultParams" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -11496,6 +11601,9 @@ "tags": [], "label": "AuthToolkit", "description": [], + "signature": [ + "AuthToolkit" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -11864,6 +11972,9 @@ "description": [ "\nDeprecation context provided to {@link ConfigDeprecation | config deprecations}\n" ], + "signature": [ + "ConfigDeprecationContext" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -11918,6 +12029,9 @@ "description": [ "\nProvides helpers to generates the most commonly used {@link ConfigDeprecation}\nwhen invoking a {@link ConfigDeprecationProvider}.\n\nSee methods documentation for more detailed examples.\n" ], + "signature": [ + "ConfigDeprecationFactory" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -13218,6 +13332,9 @@ "description": [ "\nUiSettings deprecation field options." ], + "signature": [ + "DeprecationSettings" + ], "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ @@ -13350,6 +13467,9 @@ "description": [ "\nSmall container object used to expose information about discovered plugins that may\nor may not have been started." ], + "signature": [ + "DiscoveredPlugin" + ], "path": "node_modules/@types/kbn__core-base-common/index.d.ts", "deprecated": false, "children": [ @@ -13465,6 +13585,9 @@ "tags": [], "label": "DocLinksServiceSetup", "description": [], + "signature": [ + "DocLinksServiceSetup" + ], "path": "node_modules/@types/kbn__core-doc-links-server/index.d.ts", "deprecated": false, "children": [ @@ -13943,6 +14066,9 @@ "tags": [], "label": "EnvironmentMode", "description": [], + "signature": [ + "EnvironmentMode" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -13991,6 +14117,9 @@ "description": [ "\nHTTP response parameters" ], + "signature": [ + "ErrorHttpResponseOptions" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -14038,6 +14167,9 @@ "description": [ "\nDefinition of the full event structure" ], + "signature": [ + "Event" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -14107,6 +14239,9 @@ "description": [ "\nDefinition of the context that can be appended to the events through the {@link IAnalyticsClient.registerContextProvider}." ], + "signature": [ + "EventContext" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -14333,6 +14468,9 @@ "tags": [], "label": "ExecutionContextSetup", "description": [], + "signature": [ + "ExecutionContextSetup" + ], "path": "node_modules/@types/kbn__core-execution-context-server/index.d.ts", "deprecated": false, "children": [ @@ -14426,7 +14564,7 @@ "Headers used for authentication against Elasticsearch" ], "signature": [ - "{ warning?: string | string[] | undefined; from?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; origin?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; origin?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "src/core/server/elasticsearch/types.ts", "deprecated": false @@ -14810,6 +14948,9 @@ "tags": [], "label": "HttpAuth", "description": [], + "signature": [ + "HttpAuth" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -15206,6 +15347,9 @@ "description": [ "\nHTTP response parameters" ], + "signature": [ + "HttpResponseOptions" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -15269,6 +15413,9 @@ "description": [ "\nInformation about what hostname, port, and protocol the server process is\nrunning on. Note that this may not match the URL that end-users access\nKibana at. For the public URL, see {@link BasePath.publicBaseUrl}." ], + "signature": [ + "HttpServerInfo" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -15790,6 +15937,9 @@ "tags": [], "label": "HttpServiceStart", "description": [], + "signature": [ + "HttpServiceStart" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -15900,6 +16050,9 @@ "description": [ "\nAccess or manipulate the Kibana base path\n" ], + "signature": [ + "IBasePath" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -16103,7 +16256,7 @@ "\nA {@link ElasticsearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user" ], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -16167,7 +16322,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -17233,8 +17388,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -17361,6 +17514,9 @@ "description": [ "\nAn object that handles registration of context providers and configuring handlers with context.\n" ], + "signature": [ + "IContextContainer" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -17518,6 +17674,9 @@ "description": [ "\nCSP configuration for use in Kibana." ], + "signature": [ + "ICspConfig" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -17628,6 +17787,9 @@ "tags": [], "label": "IExecutionContextContainer", "description": [], + "signature": [ + "IExecutionContextContainer" + ], "path": "node_modules/@types/kbn__core-execution-context-server/index.d.ts", "deprecated": false, "children": [ @@ -17675,6 +17837,9 @@ "description": [ "\nExternal Url configuration for use in Kibana." ], + "signature": [ + "IExternalUrlConfig" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -17706,6 +17871,9 @@ "description": [ "\nA policy describing whether access to an external destination is allowed." ], + "signature": [ + "IExternalUrlPolicy" + ], "path": "node_modules/@types/kbn__core-http-common/index.d.ts", "deprecated": false, "children": [ @@ -17818,6 +17986,9 @@ "description": [ "\nA tiny abstraction for TCP socket." ], + "signature": [ + "IKibanaSocket" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -18854,7 +19025,7 @@ "\nA {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster\non behalf of the internal Kibana user." ], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -18918,7 +19091,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -19984,8 +20157,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -20057,7 +20228,7 @@ "\nA {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster\non behalf of the user that initiated the request to the Kibana server." ], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -20121,7 +20294,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -21187,8 +21360,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -21262,6 +21433,9 @@ "description": [ "\nBasic structure of a Shipper" ], + "signature": [ + "IShipper" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -21804,7 +21978,7 @@ "\nReadonly copy of incoming request headers." ], "signature": [ - "{ warning?: string | string[] | undefined; from?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; origin?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; origin?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false @@ -21939,6 +22113,9 @@ "description": [ "\nRequest events." ], + "signature": [ + "KibanaRequestEvents" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22045,6 +22222,9 @@ "description": [ "\nLogger exposes all the necessary methods to log any type of information and\nthis is the interface used by the logging consumers including plugins.\n" ], + "signature": [ + "Logger" + ], "path": "node_modules/@types/kbn__logging/index.d.ts", "deprecated": false, "children": [ @@ -22417,6 +22597,9 @@ "description": [ "\nDescribes the configuration of a given logger.\n" ], + "signature": [ + "LoggerConfigType" + ], "path": "node_modules/@types/kbn__core-logging-server/index.d.ts", "deprecated": false, "children": [ @@ -22451,7 +22634,7 @@ "label": "level", "description": [], "signature": [ - "\"error\" | \"all\" | \"info\" | \"off\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\"" + "\"error\" | \"all\" | \"off\" | \"info\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\"" ], "path": "node_modules/@types/kbn__core-logging-server/index.d.ts", "deprecated": false @@ -22468,6 +22651,9 @@ "description": [ "\nInput used to configure logging dynamically using {@link LoggingServiceSetup.configure}" ], + "signature": [ + "LoggerContextConfigInput" + ], "path": "node_modules/@types/kbn__core-logging-server/index.d.ts", "deprecated": false, "children": [ @@ -22514,6 +22700,9 @@ "description": [ "\nThe single purpose of `LoggerFactory` interface is to define a way to\nretrieve a context-based logger instance.\n" ], + "signature": [ + "LoggerFactory" + ], "path": "node_modules/@types/kbn__logging/index.d.ts", "deprecated": false, "children": [ @@ -22564,6 +22753,9 @@ "description": [ "\nProvides APIs to plugins for customizing the plugin's logger." ], + "signature": [ + "LoggingServiceSetup" + ], "path": "node_modules/@types/kbn__core-logging-server/index.d.ts", "deprecated": false, "children": [ @@ -22672,6 +22864,9 @@ "description": [ "\nContains information about how this Kibana process has been configured.\n" ], + "signature": [ + "NodeInfo" + ], "path": "node_modules/@types/kbn__core-node-server/index.d.ts", "deprecated": false, "children": [ @@ -22702,6 +22897,9 @@ "description": [ "\nThe Kibana process can be run in dedicated \"modes\" via `node.roles`.\nThis configuration is then exposed to plugins via `NodeRoles`,\nwhich is available on the `PluginInitializerContext`.\n\nThe node roles can be used by plugins to adjust their behavior based\non the way the Kibana process has been configured.\n" ], + "signature": [ + "NodeRoles" + ], "path": "node_modules/@types/kbn__core-node-server/index.d.ts", "deprecated": false, "children": [ @@ -22824,6 +23022,9 @@ "tags": [], "label": "OnPostAuthToolkit", "description": [], + "signature": [ + "OnPostAuthToolkit" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22855,6 +23056,9 @@ "tags": [], "label": "OnPreAuthToolkit", "description": [], + "signature": [ + "OnPreAuthToolkit" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22888,6 +23092,9 @@ "description": [ "\nAdditional data to extend a response." ], + "signature": [ + "OnPreResponseExtensions" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22919,6 +23126,9 @@ "description": [ "\nResponse status code." ], + "signature": [ + "OnPreResponseInfo" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22944,6 +23154,9 @@ "description": [ "\nAdditional data to extend a response when rendering a new body" ], + "signature": [ + "OnPreResponseRender" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -22987,6 +23200,9 @@ "description": [ "\nA tool set defining an outcome of OnPreResponse interceptor for incoming request." ], + "signature": [ + "OnPreResponseToolkit" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -23071,6 +23287,9 @@ "tags": [], "label": "OnPreRoutingToolkit", "description": [], + "signature": [ + "OnPreRoutingToolkit" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -23574,6 +23793,9 @@ "description": [ "\n" ], + "signature": [ + "OptInConfig" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -23619,6 +23841,9 @@ "tags": [], "label": "PackageInfo", "description": [], + "signature": [ + "PackageInfo" + ], "path": "node_modules/@types/kbn__config/index.d.ts", "deprecated": false, "children": [ @@ -24293,7 +24518,7 @@ "label": "internalClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -24357,7 +24584,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -25423,8 +25650,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -25934,6 +26159,9 @@ "description": [ "\nAdditional body options for a route" ], + "signature": [ + "RouteConfigOptionsBody" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -26011,6 +26239,9 @@ "description": [ "\nValidation result factory to be used in the custom validation function to return the valid data or validation errors\n\nSee {@link RouteValidationFunction}.\n" ], + "signature": [ + "RouteValidationResultFactory" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -26169,6 +26400,9 @@ "description": [ "\nAdditional options for the RouteValidator class to modify its default behaviour.\n" ], + "signature": [ + "RouteValidatorOptions" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -26575,6 +26809,9 @@ "description": [ "\nReturn type from a function to validate cookie contents." ], + "signature": [ + "SessionCookieValidationResult" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "children": [ @@ -27121,6 +27358,9 @@ "description": [ "\nShape of the events emitted by the telemetryCounter$ observable" ], + "signature": [ + "TelemetryCounter" + ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, "children": [ @@ -27269,14 +27509,14 @@ { "parentPluginId": "core", "id": "def-server.UiSettingsParams.options", - "type": "Array", + "type": "CompoundType", "tags": [], "label": "options", "description": [ "array of permitted values for this setting" ], "signature": [ - "string[] | undefined" + "number[] | string[] | undefined" ], "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false @@ -27871,6 +28111,9 @@ "tags": [], "label": "AuthResultType", "description": [], + "signature": [ + "AuthResultType" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -27884,6 +28127,9 @@ "description": [ "\nStatus indicating an outcome of the authentication." ], + "signature": [ + "AuthStatus" + ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -27895,6 +28141,9 @@ "tags": [], "label": "PluginType", "description": [], + "signature": [ + "PluginType" + ], "path": "node_modules/@types/kbn__core-base-common/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -28599,7 +28848,7 @@ "label": "EcsEventType", "description": [], "signature": [ - "\"start\" | \"error\" | \"user\" | \"info\" | \"group\" | \"end\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"connection\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" + "\"start\" | \"error\" | \"end\" | \"group\" | \"user\" | \"info\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"connection\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" ], "path": "node_modules/@types/kbn__logging/index.d.ts", "deprecated": false, @@ -28615,7 +28864,7 @@ "\nClient used to query the elasticsearch cluster.\n" ], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -28679,7 +28930,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -29745,8 +29996,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -30058,7 +30307,7 @@ "\nHttp request headers to read." ], "signature": [ - "{ warning?: string | string[] | undefined; from?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; origin?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; origin?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, @@ -30391,7 +30640,7 @@ "\nSet of well-known HTTP headers." ], "signature": [ - "\"warning\" | \"from\" | \"date\" | \"expires\" | \"range\" | \"origin\" | \"location\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" + "\"from\" | \"origin\" | \"warning\" | \"location\" | \"date\" | \"expires\" | \"range\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, @@ -31066,7 +31315,7 @@ "signature": [ "{ metric?: { type: string; name: string; } | undefined; type?: ", "UiSettingsType", - " | undefined; value?: unknown; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + " | undefined; name?: string | undefined; order?: number | undefined; value?: unknown; description?: string | undefined; options?: number[] | string[] | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", "DeprecationSettings", " | undefined; }" ], @@ -31301,7 +31550,7 @@ "\nHttp response headers to set." ], "signature": [ - "Record<\"warning\" | \"from\" | \"date\" | \"expires\" | \"range\" | \"origin\" | \"location\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" + "Record<\"from\" | \"origin\" | \"warning\" | \"location\" | \"date\" | \"expires\" | \"range\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 56e16b3050365..f5b07956ee799 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github summary: API docs for the core plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_application.devdocs.json b/api_docs/core_application.devdocs.json index 2f6eb1eb8fd5e..fdf3dd24ed58d 100644 --- a/api_docs/core_application.devdocs.json +++ b/api_docs/core_application.devdocs.json @@ -2180,7 +2180,7 @@ "section": "def-public.AppStatus", "text": "AppStatus" }, - " | undefined; searchable?: boolean | undefined; deepLinks?: ", + " | undefined; tooltip?: string | undefined; searchable?: boolean | undefined; deepLinks?: ", { "pluginId": "core", "scope": "public", @@ -2196,7 +2196,7 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - " | undefined; defaultPath?: string | undefined; tooltip?: string | undefined; }" + " | undefined; defaultPath?: string | undefined; }" ], "path": "src/core/public/application/types.ts", "deprecated": false, diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx index 88f4cd2db44dd..568345edb99dd 100644 --- a/api_docs/core_application.mdx +++ b/api_docs/core_application.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-application title: "core.application" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.application plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.application'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_chrome.devdocs.json b/api_docs/core_chrome.devdocs.json index ca3b474153c88..29f26e65803cf 100644 --- a/api_docs/core_chrome.devdocs.json +++ b/api_docs/core_chrome.devdocs.json @@ -1924,7 +1924,7 @@ "signature": [ "React.HTMLAttributes & ", "CommonProps", - " & { href?: string | undefined; onClick?: React.MouseEventHandler | undefined; text: React.ReactNode; truncate?: boolean | undefined; color?: \"subdued\" | \"primary\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"text\" | \"ghost\" | undefined; 'aria-current'?: boolean | \"date\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | \"location\" | undefined; }" + " & { href?: string | undefined; onClick?: React.MouseEventHandler | undefined; text: React.ReactNode; truncate?: boolean | undefined; color?: \"primary\" | \"success\" | \"accent\" | \"warning\" | \"danger\" | \"text\" | \"subdued\" | \"ghost\" | undefined; 'aria-current'?: boolean | \"true\" | \"false\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | undefined; }" ], "path": "src/core/public/chrome/types.ts", "deprecated": false, @@ -1938,9 +1938,9 @@ "label": "ChromeHelpExtensionLinkBase", "description": [], "signature": [ - "{ iconType?: ", + "{ target?: string | (string & {}) | undefined; 'data-test-subj'?: string | undefined; iconType?: ", "IconType", - " | undefined; 'data-test-subj'?: string | undefined; rel?: string | undefined; target?: string | (string & {}) | undefined; }" + " | undefined; rel?: string | undefined; }" ], "path": "src/core/public/chrome/ui/header/header_help_menu.tsx", "deprecated": false, diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx index 32a4cf35438f1..a6c3a60f962a5 100644 --- a/api_docs/core_chrome.mdx +++ b/api_docs/core_chrome.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-chrome title: "core.chrome" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.chrome plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_saved_objects.devdocs.json b/api_docs/core_saved_objects.devdocs.json index 7f4ef1cc15a30..fbd61031711ac 100644 --- a/api_docs/core_saved_objects.devdocs.json +++ b/api_docs/core_saved_objects.devdocs.json @@ -9168,7 +9168,7 @@ "label": "typeRegistry", "description": [], "signature": [ - "{ getType: (type: string) => ", + "{ isHidden: (type: string) => boolean; getType: (type: string) => ", { "pluginId": "core", "scope": "server", @@ -9200,7 +9200,7 @@ "section": "def-server.SavedObjectsType", "text": "SavedObjectsType" }, - "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; isHidden: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" + "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" ], "path": "src/core/server/saved_objects/service/lib/scoped_client_provider.ts", "deprecated": false @@ -12531,7 +12531,7 @@ "label": "typeRegistry", "description": [], "signature": [ - "{ getType: (type: string) => ", + "{ isHidden: (type: string) => boolean; getType: (type: string) => ", { "pluginId": "core", "scope": "server", @@ -12563,7 +12563,7 @@ "section": "def-server.SavedObjectsType", "text": "SavedObjectsType" }, - "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; isHidden: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" + "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" ], "path": "src/core/server/saved_objects/saved_objects_route_handler_context.ts", "deprecated": false @@ -13514,7 +13514,7 @@ "\nThe {@link SavedObjectsNamespaceType | namespace type} for the type." ], "signature": [ - "\"multiple\" | \"single\" | \"multiple-isolated\" | \"agnostic\"" + "\"single\" | \"multiple\" | \"multiple-isolated\" | \"agnostic\"" ], "path": "src/core/server/saved_objects/types.ts", "deprecated": false @@ -14783,7 +14783,7 @@ "\nSee {@link SavedObjectTypeRegistry} for documentation.\n" ], "signature": [ - "{ getType: (type: string) => ", + "{ isHidden: (type: string) => boolean; getType: (type: string) => ", { "pluginId": "core", "scope": "server", @@ -14815,7 +14815,7 @@ "section": "def-server.SavedObjectsType", "text": "SavedObjectsType" }, - "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; isHidden: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" + "[]; isNamespaceAgnostic: (type: string) => boolean; isSingleNamespace: (type: string) => boolean; isMultiNamespace: (type: string) => boolean; isShareable: (type: string) => boolean; getIndex: (type: string) => string | undefined; isImportableAndExportable: (type: string) => boolean; }" ], "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", "deprecated": false, @@ -15445,7 +15445,7 @@ "label": "SavedObjectsCreatePointInTimeFinderOptions", "description": [], "signature": [ - "{ filter?: any; search?: string | undefined; type: string | string[]; aggs?: Record | undefined; fields?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ", "SortOrder", @@ -15647,7 +15647,7 @@ "\nThe namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive:\n * single (default): This type of saved object is namespace-isolated, e.g., it exists in only one namespace.\n * multiple: This type of saved object is shareable, e.g., it can exist in one or more namespaces.\n * multiple-isolated: This type of saved object is namespace-isolated, e.g., it exists in only one namespace, but object IDs must be\n unique across all namespaces. This is intended to be an intermediate step when objects with a \"single\" namespace type are being\n converted to a \"multiple\" namespace type. In other words, objects with a \"multiple-isolated\" namespace type will be *share-capable*,\n but will not actually be shareable until the namespace type is changed to \"multiple\".\n * agnostic: This type of saved object is global.\n" ], "signature": [ - "\"multiple\" | \"single\" | \"multiple-isolated\" | \"agnostic\"" + "\"single\" | \"multiple\" | \"multiple-isolated\" | \"agnostic\"" ], "path": "src/core/server/saved_objects/types.ts", "deprecated": false, diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx index 116e3a56e3e58..7105e1a5581a0 100644 --- a/api_docs/core_saved_objects.mdx +++ b/api_docs/core_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-savedObjects title: "core.savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.savedObjects plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/custom_integrations.devdocs.json b/api_docs/custom_integrations.devdocs.json index a56430796e324..c6b9ecd132fea 100644 --- a/api_docs/custom_integrations.devdocs.json +++ b/api_docs/custom_integrations.devdocs.json @@ -413,7 +413,7 @@ "label": "shipper", "description": [], "signature": [ - "\"beats\" | \"enterprise_search\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" + "\"other\" | \"beats\" | \"enterprise_search\" | \"language_clients\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false @@ -685,7 +685,7 @@ "label": "shipper", "description": [], "signature": [ - "\"beats\" | \"enterprise_search\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" + "\"other\" | \"beats\" | \"enterprise_search\" | \"language_clients\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false @@ -877,7 +877,7 @@ "\nThe list of all known shippers." ], "signature": [ - "(\"beats\" | \"enterprise_search\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\")[]" + "(\"other\" | \"beats\" | \"enterprise_search\" | \"language_clients\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\")[]" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, @@ -893,7 +893,7 @@ "\nA shipper-- an internal or external system capable of storing data in ES/Kibana-- applicable to an Integration." ], "signature": [ - "\"beats\" | \"enterprise_search\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" + "\"other\" | \"beats\" | \"enterprise_search\" | \"language_clients\" | \"sample_data\" | \"tests\" | \"tutorial\" | \"placeholders\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 3bd19babc28a7..71ba46d589c17 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github summary: API docs for the customIntegrations plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json index 288beaececaf2..1d35bf4683780 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -1731,7 +1731,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: string[]; getOwnField: string[]; }" ], "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", "deprecated": false @@ -2114,7 +2114,7 @@ "section": "def-common.RawSavedDashboardPanel730ToLatest", "text": "RawSavedDashboardPanel730ToLatest" }, - ", \"title\" | \"type\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }" + ", \"type\" | \"version\" | \"title\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2785,7 +2785,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanel640To720", - ", \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly type?: string | undefined; readonly name?: string | undefined; panelIndex: string; panelRefName?: string | undefined; }" + ", \"version\" | \"title\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\"> & { readonly type?: string | undefined; readonly name?: string | undefined; panelIndex: string; panelRefName?: string | undefined; }" ], "path": "src/plugins/dashboard/common/bwc/types.ts", "deprecated": false, @@ -2801,7 +2801,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanel610", - ", \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\"> & { readonly id: string; readonly type: string; }" + ", \"version\" | \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\"> & { readonly id: string; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2817,7 +2817,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanel620", - ", \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" + ", \"version\" | \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2833,7 +2833,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanel620", - ", \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" + ", \"version\" | \"title\" | \"columns\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2849,7 +2849,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanel640To720", - ", \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" + ", \"version\" | \"title\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2871,7 +2871,7 @@ "section": "def-common.RawSavedDashboardPanel730ToLatest", "text": "RawSavedDashboardPanel730ToLatest" }, - ", \"title\" | \"type\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }" + ", \"type\" | \"version\" | \"title\" | \"panelIndex\" | \"gridData\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -2887,7 +2887,7 @@ "signature": [ "Pick<", "RawSavedDashboardPanelTo60", - ", \"title\" | \"columns\" | \"sort\" | \"size_x\" | \"size_y\" | \"row\" | \"col\" | \"panelIndex\"> & { readonly id: string; readonly type: string; }" + ", \"title\" | \"row\" | \"columns\" | \"sort\" | \"size_x\" | \"size_y\" | \"col\" | \"panelIndex\"> & { readonly id: string; readonly type: string; }" ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index f3034074e4400..f8fb190ebd93f 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboard plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index f45056cab1ace..cb4a1eb386007 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboardEnhanced plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 140ce8e70bb5c..6b142a4d26846 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -3275,6 +3275,21 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-public.SearchSource.getActiveIndexFilter", + "type": "Function", + "tags": [], + "label": "getActiveIndexFilter", + "description": [], + "signature": [ + "() => string[]" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-public.SearchSource.getOwnField", @@ -3917,6 +3932,36 @@ "returnComment": [ "The expression AST." ] + }, + { + "parentPluginId": "data", + "id": "def-public.SearchSource.parseActiveIndexPatternFromQueryString", + "type": "Function", + "tags": [], + "label": "parseActiveIndexPatternFromQueryString", + "description": [], + "signature": [ + "(queryString: string) => string[]" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.SearchSource.parseActiveIndexPatternFromQueryString.$1", + "type": "string", + "tags": [], + "label": "queryString", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -8291,6 +8336,9 @@ "tags": [], "label": "ES_FIELD_TYPES", "description": [], + "signature": [ + "ES_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -8302,6 +8350,9 @@ "tags": [], "label": "KBN_FIELD_TYPES", "description": [], + "signature": [ + "KBN_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -8338,7 +8389,7 @@ "label": "AggConfigOptions", "description": [], "signature": [ - "{ id?: string | undefined; type: ", + "{ type: ", { "pluginId": "data", "scope": "common", @@ -8346,7 +8397,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; enabled?: boolean | undefined; params?: {} | ", + "; id?: string | undefined; enabled?: boolean | undefined; params?: {} | ", "SerializableRecord", " | undefined; schema?: string | undefined; }" ], @@ -9198,7 +9249,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: string[]; getOwnField: string[]; }" ], "path": "src/plugins/data/common/search/search_source/types.ts", "deprecated": false, @@ -9395,7 +9446,7 @@ "signature": [ "{ value: number; unit: ", "Unit", - "; type: \"calendar\" | \"fixed\"; }" + "; type: \"fixed\" | \"calendar\"; }" ], "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", "deprecated": false, @@ -10424,7 +10475,7 @@ "signature": [ "(interval: string) => { value: number; unit: ", "Unit", - "; type: \"calendar\" | \"fixed\"; }" + "; type: \"fixed\" | \"calendar\"; }" ], "path": "src/plugins/data/public/index.ts", "deprecated": false, @@ -11520,7 +11571,17 @@ "\nMap of field formats by field name" ], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -11617,7 +11678,7 @@ "label": "flattenHit", "description": [], "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" + "(hit: Record, deep?: boolean | undefined) => Record" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": true, @@ -11645,7 +11706,7 @@ "label": "hit", "description": [], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: unknown[]; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -13291,7 +13352,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear index pattern list cache." + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" ], "signature": [ "(id?: string | undefined) => void" @@ -13301,13 +13379,11 @@ "children": [ { "parentPluginId": "data", - "id": "def-server.DataViewsService.clearCache.$1", + "id": "def-server.DataViewsService.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", - "description": [ - "optionally clear a single id" - ], + "description": [], "signature": [ "string | undefined" ], @@ -13331,7 +13407,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -14456,7 +14538,16 @@ "\nGet rollup job capabilities" ], "signature": [ - "(indices: Record) => { [key: string]: any; }" + "(indices: ", + "RollupGetRollupIndexCapsResponse", + ") => ", + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.RollupIndexCapability", + "text": "RollupIndexCapability" + } ], "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", "deprecated": false, @@ -14471,7 +14562,7 @@ "rollup job index capabilites" ], "signature": [ - "Record" + "RollupGetRollupIndexCapsResponse" ], "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", "deprecated": false, @@ -15089,7 +15180,7 @@ "label": "elasticsearchClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -15153,7 +15246,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -16219,8 +16312,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -16638,6 +16729,9 @@ "tags": [], "label": "ES_FIELD_TYPES", "description": [], + "signature": [ + "ES_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -16649,6 +16743,9 @@ "tags": [], "label": "KBN_FIELD_TYPES", "description": [], + "signature": [ + "KBN_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -16729,7 +16826,7 @@ "signature": [ "{ value: number; unit: ", "Unit", - "; type: \"calendar\" | \"fixed\"; }" + "; type: \"fixed\" | \"calendar\"; }" ], "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", "deprecated": false, @@ -17954,7 +18051,17 @@ "\nMap of field formats by field name" ], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -18051,7 +18158,7 @@ "label": "flattenHit", "description": [], "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" + "(hit: Record, deep?: boolean | undefined) => Record" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": true, @@ -18079,7 +18186,7 @@ "label": "hit", "description": [], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: unknown[]; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -20432,7 +20539,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear index pattern list cache." + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" ], "signature": [ "(id?: string | undefined) => void" @@ -20442,13 +20566,11 @@ "children": [ { "parentPluginId": "data", - "id": "def-common.DataViewsService.clearCache.$1", + "id": "def-common.DataViewsService.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", - "description": [ - "optionally clear a single id" - ], + "description": [], "signature": [ "string | undefined" ], @@ -20472,7 +20594,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -21429,6 +21557,9 @@ "tags": [], "label": "KbnFieldType", "description": [], + "signature": [ + "KbnFieldType" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "children": [ @@ -22506,7 +22637,15 @@ "section": "def-common.GetFieldsOptions", "text": "GetFieldsOptions" }, - ") => Promise" + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]>" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -22654,6 +22793,9 @@ "tags": [], "label": "KbnFieldTypeOptions", "description": [], + "signature": [ + "KbnFieldTypeOptions" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "children": [ @@ -22903,7 +23045,7 @@ "\nGet a setting value" ], "signature": [ - "(key: string) => Promise" + "(key: string) => Promise" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -22954,7 +23096,7 @@ "\nSet a setting value" ], "signature": [ - "(key: string, value: T) => Promise" + "(key: string, value: T) => Promise" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -23053,6 +23195,9 @@ "tags": [], "label": "ES_FIELD_TYPES", "description": [], + "signature": [ + "ES_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -23064,6 +23209,9 @@ "tags": [], "label": "KBN_FIELD_TYPES", "description": [], + "signature": [ + "KBN_FIELD_TYPES" + ], "path": "node_modules/@types/kbn__field-types/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -23200,10 +23348,16 @@ "section": "def-common.DataViewListItem", "text": "DataViewListItem" }, - "[]>; clearCache: (id?: string | undefined) => void; getCache: () => Promise<", + "[]>; clearCache: () => void; clearInstanceCache: (id?: string | undefined) => void; getCache: () => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>; getDefault: () => Promise<", { "pluginId": "dataViews", @@ -23727,7 +23881,7 @@ "tags": [], "label": "DEFAULT_ASSETS_TO_IGNORE", "description": [ - "\nUsed to determine if the instance has any user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020" + "\nUsed to determine if the instance has some user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020" ], "path": "src/plugins/data_views/common/constants.ts", "deprecated": false, diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 61df290a1ec40..b2e9da3e8ab89 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github summary: API docs for the data plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3075 | 34 | 2402 | 21 | +| 3086 | 34 | 2413 | 21 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 8be2485775d9b..00f73a7ac4852 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.query plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3075 | 34 | 2402 | 21 | +| 3086 | 34 | 2413 | 21 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 65cfc70b670cd..d8983f1621c05 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -2860,9 +2860,9 @@ "label": "options", "description": [], "signature": [ - "{ filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; searchAfter?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ", + "> | undefined; fields?: string[] | undefined; searchAfter?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ", "SortOrder", " | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ", { @@ -6998,7 +6998,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: string[]; getOwnField: string[]; }" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false @@ -9722,6 +9722,21 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.SearchSource.getActiveIndexFilter", + "type": "Function", + "tags": [], + "label": "getActiveIndexFilter", + "description": [], + "signature": [ + "() => string[]" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.SearchSource.getOwnField", @@ -10364,6 +10379,36 @@ "returnComment": [ "The expression AST." ] + }, + { + "parentPluginId": "data", + "id": "def-common.SearchSource.parseActiveIndexPatternFromQueryString", + "type": "Function", + "tags": [], + "label": "parseActiveIndexPatternFromQueryString", + "description": [], + "signature": [ + "(queryString: string) => string[]" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.SearchSource.parseActiveIndexPatternFromQueryString.$1", + "type": "string", + "tags": [], + "label": "queryString", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data/common/search/search_source/search_source.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -15163,7 +15208,7 @@ "signature": [ "(interval: string) => { value: number; unit: ", "Unit", - "; type: \"calendar\" | \"fixed\"; }" + "; type: \"fixed\" | \"calendar\"; }" ], "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", "deprecated": false, @@ -20410,6 +20455,19 @@ "description": [], "path": "src/plugins/data/common/search/aggs/metrics/std_deviation.ts", "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsStdDeviation.showBounds", + "type": "CompoundType", + "tags": [], + "label": "showBounds", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/aggs/metrics/std_deviation.ts", + "deprecated": false } ], "initialIsOpen": false @@ -20623,12 +20681,12 @@ { "parentPluginId": "data", "id": "def-common.AggParamsTerms.exclude", - "type": "string", + "type": "CompoundType", "tags": [], "label": "exclude", "description": [], "signature": [ - "string | undefined" + "number[] | string[] | undefined" ], "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", "deprecated": false @@ -20636,12 +20694,38 @@ { "parentPluginId": "data", "id": "def-common.AggParamsTerms.include", - "type": "string", + "type": "CompoundType", "tags": [], "label": "include", "description": [], "signature": [ - "string | undefined" + "number[] | string[] | undefined" + ], + "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsTerms.includeIsRegex", + "type": "CompoundType", + "tags": [], + "label": "includeIsRegex", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsTerms.excludeIsRegex", + "type": "CompoundType", + "tags": [], + "label": "excludeIsRegex", + "description": [], + "signature": [ + "boolean | undefined" ], "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", "deprecated": false @@ -20694,7 +20778,7 @@ "label": "aggregate", "description": [], "signature": [ - "\"concat\" | \"min\" | \"max\" | \"sum\" | \"average\"" + "\"min\" | \"max\" | \"sum\" | \"concat\" | \"average\"" ], "path": "src/plugins/data/common/search/aggs/metrics/top_hit.ts", "deprecated": false @@ -26263,7 +26347,7 @@ "label": "AggConfigOptions", "description": [], "signature": [ - "{ id?: string | undefined; type: ", + "{ type: ", { "pluginId": "data", "scope": "common", @@ -26271,7 +26355,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; enabled?: boolean | undefined; params?: {} | ", + "; id?: string | undefined; enabled?: boolean | undefined; params?: {} | ", "SerializableRecord", " | undefined; schema?: string | undefined; }" ], @@ -27065,7 +27149,7 @@ "label": "CreateAggConfigParams", "description": [], "signature": [ - "{ id?: string | undefined; type: string | ", + "{ type: string | ", { "pluginId": "data", "scope": "common", @@ -27073,7 +27157,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; enabled?: boolean | undefined; params?: {} | ", + "; id?: string | undefined; enabled?: boolean | undefined; params?: {} | ", "SerializableRecord", " | undefined; schema?: string | undefined; }" ], @@ -29324,7 +29408,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: string[]; getOwnField: string[]; }" ], "path": "src/plugins/data/common/search/search_source/types.ts", "deprecated": false, @@ -29625,7 +29709,7 @@ "signature": [ "{ value: number; unit: ", "Unit", - "; type: \"calendar\" | \"fixed\"; }" + "; type: \"fixed\" | \"calendar\"; }" ], "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", "deprecated": false, @@ -29716,7 +29800,7 @@ "label": "SearchTypes", "description": [], "signature": [ - "string | number | boolean | object | string[] | number[] | boolean[] | object[] | undefined" + "string | number | boolean | object | number[] | string[] | boolean[] | object[] | undefined" ], "path": "src/plugins/data/common/search/expressions/eql_raw_response.ts", "deprecated": false, @@ -32168,7 +32252,7 @@ "label": "inputTypes", "description": [], "signature": [ - "(\"kibana_context\" | \"null\")[]" + "(\"null\" | \"kibana_context\")[]" ], "path": "src/plugins/data/common/search/expressions/kibana.ts", "deprecated": false diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 3b049a1d27a4a..118f29ebf2274 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.search plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3075 | 34 | 2402 | 21 | +| 3086 | 34 | 2413 | 21 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 432e7f61c8b7f..0bb4aa802aeac 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -4,13 +4,13 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewEditor plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- import dataViewEditorObj from './data_view_editor.devdocs.json'; -This plugin provides the ability to create data views via a modal flyout from any kibana app +This plugin provides the ability to create data views via a modal flyout inside Kibana apps Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) for questions regarding this plugin. diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index c985097784af0..fa8ffab9a17ee 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewFieldEditor plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 1aeb8bae0d401..a69b717cb5e8d 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewManagement plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index ada9c71be6610..67d2a65cd5a19 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -62,7 +62,17 @@ "\nMap of field formats by field name" ], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -159,7 +169,7 @@ "label": "flattenHit", "description": [], "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" + "(hit: Record, deep?: boolean | undefined) => Record" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": true, @@ -183,7 +193,7 @@ "label": "hit", "description": [], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: unknown[]; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -2268,7 +2278,15 @@ "section": "def-common.GetFieldsOptions", "text": "GetFieldsOptions" }, - ") => Promise" + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]>" ], "path": "src/plugins/data_views/public/data_views/data_views_api_client.ts", "deprecated": false, @@ -2892,7 +2910,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear index pattern list cache." + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" ], "signature": [ "(id?: string | undefined) => void" @@ -2902,13 +2937,11 @@ "children": [ { "parentPluginId": "dataViews", - "id": "def-public.DataViewsService.clearCache.$1", + "id": "def-public.DataViewsService.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", - "description": [ - "optionally clear a single id" - ], + "description": [], "signature": [ "string | undefined" ], @@ -2932,7 +2965,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -4086,7 +4125,23 @@ "label": "update", "description": [], "signature": [ - "(type: string, id: string, attributes: Record, options: Record) => Promise<", + "(type: string, id: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -4129,7 +4184,13 @@ "label": "attributes", "description": [], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/public/saved_objects_client_wrapper.ts", "deprecated": false, @@ -4143,7 +4204,14 @@ "label": "options", "description": [], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + "" ], "path": "src/plugins/data_views/public/saved_objects_client_wrapper.ts", "deprecated": false, @@ -4160,7 +4228,23 @@ "label": "create", "description": [], "signature": [ - "(type: string, attributes: Record, options: Record) => Promise<", + "(type: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options?: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + }, + " | undefined) => Promise<", "SavedObject", ">" ], @@ -4189,7 +4273,13 @@ "label": "attributes", "description": [], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/public/saved_objects_client_wrapper.ts", "deprecated": false, @@ -4203,11 +4293,18 @@ "label": "options", "description": [], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + }, + " | undefined" ], "path": "src/plugins/data_views/public/saved_objects_client_wrapper.ts", "deprecated": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] @@ -4324,7 +4421,7 @@ "label": "get", "description": [], "signature": [ - "(key: string) => Promise" + "(key: string) => Promise" ], "path": "src/plugins/data_views/public/ui_settings_wrapper.ts", "deprecated": false, @@ -4354,11 +4451,11 @@ "label": "getAll", "description": [], "signature": [ - "() => Promise() => Promise>>" + ") | undefined>>" ], "path": "src/plugins/data_views/public/ui_settings_wrapper.ts", "deprecated": false, @@ -4373,7 +4470,7 @@ "label": "set", "description": [], "signature": [ - "(key: string, value: any) => Promise" + "(key: string, value: unknown) => Promise" ], "path": "src/plugins/data_views/public/ui_settings_wrapper.ts", "deprecated": false, @@ -4395,12 +4492,12 @@ { "parentPluginId": "dataViews", "id": "def-public.UiSettingsPublicToCommon.set.$2", - "type": "Any", + "type": "Unknown", "tags": [], "label": "value", "description": [], "signature": [ - "any" + "unknown" ], "path": "src/plugins/data_views/public/ui_settings_wrapper.ts", "deprecated": false, @@ -5610,7 +5707,23 @@ "\nUpdate a saved object by id" ], "signature": [ - "(type: string, id: string, attributes: Record, options: Record) => Promise<", + "(type: string, id: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -5659,7 +5772,13 @@ "- attributes to update" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -5675,7 +5794,14 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + "" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -5694,7 +5820,23 @@ "\nCreate a saved object" ], "signature": [ - "(type: string, attributes: Record, options: Record) => Promise<", + "(type: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -5727,7 +5869,13 @@ "- attributes to set" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -5743,7 +5891,13 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -6029,7 +6183,7 @@ "\nRuntime field - type of value returned" ], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -6160,7 +6314,17 @@ "\nMap of field formats by field name" ], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -6257,7 +6421,7 @@ "label": "flattenHit", "description": [], "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" + "(hit: Record, deep?: boolean | undefined) => Record" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": true, @@ -6281,7 +6445,7 @@ "label": "hit", "description": [], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: unknown[]; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -8201,7 +8365,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear index pattern list cache." + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-server.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" ], "signature": [ "(id?: string | undefined) => void" @@ -8211,13 +8392,11 @@ "children": [ { "parentPluginId": "dataViews", - "id": "def-server.DataViewsService.clearCache.$1", + "id": "def-server.DataViewsService.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", - "description": [ - "optionally clear a single id" - ], + "description": [], "signature": [ "string | undefined" ], @@ -8241,7 +8420,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -9516,7 +9701,16 @@ "\nGet rollup job capabilities" ], "signature": [ - "(indices: Record) => { [key: string]: any; }" + "(indices: ", + "RollupGetRollupIndexCapsResponse", + ") => ", + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.RollupIndexCapability", + "text": "RollupIndexCapability" + } ], "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", "deprecated": false, @@ -9531,7 +9725,7 @@ "rollup job index capabilites" ], "signature": [ - "Record" + "RollupGetRollupIndexCapsResponse" ], "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", "deprecated": false, @@ -9867,6 +10061,44 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "dataViews", + "id": "def-server.RollupIndexCapability", + "type": "Interface", + "tags": [], + "label": "RollupIndexCapability", + "description": [ + "\nA record of capabilities (aggregations) for index rollup jobs" + ], + "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-server.RollupIndexCapability.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[index: string]: { aggs?: Dictionary | undefined; error?: string | undefined; }", + "description": [ + "\nA record of capabilities (aggregations) for an index rollup job" + ], + "signature": [ + "[index: string]: { aggs?: _.Dictionary<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.AggregationRestrictions", + "text": "AggregationRestrictions" + }, + "> | undefined; error?: string | undefined; }" + ], + "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "dataViews", "id": "def-server.SavedObjectsClientCommon", @@ -9991,7 +10223,23 @@ "\nUpdate a saved object by id" ], "signature": [ - "(type: string, id: string, attributes: Record, options: Record) => Promise<", + "(type: string, id: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -10040,7 +10288,13 @@ "- attributes to update" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -10056,7 +10310,14 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + "" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -10075,7 +10336,23 @@ "\nCreate a saved object" ], "signature": [ - "(type: string, attributes: Record, options: Record) => Promise<", + "(type: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -10108,7 +10385,13 @@ "- attributes to set" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -10124,7 +10407,13 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -10861,7 +11150,7 @@ "label": "elasticsearchClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -10925,7 +11216,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -11991,8 +12282,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -12165,7 +12454,17 @@ "\nMap of field formats by field name" ], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -12262,7 +12561,7 @@ "label": "flattenHit", "description": [], "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" + "(hit: Record, deep?: boolean | undefined) => Record" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": true, @@ -12286,7 +12585,7 @@ "label": "hit", "description": [], "signature": [ - "{ [x: string]: any; }" + "{ [x: string]: unknown[]; }" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false @@ -14654,7 +14953,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear index pattern list cache." + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" ], "signature": [ "(id?: string | undefined) => void" @@ -14664,13 +14980,11 @@ "children": [ { "parentPluginId": "dataViews", - "id": "def-common.DataViewsService.clearCache.$1", + "id": "def-common.DataViewsService.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", - "description": [ - "optionally clear a single id" - ], + "description": [], "signature": [ "string | undefined" ], @@ -14694,7 +15008,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -16438,7 +16758,7 @@ "signature": [ "Pick<", "Toast", - ", \"children\" | \"color\" | \"className\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\" | \"data-test-subj\"> & { title?: string | ", + ", \"children\" | \"color\" | \"className\" | \"lang\" | \"style\" | \"role\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"hidden\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\"> & { title?: string | ", { "pluginId": "core", "scope": "public", @@ -16612,7 +16932,24 @@ "tags": [], "label": "clearCache", "description": [ - "\nClear the cache of data views." + "\nClear the cache of data view saved objects." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataViewsServicePublicMethods.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear the cache of data view instances." ], "signature": [ "(id?: string | undefined) => void" @@ -16622,7 +16959,7 @@ "children": [ { "parentPluginId": "dataViews", - "id": "def-common.DataViewsServicePublicMethods.clearCache.$1", + "id": "def-common.DataViewsServicePublicMethods.clearInstanceCache.$1", "type": "string", "tags": [], "label": "id", @@ -17103,7 +17440,13 @@ "() => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", @@ -17985,7 +18328,15 @@ "section": "def-common.GetFieldsOptions", "text": "GetFieldsOptions" }, - ") => Promise" + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]>" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -18654,7 +19005,7 @@ "\nType of runtime field, can only be primitive type" ], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"geo_point\" | \"long\" | \"double\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"long\" | \"double\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -18963,7 +19314,23 @@ "\nUpdate a saved object by id" ], "signature": [ - "(type: string, id: string, attributes: Record, options: Record) => Promise<", + "(type: string, id: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -19012,7 +19379,13 @@ "- attributes to update" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19028,7 +19401,14 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + "" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19047,7 +19427,23 @@ "\nCreate a saved object" ], "signature": [ - "(type: string, attributes: Record, options: Record) => Promise<", + "(type: string, attributes: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ", options: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + }, + ") => Promise<", "SavedObject", ">" ], @@ -19080,7 +19476,13 @@ "- attributes to set" ], "signature": [ - "Record" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19096,7 +19498,13 @@ "- client options" ], "signature": [ - "Record" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + } ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19392,7 +19800,7 @@ "\nGet a setting value" ], "signature": [ - "(key: string) => Promise" + "(key: string) => Promise" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19443,7 +19851,7 @@ "\nSet a setting value" ], "signature": [ - "(key: string, value: T) => Promise" + "(key: string, value: T) => Promise" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -19589,6 +19997,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataViewSavedObjectAttrs", + "type": "Type", + "tags": [], + "label": "DataViewSavedObjectAttrs", + "description": [], + "signature": [ + "{ type?: string | undefined; name?: string | undefined; title: string; typeMeta?: string | undefined; }" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "dataViews", "id": "def-common.DataViewsContract", @@ -19639,10 +20061,16 @@ "section": "def-common.DataViewListItem", "text": "DataViewListItem" }, - "[]>; clearCache: (id?: string | undefined) => void; getCache: () => Promise<", + "[]>; clearCache: () => void; clearInstanceCache: (id?: string | undefined) => void; getCache: () => Promise<", "SavedObject", "<", - "DataViewSavedObjectAttrs", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, ">[] | null | undefined>; getDefault: () => Promise<", { "pluginId": "dataViews", @@ -20156,7 +20584,7 @@ "signature": [ "Pick<", "Toast", - ", \"children\" | \"color\" | \"className\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\" | \"data-test-subj\"> & { title?: string | ", + ", \"children\" | \"color\" | \"className\" | \"lang\" | \"style\" | \"role\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"hidden\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"toastLifeTimeMs\" | \"iconType\" | \"onClose\"> & { title?: string | ", { "pluginId": "core", "scope": "public", @@ -20202,7 +20630,7 @@ "\nRuntime field definition" ], "signature": [ - "{ type: \"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"; script?: { source: string; } | undefined; }" + "{ type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"; script?: { source: string; } | undefined; }" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -20249,7 +20677,7 @@ "\nRuntime field - type of value returned" ], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"long\" | \"double\" | \"composite\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -20265,7 +20693,7 @@ "\nPrimitive runtime field types" ], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"geo_point\" | \"long\" | \"double\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"long\" | \"double\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -20549,7 +20977,7 @@ "tags": [], "label": "DEFAULT_ASSETS_TO_IGNORE", "description": [ - "\nUsed to determine if the instance has any user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020" + "\nUsed to determine if the instance has some user created index patterns by filtering index patterns\nthat are created and backed only by Fleet server data\nShould be revised after https://github.com/elastic/kibana/issues/82851 is fixed\nFor more background see: https://github.com/elastic/kibana/issues/107020" ], "path": "src/plugins/data_views/common/constants.ts", "deprecated": false, diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index e54328e677243..f20f2382bfca4 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViews plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 938 | 1 | 199 | 1 | +| 945 | 0 | 203 | 0 | ## Client diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index f945bfc6e2930..37c627cf80451 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataVisualizer plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index accd8e8985cbd..499ad4334793c 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -13,6 +13,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| +| | visTypeGauge | - | +| | visTypePie | - | +| | visTypePie | - | | | alerting, discover, securitySolution | - | | | alerting, discover, securitySolution | - | | | actions, alerting | - | @@ -56,9 +59,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | actions, ml, enterpriseSearch, savedObjectsTagging | - | | | spaces, savedObjectsManagement | - | | | spaces, savedObjectsManagement | - | -| | visTypeGauge | - | -| | visTypePie | - | -| | visTypePie | - | | | console | - | | | stackAlerts, alerting, securitySolution, inputControlVis | 8.1 | | | stackAlerts, alerting, securitySolution, inputControlVis | 8.1 | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index f5e89b9dd8cba..6a1ea57aea28c 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index e5f81aef28c08..8868f93ec8e00 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team summary: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 39e4ba5303407..20ebfc84291fc 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github summary: API docs for the devTools plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 2235a6df372b5..558ae3d9d0452 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -647,7 +647,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: string[]; getOwnField: string[]; }" ], "path": "src/plugins/discover/public/services/saved_searches/types.ts", "deprecated": false @@ -930,6 +930,19 @@ ], "path": "src/plugins/discover/public/services/saved_searches/types.ts", "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.rowsPerPage", + "type": "number", + "tags": [], + "label": "rowsPerPage", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "src/plugins/discover/public/services/saved_searches/types.ts", + "deprecated": false } ], "initialIsOpen": false @@ -1054,6 +1067,19 @@ ], "path": "src/plugins/discover/public/embeddable/types.ts", "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.rowsPerPage", + "type": "number", + "tags": [], + "label": "rowsPerPage", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false } ], "initialIsOpen": false @@ -1406,6 +1432,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "discover", + "id": "def-common.SAMPLE_ROWS_PER_PAGE_SETTING", + "type": "string", + "tags": [], + "label": "SAMPLE_ROWS_PER_PAGE_SETTING", + "description": [], + "signature": [ + "\"discover:sampleRowsPerPage\"" + ], + "path": "src/plugins/discover/common/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "discover", "id": "def-common.SAMPLE_SIZE_SETTING", diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 3af0082f21259..43a0e0b59482b 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github summary: API docs for the discover plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 79 | 0 | 63 | 7 | +| 82 | 0 | 66 | 7 | ## Client diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 727a22fc0498e..669edb3032b44 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the discoverEnhanced plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/elastic_apm_synthtrace.mdx b/api_docs/elastic_apm_synthtrace.mdx index f78a462730cc7..fcab3e14cc589 100644 --- a/api_docs/elastic_apm_synthtrace.mdx +++ b/api_docs/elastic_apm_synthtrace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-apm-synthtrace title: "@elastic/apm-synthtrace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @elastic/apm-synthtrace plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-synthtrace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index 80b1999d682a5..a7343bfe9f6c9 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -9237,7 +9237,7 @@ "section": "def-public.EmbeddableFactory", "text": "EmbeddableFactory" }, - ", \"create\" | \"type\" | \"isEditable\" | \"getDisplayName\"> & Partial, \"type\" | \"create\" | \"isEditable\" | \"getDisplayName\"> & Partial, \"createFromSavedObject\" | \"isContainerType\" | \"getExplicitInput\" | \"savedObjectMetaData\" | \"canCreateNew\" | \"getDefaultInput\" | \"telemetry\" | \"extract\" | \"inject\" | \"migrations\" | \"grouping\" | \"getIconType\" | \"getDescription\">>" + ", \"telemetry\" | \"inject\" | \"extract\" | \"migrations\" | \"createFromSavedObject\" | \"isContainerType\" | \"getExplicitInput\" | \"savedObjectMetaData\" | \"canCreateNew\" | \"getDefaultInput\" | \"grouping\" | \"getIconType\" | \"getDescription\">>" ], "path": "src/plugins/embeddable/public/lib/embeddables/embeddable_factory_definition.ts", "deprecated": false, diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index ee81c48756d34..47dae44dedae4 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddable plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 1acc46793b3b3..78567c41c1b8c 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddableEnhanced plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index ec4f75ec8fee2..3d295e6f68ae2 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the encryptedSavedObjects plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 2706a8d892b0d..d6dcec886d4ab 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the enterpriseSearch plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 695e0246b3fa1..03ccb6764b485 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github summary: API docs for the esUiShared plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_annotation.devdocs.json b/api_docs/event_annotation.devdocs.json index 25eadc7becdbb..44dbbcb93afdb 100644 --- a/api_docs/event_annotation.devdocs.json +++ b/api_docs/event_annotation.devdocs.json @@ -252,6 +252,23 @@ "children": [], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.fetchEventAnnotations", + "type": "Function", + "tags": [], + "label": "fetchEventAnnotations", + "description": [], + "signature": [ + "() => ", + "FetchEventAnnotationsExpressionFunctionDefinition" + ], + "path": "src/plugins/event_annotation/common/fetch_event_annotations/index.ts", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -284,6 +301,63 @@ ], "path": "src/plugins/event_annotation/common/event_annotation_group/index.ts", "deprecated": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.EventAnnotationGroupArgs.index", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.IndexPatternExpressionType", + "text": "IndexPatternExpressionType" + }, + " | undefined" + ], + "path": "src/plugins/event_annotation/common/event_annotation_group/index.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.FetchEventAnnotationsArgs", + "type": "Interface", + "tags": [], + "label": "FetchEventAnnotationsArgs", + "description": [], + "path": "src/plugins/event_annotation/common/fetch_event_annotations/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "eventAnnotation", + "id": "def-common.FetchEventAnnotationsArgs.group", + "type": "Array", + "tags": [], + "label": "group", + "description": [], + "signature": [ + "EventAnnotationGroupOutput", + "[]" + ], + "path": "src/plugins/event_annotation/common/fetch_event_annotations/index.ts", + "deprecated": false + }, + { + "parentPluginId": "eventAnnotation", + "id": "def-common.FetchEventAnnotationsArgs.interval", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "path": "src/plugins/event_annotation/common/fetch_event_annotations/index.ts", + "deprecated": false } ], "initialIsOpen": false @@ -299,7 +373,7 @@ "label": "AvailableAnnotationIcon", "description": [], "signature": [ - "\"alert\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"circle\" | \"triangle\"" + "\"alert\" | \"circle\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"triangle\"" ], "path": "src/plugins/event_annotation/common/types.ts", "deprecated": false, @@ -773,7 +847,7 @@ "label": "options", "description": [], "signature": [ - "(\"alert\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"circle\" | \"triangle\")[]" + "(\"alert\" | \"circle\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"triangle\")[]" ], "path": "src/plugins/event_annotation/common/manual_event_annotation/index.ts", "deprecated": false diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 00254b6bdf741..7c3e5e9d553a4 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventAnnotation plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 90 | 0 | 90 | 5 | +| 95 | 0 | 95 | 6 | ## Client diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json index ee1604a8fa4a6..f5e74c98899b9 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -1123,7 +1123,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ error?: Readonly<{ message?: string | undefined; id?: string | undefined; type?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; id?: string | undefined; type?: string[] | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]" + "(Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; version?: string | undefined; description?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; original?: string | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false @@ -1142,7 +1142,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; id?: string | undefined; type?: string[] | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; version?: string | undefined; description?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; original?: string | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -1156,7 +1156,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ error?: Readonly<{ message?: string | undefined; id?: string | undefined; type?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; id?: string | undefined; type?: string[] | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined" + "Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; version?: string | undefined; description?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; original?: string | undefined; outcome?: string | undefined; created?: string | undefined; category?: string[] | undefined; url?: string | undefined; duration?: string | number | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 0ccfe05f61b4b..aa5a58256ea79 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventLog plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 4bb6a0debe5f2..747834024a674 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionError plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_gauge.devdocs.json b/api_docs/expression_gauge.devdocs.json index 89a17fbf23fa0..f40fb1a95cd51 100644 --- a/api_docs/expression_gauge.devdocs.json +++ b/api_docs/expression_gauge.devdocs.json @@ -714,7 +714,7 @@ "label": "labelMajorMode", "description": [], "signature": [ - "\"none\" | \"custom\" | \"auto\"" + "\"none\" | \"auto\" | \"custom\"" ], "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", "deprecated": false @@ -810,7 +810,7 @@ "label": "shape", "description": [], "signature": [ - "\"arc\" | \"circle\" | \"horizontalBullet\" | \"verticalBullet\"" + "\"horizontalBullet\" | \"verticalBullet\" | \"arc\" | \"circle\"" ], "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", "deprecated": false @@ -1058,7 +1058,7 @@ "label": "GaugeLabelMajorMode", "description": [], "signature": [ - "\"none\" | \"custom\" | \"auto\"" + "\"none\" | \"auto\" | \"custom\"" ], "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", "deprecated": false, @@ -1113,7 +1113,7 @@ "label": "GaugeShape", "description": [], "signature": [ - "\"arc\" | \"circle\" | \"horizontalBullet\" | \"verticalBullet\"" + "\"horizontalBullet\" | \"verticalBullet\" | \"arc\" | \"circle\"" ], "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", "deprecated": false, diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 6cff0a59c29ff..72cb6d8d24c81 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionGauge plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index b9a4b3dffb298..9a56ab94fe45a 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionHeatmap plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index f229794d468b6..79abbd1ce1241 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionImage plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index d4a796f2a1c96..e7b20028907e0 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionLegacyMetricVis plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric.devdocs.json b/api_docs/expression_metric.devdocs.json index 41f2f30c06789..b1d73f67c0240 100644 --- a/api_docs/expression_metric.devdocs.json +++ b/api_docs/expression_metric.devdocs.json @@ -174,7 +174,7 @@ "label": "metricFunction", "description": [], "signature": [ - "() => { name: \"metric\"; aliases: never[]; type: \"render\"; inputTypes: (\"number\" | \"string\" | \"null\")[]; help: string; args: { label: { types: \"string\"[]; aliases: string[]; help: string; default: string; }; labelFont: { types: \"style\"[]; help: string; default: string; }; metricFont: { types: \"style\"[]; help: string; default: string; }; metricFormat: { types: \"string\"[]; aliases: string[]; help: string; }; }; fn: (input: ", + "() => { name: \"metric\"; aliases: never[]; type: \"render\"; inputTypes: (\"number\" | \"null\" | \"string\")[]; help: string; args: { label: { types: \"string\"[]; aliases: string[]; help: string; default: string; }; labelFont: { types: \"style\"[]; help: string; default: string; }; metricFont: { types: \"style\"[]; help: string; default: string; }; metricFormat: { types: \"string\"[]; aliases: string[]; help: string; }; }; fn: (input: ", { "pluginId": "expressionMetric", "scope": "common", diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 26fab7967f41d..bb38f4cb4c2ab 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetric plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index b40a98b6ea614..22251646e207a 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetricVis plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 6d98ffe4574e4..da0ad82e4a3f7 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionPartitionVis plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_repeat_image.devdocs.json b/api_docs/expression_repeat_image.devdocs.json index bad9f3ee2cc7f..ac0e108e7bf21 100644 --- a/api_docs/expression_repeat_image.devdocs.json +++ b/api_docs/expression_repeat_image.devdocs.json @@ -174,7 +174,7 @@ "label": "repeatImageFunction", "description": [], "signature": [ - "() => { name: \"repeatImage\"; aliases: never[]; type: \"render\"; inputTypes: \"number\"[]; help: string; args: { emptyImage: { types: (\"string\" | \"null\")[]; help: string; default: null; }; image: { types: (\"string\" | \"null\")[]; help: string; default: null; }; max: { types: (\"number\" | \"null\")[]; help: string; default: number; }; size: { types: \"number\"[]; default: number; help: string; }; }; fn: (count: number, args: Arguments) => Promise<{ type: \"render\"; as: string; value: { image: string | null; emptyImage: string | null; size: number; max: number | null; count: number; }; }>; }" + "() => { name: \"repeatImage\"; aliases: never[]; type: \"render\"; inputTypes: \"number\"[]; help: string; args: { emptyImage: { types: (\"null\" | \"string\")[]; help: string; default: null; }; image: { types: (\"null\" | \"string\")[]; help: string; default: null; }; max: { types: (\"number\" | \"null\")[]; help: string; default: number; }; size: { types: \"number\"[]; default: number; help: string; }; }; fn: (count: number, args: Arguments) => Promise<{ type: \"render\"; as: string; value: { image: string | null; emptyImage: string | null; size: number; max: number | null; count: number; }; }>; }" ], "path": "src/plugins/expression_repeat_image/common/expression_functions/repeat_image_function.ts", "deprecated": false, diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 83847cbfa20eb..7313355ebdf57 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRepeatImage plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_reveal_image.devdocs.json b/api_docs/expression_reveal_image.devdocs.json index 04707c03c1660..0c1955f26aa13 100644 --- a/api_docs/expression_reveal_image.devdocs.json +++ b/api_docs/expression_reveal_image.devdocs.json @@ -162,7 +162,7 @@ "label": "revealImageFunction", "description": [], "signature": [ - "() => { name: \"revealImage\"; aliases: never[]; type: \"render\"; inputTypes: \"number\"[]; help: string; args: { image: { types: (\"string\" | \"null\")[]; help: string; default: null; }; emptyImage: { types: (\"string\" | \"null\")[]; help: string; default: null; }; origin: { types: \"string\"[]; help: string; default: string; options: ", + "() => { name: \"revealImage\"; aliases: never[]; type: \"render\"; inputTypes: \"number\"[]; help: string; args: { image: { types: (\"null\" | \"string\")[]; help: string; default: null; }; emptyImage: { types: (\"null\" | \"string\")[]; help: string; default: null; }; origin: { types: \"string\"[]; help: string; default: string; options: ", "Origin", "[]; }; }; fn: (percent: number, args: Arguments) => Promise<{ type: \"render\"; as: string; value: { image: string; emptyImage: string; origin: ", "Origin", diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index af10452b79ad9..6b149d4df94b2 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRevealImage plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index ad054fb3a2471..e3a58f66ad9a9 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionShape plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index f96fdb83a86aa..8d00e64570f61 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionTagcloud plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index 4f47ae934bf4d..ea7bc33c2cc8b 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -554,7 +554,7 @@ "label": "seriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\"" + "\"bar\" | \"line\" | \"area\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false @@ -1331,7 +1331,7 @@ "label": "valueLabels", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false @@ -1794,7 +1794,7 @@ "label": "AvailableReferenceLineIcon", "description": [], "signature": [ - "\"alert\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"empty\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"circle\" | \"triangle\"" + "\"alert\" | \"circle\" | \"asterisk\" | \"bell\" | \"bolt\" | \"bug\" | \"editorComment\" | \"flag\" | \"heart\" | \"mapMarker\" | \"pinFilled\" | \"starEmpty\" | \"tag\" | \"triangle\" | \"empty\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2116,7 +2116,7 @@ "label": "IconPosition", "description": [], "signature": [ - "\"above\" | \"below\" | \"left\" | \"right\" | \"auto\"" + "\"above\" | \"below\" | \"auto\" | \"left\" | \"right\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2130,7 +2130,7 @@ "label": "LayerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2287,7 +2287,7 @@ "label": "SeriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\"" + "\"bar\" | \"line\" | \"area\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2301,7 +2301,7 @@ "label": "ValueLabelMode", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2445,7 +2445,7 @@ "label": "YScaleType", "description": [], "signature": [ - "\"time\" | \"log\" | \"linear\" | \"sqrt\"" + "\"log\" | \"time\" | \"linear\" | \"sqrt\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 769711dd20f83..85fba6795c797 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionXY plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index dd9b0e90dcf4c..debb0fcd46543 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -6980,7 +6980,7 @@ "\nTracks state of execution.\n\n- `not-started` - before .start() method was called.\n- `pending` - immediately after .start() method is called.\n- `result` - when expression execution completed.\n- `error` - when execution failed with error." ], "signature": [ - "\"error\" | \"not-started\" | \"pending\" | \"result\"" + "\"error\" | \"result\" | \"not-started\" | \"pending\"" ], "path": "src/plugins/expressions/common/execution/container.ts", "deprecated": false @@ -10783,7 +10783,7 @@ "label": "padding", "description": [], "signature": [ - "\"m\" | \"s\" | \"xs\" | \"l\" | \"xl\" | undefined" + "\"s\" | \"m\" | \"l\" | \"xl\" | \"xs\" | undefined" ], "path": "src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.tsx", "deprecated": false @@ -10991,7 +10991,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -11584,7 +11584,7 @@ "\nAllowed column names in a PointSeries" ], "signature": [ - "\"color\" | \"size\" | \"text\" | \"y\" | \"x\"" + "\"color\" | \"size\" | \"x\" | \"y\" | \"text\"" ], "path": "src/plugins/expressions/common/expression_types/specs/pointseries.ts", "deprecated": false, @@ -17434,7 +17434,7 @@ "\nTracks state of execution.\n\n- `not-started` - before .start() method was called.\n- `pending` - immediately after .start() method is called.\n- `result` - when expression execution completed.\n- `error` - when execution failed with error." ], "signature": [ - "\"error\" | \"not-started\" | \"pending\" | \"result\"" + "\"error\" | \"result\" | \"not-started\" | \"pending\"" ], "path": "src/plugins/expressions/common/execution/container.ts", "deprecated": false @@ -20078,7 +20078,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -20599,7 +20599,7 @@ "\nAllowed column names in a PointSeries" ], "signature": [ - "\"color\" | \"size\" | \"text\" | \"y\" | \"x\"" + "\"color\" | \"size\" | \"x\" | \"y\" | \"text\"" ], "path": "src/plugins/expressions/common/expression_types/specs/pointseries.ts", "deprecated": false, @@ -27875,7 +27875,7 @@ "label": "type", "description": [], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false @@ -28753,7 +28753,7 @@ "\nTracks state of execution.\n\n- `not-started` - before .start() method was called.\n- `pending` - immediately after .start() method is called.\n- `result` - when expression execution completed.\n- `error` - when execution failed with error." ], "signature": [ - "\"error\" | \"not-started\" | \"pending\" | \"result\"" + "\"error\" | \"result\" | \"not-started\" | \"pending\"" ], "path": "src/plugins/expressions/common/execution/container.ts", "deprecated": false @@ -33590,7 +33590,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -34668,7 +34668,7 @@ "label": "MathArguments", "description": [], "signature": [ - "{ expression: string; onError?: \"null\" | \"false\" | \"zero\" | \"throw\" | undefined; }" + "{ expression: string; onError?: \"false\" | \"null\" | \"zero\" | \"throw\" | undefined; }" ], "path": "src/plugins/expressions/common/expression_functions/specs/math.ts", "deprecated": false, @@ -34758,7 +34758,7 @@ "\nAllowed column names in a PointSeries" ], "signature": [ - "\"color\" | \"size\" | \"text\" | \"y\" | \"x\"" + "\"color\" | \"size\" | \"x\" | \"y\" | \"text\"" ], "path": "src/plugins/expressions/common/expression_types/specs/pointseries.ts", "deprecated": false, @@ -38182,7 +38182,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"null\")[]" + "(\"null\" | \"string\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/map_column.ts", "deprecated": false @@ -38304,7 +38304,7 @@ "label": "types", "description": [], "signature": [ - "(\"number\" | \"string\" | \"boolean\" | \"null\")[]" + "(\"number\" | \"null\" | \"boolean\" | \"string\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/map_column.ts", "deprecated": false @@ -38378,7 +38378,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"null\")[]" + "(\"null\" | \"string\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/map_column.ts", "deprecated": false @@ -38674,7 +38674,7 @@ "label": "options", "description": [], "signature": [ - "(\"null\" | \"false\" | \"zero\" | \"throw\")[]" + "(\"false\" | \"null\" | \"zero\" | \"throw\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/math.ts", "deprecated": false @@ -38977,7 +38977,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"null\")[]" + "(\"null\" | \"string\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/math_column.ts", "deprecated": false @@ -40274,7 +40274,7 @@ "label": "options", "description": [], "signature": [ - "(\"min\" | \"max\" | \"sum\" | \"average\")[]" + "(\"sum\" | \"min\" | \"max\" | \"average\")[]" ], "path": "src/plugins/expressions/common/expression_functions/specs/overall_metric.ts", "deprecated": false diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index f801f706d9171..5da9289aaf7ca 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressions plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/features.mdx b/api_docs/features.mdx index b8902e45cf670..635bf2b76c598 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github summary: API docs for the features plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 5275befa23274..91231a1bcd6b2 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github summary: API docs for the fieldFormats plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 11b4fed345f4e..687d40d352579 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github summary: API docs for the fileUpload plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 08aa1d377af7d..76fe5353ae1ae 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -11097,7 +11097,7 @@ "label": "body", "description": [], "signature": [ - "{ description?: string | undefined; name: string; }" + "{ name: string; description?: string | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", "deprecated": false @@ -20308,7 +20308,7 @@ "section": "def-common.ValueOf", "text": "ValueOf" }, - "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; namespace: string; updated_by: string; is_managed: boolean; is_default?: boolean | undefined; is_default_fleet_server?: boolean | undefined; has_fleet_server?: boolean | undefined; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | null | undefined; monitoring_output_id?: string | null | undefined; download_source_id?: string | null | undefined; package_policies: string[] | ", + "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; name: string; description?: string | undefined; updated_at: string; namespace: string; updated_by: string; is_managed: boolean; is_default?: boolean | undefined; is_default_fleet_server?: boolean | undefined; has_fleet_server?: boolean | undefined; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | null | undefined; monitoring_output_id?: string | null | undefined; download_source_id?: string | null | undefined; package_policies: string[] | ", { "pluginId": "fleet", "scope": "common", @@ -20372,7 +20372,7 @@ "label": "AgentStatus", "description": [], "signature": [ - "\"error\" | \"offline\" | \"online\" | \"warning\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" + "\"error\" | \"warning\" | \"offline\" | \"online\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, @@ -22355,7 +22355,7 @@ "label": "PackagePolicySOAttributes", "description": [], "signature": [ - "{ package?: ", + "{ name: string; package?: ", { "pluginId": "fleet", "scope": "common", @@ -22363,7 +22363,7 @@ "section": "def-common.PackagePolicyPackage", "text": "PackagePolicyPackage" }, - " | undefined; description?: string | undefined; name: string; enabled: boolean; updated_at: string; namespace: string; created_at: string; created_by: string; updated_by: string; vars?: ", + " | undefined; description?: string | undefined; enabled: boolean; updated_at: string; namespace: string; created_at: string; created_by: string; updated_by: string; vars?: ", { "pluginId": "fleet", "scope": "common", @@ -22685,7 +22685,7 @@ "label": "RegistrySearchResult", "description": [], "signature": [ - "{ download: string; title: string; type?: \"integration\" | undefined; description: string; icons?: (", + "{ type?: \"integration\" | undefined; name: string; path: string; version: string; title: string; download: string; description: string; icons?: (", { "pluginId": "fleet", "scope": "common", @@ -22709,7 +22709,7 @@ "section": "def-common.PackageSpecCategory", "text": "PackageSpecCategory" }, - " | undefined)[] | undefined; name: string; version: string; path: string; internal?: boolean | undefined; data_streams?: ", + " | undefined)[] | undefined; internal?: boolean | undefined; data_streams?: ", { "pluginId": "fleet", "scope": "common", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index aca1a18de9763..173c7d7087e8d 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github summary: API docs for the fleet plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index f509bbceab1bb..7b4af1f64ea80 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the globalSearch plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/home.devdocs.json b/api_docs/home.devdocs.json index 5555cbb412958..6007d62a8816f 100644 --- a/api_docs/home.devdocs.json +++ b/api_docs/home.devdocs.json @@ -375,7 +375,7 @@ "{@link FeatureCatalogueCategory} to display this feature in." ], "signature": [ - "\"data\" | \"other\" | \"admin\"" + "\"other\" | \"data\" | \"admin\"" ], "path": "src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.ts", "deprecated": false @@ -708,7 +708,7 @@ "label": "FeatureCatalogueCategory", "description": [], "signature": [ - "\"data\" | \"other\" | \"admin\"" + "\"other\" | \"data\" | \"admin\"" ], "path": "src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.ts", "deprecated": false, @@ -1584,7 +1584,7 @@ "label": "ArtifactsSchema", "description": [], "signature": [ - "{ readonly application?: Readonly<{} & { label: string; path: string; }> | undefined; readonly exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; readonly dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }" + "{ readonly application?: Readonly<{} & { path: string; label: string; }> | undefined; readonly exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; readonly dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -1598,7 +1598,7 @@ "label": "InstructionSetSchema", "description": [], "signature": [ - "{ readonly title?: string | undefined; readonly callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; readonly statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; readonly instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }" + "{ readonly title?: string | undefined; readonly callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; readonly statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; readonly instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -1612,7 +1612,7 @@ "label": "InstructionsSchema", "description": [], "signature": [ - "{ readonly params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" + "{ readonly params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -1628,7 +1628,7 @@ "signature": [ "{ getSampleDatasets: () => ", "Writable", - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", "SavedObject", "[]) => void; addAppLinksToSampleDataset: (id: string, appLinks: ", { @@ -1662,7 +1662,7 @@ "signature": [ "() => ", "Writable", - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" + "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" ], "path": "src/plugins/home/server/services/sample_data/lib/sample_dataset_registry_types.ts", "deprecated": false, @@ -1716,7 +1716,7 @@ "section": "def-server.TutorialContext", "text": "TutorialContext" }, - ") => Readonly<{ isBeta?: boolean | undefined; savedObjects?: any[] | undefined; euiIconType?: string | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"other\" | \"security\" | \"metrics\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" + ") => Readonly<{ isBeta?: boolean | undefined; savedObjects?: any[] | undefined; euiIconType?: string | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"other\" | \"security\" | \"metrics\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts", "deprecated": false, @@ -1752,7 +1752,7 @@ "label": "TutorialSchema", "description": [], "signature": [ - "{ readonly isBeta?: boolean | undefined; readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"other\" | \"security\" | \"metrics\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; id: string; type: \"string\" | \"number\"; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; success?: string | undefined; text?: string | undefined; title?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" + "{ readonly isBeta?: boolean | undefined; readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"other\" | \"security\" | \"metrics\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; title?: string | undefined; success?: string | undefined; text?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -2021,7 +2021,7 @@ "signature": [ "{ getSampleDatasets: () => ", "Writable", - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", "SavedObject", "[]) => void; addAppLinksToSampleDataset: (id: string, appLinks: ", { diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 8e85eec907cb5..fc9a532f228c5 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github summary: API docs for the home plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 3ddfa9472cee9..540a4144787b1 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexLifecycleManagement plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_management.devdocs.json b/api_docs/index_management.devdocs.json index e2d722c677307..8c93e29dd27e9 100644 --- a/api_docs/index_management.devdocs.json +++ b/api_docs/index_management.devdocs.json @@ -851,6 +851,32 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "indexManagement", + "id": "def-common.ComponentTemplateDatastreams", + "type": "Interface", + "tags": [], + "label": "ComponentTemplateDatastreams", + "description": [], + "path": "x-pack/plugins/index_management/common/types/component_templates.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "indexManagement", + "id": "def-common.ComponentTemplateDatastreams.data_streams", + "type": "Array", + "tags": [], + "label": "data_streams", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/index_management/common/types/component_templates.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "indexManagement", "id": "def-common.ComponentTemplateDeserialized", diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 20c5fae345e14..f74c86686a518 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexManagement plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-ma | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 175 | 0 | 170 | 3 | +| 177 | 0 | 172 | 3 | ## Client diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 46b09dd487976..c3e0f954b035c 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github summary: API docs for the infra plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 489d0c62ca73d..7738387eff1e9 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github summary: API docs for the inspector plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index df6d98288a7e6..c95ffdae90684 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github summary: API docs for the interactiveSetup plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index bfacf8594eae2..ef960589645a8 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ace plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 93a67041fd5e1..0572d77684963 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-components plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 759aaa0bc0dfe..7b2b9d344cf1c 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 90342956e9186..63cb779d3a03f 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/alerts plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 04f13d4eb9fb1..6c8c0f22196de 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_client.devdocs.json b/api_docs/kbn_analytics_client.devdocs.json index 870cff39d62fe..42b3860ecbb9d 100644 --- a/api_docs/kbn_analytics_client.devdocs.json +++ b/api_docs/kbn_analytics_client.devdocs.json @@ -1750,7 +1750,7 @@ "Types matching string values" ], "signature": [ - "\"keyword\" | \"text\" | \"date\"" + "\"text\" | \"date\" | \"keyword\"" ], "path": "packages/analytics/client/src/schema/types.ts", "deprecated": false, @@ -1766,7 +1766,7 @@ "\nPossible type values in the schema" ], "signature": [ - "\"boolean\" | \"keyword\" | \"text\" | \"date\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" + "\"boolean\" | \"text\" | \"date\" | \"keyword\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" ], "path": "packages/analytics/client/src/schema/types.ts", "deprecated": false, diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 2e1deba00597b..d15dc47508f77 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-client plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json b/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json index e3b9cb0237cfb..904adc713d0e3 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.devdocs.json @@ -260,6 +260,9 @@ "description": [ "\nOptions for the Elastic V3 shipper" ], + "signature": [ + "ElasticV3ShipperOptions" + ], "path": "node_modules/@types/kbn__analytics-shippers-elastic-v3-common/index.d.ts", "deprecated": false, "children": [ diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index e2f1ec1edbf6f..7460b971c8cae 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index b5f800cc45217..4ad68d4ebd6fb 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json b/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json index 4f0c71a709e9d..981257e0fcd16 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.devdocs.json @@ -252,6 +252,9 @@ "description": [ "\nOptions for the Elastic V3 shipper" ], + "signature": [ + "ElasticV3ShipperOptions" + ], "path": "node_modules/@types/kbn__analytics-shippers-elastic-v3-common/index.d.ts", "deprecated": false, "children": [ diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index b57ef26af2ffd..23c5a7d23f6da 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 197f236a44afc..829237324321b 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 4851a89f604ff..e2687083fae4d 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-config-loader plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 275b0af889913..abfa679dce22c 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 1fff24880c847..3f36177e31549 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/axe-config plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_packages.mdx b/api_docs/kbn_bazel_packages.mdx index a748a89fa5a6e..1c122e82c79d5 100644 --- a/api_docs/kbn_bazel_packages.mdx +++ b/api_docs/kbn_bazel_packages.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-packages title: "@kbn/bazel-packages" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/bazel-packages plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-packages'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_runner.devdocs.json b/api_docs/kbn_bazel_runner.devdocs.json deleted file mode 100644 index e5f5473949f65..0000000000000 --- a/api_docs/kbn_bazel_runner.devdocs.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "id": "@kbn/bazel-runner", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [], - "functions": [ - { - "parentPluginId": "@kbn/bazel-runner", - "id": "def-server.runBazel", - "type": "Function", - "tags": [], - "label": "runBazel", - "description": [], - "signature": [ - "(options: BazelRunOptions) => Promise" - ], - "path": "packages/kbn-bazel-runner/src/bazel_runner.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/bazel-runner", - "id": "def-server.runBazel.$1", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - "BazelRunOptions" - ], - "path": "packages/kbn-bazel-runner/src/bazel_runner.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/bazel-runner", - "id": "def-server.runIBazel", - "type": "Function", - "tags": [], - "label": "runIBazel", - "description": [], - "signature": [ - "(options: BazelRunOptions) => Promise" - ], - "path": "packages/kbn-bazel-runner/src/bazel_runner.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/bazel-runner", - "id": "def-server.runIBazel.$1", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - "BazelRunOptions" - ], - "path": "packages/kbn-bazel-runner/src/bazel_runner.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/kbn_bazel_runner.mdx b/api_docs/kbn_bazel_runner.mdx deleted file mode 100644 index 8e0ad755b916d..0000000000000 --- a/api_docs/kbn_bazel_runner.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: kibKbnBazelRunnerPluginApi -slug: /kibana-dev-docs/api/kbn-bazel-runner -title: "@kbn/bazel-runner" -image: https://source.unsplash.com/400x175/?github -summary: API docs for the @kbn/bazel-runner plugin -date: 2022-07-18 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-runner'] -warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. ---- -import kbnBazelRunnerObj from './kbn_bazel_runner.devdocs.json'; - - - -Contact [Owner missing] for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 4 | 0 | - -## Server - -### Functions - - diff --git a/api_docs/kbn_ci_stats_core.devdocs.json b/api_docs/kbn_ci_stats_core.devdocs.json index d088822187665..c992ff04fbe96 100644 --- a/api_docs/kbn_ci_stats_core.devdocs.json +++ b/api_docs/kbn_ci_stats_core.devdocs.json @@ -20,7 +20,7 @@ "description": [], "signature": [ "(log: ", - "ToolingLog", + "SomeDevLog", ") => ", { "pluginId": "@kbn/ci-stats-core", @@ -42,7 +42,7 @@ "label": "log", "description": [], "signature": [ - "ToolingLog" + "SomeDevLog" ], "path": "packages/kbn-ci-stats-core/src/ci_stats_config.ts", "deprecated": false, diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index d451df11ab8f7..ecbfb1cb81fa5 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-core plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index a08924d9a36fd..a7064763b3931 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_reporter.devdocs.json b/api_docs/kbn_ci_stats_reporter.devdocs.json index 195e8e8a5a429..5a13643eff898 100644 --- a/api_docs/kbn_ci_stats_reporter.devdocs.json +++ b/api_docs/kbn_ci_stats_reporter.devdocs.json @@ -33,7 +33,7 @@ ], "signature": [ "(log: ", - "ToolingLog", + "SomeDevLog", ") => ", { "pluginId": "@kbn/ci-stats-reporter", @@ -54,7 +54,7 @@ "label": "log", "description": [], "signature": [ - "ToolingLog" + "SomeDevLog" ], "path": "packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts", "deprecated": false, @@ -99,7 +99,7 @@ "label": "log", "description": [], "signature": [ - "ToolingLog" + "SomeDevLog" ], "path": "packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts", "deprecated": false, diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 04f72f64ea26b..1c8c9ddbaa462 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index a60a7bd922d72..e5bd7823a8849 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/cli-dev-mode plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_coloring.devdocs.json b/api_docs/kbn_coloring.devdocs.json index b6c631706bfaf..d0a3a43de1bef 100644 --- a/api_docs/kbn_coloring.devdocs.json +++ b/api_docs/kbn_coloring.devdocs.json @@ -1462,7 +1462,7 @@ "label": "type", "description": [], "signature": [ - "\"system_palette\" | \"palette\"" + "\"palette\" | \"system_palette\"" ], "path": "packages/kbn-coloring/src/palettes/types.ts", "deprecated": false @@ -1755,7 +1755,7 @@ "label": "RequiredPaletteParamTypes", "description": [], "signature": [ - "{ name: string; reverse: boolean; rangeMin: number; rangeType: \"number\" | \"percent\"; continuity: ", + "{ rangeMin: number; name: string; reverse: boolean; rangeType: \"number\" | \"percent\"; continuity: ", { "pluginId": "@kbn/coloring", "scope": "common", diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 336107bb56a36..301262c1ced72 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/coloring plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 51cf363418db2..d85444d67a9d8 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 4a51e79032b03..3d56e33cf097d 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index c7b2409974ec3..6b45074568517 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-schema plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 34c0235b4c88d..16134781e94bd 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index d7c914cb8bee7..648599326f054 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 7e3d75a06cdeb..3ba311545f75f 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index a41b00c3a0369..0580413b0bcb0 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 2d22e691556b7..01a1485314ea9 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index c2f4be79eea09..e82026d3e9566 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 982afbb257220..a1be66687aa24 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index a12a0574d2d09..d780e7f6b4e97 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 570e4cddb26df..ea8eb03b79a17 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index ea34e4e8e279c..f7c002d5050c5 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index f0950bc88cf6f..82ff587cbf502 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-config-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index d8065d5402b0e..438ecc8cfc90a 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 55afc0d1e3e6a..04ff7ecfe37e0 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 3548f24bc7dec..e44e75865b2b3 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 7cdd0a314b3ed..1b3f5d0f9c6ae 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-deprecations-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 0381f04c12396..0a8ef656c2048 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index de58a5bc97d27..2f29ad08c4262 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 5c97d175554aa..5b916f3e93da2 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index dce0e80b7bf61..f948b3195d968 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 635ed17110cde..52d5c3e9b6ef5 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 3070f1b155433..fee94559fdc6c 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 2d94f5be05601..f212a9c5f60b1 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 100e0917a7ccb..0bb070f0ad9bc 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index b1f5cf073486c..b43c59f31e615 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 31b21911b773f..d61dbf7ededa6 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 255181e4e8d41..fc7f2351ea388 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 74530da369a26..06feed61c0065 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index f6355f3428056..771350a3463bc 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 0863e4d600f6a..5fda7f16c2092 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 25fdf453e6036..d9dbb59b3ba5c 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser.devdocs.json b/api_docs/kbn_core_http_browser.devdocs.json index 492a459206603..d39d743fa868f 100644 --- a/api_docs/kbn_core_http_browser.devdocs.json +++ b/api_docs/kbn_core_http_browser.devdocs.json @@ -259,12 +259,12 @@ "id": "def-common.HttpFetchQuery.Unnamed", "type": "IndexSignature", "tags": [], - "label": "[key: string]: string | number | boolean | string[] | number[] | boolean[] | null | undefined", + "label": "[key: string]: string | number | boolean | number[] | string[] | boolean[] | null | undefined", "description": [ "\nTypeScript note: Technically we should use this interface instead, but @types/node uses the below stricter\ndefinition, so to avoid TypeScript errors, we'll restrict our version.\n\n[key: string]:\n | string\n | number\n | boolean\n | Array\n | undefined\n | null;" ], "signature": [ - "[key: string]: string | number | boolean | string[] | number[] | boolean[] | null | undefined" + "[key: string]: string | number | boolean | number[] | string[] | boolean[] | null | undefined" ], "path": "packages/core/http/core-http-browser/src/types.ts", "deprecated": false diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 2d831bafc863c..f329eedf3402b 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 6545f83989e88..21e89ca0f1c3e 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index c3794d0a87f1e..88e5263f5e95b 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 8a5d8d7e0cb98..c030acdcab337 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 4eada9ea739b3..5b4d8a757d2a4 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 1299925063937..7f699f2183c1c 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 1d1b322e7eab1..0b702ece79b24 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 2179c6d1ea78d..93910a48daaa3 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -4073,7 +4073,7 @@ "\nReadonly copy of incoming request headers." ], "signature": [ - "{ warning?: string | string[] | undefined; from?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; origin?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; origin?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/http/core-http-server/src/router/request.ts", "deprecated": false @@ -6764,7 +6764,7 @@ "\nHttp request headers to read." ], "signature": [ - "{ warning?: string | string[] | undefined; from?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; origin?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; origin?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; date?: string | string[] | undefined; expires?: string | string[] | undefined; range?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; host?: string | string[] | undefined; etag?: string | string[] | undefined; authorization?: string | string[] | undefined; connection?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, @@ -7029,7 +7029,7 @@ "\nSet of well-known HTTP headers." ], "signature": [ - "\"warning\" | \"from\" | \"date\" | \"expires\" | \"range\" | \"origin\" | \"location\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" + "\"from\" | \"origin\" | \"warning\" | \"location\" | \"date\" | \"expires\" | \"range\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, @@ -8075,7 +8075,7 @@ "\nHttp response headers to set." ], "signature": [ - "Record<\"warning\" | \"from\" | \"date\" | \"expires\" | \"range\" | \"origin\" | \"location\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" + "Record<\"from\" | \"origin\" | \"warning\" | \"location\" | \"date\" | \"expires\" | \"range\" | \"allow\" | \"accept\" | \"host\" | \"etag\" | \"authorization\" | \"connection\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 7194f634b2948..e44485fd4cb8e 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 995891f2568ff..ab917281d972f 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 404234635c958..f19eb4aa08d8c 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 895827b42752c..6ed3f1bdc03a0 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 82b3437b0381f..b19f99d3547f9 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index c7da5326fe12f..e1d2592bdfa4c 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 42994d0e6dff9..31afe966a00f0 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_integrations_browser_internal.devdocs.json b/api_docs/kbn_core_integrations_browser_internal.devdocs.json new file mode 100644 index 0000000000000..c80088c04b03b --- /dev/null +++ b/api_docs/kbn_core_integrations_browser_internal.devdocs.json @@ -0,0 +1,54 @@ +{ + "id": "@kbn/core-integrations-browser-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-integrations-browser-internal", + "id": "def-common.IntegrationsServiceSetupDeps", + "type": "Interface", + "tags": [], + "label": "IntegrationsServiceSetupDeps", + "description": [], + "path": "packages/core/integrations/core-integrations-browser-internal/src/integrations_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-integrations-browser-internal", + "id": "def-common.IntegrationsServiceSetupDeps.uiSettings", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + "IUiSettingsClient" + ], + "path": "packages/core/integrations/core-integrations-browser-internal/src/integrations_service.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx new file mode 100644 index 0000000000000..ba3d097c02e14 --- /dev/null +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreIntegrationsBrowserInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal +title: "@kbn/core-integrations-browser-internal" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-integrations-browser-internal plugin +date: 2022-07-20 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 2 | 0 | + +## Common + +### Interfaces + + diff --git a/api_docs/kbn_core_integrations_browser_mocks.devdocs.json b/api_docs/kbn_core_integrations_browser_mocks.devdocs.json new file mode 100644 index 0000000000000..98bd9b1a37568 --- /dev/null +++ b/api_docs/kbn_core_integrations_browser_mocks.devdocs.json @@ -0,0 +1,103 @@ +{ + "id": "@kbn/core-integrations-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-integrations-browser-mocks", + "id": "def-common.IntegrationsServiceContract", + "type": "Type", + "tags": [], + "label": "IntegrationsServiceContract", + "description": [], + "signature": [ + "{ setup: () => Promise; start: ({ uiSettings }: ", + "IntegrationsServiceSetupDeps", + ") => Promise; stop: () => Promise; }" + ], + "path": "packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-integrations-browser-mocks", + "id": "def-common.IntegrationsServiceMock", + "type": "Type", + "tags": [], + "label": "IntegrationsServiceMock", + "description": [], + "signature": [ + "{ setup: jest.MockInstance, []>; start: jest.MockInstance, [", + "IntegrationsServiceSetupDeps", + "]>; stop: jest.MockInstance, []>; } & ", + { + "pluginId": "@kbn/core-integrations-browser-mocks", + "scope": "common", + "docId": "kibKbnCoreIntegrationsBrowserMocksPluginApi", + "section": "def-common.IntegrationsServiceContract", + "text": "IntegrationsServiceContract" + } + ], + "path": "packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/core-integrations-browser-mocks", + "id": "def-common.integrationsServiceMock", + "type": "Object", + "tags": [], + "label": "integrationsServiceMock", + "description": [], + "path": "packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-integrations-browser-mocks", + "id": "def-common.integrationsServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-integrations-browser-mocks", + "scope": "common", + "docId": "kibKbnCoreIntegrationsBrowserMocksPluginApi", + "section": "def-common.IntegrationsServiceMock", + "text": "IntegrationsServiceMock" + } + ], + "path": "packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx new file mode 100644 index 0000000000000..14263edb1082d --- /dev/null +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreIntegrationsBrowserMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks +title: "@kbn/core-integrations-browser-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-integrations-browser-mocks plugin +date: 2022-07-20 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_logging_server.devdocs.json b/api_docs/kbn_core_logging_server.devdocs.json index fb838f8e4c7e0..1c62152f792f8 100644 --- a/api_docs/kbn_core_logging_server.devdocs.json +++ b/api_docs/kbn_core_logging_server.devdocs.json @@ -203,7 +203,7 @@ "label": "level", "description": [], "signature": [ - "\"error\" | \"all\" | \"info\" | \"off\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\"" + "\"error\" | \"all\" | \"off\" | \"info\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\"" ], "path": "packages/core/logging/core-logging-server/src/logger.ts", "deprecated": false diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index c0429e0c27529..8562ea9e85768 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_internal.devdocs.json b/api_docs/kbn_core_logging_server_internal.devdocs.json index 058b446d5c2a6..7b04157c02296 100644 --- a/api_docs/kbn_core_logging_server_internal.devdocs.json +++ b/api_docs/kbn_core_logging_server_internal.devdocs.json @@ -117,9 +117,9 @@ "Type", " | Readonly<{ highlight?: boolean | undefined; pattern?: string | undefined; } & { type: \"pattern\"; }>; }> | Readonly<{} & { type: \"file\"; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ highlight?: boolean | undefined; pattern?: string | undefined; } & { type: \"pattern\"; }>; fileName: string; }> | Readonly<{} & { type: \"rewrite\"; policy: Readonly<{} & { type: \"meta\"; mode: \"update\" | \"remove\"; properties: Readonly<{ value?: string | number | boolean | null | undefined; } & { path: string; }>[]; }>; appenders: string[]; }> | Readonly<{} & { type: \"rolling-file\"; strategy: ", "NumericRollingStrategyConfig", - "; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ highlight?: boolean | undefined; pattern?: string | undefined; } & { type: \"pattern\"; }>; policy: Readonly<{} & { size: ", + "; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ highlight?: boolean | undefined; pattern?: string | undefined; } & { type: \"pattern\"; }>; policy: Readonly<{} & { type: \"size-limit\"; size: ", "ByteSizeValue", - "; type: \"size-limit\"; }> | Readonly<{} & { interval: moment.Duration; type: \"time-interval\"; modulate: boolean; }>; fileName: string; }>>" + "; }> | Readonly<{} & { type: \"time-interval\"; interval: moment.Duration; modulate: boolean; }>; fileName: string; }>>" ], "path": "packages/core/logging/core-logging-server-internal/src/appenders/appenders.ts", "deprecated": false, @@ -142,7 +142,7 @@ "AppenderConfigType", ">>; loggers: ", "Type", - "[]>; }>" + "[]>; }>" ], "path": "packages/core/logging/core-logging-server-internal/src/logging_config.ts", "deprecated": false, @@ -165,7 +165,7 @@ "Type", "; level: ", "Type", - "<\"error\" | \"all\" | \"info\" | \"off\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\">; }>" + "<\"error\" | \"all\" | \"off\" | \"info\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\">; }>" ], "path": "packages/core/logging/core-logging-server-internal/src/logging_config.ts", "deprecated": false, diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 05371a5d2e267..c62b3f494f1ab 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index cd247288d21b0..e6b5d870c5a88 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 07db2e25dbfa6..01eebb0405ba9 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 67b704d71fa4e..7180227c5be61 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 177cb534f5c22..b9ec8199d125c 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 4710e583c5929..1c7a908b8f480 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-preboot-server plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 4089f2b7c921a..5aaaa210831b8 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 6ac099e4d0c26..90cf668572199 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 4ff5ac041bbd6..9d31a29898c13 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index d9030c96ae6ed..902f76fe234de 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 1c0a9295e2d8c..151cbaa77a070 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index a4ad1186579de..d09badd6058c3 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 42b710a0fb9fa..0634e8c7d1a10 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index ed65b843361f2..49ec53ef565ed 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_ui_settings_common.devdocs.json b/api_docs/kbn_core_ui_settings_common.devdocs.json index 2235802090141..439a926b8f4e0 100644 --- a/api_docs/kbn_core_ui_settings_common.devdocs.json +++ b/api_docs/kbn_core_ui_settings_common.devdocs.json @@ -144,14 +144,14 @@ { "parentPluginId": "@kbn/core-ui-settings-common", "id": "def-common.UiSettingsParams.options", - "type": "Array", + "type": "CompoundType", "tags": [], "label": "options", "description": [ "array of permitted values for this setting" ], "signature": [ - "string[] | undefined" + "number[] | string[] | undefined" ], "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", "deprecated": false @@ -382,7 +382,7 @@ "section": "def-common.UiSettingsType", "text": "UiSettingsType" }, - " | undefined; value?: unknown; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + " | undefined; name?: string | undefined; order?: number | undefined; value?: unknown; description?: string | undefined; options?: number[] | string[] | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", { "pluginId": "@kbn/core-ui-settings-common", "scope": "common", diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 23fdc0fbbb4b1..bf64ec5b55a09 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 6f7957c630a53..d26469aa1883a 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index d6b0356977827..d239eaad3b72c 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto-browser plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_datemath.devdocs.json b/api_docs/kbn_datemath.devdocs.json index 4905365143524..fc0a5027ecb5b 100644 --- a/api_docs/kbn_datemath.devdocs.json +++ b/api_docs/kbn_datemath.devdocs.json @@ -105,7 +105,7 @@ "label": "Unit", "description": [], "signature": [ - "\"y\" | \"M\" | \"w\" | \"d\" | \"h\" | \"m\" | \"s\" | \"ms\"" + "\"d\" | \"y\" | \"s\" | \"m\" | \"M\" | \"w\" | \"h\" | \"ms\"" ], "path": "packages/kbn-datemath/src/index.ts", "deprecated": false, @@ -182,7 +182,7 @@ "label": "UnitsMap", "description": [], "signature": [ - "{ y: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; M: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; w: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; d: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; h: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; m: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; s: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; ms: { weight: number; type: \"calendar\" | \"fixed\" | \"mixed\"; base: number; }; }" + "{ d: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; y: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; s: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; m: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; M: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; w: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; h: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; ms: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; }" ], "path": "packages/kbn-datemath/src/index.ts", "deprecated": false, diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 9afd0dcb509c9..7924e93e694a4 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/datemath plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 03600c8eb5123..2eeb00cd1080e 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-errors plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 6bdf5aa06e72c..599dd1e475df3 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-runner plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index d253ef68e24c3..146da034cf3cd 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-proc-runner plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index f2a033462df43..412a527779e0c 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index ccd05b0cc3e09..b27a1901964e0 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/doc-links plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 1e10f69a21a83..21226f4136e88 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/docs-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index c6fc992be9393..86e7ede6b3b2e 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-archiver plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 6ef0c21af4c5e..c9b31cb916817 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-errors plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index d05af5b78d295..130ba43e80985 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-query plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 4edb84d4b6f84..db407730b5ed6 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 6e36e0e05ad87..8ef8335fdb414 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/field-types plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 0eb4654b5bf20..29ef335900170 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/find-used-node-modules plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 1163450e2232d..14b76190ca733 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/generate plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index d6a83c7a111dd..f3891381a3c76 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/handlebars plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index a07e42898b671..ebb3681cf1ec8 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/hapi-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_home_sample_data_cards.mdx b/api_docs/kbn_home_sample_data_cards.mdx index db1a613b06d6c..30ce274ed6401 100644 --- a/api_docs/kbn_home_sample_data_cards.mdx +++ b/api_docs/kbn_home_sample_data_cards.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-cards title: "@kbn/home-sample-data-cards" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/home-sample-data-cards plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-cards'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 075fb77a3bc3d..e22687f8ee1a2 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/i18n plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index da9402421dfe0..974380d8eea54 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/import-resolver plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index d50295a4ec191..67db70b1ea867 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/interpreter plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 6225ad6ec4557..8c04c941faff0 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/io-ts-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 86adaf6b57caf..57faa3e290f65 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/jest-serializers plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_kibana_json_schema.mdx b/api_docs/kbn_kibana_json_schema.mdx index 060dd4b8d4d68..baef6b815d048 100644 --- a/api_docs/kbn_kibana_json_schema.mdx +++ b/api_docs/kbn_kibana_json_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-json-schema title: "@kbn/kibana-json-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/kibana-json-schema plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-json-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging.devdocs.json b/api_docs/kbn_logging.devdocs.json index 0a3d4f130790c..9f24e7a8d462e 100644 --- a/api_docs/kbn_logging.devdocs.json +++ b/api_docs/kbn_logging.devdocs.json @@ -658,7 +658,7 @@ "label": "EcsEventType", "description": [], "signature": [ - "\"start\" | \"error\" | \"user\" | \"info\" | \"group\" | \"end\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"connection\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" + "\"start\" | \"error\" | \"end\" | \"group\" | \"user\" | \"info\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"connection\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" ], "path": "packages/kbn-logging/src/ecs/event.ts", "deprecated": false, diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index c5c7008c24864..2d88d354bd89e 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index dde39f95ede19..10d88bb7ea9a2 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging-mocks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_mapbox_gl.devdocs.json b/api_docs/kbn_mapbox_gl.devdocs.json index ac4e6d8bdf62e..29bcef9ca4e59 100644 --- a/api_docs/kbn_mapbox_gl.devdocs.json +++ b/api_docs/kbn_mapbox_gl.devdocs.json @@ -7566,7 +7566,7 @@ "label": "MapEvent", "description": [], "signature": [ - "\"error\" | \"data\" | \"render\" | \"remove\" | \"move\" | \"rotate\" | \"idle\" | \"resize\" | \"zoom\" | \"mousedown\" | \"mouseup\" | \"mouseover\" | \"mousemove\" | \"click\" | \"dblclick\" | \"mouseenter\" | \"mouseleave\" | \"mouseout\" | \"contextmenu\" | \"wheel\" | \"touchstart\" | \"touchend\" | \"touchmove\" | \"touchcancel\" | \"movestart\" | \"moveend\" | \"dragstart\" | \"drag\" | \"dragend\" | \"zoomstart\" | \"zoomend\" | \"rotatestart\" | \"rotateend\" | \"pitchstart\" | \"pitch\" | \"pitchend\" | \"boxzoomstart\" | \"boxzoomend\" | \"boxzoomcancel\" | \"webglcontextlost\" | \"webglcontextrestored\" | \"load\" | \"styledata\" | \"sourcedata\" | \"dataloading\" | \"styledataloading\" | \"sourcedataloading\" | \"styleimagemissing\" | \"style.load\" | \"dataabort\" | \"sourcedataabort\"" + "\"error\" | \"rotate\" | \"move\" | \"render\" | \"data\" | \"remove\" | \"idle\" | \"resize\" | \"zoom\" | \"mousedown\" | \"mouseup\" | \"mouseover\" | \"mousemove\" | \"click\" | \"dblclick\" | \"mouseenter\" | \"mouseleave\" | \"mouseout\" | \"contextmenu\" | \"wheel\" | \"touchstart\" | \"touchend\" | \"touchmove\" | \"touchcancel\" | \"movestart\" | \"moveend\" | \"dragstart\" | \"drag\" | \"dragend\" | \"zoomstart\" | \"zoomend\" | \"rotatestart\" | \"rotateend\" | \"pitchstart\" | \"pitch\" | \"pitchend\" | \"boxzoomstart\" | \"boxzoomend\" | \"boxzoomcancel\" | \"webglcontextlost\" | \"webglcontextrestored\" | \"load\" | \"styledata\" | \"sourcedata\" | \"dataloading\" | \"styledataloading\" | \"sourcedataloading\" | \"styleimagemissing\" | \"style.load\" | \"dataabort\" | \"sourcedataabort\"" ], "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", "deprecated": false, diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 34d516e763d7b..9a5c201f5b271 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/mapbox-gl plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 31a8a30520ad4..a66db45784df8 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-agg-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index ec5e697e62b51..3c0b1b44a6ed5 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 6276d93899862..4393fa0b171e9 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-string-hash plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_monaco.devdocs.json b/api_docs/kbn_monaco.devdocs.json index 00a9ed2a113a9..7e6cdc9776d0e 100644 --- a/api_docs/kbn_monaco.devdocs.json +++ b/api_docs/kbn_monaco.devdocs.json @@ -415,7 +415,7 @@ "label": "kind", "description": [], "signature": [ - "\"keyword\" | \"type\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" + "\"type\" | \"method\" | \"keyword\" | \"field\" | \"property\" | \"class\" | \"constructor\"" ], "path": "packages/kbn-monaco/src/painless/types.ts", "deprecated": false @@ -544,7 +544,7 @@ "label": "PainlessCompletionKind", "description": [], "signature": [ - "\"keyword\" | \"type\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" + "\"type\" | \"method\" | \"keyword\" | \"field\" | \"property\" | \"class\" | \"constructor\"" ], "path": "packages/kbn-monaco/src/painless/types.ts", "deprecated": false, diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index aa6e84684d17d..36b2f84479e93 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/monaco plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 53cb7f182e8a4..932ae24584a4e 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index dd0e223253062..3737c732f91b6 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 3f34b02b91b48..a160e8a042fe8 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_discovery.devdocs.json b/api_docs/kbn_plugin_discovery.devdocs.json deleted file mode 100644 index 331ea07e1db83..0000000000000 --- a/api_docs/kbn_plugin_discovery.devdocs.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "id": "@kbn/plugin-discovery", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [], - "functions": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.getPluginSearchPaths", - "type": "Function", - "tags": [], - "label": "getPluginSearchPaths", - "description": [], - "signature": [ - "({ rootDir, oss, examples, testPlugins }: ", - { - "pluginId": "@kbn/plugin-discovery", - "scope": "server", - "docId": "kibKbnPluginDiscoveryPluginApi", - "section": "def-server.SearchOptions", - "text": "SearchOptions" - }, - ") => string[]" - ], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.getPluginSearchPaths.$1", - "type": "Object", - "tags": [], - "label": "{ rootDir, oss, examples, testPlugins }", - "description": [], - "signature": [ - { - "pluginId": "@kbn/plugin-discovery", - "scope": "server", - "docId": "kibKbnPluginDiscoveryPluginApi", - "section": "def-server.SearchOptions", - "text": "SearchOptions" - } - ], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.parseKibanaPlatformPlugin", - "type": "Function", - "tags": [], - "label": "parseKibanaPlatformPlugin", - "description": [], - "signature": [ - "(manifestPath: string) => ", - { - "pluginId": "@kbn/plugin-discovery", - "scope": "server", - "docId": "kibKbnPluginDiscoveryPluginApi", - "section": "def-server.KibanaPlatformPlugin", - "text": "KibanaPlatformPlugin" - } - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.parseKibanaPlatformPlugin.$1", - "type": "string", - "tags": [], - "label": "manifestPath", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.simpleKibanaPlatformPluginDiscovery", - "type": "Function", - "tags": [], - "label": "simpleKibanaPlatformPluginDiscovery", - "description": [ - "\nHelper to find the new platform plugins." - ], - "signature": [ - "(scanDirs: string[], pluginPaths: string[]) => ", - { - "pluginId": "@kbn/plugin-discovery", - "scope": "server", - "docId": "kibKbnPluginDiscoveryPluginApi", - "section": "def-server.KibanaPlatformPlugin", - "text": "KibanaPlatformPlugin" - }, - "[]" - ], - "path": "packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.simpleKibanaPlatformPluginDiscovery.$1", - "type": "Array", - "tags": [], - "label": "scanDirs", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.simpleKibanaPlatformPluginDiscovery.$2", - "type": "Array", - "tags": [], - "label": "pluginPaths", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPlugin", - "type": "Interface", - "tags": [], - "label": "KibanaPlatformPlugin", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPlugin.directory", - "type": "string", - "tags": [], - "label": "directory", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPlugin.manifestPath", - "type": "string", - "tags": [], - "label": "manifestPath", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPlugin.manifest", - "type": "Object", - "tags": [], - "label": "manifest", - "description": [], - "signature": [ - { - "pluginId": "@kbn/plugin-discovery", - "scope": "server", - "docId": "kibKbnPluginDiscoveryPluginApi", - "section": "def-server.KibanaPlatformPluginManifest", - "text": "KibanaPlatformPluginManifest" - } - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest", - "type": "Interface", - "tags": [], - "label": "KibanaPlatformPluginManifest", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.ui", - "type": "boolean", - "tags": [], - "label": "ui", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.server", - "type": "boolean", - "tags": [], - "label": "server", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.kibanaVersion", - "type": "string", - "tags": [], - "label": "kibanaVersion", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.version", - "type": "string", - "tags": [], - "label": "version", - "description": [], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.owner", - "type": "Object", - "tags": [], - "label": "owner", - "description": [], - "signature": [ - "{ name: string; githubTeam?: string | undefined; }" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.enabledOnAnonymousPages", - "type": "CompoundType", - "tags": [], - "label": "enabledOnAnonymousPages", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.serviceFolders", - "type": "Object", - "tags": [], - "label": "serviceFolders", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.requiredPlugins", - "type": "Object", - "tags": [], - "label": "requiredPlugins", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.optionalPlugins", - "type": "Object", - "tags": [], - "label": "optionalPlugins", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.requiredBundles", - "type": "Object", - "tags": [], - "label": "requiredBundles", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.KibanaPlatformPluginManifest.extraPublicDirs", - "type": "Object", - "tags": [], - "label": "extraPublicDirs", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.SearchOptions", - "type": "Interface", - "tags": [], - "label": "SearchOptions", - "description": [], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.SearchOptions.rootDir", - "type": "string", - "tags": [], - "label": "rootDir", - "description": [], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.SearchOptions.oss", - "type": "boolean", - "tags": [], - "label": "oss", - "description": [], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.SearchOptions.examples", - "type": "boolean", - "tags": [], - "label": "examples", - "description": [], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/plugin-discovery", - "id": "def-server.SearchOptions.testPlugins", - "type": "CompoundType", - "tags": [], - "label": "testPlugins", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-plugin-discovery/src/plugin_search_paths.ts", - "deprecated": false - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/kbn_plugin_discovery.mdx b/api_docs/kbn_plugin_discovery.mdx deleted file mode 100644 index 88fe307c3bb68..0000000000000 --- a/api_docs/kbn_plugin_discovery.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: kibKbnPluginDiscoveryPluginApi -slug: /kibana-dev-docs/api/kbn-plugin-discovery -title: "@kbn/plugin-discovery" -image: https://source.unsplash.com/400x175/?github -summary: API docs for the @kbn/plugin-discovery plugin -date: 2022-07-18 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-discovery'] -warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. ---- -import kbnPluginDiscoveryObj from './kbn_plugin_discovery.devdocs.json'; - - - -Contact [Owner missing] for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 30 | 0 | 29 | 0 | - -## Server - -### Functions - - -### Interfaces - - diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 8fd712b5b411c..8687dfa99c744 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-generator plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 6b97051fcdb19..97d7af56d27bc 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-helpers plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_pm.devdocs.json b/api_docs/kbn_pm.devdocs.json deleted file mode 100644 index a0db71023b63c..0000000000000 --- a/api_docs/kbn_pm.devdocs.json +++ /dev/null @@ -1,681 +0,0 @@ -{ - "id": "@kbn/pm", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project", - "type": "Class", - "tags": [], - "label": "Project", - "description": [], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.fromPath", - "type": "Function", - "tags": [], - "label": "fromPath", - "description": [], - "signature": [ - "(path: string) => Promise<", - { - "pluginId": "@kbn/pm", - "scope": "server", - "docId": "kibKbnPmPluginApi", - "section": "def-server.Project", - "text": "Project" - }, - ">" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.fromPath.$1", - "type": "string", - "tags": [], - "label": "path", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.json", - "type": "Object", - "tags": [], - "label": "json", - "description": [ - "parsed package.json" - ], - "signature": [ - "IPackageJson" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.packageJsonLocation", - "type": "string", - "tags": [], - "label": "packageJsonLocation", - "description": [ - "absolute path to the package.json file in the project" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.nodeModulesLocation", - "type": "string", - "tags": [], - "label": "nodeModulesLocation", - "description": [ - "absolute path to the node_modules in the project (might not actually exist)" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.targetLocation", - "type": "string", - "tags": [], - "label": "targetLocation", - "description": [ - "absolute path to the target directory in the project (might not actually exist)" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.path", - "type": "string", - "tags": [], - "label": "path", - "description": [ - "absolute path to the directory containing the project" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.version", - "type": "string", - "tags": [], - "label": "version", - "description": [ - "the version of the project" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.allDependencies", - "type": "Object", - "tags": [], - "label": "allDependencies", - "description": [ - "merged set of dependencies of the project, [name => version range]" - ], - "signature": [ - "IPackageDependencies" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.productionDependencies", - "type": "Object", - "tags": [], - "label": "productionDependencies", - "description": [ - "regular dependencies of the project, [name => version range]" - ], - "signature": [ - "IPackageDependencies" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.devDependencies", - "type": "Object", - "tags": [], - "label": "devDependencies", - "description": [ - "development dependencies of the project, [name => version range]" - ], - "signature": [ - "IPackageDependencies" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.scripts", - "type": "Object", - "tags": [], - "label": "scripts", - "description": [ - "scripts defined in the package.json file for the project [name => body]" - ], - "signature": [ - "IPackageScripts" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.bazelPackage", - "type": "boolean", - "tags": [], - "label": "bazelPackage", - "description": [ - "states if this project is a Bazel package" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.isSinglePackageJsonProject", - "type": "boolean", - "tags": [], - "label": "isSinglePackageJsonProject", - "description": [], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [], - "signature": [ - "any" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "packageJson", - "description": [], - "signature": [ - "IPackageJson" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.Unnamed.$2", - "type": "string", - "tags": [], - "label": "projectPath", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.getBuildConfig", - "type": "Function", - "tags": [], - "label": "getBuildConfig", - "description": [], - "signature": [ - "() => BuildConfig" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.getCleanConfig", - "type": "Function", - "tags": [], - "label": "getCleanConfig", - "description": [], - "signature": [ - "() => CleanConfig" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.isBazelPackage", - "type": "Function", - "tags": [], - "label": "isBazelPackage", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.isFlaggedAsDevOnly", - "type": "Function", - "tags": [], - "label": "isFlaggedAsDevOnly", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.hasScript", - "type": "Function", - "tags": [], - "label": "hasScript", - "description": [], - "signature": [ - "(name: string) => boolean" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.hasScript.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.getExecutables", - "type": "Function", - "tags": [], - "label": "getExecutables", - "description": [], - "signature": [ - "() => { [key: string]: string; }" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScript", - "type": "Function", - "tags": [], - "label": "runScript", - "description": [], - "signature": [ - "(scriptName: string, args?: string[]) => Promise" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScript.$1", - "type": "string", - "tags": [], - "label": "scriptName", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScript.$2", - "type": "Array", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScriptStreaming", - "type": "Function", - "tags": [], - "label": "runScriptStreaming", - "description": [], - "signature": [ - "(scriptName: string, options?: { args?: string[] | undefined; debug?: boolean | undefined; }) => ", - "ExecaChildProcess", - "" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScriptStreaming.$1", - "type": "string", - "tags": [], - "label": "scriptName", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScriptStreaming.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScriptStreaming.$2.args", - "type": "Array", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.runScriptStreaming.$2.debug", - "type": "CompoundType", - "tags": [], - "label": "debug", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false - } - ] - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.hasDependencies", - "type": "Function", - "tags": [], - "label": "hasDependencies", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.Project.isEveryDependencyLocal", - "type": "Function", - "tags": [], - "label": "isEveryDependencyLocal", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "packages/kbn-pm/src/utils/project.ts", - "deprecated": false, - "children": [], - "returnComment": [] - } - ], - "initialIsOpen": false - } - ], - "functions": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjectPaths", - "type": "Function", - "tags": [], - "label": "getProjectPaths", - "description": [ - "\nReturns all the paths where plugins are located" - ], - "signature": [ - "({ rootPath, ossOnly, skipKibanaPlugins }: Options) => string[]" - ], - "path": "packages/kbn-pm/src/config.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjectPaths.$1", - "type": "Object", - "tags": [], - "label": "{ rootPath, ossOnly, skipKibanaPlugins }", - "description": [], - "signature": [ - "Options" - ], - "path": "packages/kbn-pm/src/config.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjects", - "type": "Function", - "tags": [], - "label": "getProjects", - "description": [], - "signature": [ - "(rootPath: string, projectsPathsPatterns: string[], { include = [], exclude = [] }: ", - "IProjectsOptions", - ", bazelOnly: boolean) => Promise<", - "ProjectMap", - ">" - ], - "path": "packages/kbn-pm/src/utils/projects.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjects.$1", - "type": "string", - "tags": [], - "label": "rootPath", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-pm/src/utils/projects.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjects.$2", - "type": "Array", - "tags": [], - "label": "projectsPathsPatterns", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-pm/src/utils/projects.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjects.$3", - "type": "Object", - "tags": [], - "label": "{ include = [], exclude = [] }", - "description": [], - "signature": [ - "IProjectsOptions" - ], - "path": "packages/kbn-pm/src/utils/projects.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.getProjects.$4", - "type": "boolean", - "tags": [], - "label": "bazelOnly", - "description": [], - "signature": [ - "boolean" - ], - "path": "packages/kbn-pm/src/utils/projects.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/pm", - "id": "def-server.run", - "type": "Function", - "tags": [], - "label": "run", - "description": [], - "signature": [ - "(argv: string[]) => Promise" - ], - "path": "packages/kbn-pm/src/cli.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/pm", - "id": "def-server.run.$1", - "type": "Array", - "tags": [], - "label": "argv", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-pm/src/cli.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/kbn_pm.mdx b/api_docs/kbn_pm.mdx deleted file mode 100644 index 35d2d53fe1f27..0000000000000 --- a/api_docs/kbn_pm.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: kibKbnPmPluginApi -slug: /kibana-dev-docs/api/kbn-pm -title: "@kbn/pm" -image: https://source.unsplash.com/400x175/?github -summary: API docs for the @kbn/pm plugin -date: 2022-07-18 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/pm'] -warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. ---- -import kbnPmObj from './kbn_pm.devdocs.json'; - - - -Contact [Owner missing] for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 45 | 0 | 33 | 5 | - -## Server - -### Functions - - -### Classes - - diff --git a/api_docs/kbn_react_field.devdocs.json b/api_docs/kbn_react_field.devdocs.json index 009157238dbe8..64ce7f66c3796 100644 --- a/api_docs/kbn_react_field.devdocs.json +++ b/api_docs/kbn_react_field.devdocs.json @@ -233,7 +233,7 @@ "\nUse the small size in condensed areas" ], "signature": [ - "\"m\" | \"s\" | undefined" + "\"s\" | \"m\" | undefined" ], "path": "packages/kbn-react-field/src/field_button/field_button.tsx", "deprecated": false @@ -375,7 +375,7 @@ "label": "ButtonSize", "description": [], "signature": [ - "\"m\" | \"s\"" + "\"s\" | \"m\"" ], "path": "packages/kbn-react-field/src/field_button/field_button.tsx", "deprecated": false, diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index b266903d804a1..a9ab814f89ecc 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/react-field plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index df8fc918caa55..a315a711f36a1 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/rule-data-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_scalability_simulation_generator.mdx b/api_docs/kbn_scalability_simulation_generator.mdx index 6837d445a7fc9..60986b7befb32 100644 --- a/api_docs/kbn_scalability_simulation_generator.mdx +++ b/api_docs/kbn_scalability_simulation_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-scalability-simulation-generator title: "@kbn/scalability-simulation-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/scalability-simulation-generator plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/scalability-simulation-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_autocomplete.devdocs.json b/api_docs/kbn_securitysolution_autocomplete.devdocs.json index 19f0d8fc2a5c9..9e5c951dbd325 100644 --- a/api_docs/kbn_securitysolution_autocomplete.devdocs.json +++ b/api_docs/kbn_securitysolution_autocomplete.devdocs.json @@ -305,9 +305,9 @@ "\nGiven an array of lists and optionally a field this will return all\nthe lists that match against the field based on the types from the field\n\nNOTE: That we support one additional property from \"FieldSpec\" located here:\nsrc/plugins/data/common/index_patterns/fields/types.ts\nThis type property is esTypes. If it exists and is on there we will read off the esTypes." ], "signature": [ - "(lists: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[], field?: (", + "(lists: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[], field?: (", "DataViewFieldBase", - " & { esTypes?: string[] | undefined; }) | undefined) => { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + " & { esTypes?: string[] | undefined; }) | undefined) => { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts", "deprecated": false, @@ -322,7 +322,7 @@ "The lists to match against the field" ], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 3525dc4f99105..c8e2f64adad07 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_es_utils.devdocs.json b/api_docs/kbn_securitysolution_es_utils.devdocs.json index 45c476c002e50..69ef8607a3716 100644 --- a/api_docs/kbn_securitysolution_es_utils.devdocs.json +++ b/api_docs/kbn_securitysolution_es_utils.devdocs.json @@ -388,7 +388,7 @@ "label": "esClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -452,7 +454,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -1514,8 +1516,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -1630,7 +1630,7 @@ "label": "esClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -1694,7 +1696,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -2756,8 +2758,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 13324d6db4bf7..d5b3c3170d091 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 917cf96bda219..2b4cafe425e4e 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 3204dca062a8f..c6651f265f552 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json index 401b41b8bd714..7d8d22d454a68 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json +++ b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json @@ -27,7 +27,7 @@ "label": "updateExceptionListItemValidate", "description": [], "signature": [ - "(schema: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" + "(schema: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -40,7 +40,7 @@ "label": "schema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -58,7 +58,7 @@ "label": "validateComments", "description": [], "signature": [ - "(item: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" + "(item: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -71,7 +71,7 @@ "label": "item", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -153,7 +153,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1216,7 +1216,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1307,7 +1307,7 @@ "label": "exceptions", "description": [], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1897,7 +1897,7 @@ "label": "CreateEndpointListItemSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"os_types\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"os_types\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -1925,7 +1925,7 @@ "label": "CreateExceptionListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts", "deprecated": false, @@ -1939,7 +1939,7 @@ "label": "CreateExceptionListItemSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"namespace_type\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"namespace_type\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts", "deprecated": false, @@ -2009,7 +2009,7 @@ "label": "CreateListSchema", "description": [], "signature": [ - "{ description: string; name: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; } & { deserializer?: string | undefined; id?: string | undefined; meta?: object | undefined; serializer?: string | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; } & { deserializer?: string | undefined; id?: string | undefined; meta?: object | undefined; serializer?: string | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts", "deprecated": false, @@ -2023,7 +2023,7 @@ "label": "CreateListSchemaDecoded", "description": [], "signature": [ - "{ id: string | undefined; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; description: string; name: string; meta: object | undefined; serializer: string | undefined; deserializer: string | undefined; } & { version: number; }" + "{ type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; id: string | undefined; name: string; description: string; meta: object | undefined; serializer: string | undefined; deserializer: string | undefined; } & { version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts", "deprecated": false, @@ -2317,7 +2317,7 @@ "label": "EntriesArray", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2331,7 +2331,7 @@ "label": "EntriesArrayOrUndefined", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[] | undefined" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[] | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2345,7 +2345,7 @@ "label": "Entry", "description": [], "signature": [ - "{ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }" + "{ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2373,7 +2373,7 @@ "label": "EntryList", "description": [], "signature": [ - "{ field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; }" + "{ field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts", "deprecated": false, @@ -2443,7 +2443,7 @@ "label": "ExceptionListItemSchema", "description": [], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts", "deprecated": false, @@ -2765,7 +2765,7 @@ "label": "FoundExceptionListItemSchema", "description": [], "signature": [ - "{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }" + "{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts", "deprecated": false, @@ -2793,7 +2793,7 @@ "label": "FoundListItemSchema", "description": [], "signature": [ - "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; }" + "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts", "deprecated": false, @@ -2807,7 +2807,7 @@ "label": "FoundListSchema", "description": [], "signature": [ - "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }" + "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts", "deprecated": false, @@ -2919,7 +2919,7 @@ "label": "ImportExceptionListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; item_id: string; list_id: string; name: string; type: \"simple\"; } & { id?: string | undefined; comments?: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; item_id: string; list_id: string; name: string; type: \"simple\"; } & { id?: string | undefined; comments?: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts", "deprecated": false, @@ -2933,7 +2933,7 @@ "label": "ImportExceptionListItemSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; item_id: string; list_id: string; name: string; type: \"simple\"; } & { id?: string | undefined; comments?: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"namespace_type\"> & { comments: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; item_id: string; list_id: string; name: string; type: \"simple\"; } & { id?: string | undefined; comments?: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[] | undefined; created_at?: string | undefined; updated_at?: string | undefined; created_by?: string | undefined; updated_by?: string | undefined; _version?: string | undefined; tie_breaker_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"item_id\" | \"namespace_type\"> & { comments: (({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; }) | { comment: string; })[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts", "deprecated": false, @@ -2989,7 +2989,7 @@ "label": "ImportListItemQuerySchema", "description": [], "signature": [ - "{ deserializer: string | undefined; list_id: string | undefined; serializer: string | undefined; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" + "{ deserializer: string | undefined; list_id: string | undefined; serializer: string | undefined; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts", "deprecated": false, @@ -3003,7 +3003,7 @@ "label": "ImportListItemQuerySchemaEncoded", "description": [], "signature": [ - "{ deserializer?: string | undefined; list_id?: string | undefined; serializer?: string | undefined; type?: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" + "{ deserializer?: string | undefined; list_id?: string | undefined; serializer?: string | undefined; type?: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts", "deprecated": false, @@ -3115,7 +3115,7 @@ "label": "ListArraySchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts", "deprecated": false, @@ -3157,7 +3157,7 @@ "label": "ListItemArraySchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts", "deprecated": false, @@ -3185,7 +3185,7 @@ "label": "ListItemSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }" + "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts", "deprecated": false, @@ -3213,7 +3213,7 @@ "label": "ListSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts", "deprecated": false, @@ -3423,7 +3423,7 @@ "label": "NonEmptyEntriesArray", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -3437,7 +3437,7 @@ "label": "NonEmptyEntriesArrayDecoded", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -3829,7 +3829,7 @@ "label": "SearchListItemArraySchema", "description": [], "signature": [ - "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]" + "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts", "deprecated": false, @@ -3843,7 +3843,7 @@ "label": "SearchListItemSchema", "description": [], "signature": [ - "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }" + "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts", "deprecated": false, @@ -3983,7 +3983,7 @@ "label": "Type", "description": [], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"" + "\"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts", "deprecated": false, @@ -3997,7 +3997,7 @@ "label": "TypeOrUndefined", "description": [], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" + "\"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts", "deprecated": false, @@ -4053,7 +4053,7 @@ "label": "UpdateEndpointListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -4067,7 +4067,7 @@ "label": "UpdateEndpointListItemSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -4081,7 +4081,7 @@ "label": "UpdateExceptionListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts", "deprecated": false, @@ -4095,7 +4095,7 @@ "label": "UpdateExceptionListItemSchemaDecoded", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"namespace_type\" | \"os_types\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"tags\" | \"entries\" | \"comments\" | \"namespace_type\" | \"os_types\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts", "deprecated": false, @@ -4628,7 +4628,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; list_id: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; list_id: ", "Type", "; name: ", "StringC", @@ -6914,7 +6914,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; item_id: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; item_id: ", "Type", "; list_id: ", "Type", @@ -7847,7 +7847,7 @@ ], "signature": [ "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>" + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -8780,7 +8780,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", "StringC", "; type: ", "KeyofC", @@ -8833,7 +8833,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", "StringC", "; type: ", "KeyofC", diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 9202a6895ce3e..014885622b406 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index c8166732e0803..b4ecae32431ca 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 49abef4547851..4d7ab64d3f03d 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_api.devdocs.json b/api_docs/kbn_securitysolution_list_api.devdocs.json index 11cbbb65c3edd..f644bd3bfab69 100644 --- a/api_docs/kbn_securitysolution_list_api.devdocs.json +++ b/api_docs/kbn_securitysolution_list_api.devdocs.json @@ -62,7 +62,7 @@ "signature": [ "({ http, listItem, signal, }: ", "AddExceptionListItemProps", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -206,7 +206,7 @@ "signature": [ "({ http, id, namespaceType, signal, }: ", "ApiCallByIdProps", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -245,7 +245,7 @@ "section": "def-common.DeleteListParams", "text": "DeleteListParams" }, - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -399,7 +399,7 @@ "signature": [ "({ http, id, namespaceType, signal, }: ", "ApiCallByIdProps", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -432,7 +432,7 @@ "signature": [ "({ filterOptions, http, listIds, namespaceTypes, pagination, signal, }: ", "ApiCallByListIdProps", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -504,7 +504,7 @@ "section": "def-common.FindListsParams", "text": "FindListsParams" }, - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -549,7 +549,7 @@ "section": "def-common.ImportListParams", "text": "ImportListParams" }, - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -743,7 +743,7 @@ "signature": [ "({ http, listItem, signal, }: ", "UpdateExceptionListItemProps", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -1076,7 +1076,7 @@ "label": "type", "description": [], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" + "\"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/types.ts", "deprecated": false diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 9590689c96737..51cf9ada7e7e6 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 9d11456c16e33..5593d2357604f 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_hooks.devdocs.json b/api_docs/kbn_securitysolution_list_hooks.devdocs.json index 2242202088804..1d24c2e9c357d 100644 --- a/api_docs/kbn_securitysolution_list_hooks.devdocs.json +++ b/api_docs/kbn_securitysolution_list_hooks.devdocs.json @@ -29,7 +29,7 @@ "\nThis adds an id to the incoming exception item entries as ReactJS prefers to have\nan id added to them for use as a stable id. Later if we decide to change the data\nmodel to have id's within the array then this code should be removed. If not, then\nthis code should stay as an adapter for ReactJS.\n\nThis does break the type system slightly as we are lying a bit to the type system as we return\nthe same exceptionItem as we have previously but are augmenting the arrays with an id which TypeScript\ndoesn't mind us doing here. However, downstream you will notice that you have an id when the type\ndoes not indicate it. In that case use (ExceptionItem & { id: string }) temporarily if you're using the id. If you're not,\nyou can ignore the id and just use the normal TypeScript with ReactJS.\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -44,7 +44,7 @@ "The exceptionItem to add an id to the threat matches." ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -66,7 +66,7 @@ "\nThis removes an id from the exceptionItem entries as ReactJS prefers to have\nan id added to them for use as a stable id. Later if we decide to change the data\nmodel to have id's within the array then this code should be removed. If not, then\nthis code should stay as an adapter for ReactJS.\n" ], "signature": [ - "(exceptionItem: T) => T" + "(exceptionItem: T) => T" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -103,7 +103,7 @@ "\nTransforms the output of rules to compensate for technical debt or UI concerns such as\nReactJS preferences for having ids within arrays if the data is not modeled that way.\n\nIf you add a new transform of the input called \"myNewTransform\" do it\nin the form of:\nflow(addIdToExceptionItemEntries, myNewTransform)(exceptionItem)\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -118,7 +118,7 @@ "The exceptionItem to transform the output of" ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -138,7 +138,7 @@ "label": "transformNewItemOutput", "description": [], "signature": [ - "(exceptionItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "(exceptionItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -151,7 +151,7 @@ "label": "exceptionItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -171,7 +171,7 @@ "\nTransforms the output of exception items to compensate for technical debt or UI concerns such as\nReactJS preferences for having ids within arrays if the data is not modeled that way.\n\nIf you add a new transform of the output called \"myNewTransform\" do it\nin the form of:\nflow(removeIdFromExceptionItemsEntries, myNewTransform)(exceptionItem)\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -186,7 +186,7 @@ "The exceptionItem to transform the output of" ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -317,7 +317,7 @@ "OptionalSignalArgs", "<", "DeleteListParams", - ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts", "deprecated": false, @@ -445,7 +445,7 @@ "OptionalSignalArgs", "<", "FindListsParams", - ">], { cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ">], { cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts", "deprecated": false, @@ -467,7 +467,7 @@ "OptionalSignalArgs", "<", "ImportListParams", - ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts", "deprecated": false, @@ -623,7 +623,7 @@ "label": "addExceptionListItem", "description": [], "signature": [ - "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -646,7 +646,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false @@ -664,7 +664,7 @@ "label": "updateExceptionListItem", "description": [], "signature": [ - "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -687,7 +687,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false @@ -771,7 +771,7 @@ "signature": [ "(arg: ", "ApiCallMemoProps", - " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }) => Promise" + " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }) => Promise" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -785,7 +785,7 @@ "description": [], "signature": [ "ApiCallMemoProps", - " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }" + " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -954,7 +954,7 @@ "label": "ReturnExceptionListAndItems", "description": [], "signature": [ - "[boolean, { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[], ", + "[boolean, { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[], ", "Pagination", ", Func | null]" ], @@ -996,7 +996,7 @@ "label": "ReturnPersistExceptionItem", "description": [], "signature": [ - "[PersistReturnExceptionItem, React.Dispatch<({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | null>]" + "[PersistReturnExceptionItem, React.Dispatch<({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | null>]" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 02f9e584734f3..a9ba178736c02 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_utils.devdocs.json b/api_docs/kbn_securitysolution_list_utils.devdocs.json index cacc895fdce60..557c90c7812a6 100644 --- a/api_docs/kbn_securitysolution_list_utils.devdocs.json +++ b/api_docs/kbn_securitysolution_list_utils.devdocs.json @@ -27,7 +27,7 @@ "label": "addIdToEntries", "description": [], "signature": [ - "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -40,7 +40,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -58,7 +58,7 @@ "label": "buildExceptionFilter", "description": [], "signature": [ - "({ lists, excludeExceptions, chunkSize, alias, }: { lists: ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]; excludeExceptions: boolean; chunkSize: number; alias: string | null; }) => ", + "({ lists, excludeExceptions, chunkSize, alias, }: { lists: ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]; excludeExceptions: boolean; chunkSize: number; alias: string | null; }) => ", "Filter", " | undefined" ], @@ -83,7 +83,7 @@ "label": "lists", "description": [], "signature": [ - "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" + "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" ], "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", "deprecated": false @@ -413,6 +413,44 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.buildMatchWildcardClause", + "type": "Function", + "tags": [], + "label": "buildMatchWildcardClause", + "description": [], + "signature": [ + "(entry: { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }) => ", + { + "pluginId": "@kbn/securitysolution-list-utils", + "scope": "common", + "docId": "kibKbnSecuritysolutionListUtilsPluginApi", + "section": "def-common.BooleanFilter", + "text": "BooleanFilter" + } + ], + "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.buildMatchWildcardClause.$1", + "type": "Object", + "tags": [], + "label": "entry", + "description": [], + "signature": [ + "{ field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }" + ], + "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-list-utils", "id": "def-common.buildNestedClause", @@ -703,7 +741,7 @@ "section": "def-common.ExceptionsBuilderExceptionItem", "text": "ExceptionsBuilderExceptionItem" }, - "[]) => ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" + "[]) => ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -957,7 +995,7 @@ "section": "def-common.FormattedBuilderEntry", "text": "FormattedBuilderEntry" }, - ") => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }) & { id?: string | undefined; }" + ") => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }) & { id?: string | undefined; }" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -1099,7 +1137,7 @@ "section": "def-common.FormattedBuilderEntry", "text": "FormattedBuilderEntry" }, - ", newField: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }) => { index: number; updatedEntry: ", + ", newField: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }) => { index: number; updatedEntry: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -1144,7 +1182,7 @@ "- newly selected list" ], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -2529,7 +2567,7 @@ "label": "hasLargeValueList", "description": [], "signature": [ - "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => boolean" + "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => boolean" ], "path": "packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts", "deprecated": false, @@ -2542,7 +2580,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts", "deprecated": false, @@ -3162,6 +3200,27 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.ALL_OPERATORS", + "type": "Array", + "tags": [], + "label": "ALL_OPERATORS", + "description": [], + "signature": [ + { + "pluginId": "@kbn/securitysolution-list-utils", + "scope": "common", + "docId": "kibKbnSecuritysolutionListUtilsPluginApi", + "section": "def-common.OperatorOption", + "text": "OperatorOption" + }, + "[]" + ], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-list-utils", "id": "def-common.BuilderEntry", @@ -3170,7 +3229,7 @@ "label": "BuilderEntry", "description": [], "signature": [ - "(({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }) & { id?: string | undefined; }) | ", + "(({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }) & { id?: string | undefined; }) | ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -3229,7 +3288,7 @@ "label": "CreateExceptionListItemBuilderSchema", "description": [], "signature": [ - "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"meta\" | \"entries\"> & { meta: { temporaryUuid: string; }; entries: ", + "Omit<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"meta\" | \"entries\"> & { meta: { temporaryUuid: string; }; entries: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -3245,10 +3304,10 @@ }, { "parentPluginId": "@kbn/securitysolution-list-utils", - "id": "def-common.EVENT_FILTERS_OPERATORS", + "id": "def-common.DETECTION_ENGINE_EXCEPTION_OPERATORS", "type": "Array", "tags": [], - "label": "EVENT_FILTERS_OPERATORS", + "label": "DETECTION_ENGINE_EXCEPTION_OPERATORS", "description": [], "signature": [ { @@ -3266,10 +3325,10 @@ }, { "parentPluginId": "@kbn/securitysolution-list-utils", - "id": "def-common.EXCEPTION_OPERATORS", + "id": "def-common.EVENT_FILTERS_OPERATORS", "type": "Array", "tags": [], - "label": "EXCEPTION_OPERATORS", + "label": "EVENT_FILTERS_OPERATORS", "description": [], "signature": [ { @@ -3363,7 +3422,7 @@ "label": "ExceptionListItemBuilderSchema", "description": [], "signature": [ - "Omit<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }, \"entries\"> & { entries: ", + "Omit<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }, \"entries\"> & { entries: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -3496,6 +3555,67 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.doesNotMatchOperator", + "type": "Object", + "tags": [], + "label": "doesNotMatchOperator", + "description": [], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.doesNotMatchOperator.message", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.doesNotMatchOperator.operator", + "type": "string", + "tags": [], + "label": "operator", + "description": [], + "signature": [ + "ListOperatorEnum", + ".EXCLUDED" + ], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.doesNotMatchOperator.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "ListOperatorTypeEnum", + ".WILDCARD" + ], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/securitysolution-list-utils", + "id": "def-common.doesNotMatchOperator.value", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "path": "packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-list-utils", "id": "def-common.existsOperator", diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 0355d79061d7d..5d4441c311fd1 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 227 | 0 | 179 | 0 | +| 235 | 0 | 187 | 0 | ## Common diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index e7463195dbab2..aa58ab8ba58d5 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-rules plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index e54bceb33b5cc..aa7a01d41d592 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 31fe8429dd093..99da23bde1fd2 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index fa72055f1df6b..4c821d8e0ff20 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-http-tools plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index dd031b26b7833..eadadee9a6dee 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-route-repository plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 689c18a2717d6..e5bf475175d4f 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_card_no_data.devdocs.json b/api_docs/kbn_shared_ux_card_no_data.devdocs.json index 0d842c72f5227..5058b282d79c0 100644 --- a/api_docs/kbn_shared_ux_card_no_data.devdocs.json +++ b/api_docs/kbn_shared_ux_card_no_data.devdocs.json @@ -325,21 +325,21 @@ "label": "Props", "description": [], "signature": [ - "{ children?: React.ReactNode; icon?: React.ReactElement<", + "{ children?: React.ReactNode; className?: string | undefined; id?: string | undefined; lang?: string | undefined; style?: React.CSSProperties | undefined; target?: string | undefined; role?: React.AriaRole | undefined; tabIndex?: number | undefined; display?: \"primary\" | \"success\" | \"accent\" | \"warning\" | \"danger\" | \"subdued\" | \"transparent\" | \"plain\" | undefined; href?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"true\" | \"false\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"link\" | \"copy\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"true\" | \"false\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChange?: React.FormEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onError?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; title?: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | undefined; button?: React.ReactNode; hidden?: boolean | undefined; icon?: React.ReactElement<", "EuiIconProps", - ", string | React.JSXElementConstructor> | null | undefined; image?: string | React.ReactElement> | undefined; className?: string | undefined; title?: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | undefined; onChange?: React.FormEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; id?: string | undefined; description?: React.ReactNode; security?: string | undefined; defaultValue?: string | number | readonly string[] | undefined; hidden?: boolean | undefined; lang?: string | undefined; onError?: React.ReactEventHandler | undefined; category?: string | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; contentEditable?: Booleanish | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: React.AriaRole | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"email\" | \"search\" | \"text\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | \"location\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"dialog\" | \"listbox\" | \"tree\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"other\" | \"ascending\" | \"descending\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; button?: React.ReactNode; href?: string | undefined; rel?: string | undefined; target?: string | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"xs\" | \"l\" | \"xl\" | undefined; footer?: React.ReactNode; hasBorder?: boolean | undefined; textAlign?: CardAlignment | undefined; titleElement?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | undefined; titleSize?: \"s\" | \"xs\" | undefined; betaBadgeProps?: Partial<(", + ", string | React.JSXElementConstructor> | null | undefined; image?: string | React.ReactElement> | undefined; description?: React.ReactNode; security?: string | undefined; defaultValue?: string | number | readonly string[] | undefined; category?: string | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; contentEditable?: \"inherit\" | Booleanish | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; translate?: \"no\" | \"yes\" | undefined; radioGroup?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"off\" | \"on\" | undefined; inputMode?: \"none\" | \"text\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; rel?: string | undefined; paddingSize?: \"none\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xs\" | undefined; footer?: React.ReactNode; hasBorder?: boolean | undefined; textAlign?: CardAlignment | undefined; titleElement?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | undefined; titleSize?: \"s\" | \"xs\" | undefined; betaBadgeProps?: Partial<(", "CommonProps", " & ", "DisambiguateSet", "<(", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">), WithSpanProps> & WithSpanProps & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -349,13 +349,13 @@ "DisambiguateSet", "<(", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">), WithSpanProps> & WithSpanProps & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -367,15 +367,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -385,15 +385,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -405,15 +405,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -425,7 +425,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -433,7 +433,7 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -443,7 +443,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -451,7 +451,7 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -463,7 +463,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -471,13 +471,13 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; })> | undefined; display?: \"subdued\" | \"primary\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"transparent\" | \"plain\" | undefined; selectable?: ", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; })> | undefined; selectable?: ", "EuiCardSelectProps", " | undefined; }" ], diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 28abe15482191..cfaa02e38a065 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_components.devdocs.json b/api_docs/kbn_shared_ux_components.devdocs.json index 52bb9bcd5d8b0..48342694fc62e 100644 --- a/api_docs/kbn_shared_ux_components.devdocs.json +++ b/api_docs/kbn_shared_ux_components.devdocs.json @@ -221,7 +221,7 @@ "signature": [ "Omit<", "EuiPageProps", - ", \"paddingSize\"> & { template?: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + ", \"paddingSize\"> & { template?: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\" | undefined; paddingSize?: \"none\" | \"s\" | \"m\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", diff --git a/api_docs/kbn_shared_ux_components.mdx b/api_docs/kbn_shared_ux_components.mdx index 0f3d503e8e6e5..ea5ca5a0543c6 100644 --- a/api_docs/kbn_shared_ux_components.mdx +++ b/api_docs/kbn_shared_ux_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-components title: "@kbn/shared-ux-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-components plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 06cf6b161b9cf..7d5af7c06142b 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 65e9ef61788d6..65633e2d106c5 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 74497e91f9e62..0c99e09aeabf5 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index b3b4e5019602c..0776d0627d405 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_services.mdx b/api_docs/kbn_shared_ux_services.mdx index fe3d5e7b86513..9ec9a8ad046f4 100644 --- a/api_docs/kbn_shared_ux_services.mdx +++ b/api_docs/kbn_shared_ux_services.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-services title: "@kbn/shared-ux-services" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-services plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-services'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_storybook.mdx b/api_docs/kbn_shared_ux_storybook.mdx index 839053658b099..c624ddcb7dd98 100644 --- a/api_docs/kbn_shared_ux_storybook.mdx +++ b/api_docs/kbn_shared_ux_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook title: "@kbn/shared-ux-storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-storybook plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index e016371b504bf..2051ac153c097 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-utility plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_some_dev_log.devdocs.json b/api_docs/kbn_some_dev_log.devdocs.json new file mode 100644 index 0000000000000..7bfd2a8a85bf8 --- /dev/null +++ b/api_docs/kbn_some_dev_log.devdocs.json @@ -0,0 +1,336 @@ +{ + "id": "@kbn/some-dev-log", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog", + "type": "Interface", + "tags": [], + "label": "SomeDevLog", + "description": [ + "\nGeneric interface that is implemented by the ToolingLog and the logger\nused by kbn_pm, which is responsible for running before the repo is\nbootstrapped and therefore can't use the ToolingLog." + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.info", + "type": "Function", + "tags": [], + "label": "info", + "description": [ + "\nLog an info message" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.info.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.info.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.warning", + "type": "Function", + "tags": [], + "label": "warning", + "description": [ + "\nLog a warning message" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.warning.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.warning.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.error", + "type": "Function", + "tags": [], + "label": "error", + "description": [ + "\nLog an error message" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.error.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.error.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.success", + "type": "Function", + "tags": [], + "label": "success", + "description": [ + "\nLog a success message" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.success.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.success.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.debug", + "type": "Function", + "tags": [], + "label": "debug", + "description": [ + "\nLog a debug message. Only printed to the terminal when --debug or --verbose are passed" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.debug.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.debug.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.verbose", + "type": "Function", + "tags": [], + "label": "verbose", + "description": [ + "\nLog a verbose message. Only printed to the terminal when --verbose is passed" + ], + "signature": [ + "(msg: string, ...rest: any[]) => void" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.verbose.$1", + "type": "string", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeDevLog.verbose.$2", + "type": "Array", + "tags": [], + "label": "rest", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/some-dev-log", + "id": "def-server.SomeLogLevel", + "type": "Type", + "tags": [], + "label": "SomeLogLevel", + "description": [ + "\nBasic set of log-level flags, the common levels implemented between\nthe ToolingLog and the kbn_pm logger" + ], + "signature": [ + "\"info\" | \"debug\" | \"verbose\" | \"quiet\"" + ], + "path": "packages/kbn-some-dev-log/src/some_dev_log.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx new file mode 100644 index 0000000000000..46c8855d5c547 --- /dev/null +++ b/api_docs/kbn_some_dev_log.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnSomeDevLogPluginApi +slug: /kibana-dev-docs/api/kbn-some-dev-log +title: "@kbn/some-dev-log" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/some-dev-log plugin +date: 2022-07-20 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 20 | 0 | 12 | 0 | + +## Server + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index f0a03ba8cdd9f..20e11746a6cb7 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/sort-package-json plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 09b22d7c14368..42b98501ed760 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/std plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 9a7dc545fe43c..cd693a01fbf8c 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_storybook.devdocs.json b/api_docs/kbn_storybook.devdocs.json index 7388a90ac8ed2..ddfb4665d511a 100644 --- a/api_docs/kbn_storybook.devdocs.json +++ b/api_docs/kbn_storybook.devdocs.json @@ -108,6 +108,9 @@ "description": [ "\nThe interface for Storybook configuration in `main.ts` files." ], + "signature": [ + "StorybookConfig" + ], "path": "node_modules/@storybook/core-common/dist/ts3.9/types.d.ts", "deprecated": false, "children": [ diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 881e3c2572eb9..33ca20869da9d 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/storybook plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index f426b55e05a9e..2a4917308c8b4 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/telemetry-tools plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 4c9700cef79cd..d26b265440ed6 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 05642fd07db93..4fb4e83c4fa2c 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test-jest-helpers plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_tooling_log.devdocs.json b/api_docs/kbn_tooling_log.devdocs.json index 6442d3feca9f3..3ead6f8896f56 100644 --- a/api_docs/kbn_tooling_log.devdocs.json +++ b/api_docs/kbn_tooling_log.devdocs.json @@ -17,6 +17,17 @@ "tags": [], "label": "ToolingLog", "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "server", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-server.ToolingLog", + "text": "ToolingLog" + }, + " implements ", + "SomeDevLog" + ], "path": "packages/kbn-tooling-log/src/tooling_log.ts", "deprecated": false, "children": [ diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index b2513a85dacb3..ec55c535ebe7b 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/tooling-log plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index db9c165b4e4d4..1aec96470a67f 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index eb74684b282c9..1077f92e604e7 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer-core plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 16918024301ab..4256b2b093517 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/typed-react-router-config plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 41296d33bb354..590ac83265510 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ui-theme plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index d6ffd66a3c4ea..8e94b170084fc 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 34329cafcf352..dfff5f692d03c 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types-jest plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utils.devdocs.json b/api_docs/kbn_utils.devdocs.json index 5386005a725b4..9f4936d0c79cb 100644 --- a/api_docs/kbn_utils.devdocs.json +++ b/api_docs/kbn_utils.devdocs.json @@ -460,7 +460,7 @@ "label": "isKibanaDistributable", "description": [], "signature": [ - "() => any" + "() => boolean" ], "path": "packages/kbn-utils/src/package_json/index.ts", "deprecated": false, @@ -517,23 +517,11 @@ "tags": [], "label": "kibanaPackageJson", "description": [], + "signature": [ + "KibanaPackageJson" + ], "path": "packages/kbn-utils/src/package_json/index.ts", "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/utils", - "id": "def-server.kibanaPackageJson.Unnamed", - "type": "Any", - "tags": [], - "label": "Unnamed", - "description": [], - "signature": [ - "any" - ], - "path": "packages/kbn-utils/src/package_json/index.ts", - "deprecated": false - } - ], "initialIsOpen": false } ] diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 5fed058183a56..635517a8b54cf 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 31 | 1 | 21 | 0 | +| 30 | 0 | 20 | 0 | ## Server diff --git a/api_docs/kbn_yarn_lock_validator.devdocs.json b/api_docs/kbn_yarn_lock_validator.devdocs.json new file mode 100644 index 0000000000000..3a3cc4dd5c699 --- /dev/null +++ b/api_docs/kbn_yarn_lock_validator.devdocs.json @@ -0,0 +1,148 @@ +{ + "id": "@kbn/yarn-lock-validator", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.readYarnLock", + "type": "Function", + "tags": [], + "label": "readYarnLock", + "description": [ + "\nParse any yarn.lock content into a YarnLock map" + ], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/yarn-lock-validator", + "scope": "server", + "docId": "kibKbnYarnLockValidatorPluginApi", + "section": "def-server.YarnLock", + "text": "YarnLock" + }, + ">" + ], + "path": "packages/kbn-yarn-lock-validator/src/yarn_lock.ts", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.validateDependencies", + "type": "Function", + "tags": [], + "label": "validateDependencies", + "description": [ + "\nValidates the passed yarn.lock file to ensure that we aren't accidentally reproducing\nspecific scenarios we have tried to remove from the codebase." + ], + "signature": [ + "(log: ", + "SomeDevLog", + ", yarnLock: ", + { + "pluginId": "@kbn/yarn-lock-validator", + "scope": "server", + "docId": "kibKbnYarnLockValidatorPluginApi", + "section": "def-server.YarnLock", + "text": "YarnLock" + }, + ") => Promise" + ], + "path": "packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.validateDependencies.$1", + "type": "Object", + "tags": [], + "label": "log", + "description": [], + "signature": [ + "SomeDevLog" + ], + "path": "packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.validateDependencies.$2", + "type": "Object", + "tags": [], + "label": "yarnLock", + "description": [], + "signature": [ + { + "pluginId": "@kbn/yarn-lock-validator", + "scope": "server", + "docId": "kibKbnYarnLockValidatorPluginApi", + "section": "def-server.YarnLock", + "text": "YarnLock" + } + ], + "path": "packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.YarnLock", + "type": "Interface", + "tags": [], + "label": "YarnLock", + "description": [ + "\nParsed yarn.lock file contents mapping `name@versionRange` strings to information from\nthe yarn.lock file that is used to satisfy that request." + ], + "path": "packages/kbn-yarn-lock-validator/src/yarn_lock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/yarn-lock-validator", + "id": "def-server.YarnLock.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[key: string]: { version: string; resolved: string; integrity: string; dependencies?: { [key: string]: string; } | undefined; optionalDependencies?: { [key: string]: string; } | undefined; }", + "description": [ + "a simple map of `name@versionrange` tags to metadata about a package" + ], + "signature": [ + "[key: string]: { version: string; resolved: string; integrity: string; dependencies?: { [key: string]: string; } | undefined; optionalDependencies?: { [key: string]: string; } | undefined; }" + ], + "path": "packages/kbn-yarn-lock-validator/src/yarn_lock.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx new file mode 100644 index 0000000000000..8d5b0ff324848 --- /dev/null +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnYarnLockValidatorPluginApi +slug: /kibana-dev-docs/api/kbn-yarn-lock-validator +title: "@kbn/yarn-lock-validator" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/yarn-lock-validator plugin +date: 2022-07-20 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 2 | 0 | + +## Server + +### Functions + + +### Interfaces + + diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 1399e76c0e754..727ccdf9ab44d 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaOverview plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 1b233147eb7da..3d697378ee293 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -4202,7 +4202,7 @@ "signature": [ "Omit<", "EuiPageProps", - ", \"paddingSize\"> & { template?: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + ", \"paddingSize\"> & { template?: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\" | undefined; paddingSize?: \"none\" | \"s\" | \"m\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 052007a4588ae..336a4f6e5ec9d 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaReact plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index b1513686419f1..196f00ad17401 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaUtils plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index f6d9bfd13c9a4..93ed01eb4775a 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github summary: API docs for the kubernetesSecurity plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 406a04922c602..a0cb2134f3ed9 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -979,7 +979,7 @@ "label": "seriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\"" + "\"bar\" | \"line\" | \"area\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false @@ -1426,7 +1426,7 @@ "label": "layerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", "deprecated": false @@ -1453,7 +1453,7 @@ "label": "rowHeight", "description": [], "signature": [ - "\"custom\" | \"auto\" | \"single\" | undefined" + "\"auto\" | \"custom\" | \"single\" | undefined" ], "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", "deprecated": false @@ -1466,7 +1466,7 @@ "label": "headerRowHeight", "description": [], "signature": [ - "\"custom\" | \"auto\" | \"single\" | undefined" + "\"auto\" | \"custom\" | \"single\" | undefined" ], "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", "deprecated": false @@ -2695,7 +2695,7 @@ "label": "layerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -2822,7 +2822,7 @@ "\nordinal: Each name is a unique value, but the names are in sorted order, like \"Top values\"\ninterval: Histogram data, like date or number histograms\nratio: Most number data is rendered as a ratio that includes 0" ], "signature": [ - "\"interval\" | \"ordinal\" | \"ratio\" | undefined" + "\"ordinal\" | \"interval\" | \"ratio\" | undefined" ], "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false @@ -3211,7 +3211,7 @@ "label": "numberDisplay", "description": [], "signature": [ - "\"percent\" | \"value\" | \"hidden\"" + "\"percent\" | \"hidden\" | \"value\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -3237,7 +3237,7 @@ "label": "legendDisplay", "description": [], "signature": [ - "\"default\" | \"show\" | \"hide\"" + "\"default\" | \"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -3625,7 +3625,7 @@ "\nThe change type indicates what was changed in this table compared to the currently active table of this layer." ], "signature": [ - "\"layers\" | \"initial\" | \"unchanged\" | \"reduced\" | \"extended\" | \"reorder\"" + "\"initial\" | \"layers\" | \"unchanged\" | \"reduced\" | \"extended\" | \"reorder\"" ], "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false @@ -3681,7 +3681,7 @@ "label": "params", "description": [], "signature": [ - "{ size: number; accuracyMode?: boolean | undefined; orderBy: { type: \"alphabetical\"; fallback?: boolean | undefined; } | { type: \"rare\"; maxDocCount: number; } | { type: \"column\"; columnId: string; } | { type: \"custom\"; }; orderAgg?: ", + "{ size: number; accuracyMode?: boolean | undefined; include?: number[] | string[] | undefined; exclude?: number[] | string[] | undefined; includeIsRegex?: boolean | undefined; excludeIsRegex?: boolean | undefined; orderBy: { type: \"alphabetical\"; fallback?: boolean | undefined; } | { type: \"rare\"; maxDocCount: number; } | { type: \"column\"; columnId: string; } | { type: \"custom\"; }; orderAgg?: ", { "pluginId": "lens", "scope": "public", @@ -5504,7 +5504,7 @@ "label": "valueLabels", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false @@ -5869,7 +5869,7 @@ "label": "seriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" + "\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" ], "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", "deprecated": false @@ -6154,7 +6154,7 @@ "label": "preferredSeriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" + "\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" ], "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", "deprecated": false @@ -6960,7 +6960,7 @@ "section": "def-common.GaugeState", "text": "GaugeState" }, - ", \"goal\" | \"metric\" | \"min\" | \"max\"> & { metricAccessor?: string | undefined; minAccessor?: string | undefined; maxAccessor?: string | undefined; goalAccessor?: string | undefined; } & { layerId: string; layerType: ", + ", \"goal\" | \"min\" | \"metric\" | \"max\"> & { metricAccessor?: string | undefined; minAccessor?: string | undefined; maxAccessor?: string | undefined; goalAccessor?: string | undefined; } & { layerId: string; layerType: ", { "pluginId": "lens", "scope": "common", @@ -7037,7 +7037,7 @@ "label": "IconPosition", "description": [], "signature": [ - "\"above\" | \"below\" | \"left\" | \"right\" | \"auto\"" + "\"above\" | \"below\" | \"auto\" | \"left\" | \"right\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -7051,7 +7051,7 @@ "label": "LayerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -7344,12 +7344,35 @@ "label": "SeriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" + "\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" ], "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "lens", + "id": "def-public.StandardDeviationIndexPatternColumn", + "type": "Type", + "tags": [], + "label": "StandardDeviationIndexPatternColumn", + "description": [], + "signature": [ + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.FieldBasedIndexPatternColumn", + "text": "FieldBasedIndexPatternColumn" + }, + " & { operationType: \"standard_deviation\"; params?: { emptyAsNull?: boolean | undefined; format?: ", + "ValueFormatConfig", + " | undefined; } | undefined; }" + ], + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "lens", "id": "def-public.SumIndexPatternColumn", @@ -7486,7 +7509,7 @@ "label": "ValueLabelConfig", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, @@ -7500,7 +7523,7 @@ "label": "ValueLabelMode", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -7578,7 +7601,7 @@ "label": "YAxisMode", "description": [], "signature": [ - "\"bottom\" | \"left\" | \"right\" | \"auto\"" + "\"auto\" | \"bottom\" | \"left\" | \"right\"" ], "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", "deprecated": false, @@ -7592,7 +7615,7 @@ "label": "YScaleType", "description": [], "signature": [ - "\"time\" | \"log\" | \"linear\" | \"sqrt\"" + "\"log\" | \"time\" | \"linear\" | \"sqrt\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -8391,7 +8414,7 @@ "label": "rowHeight", "description": [], "signature": [ - "\"custom\" | \"auto\" | \"single\"" + "\"auto\" | \"custom\" | \"single\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false @@ -8444,7 +8467,7 @@ "label": "valueLabels", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false @@ -8487,7 +8510,7 @@ "label": "valueLabels", "description": [], "signature": [ - "\"outside\" | \"hide\" | \"inside\"" + "\"hide\" | \"outside\" | \"inside\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false @@ -8728,7 +8751,7 @@ "label": "OperationTypePost712", "description": [], "signature": [ - "\"filters\" | \"count\" | \"date_histogram\" | \"percentile\" | \"min\" | \"max\" | \"sum\" | \"average\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"unique_count\" | \"last_value\" | \"counter_rate\" | \"differences\"" + "\"min\" | \"max\" | \"sum\" | \"filters\" | \"count\" | \"date_histogram\" | \"percentile\" | \"average\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"unique_count\" | \"last_value\" | \"counter_rate\" | \"differences\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -8742,7 +8765,7 @@ "label": "OperationTypePre712", "description": [], "signature": [ - "\"filters\" | \"count\" | \"date_histogram\" | \"percentile\" | \"min\" | \"max\" | \"sum\" | \"range\" | \"terms\" | \"avg\" | \"median\" | \"cumulative_sum\" | \"derivative\" | \"moving_average\" | \"last_value\" | \"counter_rate\" | \"cardinality\"" + "\"min\" | \"max\" | \"sum\" | \"filters\" | \"count\" | \"date_histogram\" | \"percentile\" | \"range\" | \"terms\" | \"avg\" | \"median\" | \"cumulative_sum\" | \"derivative\" | \"moving_average\" | \"last_value\" | \"counter_rate\" | \"cardinality\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -9309,7 +9332,7 @@ "label": "layerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -9639,7 +9662,7 @@ "label": "numberDisplay", "description": [], "signature": [ - "\"percent\" | \"value\" | \"hidden\"" + "\"percent\" | \"hidden\" | \"value\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -9665,7 +9688,7 @@ "label": "legendDisplay", "description": [], "signature": [ - "\"default\" | \"show\" | \"hide\"" + "\"default\" | \"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false @@ -9992,7 +10015,7 @@ "label": "LayerType", "description": [], "signature": [ - "\"data\" | \"annotations\" | \"referenceLine\"" + "\"data\" | \"referenceLine\" | \"annotations\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, @@ -10006,7 +10029,7 @@ "label": "LegendDisplayType", "description": [], "signature": [ - "\"default\" | \"show\" | \"hide\"" + "\"default\" | \"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, @@ -10062,7 +10085,7 @@ "label": "NumberDisplayType", "description": [], "signature": [ - "\"percent\" | \"value\" | \"hidden\"" + "\"percent\" | \"hidden\" | \"value\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, @@ -10147,7 +10170,7 @@ "label": "ValueLabelConfig", "description": [], "signature": [ - "\"show\" | \"hide\"" + "\"hide\" | \"show\"" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false, diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 2e76b573df50d..73598e8c87319 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github summary: API docs for the lens plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 601 | 0 | 523 | 40 | +| 602 | 0 | 524 | 40 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index e913f79eabf7a..91a4a4f920574 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseApiGuard plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 9dd5201006e01..a4aa33117a19d 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseManagement plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 51fbbdcb31f45..52322508e15c3 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github summary: API docs for the licensing plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lists.devdocs.json b/api_docs/lists.devdocs.json index cfca7e62412b5..f7c6a674ddaad 100644 --- a/api_docs/lists.devdocs.json +++ b/api_docs/lists.devdocs.json @@ -311,7 +311,7 @@ "label": "exceptionItems", "description": [], "signature": [ - "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" + "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" ], "path": "x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx", "deprecated": false @@ -324,7 +324,7 @@ "label": "exceptionsToDelete", "description": [], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" ], "path": "x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx", "deprecated": false @@ -585,7 +585,7 @@ "signature": [ "({ itemId, id, namespaceType, }: ", "GetExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -659,7 +659,7 @@ "signature": [ "({ comments, description, entries, itemId, meta, name, osTypes, tags, type, }: ", "CreateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -695,7 +695,7 @@ "signature": [ "({ _version, comments, description, entries, id, itemId, meta, name, osTypes, tags, type, }: ", "UpdateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -731,7 +731,7 @@ "signature": [ "({ itemId, id, }: ", "GetEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -881,7 +881,7 @@ "section": "def-server.CreateExceptionListItemOptions", "text": "CreateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -929,7 +929,7 @@ "section": "def-server.UpdateExceptionListItemOptions", "text": "UpdateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -971,7 +971,7 @@ "signature": [ "({ id, itemId, namespaceType, }: ", "DeleteExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1041,7 +1041,7 @@ "signature": [ "({ id, itemId, }: ", "DeleteEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1075,7 +1075,7 @@ "signature": [ "({ listId, filter, perPage, pit, page, searchAfter, sortField, sortOrder, namespaceType, }: ", "FindExceptionListItemOptions", - ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" + ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1111,7 +1111,7 @@ "signature": [ "({ listId, filter, perPage, pit, page, searchAfter, sortField, sortOrder, namespaceType, }: ", "FindExceptionListsItemOptions", - ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" + ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1147,7 +1147,7 @@ "signature": [ "({ perPage, pit, page, searchAfter, sortField, sortOrder, valueListId, }: ", "FindValueListExceptionListsItems", - ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" + ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1219,7 +1219,7 @@ "signature": [ "({ filter, perPage, page, pit, searchAfter, sortField, sortOrder, }: ", "FindEndpointListItemOptions", - ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" + ") => Promise<({ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } & { pit?: string | undefined; }) | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1680,7 +1680,7 @@ "signature": [ "({ id }: ", "GetListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1716,7 +1716,7 @@ "signature": [ "({ id, deserializer, immutable, serializer, name, description, type, meta, version, }: ", "CreateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1752,7 +1752,7 @@ "signature": [ "({ id, deserializer, serializer, name, description, immutable, type, meta, version, }: ", "CreateListIfItDoesNotExistOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2168,7 +2168,7 @@ "signature": [ "({ id }: ", "DeleteListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2204,7 +2204,7 @@ "signature": [ "({ listId, value, type, }: ", "DeleteListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2240,7 +2240,7 @@ "signature": [ "({ id }: ", "DeleteListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2310,7 +2310,7 @@ "signature": [ "({ deserializer, serializer, type, listId, stream, meta, version, }: ", "ImportListItemsToStreamOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2344,7 +2344,7 @@ "signature": [ "({ listId, value, type, }: ", "GetListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2380,7 +2380,7 @@ "signature": [ "({ id, deserializer, serializer, listId, value, type, meta, }: ", "CreateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2414,7 +2414,7 @@ "signature": [ "({ _version, id, value, meta, }: ", "UpdateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2448,7 +2448,7 @@ "signature": [ "({ _version, id, name, description, meta, version, }: ", "UpdateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2482,7 +2482,7 @@ "signature": [ "({ id }: ", "GetListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2518,7 +2518,7 @@ "signature": [ "({ type, listId, value, }: ", "GetListItemsByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2554,7 +2554,7 @@ "signature": [ "({ type, listId, value, }: ", "SearchListItemByValuesOptions", - ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" + ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2590,7 +2590,7 @@ "signature": [ "({ filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2626,7 +2626,7 @@ "signature": [ "({ listId, filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListItemOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -2693,7 +2693,7 @@ "an array with the exception list item entries" ], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", "deprecated": false @@ -2985,7 +2985,7 @@ "item exception entries logic" ], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip\" | \"text\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"text\" | \"date\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", "deprecated": false @@ -3969,7 +3969,7 @@ "label": "esClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -4033,7 +4035,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -5099,8 +5101,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 004c84ac41387..5e57784c6888b 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github summary: API docs for the lists plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 86501943aa688..15873c6df7d93 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github summary: API docs for the management plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 4f722ea011179..59f44f0bee696 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github summary: API docs for the maps plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index aa99a0d006914..6a73b57230c88 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github summary: API docs for the mapsEms plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ml.devdocs.json b/api_docs/ml.devdocs.json index 27f79d5906f45..7db42e75b04cb 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -1262,7 +1262,7 @@ }, " extends Pick<", "UseDataGridReturnType", - ", \"status\" | \"rowCount\" | \"errorMessage\" | \"baseline\" | \"chartsVisible\" | \"chartsButtonVisible\" | \"ccsWarning\" | \"columnsWithCharts\" | \"invalidSortingColumnns\" | \"noDataMessage\" | \"onChangeItemsPerPage\" | \"onChangePage\" | \"onSort\" | \"pagination\" | \"setPagination\" | \"setVisibleColumns\" | \"rowCountRelation\" | \"sortingColumns\" | \"tableItems\" | \"toggleChartVisibility\" | \"visibleColumns\" | \"predictionFieldName\" | \"resultsField\">" + ", \"status\" | \"baseline\" | \"rowCount\" | \"errorMessage\" | \"chartsVisible\" | \"chartsButtonVisible\" | \"ccsWarning\" | \"columnsWithCharts\" | \"invalidSortingColumnns\" | \"noDataMessage\" | \"onChangeItemsPerPage\" | \"onChangePage\" | \"onSort\" | \"pagination\" | \"setPagination\" | \"setVisibleColumns\" | \"rowCountRelation\" | \"sortingColumns\" | \"tableItems\" | \"toggleChartVisibility\" | \"visibleColumns\" | \"predictionFieldName\" | \"resultsField\">" ], "path": "x-pack/plugins/ml/public/application/components/data_grid/types.ts", "deprecated": false, diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index ecf3540a26754..7655841db6be3 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github summary: API docs for the ml plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 00de65b67c3ce..7544f3af5044a 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoring plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 8409f4b3e6e7a..ac9d0908b48d6 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoringCollection plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/navigation.devdocs.json b/api_docs/navigation.devdocs.json index e07b06a8b3e1e..a7763c89bcdd8 100644 --- a/api_docs/navigation.devdocs.json +++ b/api_docs/navigation.devdocs.json @@ -410,13 +410,13 @@ "DisambiguateSet", "<(", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">), WithSpanProps> & WithSpanProps & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -426,13 +426,13 @@ "DisambiguateSet", "<(", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">), WithSpanProps> & WithSpanProps & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -444,15 +444,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -462,15 +462,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -482,15 +482,15 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", - " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\"> & { iconType?: ", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\"> & { iconType?: ", "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -502,7 +502,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -510,7 +510,7 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -520,7 +520,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -528,7 +528,7 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", @@ -540,7 +540,7 @@ "DisambiguateSet", " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"onClick\" | \"href\">) | (", + " & { href: string; target?: string | undefined; rel?: string | undefined; } & Omit, \"color\" | \"href\" | \"onClick\">) | (", "DisambiguateSet", " & { onClick?: React.MouseEventHandler | undefined; onClickAriaLabel?: string | undefined; } & Omit, \"color\" | \"onClick\">)> & ", "DisambiguateSet", @@ -548,7 +548,7 @@ "IconType", " | undefined; label: React.ReactNode; tooltipContent?: React.ReactNode; tooltipPosition?: ", "ToolTipPositions", - " | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"hollow\" | undefined; size?: ", + " | undefined; title?: string | undefined; color?: \"accent\" | \"subdued\" | \"hollow\" | undefined; size?: ", "BetaBadgeSize", " | undefined; } & ", "DisambiguateSet", diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index f554bf3e4a482..fb9f2d616cf2e 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github summary: API docs for the navigation plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index d647814d34fc8..abb84788d032d 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github summary: API docs for the newsfeed plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 58534e319fad7..8a5367d371726 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -696,11 +696,11 @@ }, " | undefined; list: () => string[]; }; selectedAlertId?: string | undefined; } & ", "CommonProps", - " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | \"css\" | keyof React.HTMLAttributes> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }, \"children\" | \"color\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"id\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"as\" | keyof ", + " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | \"css\" | keyof React.HTMLAttributes> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }, \"children\" | \"color\" | \"id\" | \"lang\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | keyof ", "CommonProps", - " | keyof React.ClassAttributes | keyof _EuiFlyoutProps>, \"children\" | \"alert\" | \"color\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"key\" | \"id\" | \"css\" | \"security\" | \"defaultValue\" | \"hidden\" | \"lang\" | \"onError\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"as\" | keyof ", + " | \"title\" | \"hidden\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"as\" | keyof React.ClassAttributes | keyof _EuiFlyoutProps>, \"children\" | \"color\" | \"id\" | \"lang\" | \"tabIndex\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChange\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | keyof ", "CommonProps", - " | \"alerts\" | keyof _EuiFlyoutProps | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" + " | \"title\" | \"alert\" | \"hidden\" | \"key\" | \"css\" | \"security\" | \"defaultValue\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"translate\" | \"radioGroup\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"as\" | \"alerts\" | keyof _EuiFlyoutProps | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" ], "path": "x-pack/plugins/observability/public/index.ts", "deprecated": false, @@ -3656,7 +3656,7 @@ "label": "defaultSeriesType", "description": [], "signature": [ - "\"area\" | \"line\" | \"bar\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" + "\"bar\" | \"line\" | \"area\" | \"bar_stacked\" | \"area_stacked\" | \"bar_horizontal\" | \"bar_percentage_stacked\" | \"bar_horizontal_stacked\" | \"area_percentage_stacked\" | \"bar_horizontal_percentage_stacked\"" ], "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", "deprecated": false @@ -4467,6 +4467,9 @@ "tags": [], "label": "METRIC_TYPE", "description": [], + "signature": [ + "METRIC_TYPE" + ], "path": "node_modules/@types/kbn__analytics/index.d.ts", "deprecated": false, "initialIsOpen": false @@ -4560,6 +4563,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.apmServiceGroupMaxNumberOfServices", + "type": "string", + "tags": [], + "label": "apmServiceGroupMaxNumberOfServices", + "description": [], + "signature": [ + "\"observability:apmServiceGroupMaxNumberOfServices\"" + ], + "path": "x-pack/plugins/observability/common/ui_settings_keys.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.DragHandleProps", @@ -4582,6 +4599,9 @@ "tags": [], "label": "DropResult", "description": [], + "signature": [ + "DropResult" + ], "path": "x-pack/plugins/observability/public/typings/eui_draggable/index.ts", "deprecated": false, "initialIsOpen": false @@ -4974,11 +4994,11 @@ "DisambiguateSet", ", Omit, \"href\">> & Omit, \"href\">) | (", "DisambiguateSet", - ", \"href\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes))), \"color\" | \"onClick\" | \"rel\" | \"target\"> & { size?: ItemSize | undefined; color?: Color | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: ", + ", \"href\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes))), \"color\" | \"target\" | \"onClick\" | \"rel\"> & { size?: ItemSize | undefined; color?: Color | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: ", "IconType", " | undefined; iconProps?: Omit<", "EuiIconProps", - ", \"type\"> | undefined; icon?: React.ReactElement> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", + ", \"type\"> | undefined; icon?: React.ReactElement> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"button\" | \"reset\" | \"submit\" | undefined; } & ", "EuiButtonIconProps", " & { onClick?: React.MouseEventHandler | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: React.Ref | undefined; } & { alwaysShow?: boolean | undefined; }) | undefined; onClick?: React.MouseEventHandler | undefined; wrapText?: boolean | undefined; buttonRef?: React.Ref | undefined; }" ], @@ -5368,7 +5388,7 @@ "label": "client", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -5432,7 +5454,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -6498,8 +6520,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -7463,6 +7483,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-common.apmServiceGroupMaxNumberOfServices", + "type": "string", + "tags": [], + "label": "apmServiceGroupMaxNumberOfServices", + "description": [], + "signature": [ + "\"observability:apmServiceGroupMaxNumberOfServices\"" + ], + "path": "x-pack/plugins/observability/common/ui_settings_keys.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-common.apmServiceInventoryOptimizedSorting", @@ -7725,7 +7759,7 @@ "label": "TimeUnitChar", "description": [], "signature": [ - "\"d\" | \"h\" | \"m\" | \"s\"" + "\"d\" | \"s\" | \"m\" | \"h\"" ], "path": "x-pack/plugins/observability/common/utils/formatters/duration.ts", "deprecated": false, diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 3dd22a2322057..56d58a20d5434 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github summary: API docs for the observability plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 386 | 2 | 383 | 31 | +| 388 | 2 | 385 | 31 | ## Client diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 45b10f6a2109e..92d3e79e57a03 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github summary: API docs for the osquery plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 0f422f6cae03f..7a107870aa158 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory summary: Directory of public APIs available through plugins or packages. -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -12,13 +12,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 350 | 290 | 36 | +| 346 | 291 | 36 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 27662 | 176 | 19688 | 1464 | +| 27685 | 174 | 19707 | 877 | ## Plugin Directory @@ -27,12 +27,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 241 | 0 | 236 | 19 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 23 | 0 | 19 | 1 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 9 | 0 | 0 | 1 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 365 | 0 | 356 | 20 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 366 | 0 | 357 | 20 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 40 | 0 | 40 | 55 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 78 | 1 | 69 | 2 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | -| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 68 | 0 | 54 | 28 | +| | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 81 | 0 | 65 | 28 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 272 | 2 | 253 | 9 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 29 | 0 | 24 | 0 | | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 6 | 0 | 6 | 0 | @@ -43,21 +43,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 102 | 0 | 83 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 143 | 0 | 141 | 12 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3075 | 34 | 2402 | 21 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 15 | 0 | 7 | 0 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3086 | 34 | 2413 | 21 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 15 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 41 | 0 | 36 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 938 | 1 | 199 | 1 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 945 | 0 | 203 | 0 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 28 | 3 | 24 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 79 | 0 | 63 | 7 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 82 | 0 | 66 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 505 | 0 | 413 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 51 | 0 | 44 | 0 | | | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 114 | 3 | 110 | 3 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 90 | 0 | 90 | 5 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 95 | 0 | 95 | 6 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 100 | 0 | 100 | 9 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 61 | 0 | 61 | 2 | @@ -84,7 +84,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | grokdebugger | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 143 | 0 | 104 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | -| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 175 | 0 | 170 | 3 | +| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 177 | 0 | 172 | 3 | | | [Logs and Metrics UI](https://github.com/orgs/elastic/teams/logs-metrics-ui) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 42 | 0 | 39 | 8 | | ingestPipelines | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | inputControlVis | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Input Control visualization to Kibana | 0 | 0 | 0 | 0 | @@ -95,7 +95,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 615 | 3 | 420 | 9 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 601 | 0 | 523 | 40 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 602 | 0 | 524 | 40 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | @@ -109,7 +109,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 386 | 2 | 383 | 31 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 388 | 2 | 385 | 31 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 13 | 0 | 13 | 0 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 231 | 2 | 180 | 11 | @@ -142,10 +142,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 447 | 1 | 342 | 32 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 407 | 0 | 386 | 42 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 423 | 0 | 402 | 41 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 130 | 0 | 91 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 205 | 0 | 142 | 9 | -| | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 82 | 2 | 78 | 13 | +| | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 84 | 2 | 80 | 13 | | upgradeAssistant | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | urlDrilldown | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 12 | 0 | 12 | 0 | @@ -186,7 +186,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 11 | 0 | 11 | 0 | | | [Owner missing] | - | 10 | 0 | 10 | 0 | | | [Owner missing] | - | 18 | 0 | 9 | 1 | -| | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 7 | 0 | 2 | 0 | | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 62 | 0 | 17 | 1 | @@ -239,6 +238,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 8 | 2 | 6 | 0 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | +| | [Owner missing] | - | 2 | 0 | 2 | 0 | +| | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 56 | 0 | 30 | 0 | | | [Owner missing] | - | 9 | 0 | 5 | 1 | | | [Owner missing] | - | 13 | 0 | 12 | 0 | @@ -290,10 +291,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 47 | 0 | 46 | 10 | | | [Owner missing] | - | 51 | 5 | 34 | 0 | | | [Owner missing] | A library to convert APM traces into JSON format for performance testing. | 3 | 0 | 3 | 0 | -| | [Owner missing] | - | 30 | 0 | 29 | 0 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | Just some helpers for kibana plugin devs. | 1 | 0 | 1 | 0 | -| | [Owner missing] | - | 45 | 0 | 33 | 5 | | | [Owner missing] | - | 21 | 0 | 10 | 0 | | | [Owner missing] | - | 74 | 0 | 71 | 0 | | | [Owner missing] | A library to generate scalability benchmarking simulation files from APM traces. | 3 | 0 | 3 | 1 | @@ -307,7 +306,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | security solution list REST API | 59 | 0 | 58 | 0 | | | [Owner missing] | security solution list constants to use across plugins such lists, security_solution, cases, etc... | 26 | 0 | 12 | 0 | | | [Owner missing] | Security solution list ReactJS hooks | 56 | 0 | 44 | 0 | -| | [Owner missing] | security solution list utilities | 227 | 0 | 179 | 0 | +| | [Owner missing] | security solution list utilities | 235 | 0 | 187 | 0 | | | [Owner missing] | security solution rule utilities to use across plugins | 24 | 0 | 21 | 0 | | | [Owner missing] | security solution t-grid packages will allow sharing components between timelines and security_solution plugin until we transfer all functionality to timelines plugin | 120 | 0 | 116 | 0 | | | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 31 | 0 | 29 | 0 | @@ -323,6 +322,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 80 | 0 | 51 | 1 | | | [Owner missing] | - | 16 | 0 | 7 | 0 | | | [Owner missing] | - | 9 | 0 | 3 | 0 | +| | [Owner missing] | - | 20 | 0 | 12 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | | | [Owner missing] | - | 92 | 1 | 59 | 1 | | | [Owner missing] | - | 4 | 0 | 2 | 0 | @@ -337,5 +337,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 7 | 0 | 6 | 0 | | | [Owner missing] | - | 32 | 0 | 12 | 1 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | -| | [Owner missing] | - | 31 | 1 | 21 | 0 | +| | [Owner missing] | - | 30 | 0 | 20 | 0 | +| | [Owner missing] | - | 6 | 0 | 2 | 0 | diff --git a/api_docs/presentation_util.devdocs.json b/api_docs/presentation_util.devdocs.json index dd8fb7d13cfd4..e07810e3f3910 100644 --- a/api_docs/presentation_util.devdocs.json +++ b/api_docs/presentation_util.devdocs.json @@ -2249,7 +2249,7 @@ "label": "getProjects", "description": [], "signature": [ - "(solutions?: (\"dashboard\" | \"presentation\" | \"canvas\")[] | undefined) => Record<\"labs:dashboard:deferBelowFold\" | \"labs:dashboard:dashboardControls\" | \"labs:canvas:byValueEmbeddable\", ", + "(solutions?: (\"presentation\" | \"dashboard\" | \"canvas\")[] | undefined) => Record<\"labs:dashboard:deferBelowFold\" | \"labs:dashboard:dashboardControls\" | \"labs:canvas:byValueEmbeddable\", ", { "pluginId": "presentationUtil", "scope": "common", @@ -2270,7 +2270,7 @@ "label": "solutions", "description": [], "signature": [ - "(\"dashboard\" | \"presentation\" | \"canvas\")[] | undefined" + "(\"presentation\" | \"dashboard\" | \"canvas\")[] | undefined" ], "path": "src/plugins/presentation_util/public/services/labs.ts", "deprecated": false, @@ -3367,7 +3367,7 @@ "label": "solutions", "description": [], "signature": [ - "(\"dashboard\" | \"presentation\" | \"canvas\")[]" + "(\"presentation\" | \"dashboard\" | \"canvas\")[]" ], "path": "src/plugins/presentation_util/common/labs.ts", "deprecated": false @@ -3578,7 +3578,7 @@ "label": "SolutionName", "description": [], "signature": [ - "\"dashboard\" | \"presentation\" | \"canvas\"" + "\"presentation\" | \"dashboard\" | \"canvas\"" ], "path": "src/plugins/presentation_util/common/labs.ts", "deprecated": false, diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index cd7a619d1cd7a..d7c9adf44233a 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github summary: API docs for the presentationUtil plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 16ca281504f3a..50d1bd6501ed5 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github summary: API docs for the remoteClusters plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index b3680199c5cfe..e8cb5155cd056 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github summary: API docs for the reporting plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index caee41f6c8f99..95999d8abc341 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github summary: API docs for the rollup plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 7ae32ba102995..c320d99c567fe 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github summary: API docs for the ruleRegistry plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/runtime_fields.devdocs.json b/api_docs/runtime_fields.devdocs.json index 2fd793d71e9cf..8826b34795475 100644 --- a/api_docs/runtime_fields.devdocs.json +++ b/api_docs/runtime_fields.devdocs.json @@ -324,7 +324,7 @@ "label": "type", "description": [], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"long\" | \"double\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\"" ], "path": "x-pack/plugins/runtime_fields/public/types.ts", "deprecated": false @@ -357,7 +357,7 @@ "description": [], "signature": [ "ComboBoxOption", - "<\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"long\" | \"double\">[]" + "<\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\">[]" ], "path": "x-pack/plugins/runtime_fields/public/constants.ts", "deprecated": false, @@ -371,7 +371,7 @@ "label": "RuntimeType", "description": [], "signature": [ - "\"boolean\" | \"keyword\" | \"ip\" | \"date\" | \"long\" | \"double\"" + "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\"" ], "path": "x-pack/plugins/runtime_fields/public/types.ts", "deprecated": false, diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 6086df87b3a89..8ee9718178d6d 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github summary: API docs for the runtimeFields plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects.devdocs.json b/api_docs/saved_objects.devdocs.json index 1f715bff2765f..a82de64b5da32 100644 --- a/api_docs/saved_objects.devdocs.json +++ b/api_docs/saved_objects.devdocs.json @@ -735,7 +735,7 @@ "section": "def-public.SavedObject", "text": "SavedObject" }, - ", \"title\" | \"id\" | \"getDisplayName\" | \"lastSavedTitle\" | \"copyOnSave\" | \"getEsType\">, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: (() => void) | undefined, services: Pick<", + ", \"id\" | \"title\" | \"getDisplayName\" | \"lastSavedTitle\" | \"copyOnSave\" | \"getEsType\">, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: (() => void) | undefined, services: Pick<", "SavedObjectKibanaServices", ", \"overlays\" | \"savedObjectsClient\">) => Promise" ], @@ -758,7 +758,7 @@ "section": "def-public.SavedObject", "text": "SavedObject" }, - ", \"title\" | \"id\" | \"getDisplayName\" | \"lastSavedTitle\" | \"copyOnSave\" | \"getEsType\">" + ", \"id\" | \"title\" | \"getDisplayName\" | \"lastSavedTitle\" | \"copyOnSave\" | \"getEsType\">" ], "path": "src/plugins/saved_objects/public/saved_object/helpers/check_for_duplicate_title.ts", "deprecated": false, diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index b94b28329351a..0e55dbb89931a 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjects plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_management.devdocs.json b/api_docs/saved_objects_management.devdocs.json index c62b68b738f4d..336a2c0cc5684 100644 --- a/api_docs/saved_objects_management.devdocs.json +++ b/api_docs/saved_objects_management.devdocs.json @@ -278,7 +278,7 @@ "label": "euiColumn", "description": [], "signature": [ - "{ children?: React.ReactNode; color?: string | undefined; className?: string | undefined; title?: string | undefined; onChange?: React.FormEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; id?: string | undefined; description?: string | undefined; security?: string | undefined; name: React.ReactNode; field: (string & {}) | keyof ", + "{ children?: React.ReactNode; color?: string | undefined; className?: string | undefined; height?: string | number | undefined; id?: string | undefined; lang?: string | undefined; name: React.ReactNode; style?: React.CSSProperties | undefined; width?: string | undefined; role?: React.AriaRole | undefined; tabIndex?: number | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"true\" | \"false\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"link\" | \"copy\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"true\" | \"false\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChange?: React.FormEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onError?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; title?: string | undefined; render?: ((value: any, record: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -286,7 +286,7 @@ "section": "def-public.SavedObjectsManagementRecord", "text": "SavedObjectsManagementRecord" }, - "; defaultValue?: string | number | readonly string[] | undefined; hidden?: boolean | undefined; lang?: string | undefined; onError?: React.ReactEventHandler | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; contentEditable?: Booleanish | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: React.AriaRole | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"email\" | \"search\" | \"text\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | \"location\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"dialog\" | \"listbox\" | \"tree\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"other\" | \"ascending\" | \"descending\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; render?: ((value: any, record: ", + ") => React.ReactNode) | undefined; hidden?: boolean | undefined; description?: string | undefined; security?: string | undefined; field: (string & {}) | keyof ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -294,7 +294,7 @@ "section": "def-public.SavedObjectsManagementRecord", "text": "SavedObjectsManagementRecord" }, - ") => React.ReactNode) | undefined; height?: string | number | undefined; width?: string | undefined; readOnly?: boolean | undefined; align?: ", + "; defaultValue?: string | number | readonly string[] | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; contentEditable?: \"inherit\" | Booleanish | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; translate?: \"no\" | \"yes\" | undefined; radioGroup?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"off\" | \"on\" | undefined; inputMode?: \"none\" | \"text\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; readOnly?: boolean | undefined; align?: ", "HorizontalAlignment", " | undefined; abbr?: string | undefined; footer?: string | React.ReactElement> | ((props: ", "EuiTableFooterProps", @@ -306,7 +306,7 @@ "section": "def-public.SavedObjectsManagementRecord", "text": "SavedObjectsManagementRecord" }, - ">) => React.ReactNode) | undefined; colSpan?: number | undefined; headers?: string | undefined; rowSpan?: number | undefined; scope?: string | undefined; valign?: \"top\" | \"bottom\" | \"middle\" | \"baseline\" | undefined; dataType?: ", + ">) => React.ReactNode) | undefined; colSpan?: number | undefined; headers?: string | undefined; rowSpan?: number | undefined; scope?: string | undefined; valign?: \"baseline\" | \"middle\" | \"top\" | \"bottom\" | undefined; dataType?: ", "EuiTableDataType", " | undefined; isExpander?: boolean | undefined; textOnly?: boolean | undefined; truncateText?: boolean | undefined; mobileOptions?: (Omit<", "EuiTableRowCellMobileOptionsShape", @@ -501,7 +501,7 @@ "label": "obj", "description": [], "signature": [ - "{ id: string; type: string; meta: { title?: string | undefined; icon?: string | undefined; }; overwrite?: boolean | undefined; }" + "{ type: string; id: string; meta: { title?: string | undefined; icon?: string | undefined; }; overwrite?: boolean | undefined; }" ], "path": "src/plugins/saved_objects_management/public/lib/process_import_response.ts", "deprecated": false @@ -697,7 +697,7 @@ "label": "namespaceType", "description": [], "signature": [ - "\"multiple\" | \"single\" | \"multiple-isolated\" | \"agnostic\"" + "\"single\" | \"multiple\" | \"multiple-isolated\" | \"agnostic\"" ], "path": "src/plugins/saved_objects_management/common/types.ts", "deprecated": false @@ -1808,7 +1808,7 @@ "label": "namespaceType", "description": [], "signature": [ - "\"multiple\" | \"single\" | \"multiple-isolated\" | \"agnostic\"" + "\"single\" | \"multiple\" | \"multiple-isolated\" | \"agnostic\"" ], "path": "src/plugins/saved_objects_management/common/types.ts", "deprecated": false diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 2ef5ce8554542..5380d4bc20a92 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsManagement plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging.devdocs.json b/api_docs/saved_objects_tagging.devdocs.json index 0500a6eb89beb..5221f4d8ada4d 100644 --- a/api_docs/saved_objects_tagging.devdocs.json +++ b/api_docs/saved_objects_tagging.devdocs.json @@ -1787,7 +1787,7 @@ "label": "errors", "description": [], "signature": [ - "{ color?: string | undefined; id?: string | undefined; description?: string | undefined; name?: string | undefined; }" + "{ color?: string | undefined; id?: string | undefined; name?: string | undefined; description?: string | undefined; }" ], "path": "x-pack/plugins/saved_objects_tagging/common/validation.ts", "deprecated": false diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 1fc3bd6ca2ca1..a667fc54a41b3 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTagging plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 1adfd65b7e135..890f3c00ed98a 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTaggingOss plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 37487313d5c21..23e1f76617428 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotMode plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index f83b7e34a396c..d8f6a26967e74 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotting plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security.mdx b/api_docs/security.mdx index dba9501561af0..0a37e14b57600 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github summary: API docs for the security plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index f41238eea2bcf..5afe8b4a4901e 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github summary: API docs for the securitySolution plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 0a30a7b5b6a01..dcdb96a76305a 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github summary: API docs for the sessionView plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 1ae3fa23eb1fa..eb48289037039 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github summary: API docs for the share plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/shared_u_x.mdx b/api_docs/shared_u_x.mdx index 1df2f203d8232..baa409a49032c 100644 --- a/api_docs/shared_u_x.mdx +++ b/api_docs/shared_u_x.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sharedUX title: "sharedUX" image: https://source.unsplash.com/400x175/?github summary: API docs for the sharedUX plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sharedUX'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index f15fdd1193ec6..c6ff87caf6fd0 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github summary: API docs for the snapshotRestore plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/spaces.devdocs.json b/api_docs/spaces.devdocs.json index 0010e6bbdd17a..e05dbfc9d31de 100644 --- a/api_docs/spaces.devdocs.json +++ b/api_docs/spaces.devdocs.json @@ -1718,7 +1718,7 @@ "The size of the avatar." ], "signature": [ - "\"m\" | \"s\" | \"l\" | \"xl\" | undefined" + "\"s\" | \"m\" | \"l\" | \"xl\" | undefined" ], "path": "x-pack/plugins/spaces/public/space_avatar/types.ts", "deprecated": false diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 8673507136d26..97b5c709e3bac 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github summary: API docs for the spaces plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index fd42a28e7000d..459dfcfa79ae9 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the stackAlerts plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 1c6d3db965db9..4830977f02c82 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the taskManager plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 8875155459652..3c884cad78a7b 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetry plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_manager.devdocs.json b/api_docs/telemetry_collection_manager.devdocs.json index 5d7ae451769f4..5102d381a23a1 100644 --- a/api_docs/telemetry_collection_manager.devdocs.json +++ b/api_docs/telemetry_collection_manager.devdocs.json @@ -72,7 +72,7 @@ "label": "esClient", "description": [], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -136,7 +138,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -1202,8 +1204,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 538b4c4a2500c..000ee4ee69d5e 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionManager plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index a3c8722880819..afe83d7860f11 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionXpack plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index d4f93b160e8f5..6d2d1bc193bd0 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryManagementSection plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 1ef3a094339f2..70f9ddcd7fb4b 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -772,7 +772,7 @@ "EuiDataGridColumn", ", \"id\" | \"display\" | \"displayAsText\" | \"initialWidth\"> & Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -804,7 +804,7 @@ "EuiDataGridColumn", ", \"id\" | \"display\" | \"displayAsText\" | \"initialWidth\"> & Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -2302,7 +2302,7 @@ "EuiDataGridColumn", ", \"id\" | \"display\" | \"displayAsText\" | \"initialWidth\"> & Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -2849,11 +2849,11 @@ "label": "TGridModelForTimeline", "description": [], "signature": [ - "{ title: string; columns: (Pick<", + "{ id: string; version: string | null; title: string; columns: (Pick<", "EuiDataGridColumn", ", \"id\" | \"display\" | \"displayAsText\" | \"initialWidth\"> & Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -2865,11 +2865,11 @@ }, "; description?: string | null | undefined; esTypes?: string[] | undefined; example?: string | number | null | undefined; format?: string | undefined; linkField?: string | undefined; placeholder?: string | undefined; subType?: ", "IFieldSubType", - " | undefined; type?: string | undefined; })[]; id: string; filters?: ", + " | undefined; type?: string | undefined; })[]; filters?: ", "Filter", "[] | undefined; dataViewId: string | null; sort: ", "SortColumnTimeline", - "[]; version: string | null; filterManager?: ", + "[]; filterManager?: ", { "pluginId": "data", "scope": "public", @@ -2881,7 +2881,7 @@ "EuiDataGridColumn", ", \"id\" | \"display\" | \"displayAsText\" | \"initialWidth\"> & Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -3981,7 +3981,7 @@ "signature": [ "Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -6542,7 +6542,7 @@ "signature": [ "Pick<", "EuiDataGridColumn", - ", \"id\" | \"schema\" | \"actions\" | \"display\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", + ", \"id\" | \"display\" | \"schema\" | \"actions\" | \"defaultSortDirection\" | \"displayAsText\" | \"initialWidth\" | \"isSortable\"> & { aggregatable?: boolean | undefined; tGridCellActions?: ", "TGridCellAction", "[] | undefined; category?: string | undefined; columnHeaderType: ", { @@ -6614,7 +6614,7 @@ "label": "DataProvidersAnd", "description": [], "signature": [ - "{ id: string; type?: ", + "{ type?: ", { "pluginId": "timelines", "scope": "common", @@ -6622,7 +6622,7 @@ "section": "def-common.DataProviderType", "text": "DataProviderType" }, - " | undefined; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", + " | undefined; id: string; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", { "pluginId": "timelines", "scope": "common", diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 3728d891114d6..c25cb9b2cf675 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github summary: API docs for the timelines plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index b3562fec27109..bdeff902775fc 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github summary: API docs for the transform plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 308ee72116682..ac1678a3d0b61 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -54,7 +54,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly internalShareableComponentsSandbox: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" + "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false @@ -1449,7 +1449,7 @@ "label": "suspendedComponentWithProps", "description": [], "signature": [ - "(ComponentToSuspend: React.ComponentType, size: \"m\" | \"s\" | \"l\" | \"xl\" | \"xxl\" | undefined) => (props: T) => JSX.Element" + "(ComponentToSuspend: React.ComponentType, size: \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined) => (props: T) => JSX.Element" ], "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/suspended_component_with_props.tsx", "deprecated": false, @@ -1476,7 +1476,7 @@ "label": "size", "description": [], "signature": [ - "\"m\" | \"s\" | \"l\" | \"xl\" | \"xxl\" | undefined" + "\"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined" ], "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/suspended_component_with_props.tsx", "deprecated": false, @@ -1896,7 +1896,7 @@ "label": "alert", "description": [], "signature": [ - "{ [x: `email.to.${number}`]: string[]; [x: `email.cc.${number}`]: string[]; [x: `email.bcc.${number}`]: string[]; [x: `email.attachments.${number}`]: string[]; [x: `user.roles.${number}`]: string[]; [x: `user.target.roles.${number}`]: string[]; [x: `user.changes.roles.${number}`]: string[]; [x: `user.effective.roles.${number}`]: string[]; [x: `source.user.roles.${number}`]: string[]; [x: `tags.${number}`]: string[]; [x: `client.user.roles.${number}`]: string[]; [x: `file.attributes.${number}`]: string[]; [x: `file.elf.exports.${number}`]: string[]; [x: `file.elf.imports.${number}`]: string[]; [x: `file.elf.sections.${number}`]: string[]; [x: `file.elf.segments.${number}`]: string[]; [x: `file.elf.shared_libraries.${number}`]: string[]; [x: `file.x509.issuer.organization.${number}`]: string[]; [x: `file.x509.issuer.common_name.${number}`]: string[]; [x: `file.x509.issuer.country.${number}`]: string[]; [x: `file.x509.issuer.locality.${number}`]: string[]; [x: `file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `file.x509.issuer.state_or_province.${number}`]: string[]; [x: `file.x509.subject.organization.${number}`]: string[]; [x: `file.x509.subject.common_name.${number}`]: string[]; [x: `file.x509.subject.country.${number}`]: string[]; [x: `file.x509.subject.locality.${number}`]: string[]; [x: `file.x509.subject.organizational_unit.${number}`]: string[]; [x: `file.x509.subject.state_or_province.${number}`]: string[]; [x: `file.x509.alternative_names.${number}`]: string[]; [x: `host.ip.${number}`]: string[]; [x: `host.mac.${number}`]: string[]; [x: `container.image.tag.${number}`]: string[]; [x: `server.user.roles.${number}`]: string[]; [x: `rule.author.${number}`]: string[]; [x: `event.type.${number}`]: string[]; [x: `event.category.${number}`]: string[]; [x: `registry.data.strings.${number}`]: string[]; [x: `destination.user.roles.${number}`]: string[]; [x: `dns.answers.${number}`]: string[]; [x: `dns.header_flags.${number}`]: string[]; [x: `dns.resolved_ip.${number}`]: string[]; [x: `observer.ip.${number}`]: string[]; [x: `observer.mac.${number}`]: string[]; [x: `process.elf.exports.${number}`]: string[]; [x: `process.elf.imports.${number}`]: string[]; [x: `process.elf.sections.${number}`]: string[]; [x: `process.elf.segments.${number}`]: string[]; [x: `process.elf.shared_libraries.${number}`]: string[]; [x: `process.args.${number}`]: string[]; [x: `process.parent.args.${number}`]: string[]; [x: `process.target.args.${number}`]: string[]; [x: `process.parent.elf.exports.${number}`]: string[]; [x: `process.parent.elf.imports.${number}`]: string[]; [x: `process.parent.elf.sections.${number}`]: string[]; [x: `process.parent.elf.segments.${number}`]: string[]; [x: `process.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.args.${number}`]: string[]; [x: `process.target.elf.exports.${number}`]: string[]; [x: `process.target.elf.imports.${number}`]: string[]; [x: `process.target.elf.sections.${number}`]: string[]; [x: `process.target.elf.segments.${number}`]: string[]; [x: `process.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.args.${number}`]: string[]; [x: `process.target.target.args.${number}`]: string[]; [x: `process.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `related.ip.${number}`]: string[]; [x: `related.user.${number}`]: string[]; [x: `related.hash.${number}`]: string[]; [x: `related.hosts.${number}`]: string[]; [x: `threat.group.alias.${number}`]: string[]; [x: `threat.indicator.x509.issuer.organization.${number}`]: string[]; [x: `threat.indicator.x509.issuer.common_name.${number}`]: string[]; [x: `threat.indicator.x509.issuer.country.${number}`]: string[]; [x: `threat.indicator.x509.issuer.locality.${number}`]: string[]; [x: `threat.indicator.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.indicator.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.indicator.x509.subject.organization.${number}`]: string[]; [x: `threat.indicator.x509.subject.common_name.${number}`]: string[]; [x: `threat.indicator.x509.subject.country.${number}`]: string[]; [x: `threat.indicator.x509.subject.locality.${number}`]: string[]; [x: `threat.indicator.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.indicator.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.indicator.x509.alternative_names.${number}`]: string[]; [x: `threat.indicator.file.attributes.${number}`]: string[]; [x: `threat.indicator.file.elf.exports.${number}`]: string[]; [x: `threat.indicator.file.elf.imports.${number}`]: string[]; [x: `threat.indicator.file.elf.sections.${number}`]: string[]; [x: `threat.indicator.file.elf.segments.${number}`]: string[]; [x: `threat.indicator.file.elf.shared_libraries.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.organization.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.common_name.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.country.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.locality.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.organization.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.common_name.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.country.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.locality.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.indicator.file.x509.alternative_names.${number}`]: string[]; [x: `threat.indicator.registry.data.strings.${number}`]: string[]; [x: `threat.enrichments.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.alternative_names.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.attributes.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.exports.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.imports.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.sections.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.segments.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.shared_libraries.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.alternative_names.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.registry.data.strings.${number}`]: string[]; [x: `threat.software.platforms.${number}`]: string[]; [x: `threat.tactic.id.${number}`]: string[]; [x: `threat.tactic.name.${number}`]: string[]; [x: `threat.tactic.reference.${number}`]: string[]; [x: `threat.technique.id.${number}`]: string[]; [x: `threat.technique.name.${number}`]: string[]; [x: `threat.technique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `tls.client.x509.issuer.organization.${number}`]: string[]; [x: `tls.client.x509.issuer.common_name.${number}`]: string[]; [x: `tls.client.x509.issuer.country.${number}`]: string[]; [x: `tls.client.x509.issuer.locality.${number}`]: string[]; [x: `tls.client.x509.issuer.organizational_unit.${number}`]: string[]; [x: `tls.client.x509.issuer.state_or_province.${number}`]: string[]; [x: `tls.client.x509.subject.organization.${number}`]: string[]; [x: `tls.client.x509.subject.common_name.${number}`]: string[]; [x: `tls.client.x509.subject.country.${number}`]: string[]; [x: `tls.client.x509.subject.locality.${number}`]: string[]; [x: `tls.client.x509.subject.organizational_unit.${number}`]: string[]; [x: `tls.client.x509.subject.state_or_province.${number}`]: string[]; [x: `tls.client.x509.alternative_names.${number}`]: string[]; [x: `tls.client.certificate_chain.${number}`]: string[]; [x: `tls.client.supported_ciphers.${number}`]: string[]; [x: `tls.server.x509.issuer.organization.${number}`]: string[]; [x: `tls.server.x509.issuer.common_name.${number}`]: string[]; [x: `tls.server.x509.issuer.country.${number}`]: string[]; [x: `tls.server.x509.issuer.locality.${number}`]: string[]; [x: `tls.server.x509.issuer.organizational_unit.${number}`]: string[]; [x: `tls.server.x509.issuer.state_or_province.${number}`]: string[]; [x: `tls.server.x509.subject.organization.${number}`]: string[]; [x: `tls.server.x509.subject.common_name.${number}`]: string[]; [x: `tls.server.x509.subject.country.${number}`]: string[]; [x: `tls.server.x509.subject.locality.${number}`]: string[]; [x: `tls.server.x509.subject.organizational_unit.${number}`]: string[]; [x: `tls.server.x509.subject.state_or_province.${number}`]: string[]; [x: `tls.server.x509.alternative_names.${number}`]: string[]; [x: `tls.server.certificate_chain.${number}`]: string[]; [x: `vulnerability.category.${number}`]: string[]; } & ", + "{ [x: `email.to.${number}`]: string[]; [x: `email.cc.${number}`]: string[]; [x: `email.bcc.${number}`]: string[]; [x: `email.attachments.${number}`]: string[]; [x: `user.roles.${number}`]: string[]; [x: `user.target.roles.${number}`]: string[]; [x: `user.changes.roles.${number}`]: string[]; [x: `user.effective.roles.${number}`]: string[]; [x: `source.user.roles.${number}`]: string[]; [x: `tags.${number}`]: string[]; [x: `client.user.roles.${number}`]: string[]; [x: `file.attributes.${number}`]: string[]; [x: `file.elf.exports.${number}`]: string[]; [x: `file.elf.imports.${number}`]: string[]; [x: `file.elf.sections.${number}`]: string[]; [x: `file.elf.segments.${number}`]: string[]; [x: `file.elf.shared_libraries.${number}`]: string[]; [x: `file.x509.issuer.organization.${number}`]: string[]; [x: `file.x509.issuer.common_name.${number}`]: string[]; [x: `file.x509.issuer.country.${number}`]: string[]; [x: `file.x509.issuer.locality.${number}`]: string[]; [x: `file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `file.x509.issuer.state_or_province.${number}`]: string[]; [x: `file.x509.subject.organization.${number}`]: string[]; [x: `file.x509.subject.common_name.${number}`]: string[]; [x: `file.x509.subject.country.${number}`]: string[]; [x: `file.x509.subject.locality.${number}`]: string[]; [x: `file.x509.subject.organizational_unit.${number}`]: string[]; [x: `file.x509.subject.state_or_province.${number}`]: string[]; [x: `file.x509.alternative_names.${number}`]: string[]; [x: `host.ip.${number}`]: string[]; [x: `host.mac.${number}`]: string[]; [x: `container.image.tag.${number}`]: string[]; [x: `server.user.roles.${number}`]: string[]; [x: `rule.author.${number}`]: string[]; [x: `event.type.${number}`]: string[]; [x: `event.category.${number}`]: string[]; [x: `registry.data.strings.${number}`]: string[]; [x: `destination.user.roles.${number}`]: string[]; [x: `dns.answers.${number}`]: string[]; [x: `dns.header_flags.${number}`]: string[]; [x: `dns.resolved_ip.${number}`]: string[]; [x: `observer.ip.${number}`]: string[]; [x: `observer.mac.${number}`]: string[]; [x: `process.elf.exports.${number}`]: string[]; [x: `process.elf.imports.${number}`]: string[]; [x: `process.elf.sections.${number}`]: string[]; [x: `process.elf.segments.${number}`]: string[]; [x: `process.elf.shared_libraries.${number}`]: string[]; [x: `process.args.${number}`]: string[]; [x: `process.target.args.${number}`]: string[]; [x: `process.parent.args.${number}`]: string[]; [x: `process.target.elf.exports.${number}`]: string[]; [x: `process.target.elf.imports.${number}`]: string[]; [x: `process.target.elf.sections.${number}`]: string[]; [x: `process.target.elf.segments.${number}`]: string[]; [x: `process.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.args.${number}`]: string[]; [x: `process.target.parent.args.${number}`]: string[]; [x: `process.parent.elf.exports.${number}`]: string[]; [x: `process.parent.elf.imports.${number}`]: string[]; [x: `process.parent.elf.sections.${number}`]: string[]; [x: `process.parent.elf.segments.${number}`]: string[]; [x: `process.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.args.${number}`]: string[]; [x: `process.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.target.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.target.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.target.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.target.parent.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.target.parent.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.target.parent.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.target.parent.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.exports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.imports.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.sections.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.segments.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.elf.shared_libraries.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.target.args.${number}`]: string[]; [x: `process.parent.parent.parent.parent.parent.parent.parent.parent.args.${number}`]: string[]; [x: `related.ip.${number}`]: string[]; [x: `related.user.${number}`]: string[]; [x: `related.hash.${number}`]: string[]; [x: `related.hosts.${number}`]: string[]; [x: `threat.group.alias.${number}`]: string[]; [x: `threat.indicator.x509.issuer.organization.${number}`]: string[]; [x: `threat.indicator.x509.issuer.common_name.${number}`]: string[]; [x: `threat.indicator.x509.issuer.country.${number}`]: string[]; [x: `threat.indicator.x509.issuer.locality.${number}`]: string[]; [x: `threat.indicator.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.indicator.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.indicator.x509.subject.organization.${number}`]: string[]; [x: `threat.indicator.x509.subject.common_name.${number}`]: string[]; [x: `threat.indicator.x509.subject.country.${number}`]: string[]; [x: `threat.indicator.x509.subject.locality.${number}`]: string[]; [x: `threat.indicator.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.indicator.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.indicator.x509.alternative_names.${number}`]: string[]; [x: `threat.indicator.file.attributes.${number}`]: string[]; [x: `threat.indicator.file.elf.exports.${number}`]: string[]; [x: `threat.indicator.file.elf.imports.${number}`]: string[]; [x: `threat.indicator.file.elf.sections.${number}`]: string[]; [x: `threat.indicator.file.elf.segments.${number}`]: string[]; [x: `threat.indicator.file.elf.shared_libraries.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.organization.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.common_name.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.country.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.locality.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.indicator.file.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.organization.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.common_name.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.country.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.locality.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.indicator.file.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.indicator.file.x509.alternative_names.${number}`]: string[]; [x: `threat.indicator.registry.data.strings.${number}`]: string[]; [x: `threat.enrichments.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.x509.alternative_names.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.attributes.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.exports.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.imports.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.sections.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.segments.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.elf.shared_libraries.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.issuer.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.organization.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.common_name.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.country.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.locality.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.organizational_unit.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.subject.state_or_province.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.file.x509.alternative_names.${number}`]: string[]; [x: `threat.enrichments.${number}.indicator.registry.data.strings.${number}`]: string[]; [x: `threat.software.platforms.${number}`]: string[]; [x: `threat.tactic.id.${number}`]: string[]; [x: `threat.tactic.name.${number}`]: string[]; [x: `threat.tactic.reference.${number}`]: string[]; [x: `threat.technique.id.${number}`]: string[]; [x: `threat.technique.name.${number}`]: string[]; [x: `threat.technique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.id.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.name.${number}`]: string[]; [x: `threat.technique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.subtechnique.reference.${number}`]: string[]; [x: `tls.client.x509.issuer.organization.${number}`]: string[]; [x: `tls.client.x509.issuer.common_name.${number}`]: string[]; [x: `tls.client.x509.issuer.country.${number}`]: string[]; [x: `tls.client.x509.issuer.locality.${number}`]: string[]; [x: `tls.client.x509.issuer.organizational_unit.${number}`]: string[]; [x: `tls.client.x509.issuer.state_or_province.${number}`]: string[]; [x: `tls.client.x509.subject.organization.${number}`]: string[]; [x: `tls.client.x509.subject.common_name.${number}`]: string[]; [x: `tls.client.x509.subject.country.${number}`]: string[]; [x: `tls.client.x509.subject.locality.${number}`]: string[]; [x: `tls.client.x509.subject.organizational_unit.${number}`]: string[]; [x: `tls.client.x509.subject.state_or_province.${number}`]: string[]; [x: `tls.client.x509.alternative_names.${number}`]: string[]; [x: `tls.client.certificate_chain.${number}`]: string[]; [x: `tls.client.supported_ciphers.${number}`]: string[]; [x: `tls.server.x509.issuer.organization.${number}`]: string[]; [x: `tls.server.x509.issuer.common_name.${number}`]: string[]; [x: `tls.server.x509.issuer.country.${number}`]: string[]; [x: `tls.server.x509.issuer.locality.${number}`]: string[]; [x: `tls.server.x509.issuer.organizational_unit.${number}`]: string[]; [x: `tls.server.x509.issuer.state_or_province.${number}`]: string[]; [x: `tls.server.x509.subject.organization.${number}`]: string[]; [x: `tls.server.x509.subject.common_name.${number}`]: string[]; [x: `tls.server.x509.subject.country.${number}`]: string[]; [x: `tls.server.x509.subject.locality.${number}`]: string[]; [x: `tls.server.x509.subject.organizational_unit.${number}`]: string[]; [x: `tls.server.x509.subject.state_or_province.${number}`]: string[]; [x: `tls.server.x509.alternative_names.${number}`]: string[]; [x: `tls.server.certificate_chain.${number}`]: string[]; [x: `vulnerability.category.${number}`]: string[]; } & ", "BasicFields" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", @@ -2005,7 +2005,7 @@ "label": "flyoutSize", "description": [], "signature": [ - "\"m\" | \"s\" | \"l\" | undefined" + "\"s\" | \"m\" | \"l\" | undefined" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false @@ -2917,6 +2917,269 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps", + "type": "Interface", + "tags": [], + "label": "RuleStatusFilterProps", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.selectedStatuses", + "type": "Array", + "tags": [], + "label": "selectedStatuses", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatus", + "text": "RuleStatus" + }, + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.dataTestSubj", + "type": "string", + "tags": [], + "label": "dataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.selectDataTestSubj", + "type": "string", + "tags": [], + "label": "selectDataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.buttonDataTestSubj", + "type": "string", + "tags": [], + "label": "buttonDataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.optionDataTestSubj", + "type": "Function", + "tags": [], + "label": "optionDataTestSubj", + "description": [], + "signature": [ + "((status: ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatus", + "text": "RuleStatus" + }, + ") => string) | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.optionDataTestSubj.$1", + "type": "CompoundType", + "tags": [], + "label": "status", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatus", + "text": "RuleStatus" + } + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.onChange", + "type": "Function", + "tags": [], + "label": "onChange", + "description": [], + "signature": [ + "(selectedStatuses: ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatus", + "text": "RuleStatus" + }, + "[]) => void" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleStatusFilterProps.onChange.$1", + "type": "Array", + "tags": [], + "label": "selectedStatuses", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatus", + "text": "RuleStatus" + }, + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_filter.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem", + "type": "Interface", + "tags": [], + "label": "RuleTableItem", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleTableItem", + "text": "RuleTableItem" + }, + " extends ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.ruleType", + "type": "string", + "tags": [], + "label": "ruleType", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.index", + "type": "number", + "tags": [], + "label": "index", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.actionsCount", + "type": "number", + "tags": [], + "label": "actionsCount", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.isEditable", + "type": "boolean", + "tags": [], + "label": "isEditable", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.enabledInLicense", + "type": "boolean", + "tags": [], + "label": "enabledInLicense", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.RuleTableItem.showIntervalWarning", + "type": "CompoundType", + "tags": [], + "label": "showIntervalWarning", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-public.RuleType", @@ -3280,7 +3543,7 @@ "label": "setRuleProperty", "description": [], "signature": [ - "(key: Prop, value: ", + "(key: Prop, value: ", "SanitizedRule", "[Prop] | null) => void" ], @@ -5553,9 +5816,21 @@ "description": [], "signature": [ "(props: ", - "RuleStatusFilterProps", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatusFilterProps", + "text": "RuleStatusFilterProps" + }, ") => React.ReactElement<", - "RuleStatusFilterProps", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatusFilterProps", + "text": "RuleStatusFilterProps" + }, ", string | React.JSXElementConstructor>" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", @@ -5569,7 +5844,13 @@ "label": "props", "description": [], "signature": [ - "RuleStatusFilterProps" + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleStatusFilterProps", + "text": "RuleStatusFilterProps" + } ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, @@ -6223,7 +6504,7 @@ "\nParses the string value used in `xpack.trigger_actions_ui.enableExperimental` kibana configuration,\nwhich should be a string of values delimited by a comma (`,`)\n" ], "signature": [ - "(configValue: string[]) => Readonly<{ rulesListDatagrid: boolean; internalAlertsTable: boolean; internalShareableComponentsSandbox: boolean; ruleTagFilter: boolean; ruleStatusFilter: boolean; rulesDetailLogs: boolean; }>" + "(configValue: string[]) => Readonly<{ rulesListDatagrid: boolean; internalAlertsTable: boolean; ruleTagFilter: boolean; ruleStatusFilter: boolean; rulesDetailLogs: boolean; }>" ], "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, @@ -6380,7 +6661,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly internalShareableComponentsSandbox: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" + "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" ], "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, @@ -6412,7 +6693,7 @@ "\nA list of allowed values that can be used in `xpack.trigger_actions_ui.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly internalShareableComponentsSandbox: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" + "{ readonly rulesListDatagrid: boolean; readonly internalAlertsTable: boolean; readonly ruleTagFilter: boolean; readonly ruleStatusFilter: boolean; readonly rulesDetailLogs: boolean; }" ], "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 7250ffd3d26c9..88d619e397eba 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github summary: API docs for the triggersActionsUi plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 407 | 0 | 386 | 42 | +| 423 | 0 | 402 | 41 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index eb677005bb8df..5809b8368c9df 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActions plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions_enhanced.devdocs.json b/api_docs/ui_actions_enhanced.devdocs.json index 031505c5781ac..90944593a2acc 100644 --- a/api_docs/ui_actions_enhanced.devdocs.json +++ b/api_docs/ui_actions_enhanced.devdocs.json @@ -3402,7 +3402,7 @@ }, ",Pick<", "UiActionsServiceEnhancements", - ", \"telemetry\" | \"extract\" | \"inject\" | \"getActionFactory\" | \"hasActionFactory\" | \"getActionFactories\">" + ", \"telemetry\" | \"inject\" | \"extract\" | \"getActionFactory\" | \"hasActionFactory\" | \"getActionFactories\">" ], "path": "src/plugins/ui_actions_enhanced/public/plugin.ts", "deprecated": false, diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 25def38a93091..cd5e91c45f732 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActionsEnhanced plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index d984b361b46e1..ad5676176be04 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -752,6 +752,34 @@ "path": "src/plugins/unified_search/public/search_bar/create_search_bar.tsx", "deprecated": false, "initialIsOpen": false + }, + { + "parentPluginId": "unifiedSearch", + "id": "def-public.UPDATE_FILTER_REFERENCES_ACTION", + "type": "string", + "tags": [], + "label": "UPDATE_FILTER_REFERENCES_ACTION", + "description": [], + "signature": [ + "\"UPDATE_FILTER_REFERENCES_ACTION\"" + ], + "path": "src/plugins/unified_search/public/actions/update_filter_references_action.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedSearch", + "id": "def-public.UPDATE_FILTER_REFERENCES_TRIGGER", + "type": "string", + "tags": [], + "label": "UPDATE_FILTER_REFERENCES_TRIGGER", + "description": [], + "signature": [ + "\"UPDATE_FILTER_REFERENCES_TRIGGER\"" + ], + "path": "src/plugins/unified_search/public/triggers/update_filter_references_trigger.ts", + "deprecated": false, + "initialIsOpen": false } ], "objects": [], diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 48dba51aca1c0..8fd78613bed8a 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 82 | 2 | 78 | 13 | +| 84 | 2 | 80 | 13 | ## Client diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 548c288123de6..5b3f15a4f3fdb 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch.autocomplete plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 82 | 2 | 78 | 13 | +| 84 | 2 | 80 | 13 | ## Client diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 13d621b54a2a3..3252dc99360b3 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github summary: API docs for the urlForwarding plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/usage_collection.devdocs.json b/api_docs/usage_collection.devdocs.json index 244872495d1b3..15be4b7419387 100644 --- a/api_docs/usage_collection.devdocs.json +++ b/api_docs/usage_collection.devdocs.json @@ -326,7 +326,7 @@ "\nRequest-scoped Elasticsearch client" ], "signature": [ - "{ eql: ", + "{ name: string | symbol; transform: ", "default", "; search: { >; }; create: { (this: That, params: ", + ">; }; eql: ", + "default", + "; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -390,7 +392,7 @@ "default", "; security: ", "default", - "; name: string | symbol; index: { (this: That, params: ", + "; index: { (this: That, params: ", "IndexRequest", " | ", "IndexRequest", @@ -1456,8 +1458,6 @@ "TermvectorsResponse", ">; }; textStructure: ", "default", - "; transform: ", - "default", "; updateByQuery: { (this: That, params: ", "UpdateByQueryRequest", " | ", @@ -2190,7 +2190,7 @@ "\nPossible type values in the schema" ], "signature": [ - "\"boolean\" | \"keyword\" | \"text\" | \"date\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" + "\"boolean\" | \"text\" | \"date\" | \"keyword\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" ], "path": "node_modules/@types/kbn__analytics-client/index.d.ts", "deprecated": false, diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 54bc9017f6704..8cb53f58999fd 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the usageCollection plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 467046d89b7de..ec97960575ffa 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github summary: API docs for the ux plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index ec5e9751f8f44..bb30dcfc843f5 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the visDefaultEditor plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 73fcc40f1d12e..5897ea11308be 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeGauge plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index c38aebf315312..a0b0a56f833b8 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeHeatmap plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index d078fa1f79f0f..a0985a9ef4186 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypePie plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 951b354bcc2b3..83e54c1bdbba0 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTable plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index b9356ffd59104..9134ca9a800f8 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimelion plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 8ec9f72bf0837..2542b1d9f3ec8 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimeseries plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 9c6072ac8e0c9..3cf0d0ad5129c 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVega plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vislib.devdocs.json b/api_docs/vis_type_vislib.devdocs.json index ad1196c648308..49de6b874a701 100644 --- a/api_docs/vis_type_vislib.devdocs.json +++ b/api_docs/vis_type_vislib.devdocs.json @@ -39,7 +39,7 @@ "label": "type", "description": [], "signature": [ - "\"goal\" | \"heatmap\" | \"metric\" | \"gauge\" | \"pie\"" + "\"goal\" | \"metric\" | \"gauge\" | \"heatmap\" | \"pie\"" ], "path": "src/plugins/vis_types/vislib/public/types.ts", "deprecated": false @@ -338,7 +338,7 @@ "label": "VislibChartType", "description": [], "signature": [ - "\"goal\" | \"heatmap\" | \"metric\" | \"gauge\" | \"pie\"" + "\"goal\" | \"metric\" | \"gauge\" | \"heatmap\" | \"pie\"" ], "path": "src/plugins/vis_types/vislib/public/types.ts", "deprecated": false, diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 66d593c9342ff..51a469d6675e4 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVislib plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 36ada42dd4d54..f645d26ebe9f9 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeXy plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index d647aaa69542f..9e3b0bd75383d 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -5123,7 +5123,7 @@ "label": "VisualizeEmbeddableContract", "description": [], "signature": [ - "{ readonly id: string; readonly type: \"visualization\"; getExplicitInput: () => ", + "{ readonly type: \"visualization\"; readonly id: string; render: (domNode: HTMLElement) => Promise; getExplicitInput: () => ", { "pluginId": "visualizations", "scope": "public", @@ -5155,7 +5155,7 @@ "section": "def-public.ContainerOutput", "text": "ContainerOutput" }, - "> | undefined; render: (domNode: HTMLElement) => Promise; updateInput: (changes: Partial<", + "> | undefined; updateInput: (changes: Partial<", { "pluginId": "visualizations", "scope": "public", @@ -5347,7 +5347,43 @@ "label": "VisualizeEmbeddableFactoryContract", "description": [], "signature": [ - "{ create: (input: ", + "{ readonly type: \"visualization\"; inject: (_state: ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" + }, + ", references: ", + "SavedObjectReference", + "[]) => ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" + }, + "; extract: (_state: ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" + }, + ") => { state: ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" + }, + "; references: ", + "SavedObjectReference", + "[]; }; create: (input: ", { "pluginId": "visualizations", "scope": "public", @@ -5407,7 +5443,7 @@ "VisualizeEmbeddable", " | ", "DisabledLabEmbeddable", - " | undefined>; readonly type: \"visualization\"; isEditable: () => Promise; getDisplayName: () => string; createFromSavedObject: (savedObjectId: string, input: Partial<", + " | undefined>; isEditable: () => Promise; getDisplayName: () => string; createFromSavedObject: (savedObjectId: string, input: Partial<", { "pluginId": "visualizations", "scope": "public", @@ -5459,43 +5495,7 @@ "section": "def-public.SavedObjectMetaData", "text": "SavedObjectMetaData" }, - "; extract: (_state: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - }, - ") => { state: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - }, - "; references: ", - "SavedObjectReference", - "[]; }; inject: (_state: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - }, - ", references: ", - "SavedObjectReference", - "[]) => ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - }, - "; getCurrentAppId: () => Promise; checkTitle: (props: ", + "; getCurrentAppId: () => Promise; checkTitle: (props: ", { "pluginId": "savedObjects", "scope": "public", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index a7af86feac5f8..498f3cb74c07b 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github summary: API docs for the visualizations plugin -date: 2022-07-18 +date: 2022-07-20 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/dev_docs/operations/operations_landing.mdx b/dev_docs/operations/operations_landing.mdx index 95fb4ceb2af09..2e2cef5c9bbbb 100644 --- a/dev_docs/operations/operations_landing.mdx +++ b/dev_docs/operations/operations_landing.mdx @@ -38,6 +38,8 @@ layout: landing { pageId: "kibDevDocsOpsEslintConfig" }, { pageId: "kibDevDocsOpsEslintWithTypes" }, { pageId: "kibDevDocsOpsEslintPluginImports" }, + { pageId: "kibDevDocsOpsEslintPluginDisable" }, + { pageId: "kibDevDocsOpsKbnYarnLockValidator"}, ]} /> diff --git a/docs/developer/getting-started/monorepo-packages.asciidoc b/docs/developer/getting-started/monorepo-packages.asciidoc index eed060d253a28..b6524c6007b2e 100644 --- a/docs/developer/getting-started/monorepo-packages.asciidoc +++ b/docs/developer/getting-started/monorepo-packages.asciidoc @@ -17,16 +17,6 @@ Remember that any time you need to make sure the monorepo is ready to be used ju yarn kbn bootstrap ---- -[discrete] -=== Building Non Bazel Packages - -Non Bazel packages can be built independently with - -[source,bash] ----- -yarn kbn run build -i PACKAGE_NAME ----- - [discrete] === Building Bazel Packages @@ -34,7 +24,7 @@ Bazel packages are built as a whole for now. You can use: [source,bash] ---- -yarn kbn build +yarn kbn bootstrap ---- [discrete] diff --git a/docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc b/docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc index 4636a40471e12..e7468c60a2ebc 100644 --- a/docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc +++ b/docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc @@ -124,7 +124,7 @@ import { DemoPlugin } from './plugin'; export const config = { schema: schema.object({ enabled: schema.boolean({ defaultValue: true }), - }); + }), } export const plugin = (initContext: PluginInitializerContext) => new DemoPlugin(initContext); diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index 5ed2d734a81c2..5ca8f75a0fba0 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -298,6 +298,9 @@ When enabled, removes the columns that are not in the new data view. [[discover-sample-size]]`discover:sampleSize`:: Specifies the number of rows to display in the *Discover* table. +[[discover-sampleRowsPerPage]]`discover:sampleRowsPerPage`:: +Specifies the number of rows to display per page in the *Discover* table. + [[discover-searchFieldsFromSource]]`discover:searchFieldsFromSource`:: Load fields from the original JSON {ref}/mapping-source-field.html[`_source`]. When disabled, *Discover* loads fields using the {es} search API's diff --git a/docs/setup/upgrade/resolving-migration-failures.asciidoc b/docs/setup/upgrade/resolving-migration-failures.asciidoc index 85847b15cb084..0af9fafa36d77 100644 --- a/docs/setup/upgrade/resolving-migration-failures.asciidoc +++ b/docs/setup/upgrade/resolving-migration-failures.asciidoc @@ -177,7 +177,7 @@ If the cluster exceeded the low watermark for disk usage, the output should cont -------------------------------------------- "The node is above the low watermark cluster setting [cluster.routing.allocation.disk.watermark.low=85%], using more disk space than the maximum allowed [85.0%], actual free: [11.692661332965082%]" -------------------------------------------- -Refer to the {es} guide for how to {ref}/fix-common-cluster-issues.html#_error_disk_usage_exceeded_flood_stage_watermark_index_has_read_only_allow_delete_block[fix common cluster issues]. +Refer to the {es} guide for how to {ref}/fix-common-cluster-issues.html[fix common cluster issues]. If routing allocation is the issue, the `_cluster/allocation/explain` API will return an entry similar to this: diff --git a/examples/bfetch_explorer/public/containers/app/pages/page_count_until/index.tsx b/examples/bfetch_explorer/public/containers/app/pages/page_count_until/index.tsx index ef0fb8ce04a80..75a20904256b5 100644 --- a/examples/bfetch_explorer/public/containers/app/pages/page_count_until/index.tsx +++ b/examples/bfetch_explorer/public/containers/app/pages/page_count_until/index.tsx @@ -12,7 +12,7 @@ import { CountUntil } from '../../../../components/count_until'; import { Page } from '../../../../components/page'; import { useDeps } from '../../../../hooks/use_deps'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface Props {} export const PageCountUntil: React.FC = () => { diff --git a/examples/bfetch_explorer/public/containers/app/pages/page_double_integers/index.tsx b/examples/bfetch_explorer/public/containers/app/pages/page_double_integers/index.tsx index 462bb5eca1d97..126e099098cee 100644 --- a/examples/bfetch_explorer/public/containers/app/pages/page_double_integers/index.tsx +++ b/examples/bfetch_explorer/public/containers/app/pages/page_double_integers/index.tsx @@ -12,7 +12,7 @@ import { DoubleIntegers } from '../../../../components/double_integers'; import { Page } from '../../../../components/page'; import { useDeps } from '../../../../hooks/use_deps'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface Props {} export const PageDoubleIntegers: React.FC = () => { diff --git a/examples/bfetch_explorer/public/containers/app/sidebar/index.tsx b/examples/bfetch_explorer/public/containers/app/sidebar/index.tsx index a3732ad6bd678..7bb2a5737c4ac 100644 --- a/examples/bfetch_explorer/public/containers/app/sidebar/index.tsx +++ b/examples/bfetch_explorer/public/containers/app/sidebar/index.tsx @@ -11,7 +11,7 @@ import { EuiPageSideBar, EuiSideNav } from '@elastic/eui'; import { useHistory } from 'react-router-dom'; import { routes } from '../../../routes'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface interface SidebarProps {} export const Sidebar: React.FC = () => { diff --git a/examples/response_stream/public/plugin.ts b/examples/response_stream/public/plugin.ts index c9e72f06e68ad..1c1c8ce389495 100644 --- a/examples/response_stream/public/plugin.ts +++ b/examples/response_stream/public/plugin.ts @@ -14,7 +14,7 @@ export interface ResponseStreamSetupPlugins { developerExamples: DeveloperExamplesSetup; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ResponseStreamStartPlugins {} export class ResponseStreamPlugin implements Plugin { diff --git a/examples/response_stream/server/plugin.ts b/examples/response_stream/server/plugin.ts index f2d5e1dddb4c7..9620a58ae517b 100644 --- a/examples/response_stream/server/plugin.ts +++ b/examples/response_stream/server/plugin.ts @@ -11,10 +11,10 @@ import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; import { defineReducerStreamRoute, defineSimpleStringStreamRoute } from './routes'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ResponseStreamSetupPlugins {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ResponseStreamStartPlugins {} export class ResponseStreamPlugin implements Plugin { diff --git a/kbn_pm/README.mdx b/kbn_pm/README.mdx new file mode 100644 index 0000000000000..03568d5667a25 --- /dev/null +++ b/kbn_pm/README.mdx @@ -0,0 +1,44 @@ +--- +id: kibDevDocsOpsKbnPm +slug: /kibana-dev-docs/ops/kbn-pm +title: "@kbn/pm" +description: 'The tool which bootstraps the repo and helps work with packages' +date: 2022-07-14 +tags: ['kibana', 'dev', 'contributor', 'operations', 'packages', 'scripts'] +--- + +`@kbn/pm` is the tool that we use to bootstrap the Kibana repository, build packages with Bazel, and run scripts in packages. + +## commands + +### `yarn kbn bootstrap` + +Use this command to install dependencies, build packages, and prepare the repo for local development. + +### `yarn kbn watch` + +Use this command to build all packages and make sure that they are rebuilt as you make changes. + +### and more! + +There are several commands supported by `@kbn/pm`, but rather than documenting them here they are documented in the help text. Please run `yarn kbn --help` locally to see the most up-to-date info. + +## Why isn't this TypeScript? + +Since this tool is required for bootstrapping the repository it needs to work without any dependencies installed and without a build toolchain. We accomplish this by writing the tool in vanilla JS (shocker!) and using TypeScript to validate the code which is typed via heavy use of JSDoc comments. + +In order to use import/export syntax and enhance the developer experience a little we use the `.mjs` file extension. + +In some cases we actually do use TypeScript files, just for defining complicated types. These files are then imported only in special TS-compatible JSDoc comments, so Node.js will never try to import them but they can be used to define types which are too complicated to define inline or in a JSDoc comment. + +There are cases where `@kbn/pm` relies on code from packages, mostly to prevent reimplementing common functionality. This can only be done in one of two ways: + + 1. With a dynamic `await import(...)` statement that is always run after boostrap is complete, or is wrapped in a try/catch in case bootstrap didn't complete successfully. + 2. By pulling in the source code of the un-built package. + +Option 1 is used in several places, with contingencies in place in case bootstrap failed. Option 2 is used for two pieces of code which are needed in order to run bootstrap: + + 1. `@kbn/plugin-discovery` as we need to populate the `@kbn/synthetic-package-map` to run Bazel + 2. `@kbn/bazel-runner` as we want to have the logic for running bazel in a single location + +Because we load these two packages from source, without being built, before bootstrap is ever run, they can not depend on other packages and must be written in Vanilla JS as well. \ No newline at end of file diff --git a/kbn_pm/src/cli.mjs b/kbn_pm/src/cli.mjs new file mode 100644 index 0000000000000..99d8262f92aa9 --- /dev/null +++ b/kbn_pm/src/cli.mjs @@ -0,0 +1,130 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * This is the script that's run by `yarn kbn`. This script has as little logic + * as possible so that it can: + * - run without being built and without any dependencies + * - can bootstrap the repository, installing all deps and building all packages + * - load additional commands from packages which will extend the functionality + * beyond bootstrapping + */ + +import { Args } from './lib/args.mjs'; +import { getHelp } from './lib/help.mjs'; +import { createFlagError, isCliError } from './lib/cli_error.mjs'; +import { COMMANDS } from './commands/index.mjs'; +import { Log } from './lib/log.mjs'; + +const start = Date.now(); +const args = new Args(process.argv.slice(2), process.env.CI ? ['--quiet'] : []); +const log = new Log(args.getLoggingLevel()); +const cmdName = args.getCommandName(); + +/** + * @param {import('./lib/log.mjs').Log} log + */ +async function tryToGetCiStatsReporter(log) { + try { + const { CiStatsReporter } = await import('@kbn/ci-stats-reporter'); + return CiStatsReporter.fromEnv(log); + } catch { + return; + } +} + +try { + const cmd = cmdName ? COMMANDS.find((c) => c.name === cmdName) : undefined; + + if (cmdName && !cmd) { + throw createFlagError(`Invalid command name [${cmdName}]`); + } + + if (args.getBooleanValue('help')) { + log._write(await getHelp(cmdName)); + process.exit(0); + } + + if (!cmd) { + throw createFlagError('missing command name'); + } + + /** @type {import('@kbn/ci-stats-reporter').CiStatsTiming[]} */ + const timings = []; + + /** @type {import('./lib/command').CommandRunContext['time']} */ + const time = async (id, block) => { + if (!cmd.reportTimings) { + return await block(); + } + + const start = Date.now(); + log.verbose(`[${id}]`, 'start'); + const [result] = await Promise.allSettled([block()]); + const ms = Date.now() - start; + log.verbose(`[${id}]`, result.status === 'fulfilled' ? 'success' : 'failure', 'in', ms, 'ms'); + timings.push({ + group: cmd.reportTimings.group, + id, + ms, + meta: { + success: result.status === 'fulfilled', + }, + }); + + if (result.status === 'fulfilled') { + return result.value; + } else { + throw result.reason; + } + }; + + const [result] = await Promise.allSettled([ + (async () => + await cmd.run({ + args, + log, + time, + }))(), + ]); + + if (cmd.reportTimings) { + timings.push({ + group: cmd.reportTimings.group, + id: cmd.reportTimings.id, + ms: Date.now() - start, + meta: { + success: result.status === 'fulfilled', + }, + }); + } + + if (timings.length) { + const reporter = await tryToGetCiStatsReporter(log); + if (reporter) { + await reporter.timings({ timings }); + } + } + + if (result.status === 'rejected') { + throw result.reason; + } +} catch (error) { + if (!isCliError(error)) { + throw error; + } + + log.error(`[${cmdName}] failed: ${error.message}`); + + if (error.showHelp) { + log._write(''); + log._write(await getHelp(cmdName)); + } + + process.exit(error.exitCode ?? 1); +} diff --git a/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs b/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs new file mode 100644 index 0000000000000..65876b0799aeb --- /dev/null +++ b/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs @@ -0,0 +1,127 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { spawnSync } from '../../lib/spawn.mjs'; +import * as Bazel from '../../lib/bazel.mjs'; +import { haveNodeModulesBeenManuallyDeleted, removeYarnIntegrityFileIfExists } from './yarn.mjs'; +import { setupRemoteCache } from './setup_remote_cache.mjs'; +import { regenerateSyntheticPackageMap } from './regenerate_synthetic_package_map.mjs'; +import { sortPackageJson } from './sort_package_json.mjs'; +import { pluginDiscovery } from './plugins.mjs'; +import { regenerateBaseTsconfig } from './regenerate_base_tsconfig.mjs'; + +/** @type {import('../../lib/command').Command} */ +export const command = { + name: 'bootstrap', + intro: 'Bootstrap the Kibana repository, installs all dependencies and builds all packages', + description: ` + This command should be run every time you checkout a new revision, or can be used to build all packages + once after making a change locally. Package builds are cached remotely so when you don't have local + changes build artifacts will be downloaded from the remote cache. + `, + flagsHelp: ` + --force-install Use this flag to force bootstrap to install yarn dependencies. By default the', + command will attempt to only run yarn installs when necessary, but if you manually', + delete the node modules directory or have an issue in your node_modules directory', + you might need to force the install manually.', + --offline Run the installation process without consulting online resources. This is useful and', + sometimes necessary for using bootstrap on an airplane for instance. The local caches', + will be used exclusively, including a yarn-registry local mirror which is created and', + maintained by successful online bootstrap executions.', + --no-validate By default bootstrap validates the yarn.lock file to check for a handfull of', + conditions. If you run into issues with this process locally you can disable it by', + passing this flag. + --no-vscode By default bootstrap updates the .vscode directory to include commonly useful vscode + settings for local development. Disable this process either pass this flag or set + the KBN_BOOTSTRAP_NO_VSCODE=true environment variable. + --quiet Prevent logging more than basic success/error messages + `, + reportTimings: { + group: 'scripts/kbn bootstrap', + id: 'total', + }, + async run({ args, log, time }) { + const offline = args.getBooleanValue('offline') ?? false; + const validate = args.getBooleanValue('validate') ?? true; + const quiet = args.getBooleanValue('quiet') ?? false; + const vscodeConfig = + args.getBooleanValue('vscode') ?? (process.env.KBN_BOOTSTRAP_NO_VSCODE ? false : true); + + // Force install is set in case a flag is passed into yarn kbn bootstrap or + // our custom logic have determined there is a chance node_modules have been manually deleted and as such bazel + // tracking mechanism is no longer valid + const forceInstall = + args.getBooleanValue('force-install') ?? haveNodeModulesBeenManuallyDeleted(); + + Bazel.tryRemovingBazeliskFromYarnGlobal(log); + + // Install bazel machinery tools if needed + Bazel.ensureInstalled(log); + + // Setup remote cache settings in .bazelrc.cache if needed + setupRemoteCache(log); + + // Bootstrap process for Bazel packages + // Bazel is now managing dependencies so yarn install + // will happen as part of this + // + // NOTE: Bazel projects will be introduced incrementally + // And should begin from the ones with none dependencies forward. + // That way non bazel projects could depend on bazel projects but not the other way around + // That is only intended during the migration process while non Bazel projects are not removed at all. + if (forceInstall) { + await time('force install dependencies', async () => { + removeYarnIntegrityFileIfExists(); + await Bazel.expungeCache(log, { quiet }); + await Bazel.installYarnDeps(log, { offline, quiet }); + }); + } + + const plugins = await time('plugin discovery', async () => { + return pluginDiscovery(); + }); + + // generate the synthetic package map which powers several other features, needed + // as an input to the package build + await time('regenerate synthetic package map', async () => { + regenerateSyntheticPackageMap(plugins); + }); + + // build packages + await time('build packages', async () => { + await Bazel.buildPackages(log, { offline, quiet }); + }); + + await time('sort package json', async () => { + await sortPackageJson(); + }); + await time('regenerate tsconfig.base.json', async () => { + regenerateBaseTsconfig(plugins); + }); + + if (validate) { + // now that packages are built we can import `@kbn/yarn-lock-validator` + const { readYarnLock, validateDependencies } = await import('@kbn/yarn-lock-validator'); + const yarnLock = await time('read yarn.lock', async () => { + return await readYarnLock(); + }); + await time('validate dependencies', async () => { + await validateDependencies(log, yarnLock); + }); + } + + if (vscodeConfig) { + await time('update vscode config', async () => { + // Update vscode settings + spawnSync('node', ['scripts/update_vscode_config']); + + log.success('vscode config updated'); + }); + } + }, +}; diff --git a/kbn_pm/src/commands/bootstrap/normalize_path.mjs b/kbn_pm/src/commands/bootstrap/normalize_path.mjs new file mode 100644 index 0000000000000..1ff4d286bff3a --- /dev/null +++ b/kbn_pm/src/commands/bootstrap/normalize_path.mjs @@ -0,0 +1,61 @@ +/* eslint-disable @kbn/eslint/require-license-header */ +/** + * @notice + * This code includes a copy of the `normalize-path` + * https://github.com/jonschlinkert/normalize-path/blob/52c3a95ebebc2d98c1ad7606cbafa7e658656899/index.js + * + * The MIT License (MIT) + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @param {string} path + * @returns {string} + */ +export function normalizePath(path) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + const len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + let prefix = ''; + if (len > 4 && path[3] === '\\') { + const ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + const segs = path.split(/[/\\]+/); + if (segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +} diff --git a/kbn_pm/src/commands/bootstrap/plugins.mjs b/kbn_pm/src/commands/bootstrap/plugins.mjs new file mode 100644 index 0000000000000..70b7d98cee4da --- /dev/null +++ b/kbn_pm/src/commands/bootstrap/plugins.mjs @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { REPO_ROOT } from '../../lib/paths.mjs'; + +/** @type {string} */ +const PLUGIN_DISCOVERY_SRC = '../../../../packages/kbn-plugin-discovery/src/index.js'; + +/** + * @param {string} pluginId + * @returns {string} + */ +export function convertPluginIdToPackageId(pluginId) { + if (pluginId === 'core') { + // core is the only non-plugin + return `@kbn/core`; + } + + return `@kbn/${pluginId + .split('') + .flatMap((c) => (c.toUpperCase() === c ? `-${c.toLowerCase()}` : c)) + .join('')}-plugin` + .replace(/-\w(-\w)+-/g, (match) => `-${match.split('-').join('')}-`) + .replace(/-plugin-plugin$/, '-plugin'); +} + +/** + * @returns {Promise} + */ +export async function pluginDiscovery() { + /* eslint-disable no-unsanitized/method */ + /** @type {import('@kbn/plugin-discovery')} */ + const { getPluginSearchPaths, simpleKibanaPlatformPluginDiscovery } = await import( + PLUGIN_DISCOVERY_SRC + ); + /* eslint-enable no-unsanitized/method */ + + const searchPaths = getPluginSearchPaths({ + rootDir: REPO_ROOT, + examples: true, + oss: false, + testPlugins: true, + }); + + return simpleKibanaPlatformPluginDiscovery(searchPaths, []); +} diff --git a/packages/kbn-pm/src/utils/regenerate_base_tsconfig.ts b/kbn_pm/src/commands/bootstrap/regenerate_base_tsconfig.mjs similarity index 63% rename from packages/kbn-pm/src/utils/regenerate_base_tsconfig.ts rename to kbn_pm/src/commands/bootstrap/regenerate_base_tsconfig.mjs index 667dc97d9ee8e..69b288f7981bb 100644 --- a/packages/kbn-pm/src/utils/regenerate_base_tsconfig.ts +++ b/kbn_pm/src/commands/bootstrap/regenerate_base_tsconfig.mjs @@ -6,30 +6,33 @@ * Side Public License, v 1. */ -import Fs from 'fs/promises'; import Path from 'path'; +import Fs from 'fs'; -import normalizePath from 'normalize-path'; -import { KibanaPlatformPlugin } from '@kbn/plugin-discovery'; -import { convertPluginIdToPackageId } from './convert_plugin_id_to_package_id'; +import { REPO_ROOT } from '../../lib/paths.mjs'; +import { convertPluginIdToPackageId } from './plugins.mjs'; +import { normalizePath } from './normalize_path.mjs'; -export async function regenerateBaseTsconfig(plugins: KibanaPlatformPlugin[], repoRoot: string) { - const tsconfigPath = Path.resolve(repoRoot, 'tsconfig.base.json'); - const lines = (await Fs.readFile(tsconfigPath, 'utf-8')).split('\n'); +/** + * @param {import('@kbn/plugin-discovery').KibanaPlatformPlugin[]} plugins + */ +export function regenerateBaseTsconfig(plugins) { + const tsconfigPath = Path.resolve(REPO_ROOT, 'tsconfig.base.json'); + const lines = Fs.readFileSync(tsconfigPath, 'utf-8').split('\n'); const packageMap = plugins .slice() .sort((a, b) => a.manifestPath.localeCompare(b.manifestPath)) .flatMap((p) => { const id = convertPluginIdToPackageId(p.manifest.id); - const path = normalizePath(Path.relative(repoRoot, p.directory)); + const path = normalizePath(Path.relative(REPO_ROOT, p.directory)); return [` "${id}": ["${path}"],`, ` "${id}/*": ["${path}/*"],`]; }); const start = lines.findIndex((l) => l.trim() === '// START AUTOMATED PACKAGE LISTING'); const end = lines.findIndex((l) => l.trim() === '// END AUTOMATED PACKAGE LISTING'); - await Fs.writeFile( + Fs.writeFileSync( tsconfigPath, [...lines.slice(0, start + 1), ...packageMap, ...lines.slice(end)].join('\n') ); diff --git a/kbn_pm/src/commands/bootstrap/regenerate_synthetic_package_map.mjs b/kbn_pm/src/commands/bootstrap/regenerate_synthetic_package_map.mjs new file mode 100644 index 0000000000000..22898daa92b21 --- /dev/null +++ b/kbn_pm/src/commands/bootstrap/regenerate_synthetic_package_map.mjs @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import { normalizePath } from './normalize_path.mjs'; +import { REPO_ROOT } from '../../lib/paths.mjs'; +import { convertPluginIdToPackageId } from './plugins.mjs'; + +/** + * @param {import('@kbn/plugin-discovery').KibanaPlatformPlugin[]} plugins + */ +export function regenerateSyntheticPackageMap(plugins) { + /** @type {Array<[string, string]>} */ + const entries = [['@kbn/core', 'src/core']]; + + for (const plugin of plugins) { + entries.push([ + convertPluginIdToPackageId(plugin.manifest.id), + normalizePath(Path.relative(REPO_ROOT, plugin.directory)), + ]); + } + + Fs.writeFileSync( + Path.resolve(REPO_ROOT, 'packages/kbn-synthetic-package-map/synthetic-packages.json'), + JSON.stringify(entries, null, 2) + ); +} diff --git a/packages/kbn-pm/src/utils/bazel/setup_remote_cache.ts b/kbn_pm/src/commands/bootstrap/setup_remote_cache.mjs similarity index 52% rename from packages/kbn-pm/src/utils/bazel/setup_remote_cache.ts rename to kbn_pm/src/commands/bootstrap/setup_remote_cache.mjs index 9ec7f36821d3d..6961e644a0989 100644 --- a/packages/kbn-pm/src/utils/bazel/setup_remote_cache.ts +++ b/kbn_pm/src/commands/bootstrap/setup_remote_cache.mjs @@ -5,17 +5,19 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import dedent from 'dedent'; -import { writeFileSync } from 'fs'; -import { resolve } from 'path'; -import { spawn } from '../child_process'; -import { log } from '../log'; -import { isFile, readFile } from '../fs'; -async function isElasticCommitter() { +import Path from 'path'; +import Fs from 'fs'; +import { spawnSync } from 'child_process'; + +import { isFile } from '../../lib/fs.mjs'; +import { dedent } from '../../lib/indent.mjs'; +import { REPO_ROOT } from '../../lib/paths.mjs'; + +function isElasticCommitter() { try { - const { stdout: email } = await spawn('git', ['config', 'user.email'], { - stdio: 'pipe', + const { stdout: email } = spawnSync('git', ['config', 'user.email'], { + encoding: 'utf8', }); return email.trim().endsWith('@elastic.co'); @@ -24,31 +26,39 @@ async function isElasticCommitter() { } } -async function upToDate(settingsPath: string) { - if (!(await isFile(settingsPath))) { +/** + * + * @param {string} settingsPath + * @returns + */ +function upToDate(settingsPath) { + if (!isFile(settingsPath)) { return false; } - const readSettingsFile = await readFile(settingsPath, 'utf8'); + const readSettingsFile = Fs.readFileSync(settingsPath, 'utf8'); return readSettingsFile.startsWith('# V2 '); } -export async function setupRemoteCache(repoRootPath: string) { +/** + * @param {import('@kbn/some-dev-log').SomeDevLog} log + */ +export function setupRemoteCache(log) { // The remote cache is only for Elastic employees working locally (CI cache settings are handled elsewhere) if ( process.env.FORCE_BOOTSTRAP_REMOTE_CACHE !== 'true' && - (process.env.CI || !(await isElasticCommitter())) + (process.env.CI || !isElasticCommitter()) ) { return; } - log.debug(`[bazel_tools] setting up remote cache settings if necessary`); + log.debug(`setting up remote cache settings if necessary`); - const settingsPath = resolve(repoRootPath, '.bazelrc.cache'); + const settingsPath = Path.resolve(REPO_ROOT, '.bazelrc.cache'); // Checks if we should upgrade or install the config file - if (await upToDate(settingsPath)) { - log.debug(`[bazel_tools] remote cache config already exists and is up-to-date, skipping`); + if (upToDate(settingsPath)) { + log.debug(`remote cache config already exists and is up-to-date, skipping`); return; } @@ -60,6 +70,6 @@ export async function setupRemoteCache(repoRootPath: string) { build --incompatible_remote_results_ignore_disk `; - writeFileSync(settingsPath, contents); - log.info(`[bazel_tools] remote cache settings written to ${settingsPath}`); + Fs.writeFileSync(settingsPath, contents); + log.info(`remote cache settings written to ${settingsPath}`); } diff --git a/packages/kbn-pm/src/utils/regenerate_package_json.ts b/kbn_pm/src/commands/bootstrap/sort_package_json.mjs similarity index 53% rename from packages/kbn-pm/src/utils/regenerate_package_json.ts rename to kbn_pm/src/commands/bootstrap/sort_package_json.mjs index 6124aebc38879..f78401c257e40 100644 --- a/packages/kbn-pm/src/utils/regenerate_package_json.ts +++ b/kbn_pm/src/commands/bootstrap/sort_package_json.mjs @@ -6,13 +6,15 @@ * Side Public License, v 1. */ -import Fsp from 'fs/promises'; import Path from 'path'; +import Fs from 'fs'; -import { sortPackageJson } from '@kbn/sort-package-json'; +import { REPO_ROOT } from '../../lib/paths.mjs'; -export async function regeneratePackageJson(rootPath: string) { - const path = Path.resolve(rootPath, 'package.json'); - const json = await Fsp.readFile(path, 'utf8'); - await Fsp.writeFile(path, sortPackageJson(json)); +export async function sortPackageJson() { + const { sortPackageJson } = await import('@kbn/sort-package-json'); + + const path = Path.resolve(REPO_ROOT, 'package.json'); + const json = Fs.readFileSync(path, 'utf8'); + Fs.writeFileSync(path, sortPackageJson(json)); } diff --git a/kbn_pm/src/commands/bootstrap/yarn.mjs b/kbn_pm/src/commands/bootstrap/yarn.mjs new file mode 100644 index 0000000000000..db11c3b12930e --- /dev/null +++ b/kbn_pm/src/commands/bootstrap/yarn.mjs @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import { REPO_ROOT } from '../../lib/paths.mjs'; +import { maybeRealpath, isFile, isDirectory } from '../../lib/fs.mjs'; + +// yarn integrity file checker +export function removeYarnIntegrityFileIfExists() { + try { + const nodeModulesRealPath = maybeRealpath(Path.resolve(REPO_ROOT, 'node_modules')); + const yarnIntegrityFilePath = Path.resolve(nodeModulesRealPath, '.yarn-integrity'); + + // check if the file exists and delete it in that case + if (isFile(yarnIntegrityFilePath)) { + Fs.unlinkSync(yarnIntegrityFilePath); + } + } catch { + // no-op + } +} + +// yarn and bazel integration checkers +function areNodeModulesPresent() { + try { + return isDirectory(Path.resolve(REPO_ROOT, 'node_modules')); + } catch { + return false; + } +} + +function haveBazelFoldersBeenCreatedBefore() { + try { + return ( + isDirectory(Path.resolve(REPO_ROOT, 'bazel-bin/packages')) || + isDirectory(Path.resolve(REPO_ROOT, 'bazel-kibana/packages')) || + isDirectory(Path.resolve(REPO_ROOT, 'bazel-out/host')) + ); + } catch { + return false; + } +} + +export function haveNodeModulesBeenManuallyDeleted() { + return !areNodeModulesPresent() && haveBazelFoldersBeenCreatedBefore(); +} diff --git a/kbn_pm/src/commands/clean_command.mjs b/kbn_pm/src/commands/clean_command.mjs new file mode 100644 index 0000000000000..a112431eeda57 --- /dev/null +++ b/kbn_pm/src/commands/clean_command.mjs @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { dedent } from '../lib/indent.mjs'; +import { cleanPaths } from '../lib/clean.mjs'; +import * as Bazel from '../lib/bazel.mjs'; +import { findPluginCleanPaths } from '../lib/find_clean_paths.mjs'; + +/** @type {import('../lib/command').Command} */ +export const command = { + name: 'clean', + description: 'Deletes output directories and resets internal caches', + reportTimings: { + group: 'scripts/kbn clean', + id: 'total', + }, + flagsHelp: ` + --quiet Prevent logging more than basic success/error messages + `, + async run({ args, log }) { + log.warning(dedent` + This command is only necessary for the circumstance where you need to recover a consistent + state when problems arise. If you need to run this command often, please let us know by + filling out this form: https://ela.st/yarn-kbn-clean. + + Please note it might not solve problems with node_modules. To solve problems around node_modules + you might need to run 'yarn kbn reset'. + `); + + await cleanPaths(log, await findPluginCleanPaths(log)); + + // Runs Bazel soft clean + if (Bazel.isInstalled(log)) { + await Bazel.clean(log, { + quiet: args.getBooleanValue('quiet'), + }); + } + }, +}; diff --git a/kbn_pm/src/commands/index.mjs b/kbn_pm/src/commands/index.mjs new file mode 100644 index 0000000000000..8d4638310d329 --- /dev/null +++ b/kbn_pm/src/commands/index.mjs @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const COMMANDS = [ + (await import('./bootstrap/bootstrap_command.mjs')).command, + (await import('./watch_command.mjs')).command, + (await import('./run_in_packages_command.mjs')).command, + (await import('./clean_command.mjs')).command, + (await import('./reset_command.mjs')).command, +]; diff --git a/kbn_pm/src/commands/reset_command.mjs b/kbn_pm/src/commands/reset_command.mjs new file mode 100644 index 0000000000000..1b218087bd33d --- /dev/null +++ b/kbn_pm/src/commands/reset_command.mjs @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; + +import { REPO_ROOT } from '../lib/paths.mjs'; +import { dedent } from '../lib/indent.mjs'; +import { cleanPaths } from '../lib/clean.mjs'; +import * as Bazel from '../lib/bazel.mjs'; +import { findPluginCleanPaths, readCleanPatterns } from '../lib/find_clean_paths.mjs'; + +/** @type {import('../lib/command').Command} */ +export const command = { + name: 'reset', + description: + 'Deletes node_modules and output directories, resets internal and disk caches, and stops Bazel server', + reportTimings: { + group: 'scripts/kbn reset', + id: 'total', + }, + flagsHelp: ` + --quiet Prevent logging more than basic success/error messages + `, + async run({ args, log }) { + log.warning(dedent` + In most cases, 'yarn kbn clean' is all that should be needed to recover a consistent state when + problems arise. However for the rare cases where something get corrupt on node_modules you might need this command. + If you think you need to use this command very often (which is not normal), please let us know. + `); + + await cleanPaths(log, [ + Path.resolve(REPO_ROOT, 'node_modules'), + Path.resolve(REPO_ROOT, 'x-pack/node_modules'), + ...readCleanPatterns(REPO_ROOT), + ...(await findPluginCleanPaths(log)), + ]); + + const quiet = args.getBooleanValue('quiet'); + Bazel.expungeCache(log, { quiet }); + Bazel.cleanDiskCache(log); + }, +}; diff --git a/kbn_pm/src/commands/run_in_packages_command.mjs b/kbn_pm/src/commands/run_in_packages_command.mjs new file mode 100644 index 0000000000000..78a168463e6db --- /dev/null +++ b/kbn_pm/src/commands/run_in_packages_command.mjs @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; + +import { REPO_ROOT } from '../lib/paths.mjs'; +import { spawnSync, spawnStreaming } from '../lib/spawn.mjs'; + +/** @type {import('../lib/command').Command} */ +export const command = { + name: 'run-in-packages', + usage: '[...flags] [...subFlags]', + description: ` + Run script defined in package.json in each package that contains that script. Any flags passed + after the script name will be passed directly to the script. + `, + flagsHelp: ` + --filter package name to be filter packages by, can be specified multiple times + and only packages matching this filter will be matched + --exclude package name to be excluded, can be specified multiple times + --quiet only log the output of commands if they fail + `, + reportTimings: { + group: 'scripts/kbn run', + id: 'total', + }, + async run({ log, args }) { + const scriptName = args.getPositionalArgs()[0]; + + const rawArgs = args.getRawArgs(); + const i = rawArgs.indexOf(scriptName); + const scriptArgs = i !== -1 ? rawArgs.slice(i + 1) : []; + + const exclude = args.getStringValues('exclude') ?? []; + const include = args.getStringValues('include') ?? []; + + const { discoverBazelPackages } = await import('@kbn/bazel-packages'); + const packages = await discoverBazelPackages(REPO_ROOT); + for (const { pkg, normalizedRepoRelativeDir } of packages) { + if ( + exclude.includes(pkg.name) || + (include.length && !include.includes(pkg.name)) || + !pkg.scripts || + !Object.hasOwn(pkg.scripts, scriptName) + ) { + continue; + } + + log.debug( + `running [${scriptName}] script in [${pkg.name}]`, + scriptArgs.length ? `with args [${scriptArgs.join(' ')}]` : '' + ); + + const cwd = Path.resolve(REPO_ROOT, normalizedRepoRelativeDir); + + if (args.getBooleanValue('quiet')) { + spawnSync('yarn', ['run', scriptName, ...scriptArgs], { + cwd, + description: `${scriptName} in ${pkg.name}`, + }); + } else { + await spawnStreaming('yarn', ['run', scriptName, ...scriptArgs], { + cwd: cwd, + logPrefix: ' ', + }); + } + + log.success(`Ran [${scriptName}] in [${pkg.name}]`); + } + }, +}; diff --git a/kbn_pm/src/commands/watch_command.mjs b/kbn_pm/src/commands/watch_command.mjs new file mode 100644 index 0000000000000..537721d58aae5 --- /dev/null +++ b/kbn_pm/src/commands/watch_command.mjs @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as Bazel from '../lib/bazel.mjs'; + +/** @type {import('../lib/command').Command} */ +export const command = { + name: 'watch', + description: 'Runs a build in the Bazel built packages and keeps watching them for changes', + flagsHelp: ` + --offline Run the installation process without consulting online resources. This is useful and', + sometimes necessary for using bootstrap on an airplane for instance. The local caches', + will be used exclusively, including a yarn-registry local mirror which is created and', + maintained by successful online bootstrap executions.', + `, + reportTimings: { + group: 'scripts/kbn watch', + id: 'total', + }, + + async run({ args, log }) { + await Bazel.watch(log, { + offline: args.getBooleanValue('offline') ?? true, + }); + }, +}; diff --git a/kbn_pm/src/lib/args.mjs b/kbn_pm/src/lib/args.mjs new file mode 100644 index 0000000000000..034f4b7d9becf --- /dev/null +++ b/kbn_pm/src/lib/args.mjs @@ -0,0 +1,182 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { createFlagError } from './cli_error.mjs'; + +/** + * @param {string[]} argv + */ +function parseArgv(argv) { + /** @type {string[]} */ + const raw = []; + /** @type {string[]} */ + const positional = []; + /** @type {Map} */ + const flags = new Map(); + + for (const arg of argv) { + raw.push(arg); + + if (!arg.startsWith('--')) { + // positional arguments are anything that doesn't start with "--" + positional.push(arg); + continue; + } + + // flags always start with "--" and might have an =value attached. + // - If the flag name starts with "no-", like `--no-flag`, it will set `flag` to `false` + // - If the flag has multiple string values they will be turned into an array of values + const [name, ...value] = arg.slice(2).split('='); + if (value.length === 0) { + // boolean flag + if (name.startsWith('no-')) { + flags.set(name.slice(3), false); + } else { + flags.set(name, true); + } + } else { + flags.set(name, value.join('=')); + } + } + + return { raw, positional, flags }; +} + +export class Args { + #flags; + #positional; + #raw; + #defaults; + + /** + * @param {string[]} argv + * @param {string[]} defaultArgv + */ + constructor(argv, defaultArgv) { + const { flags, positional, raw } = parseArgv(argv); + this.#flags = flags; + this.#positional = positional; + this.#raw = raw; + this.#defaults = parseArgv(defaultArgv).flags; + } + + /** + * @returns {import('@kbn/some-dev-log').SomeLogLevel} + */ + getLoggingLevel() { + if (this.getBooleanValue('quiet')) { + return 'quiet'; + } + + if (this.getBooleanValue('verbose')) { + return 'verbose'; + } + + if (this.getBooleanValue('debug')) { + return 'debug'; + } + + return 'info'; + } + + /** + * Get the command name from the args + */ + getCommandName() { + return this.#positional[0]; + } + + /** + * Get the positional arguments, excludes the command name + */ + getPositionalArgs() { + return this.#positional.slice(1); + } + + /** + * Get all of the passed args + */ + getRawArgs() { + return this.#raw.slice(); + } + + /** + * Get the value of a specific flag as a string, if the argument is specified multiple + * times then only the last value specified will be returned. If the flag was specified + * as a boolean then an error will be thrown. If the flag wasn't specified then + * undefined will be returned. + * @param {string} name + */ + getStringValue(name) { + const value = this.#flags.get(name) ?? this.#defaults.get(name); + if (Array.isArray(value)) { + return value.at(-1); + } + + if (typeof value === 'boolean') { + throw createFlagError(`Expected [--${name}] to have a value, not be a boolean flag`); + } + + return value; + } + + /** + * Get the string values of a flag as an array of values. This will return all values for a + * given flag and any boolean values will cause an error to be thrown. + * @param {string} name + */ + getStringValues(name) { + const value = this.#flags.get(name) ?? this.#defaults.get(name); + if (typeof value === 'string') { + return [value]; + } + + if (value === undefined || Array.isArray(value)) { + return value; + } + + throw createFlagError(`Expected [--${name}] to have a string value`); + } + + /** + * Get the boolean value of a specific flag. If the flag wasn't defined then undefined will + * be returned. If the flag was specified with a string value then an error will be thrown. + * @param {string} name + */ + getBooleanValue(name) { + const value = this.#flags.get(name) ?? this.#defaults.get(name); + if (typeof value === 'boolean' || value === undefined) { + return value; + } + + throw createFlagError( + `Unexpected value for [--${name}], this is a boolean flag and should be specified as just [--${name}] or [--no-${name}]` + ); + } + + /** + * Get the value of a specific flag parsed as a number. If the flag wasn't specified then + * undefined will be returned. If the flag was specified multiple times then the last value + * specified will be used. If the flag's value can't be parsed as a number then an error + * will be returned. + * @param {string} name + */ + getNumberValue(name) { + const value = this.getStringValue(name); + if (value === undefined) { + return value; + } + + const parsed = parseFloat(value); + if (Number.isNaN(parsed)) { + throw createFlagError(`Expected value of [--${name}] to be parsable as a valid number`); + } + + return parsed; + } +} diff --git a/kbn_pm/src/lib/bazel.mjs b/kbn_pm/src/lib/bazel.mjs new file mode 100644 index 0000000000000..3fb27a18e5557 --- /dev/null +++ b/kbn_pm/src/lib/bazel.mjs @@ -0,0 +1,260 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import { spawnSync } from './spawn.mjs'; +import * as Color from './colors.mjs'; +import { createCliError } from './cli_error.mjs'; +import { REPO_ROOT } from './paths.mjs'; +import { cleanPaths } from './clean.mjs'; +import { indent } from './indent.mjs'; + +const BAZEL_RUNNER_SRC = '../../../packages/kbn-bazel-runner/src/index.js'; + +async function getBazelRunner() { + /* eslint-disable no-unsanitized/method */ + /** @type {import('@kbn/bazel-runner')} */ + const { runBazel, runIBazel } = await import(BAZEL_RUNNER_SRC); + /* eslint-enable no-unsanitized/method */ + return { runBazel, runIBazel }; +} + +/** + * @param {import('./log.mjs').Log} log + * @param {string} name + * @param {number} code + * @param {string} output + */ +function throwBazelError(log, name, code, output) { + const tag = Color.title('HINT'); + log._write( + [ + tag, + tag + + 'If experiencing problems with node_modules try `yarn kbn bootstrap --force-install` or as last resort `yarn kbn reset && yarn kbn bootstrap`', + tag, + ].join('\n') + ); + + throw createCliError( + `[${name}] exited with code [${code}]${output ? `\n output:\n${indent(4, output)}}` : ''}` + ); +} + +/** + * @param {import('./log.mjs').Log} log + * @param {string[]} inputArgs + * @param {{ quiet?: boolean; offline?: boolean, env?: Record } | undefined} opts + */ +async function runBazel(log, inputArgs, opts = undefined) { + const bazel = (await getBazelRunner()).runBazel; + + const args = [...(opts?.offline ? ['--config=offline'] : []), ...inputArgs]; + log.debug(`> bazel ${args.join(' ')}`); + await bazel(args, { + env: opts?.env, + cwd: REPO_ROOT, + quiet: opts?.quiet, + logPrefix: Color.info('[bazel]'), + onErrorExit(code, output) { + throwBazelError(log, 'bazel', code, output); + }, + }); +} + +/** + * + * @param {import('./log.mjs').Log} log + * @param {{ offline: boolean } | undefined} opts + */ +export async function watch(log, opts = undefined) { + const ibazel = (await getBazelRunner()).runIBazel; + + const args = [ + // --run_output=false arg will disable the iBazel notifications about gazelle + // and buildozer when running it. Could also be solved by adding a root + // `.bazel_fix_commands.json` but its not needed at the moment + '--run_output=false', + 'build', + '//packages:build', + '--show_result=1', + ...(opts?.offline ? ['--config=offline'] : []), + ]; + log.debug(`> ibazel ${args.join(' ')}`); + await ibazel(args, { + cwd: REPO_ROOT, + logPrefix: Color.info('[ibazel]'), + onErrorExit(code, output) { + throwBazelError(log, 'ibazel', code, output); + }, + }); +} + +/** + * @param {import('./log.mjs').Log} log + * @param {{ quiet?: boolean } | undefined} opts + */ +export async function clean(log, opts = undefined) { + await runBazel(log, ['clean'], { + quiet: opts?.quiet, + }); + log.success('soft cleaned bazel'); +} + +/** + * @param {import('./log.mjs').Log} log + * @param {{ quiet?: boolean } | undefined} opts + */ +export async function expungeCache(log, opts = undefined) { + await runBazel(log, ['clean', '--expunge'], { + quiet: opts?.quiet, + }); + log.success('hard cleaned bazel'); +} + +/** + * @param {import('./log.mjs').Log} log + */ +export async function cleanDiskCache(log) { + const args = ['info', 'repository_cache']; + log.debug(`> bazel ${args.join(' ')}`); + const repositoryCachePath = spawnSync('bazel', args); + + await cleanPaths(log, [ + Path.resolve(Path.dirname(repositoryCachePath), 'disk-cache'), + Path.resolve(repositoryCachePath), + ]); + + log.success('removed disk caches'); +} + +/** + * @param {import('./log.mjs').Log} log + * @param {{ offline?: boolean, quiet?: boolean } | undefined} opts + */ +export async function installYarnDeps(log, opts = undefined) { + await runBazel(log, ['run', '@nodejs//:yarn'], { + offline: opts?.offline, + quiet: opts?.quiet, + env: { + SASS_BINARY_SITE: + 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass', + RE2_DOWNLOAD_MIRROR: + 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2', + }, + }); + + log.success('yarn deps installed'); +} + +/** + * @param {import('./log.mjs').Log} log + * @param {{ offline?: boolean, quiet?: boolean } | undefined} opts + */ +export async function buildPackages(log, opts = undefined) { + await runBazel(log, ['build', '//packages:build', '--show_result=1'], { + offline: opts?.offline, + quiet: opts?.quiet, + }); + + log.success('packages built'); +} + +/** + * @param {string} versionFilename + * @returns + */ +function readBazelToolsVersionFile(versionFilename) { + const version = Fs.readFileSync(Path.resolve(REPO_ROOT, versionFilename), 'utf8').trim(); + + if (!version) { + throw new Error( + `Failed on reading bazel tools versions\n ${versionFilename} file do not contain any version set` + ); + } + + return version; +} + +/** + * @param {import('./log.mjs').Log} log + */ +export function tryRemovingBazeliskFromYarnGlobal(log) { + try { + log.debug('Checking if Bazelisk is installed on the yarn global scope'); + const stdout = spawnSync('yarn', ['global', 'list']); + + if (stdout.includes(`@bazel/bazelisk@`)) { + log.debug('Bazelisk was found on yarn global scope, removing it'); + spawnSync('yarn', ['global', 'remove', `@bazel/bazelisk`]); + + log.info(`bazelisk was installed on Yarn global packages and is now removed`); + return true; + } + + return false; + } catch { + return false; + } +} + +/** + * @param {import('./log.mjs').Log} log + */ +export function isInstalled(log) { + try { + log.debug('getting bazel version'); + const stdout = spawnSync('bazel', ['--version']).trim(); + const bazelVersion = readBazelToolsVersionFile('.bazelversion'); + + if (stdout === `bazel ${bazelVersion}`) { + return true; + } else { + log.info(`Bazel is installed (${stdout}), but was expecting ${bazelVersion}`); + return false; + } + } catch { + return false; + } +} + +/** + * @param {import('./log.mjs').Log} log + */ +export function ensureInstalled(log) { + if (isInstalled(log)) { + return; + } + + // Install bazelisk if not installed + log.debug(`reading bazel tools versions from version files`); + const bazeliskVersion = readBazelToolsVersionFile('.bazeliskversion'); + const bazelVersion = readBazelToolsVersionFile('.bazelversion'); + + log.info(`installing Bazel tools`); + + log.debug( + `bazelisk is not installed. Installing @bazel/bazelisk@${bazeliskVersion} and bazel@${bazelVersion}` + ); + spawnSync('npm', ['install', '--global', `@bazel/bazelisk@${bazeliskVersion}`], { + env: { + USE_BAZEL_VERSION: bazelVersion, + }, + }); + + const isBazelBinAvailableAfterInstall = isInstalled(log); + if (!isBazelBinAvailableAfterInstall) { + throw new Error( + `an error occurred when installing the Bazel tools. Please make sure you have access to npm globally installed modules on your $PATH` + ); + } + + log.success(`bazel tools installed`); +} diff --git a/kbn_pm/src/lib/clean.mjs b/kbn_pm/src/lib/clean.mjs new file mode 100644 index 0000000000000..0c44e972b26bb --- /dev/null +++ b/kbn_pm/src/lib/clean.mjs @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Fs from 'fs'; +import Fsp from 'fs/promises'; +import Path from 'path'; + +/** + * + * @param {import('@kbn/some-dev-log').SomeDevLog} log + * @param {string[]} paths + */ +export async function cleanPaths(log, paths) { + for (const path of paths) { + if (!Fs.existsSync(path)) { + continue; + } + + log.info('deleting', Path.relative(process.cwd(), path)); + await Fsp.rm(path, { + recursive: true, + force: true, + }); + } +} diff --git a/kbn_pm/src/lib/cli_error.mjs b/kbn_pm/src/lib/cli_error.mjs new file mode 100644 index 0000000000000..54936f49b6769 --- /dev/null +++ b/kbn_pm/src/lib/cli_error.mjs @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { isObj } from './obj_helpers.mjs'; + +/** @typedef {Error & { showHelp: boolean, exitCode?: number }} CliError */ + +/** + * Create a CliError instance + * @param {string} message + * @param {{ showHelp?: boolean, exitCode?: number } | undefined} options + * @returns {CliError} + */ +export function createCliError(message, options = undefined) { + /** @type {true} */ + const __isCliError = true; + + return Object.assign(new Error(message), { + __isCliError, + showHelp: options?.showHelp || false, + exitCode: options?.exitCode, + }); +} + +/** + * @param {string} message + */ +export function createFlagError(message) { + return createCliError(message, { + showHelp: true, + exitCode: 1, + }); +} + +/** + * Determine if the passed value is a CliError + * + * @param {unknown} error + * @returns {error is CliError} + */ +export function isCliError(error) { + return isObj(error) && !!error.__isCliError; +} diff --git a/kbn_pm/src/lib/colors.mjs b/kbn_pm/src/lib/colors.mjs new file mode 100644 index 0000000000000..edea708c7f99d --- /dev/null +++ b/kbn_pm/src/lib/colors.mjs @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Print an error title, prints on a red background with white text + * @param {string} txt + */ +export const err = (txt) => `\x1b[41m\x1b[37m${txt}\x1b[39m\x1b[49m`; + +/** + * Print some text with some spacing, with very high contrast and bold text + * @param {string} txt + */ +export const title = (txt) => `\x1b[100m\x1b[37m\x1b[1m ${txt} \x1b[22m\x1b[39m\x1b[49m`; + +/** + * Print the yellow warning label + * @param {string} txt + */ +export const warning = (txt) => `\x1b[33m${txt}\x1b[39m`; + +/** + * Print the simple blue info label + * @param {string} txt + */ +export const info = (txt) => `\x1b[94m${txt}\x1b[39m`; + +/** + * Print a green success label + * @param {string} txt + */ +export const success = (txt) => `\x1b[32m${txt}\x1b[39m`; + +/** + * Print the simple dim debug label + * @param {string} txt + */ +export const debug = (txt) => `\x1b[2m${txt}\x1b[22m`; + +/** + * Print the bright verbose label + * @param {string} txt + */ +export const verbose = (txt) => `\x1b[35m${txt}\x1b[39m`; diff --git a/kbn_pm/src/lib/command.ts b/kbn_pm/src/lib/command.ts new file mode 100644 index 0000000000000..03568a9ba241f --- /dev/null +++ b/kbn_pm/src/lib/command.ts @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Log } from './log.mjs'; +import type { Args } from './args.mjs'; + +/** + * Helper function to easily time specific parts of a kbn command. Does not produce + * timings unless the reportTimings config is also defined + */ +export type SubCommandTimeFn = (id: string, block: () => Promise) => Promise; + +/** + * Argument passed to the command run function + */ +export interface CommandRunContext { + args: Args; + log: Log; + time: SubCommandTimeFn; +} + +/** + * Description of a command that can be run by kbn/pm + */ +export interface Command { + /** + * The name of the command + */ + name: string; + + /** + * Additionall usage details which should be added after the command name + */ + usage?: string; + + /** + * Text to follow the name of the command in the help output + */ + intro?: string; + + /** + * Summary of the functionality for this command, printed + * between the usage and flags help in the help output + */ + description?: string; + + /** + * Description of the flags this command accepts + */ + flagsHelp?: string; + + /** + * Function which executes the command. + */ + run(ctx: CommandRunContext): Promise; + + /** + * Configuration to send timing data to ci-stats for this command. If the + * time() fn is used those timing records will use the group from this config. + * If this config is not used then the time() fn won't report any data. + */ + reportTimings?: { + group: string; + id: string; + }; +} diff --git a/kbn_pm/src/lib/find_clean_paths.mjs b/kbn_pm/src/lib/find_clean_paths.mjs new file mode 100644 index 0000000000000..e98a949971487 --- /dev/null +++ b/kbn_pm/src/lib/find_clean_paths.mjs @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import { REPO_ROOT } from './paths.mjs'; + +/** + * Attempt to load the synthetic package map, if bootstrap hasn't run successfully + * this might fail. + * @param {import('@kbn/some-dev-log').SomeDevLog} log + * @returns {Promise} + */ +async function tryToGetSyntheticPackageMap(log) { + try { + const { readPackageMap } = await import('@kbn/synthetic-package-map'); + return readPackageMap(); + } catch (error) { + log.warning( + 'unable to load synthetic package map, unable to clean target directories in synthetic packages' + ); + return new Map(); + } +} + +/** + * @param {*} packageDir + * @returns {string[]} + */ +export function readCleanPatterns(packageDir) { + let json; + try { + const path = Path.resolve(packageDir, 'package.json'); + json = JSON.parse(Fs.readFileSync(path, 'utf8')); + } catch (error) { + if (error.code === 'ENOENT') { + return []; + } + throw error; + } + + /** @type {string[]} */ + const patterns = json.kibana?.clean?.extraPatterns ?? []; + + return patterns.flatMap((pattern) => { + const absolute = Path.resolve(packageDir, pattern); + + // sanity check to make sure that resolved patterns are "relative" to + // the package dir, if they start with a . then they traverse out of + // the package dir so we drop them + if (Path.relative(packageDir, absolute).startsWith('.')) { + return []; + } + + return absolute; + }); +} + +/** + * @param {import('@kbn/some-dev-log').SomeDevLog} log + * @returns {Promise} + */ +export async function findPluginCleanPaths(log) { + const packageMap = await tryToGetSyntheticPackageMap(log); + return [...packageMap.values()].flatMap((repoRelativePath) => { + const pkgDir = Path.resolve(REPO_ROOT, repoRelativePath); + return [Path.resolve(pkgDir, 'target'), ...readCleanPatterns(pkgDir)]; + }); +} diff --git a/kbn_pm/src/lib/fs.mjs b/kbn_pm/src/lib/fs.mjs new file mode 100644 index 0000000000000..4a1cc9f406aa3 --- /dev/null +++ b/kbn_pm/src/lib/fs.mjs @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Fs from 'fs'; + +/** + * @param {string} path + * @returns {string} + */ +export function maybeRealpath(path) { + try { + return Fs.realpathSync.native(path); + } catch (error) { + if (error.code !== 'ENOENT') { + throw error; + } + } + + return path; +} + +/** + * @param {string} path + * @returns {boolean} + */ +export function isDirectory(path) { + try { + const stat = Fs.statSync(path); + return stat.isDirectory(); + } catch (error) { + return false; + } +} + +/** + * @param {string} path + * @returns {boolean} + */ +export function isFile(path) { + try { + const stat = Fs.statSync(path); + return stat.isFile(); + } catch (error) { + return false; + } +} diff --git a/kbn_pm/src/lib/help.mjs b/kbn_pm/src/lib/help.mjs new file mode 100644 index 0000000000000..08a5467d92fc3 --- /dev/null +++ b/kbn_pm/src/lib/help.mjs @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { COMMANDS } from '../commands/index.mjs'; +import { dedent, indent } from './indent.mjs'; +import { title } from './colors.mjs'; + +/** + * @param {string | undefined} cmdName + * @returns {Promise} + */ +export async function getHelp(cmdName = undefined) { + const cmd = cmdName && COMMANDS.find((c) => c.name === cmdName); + + /** + * @param {number} depth + * @param {import('./command').Command} cmd + * @returns {string[]} + */ + const cmdLines = (depth, cmd) => { + const intro = cmd.intro ? dedent(cmd.intro) : ''; + const desc = cmd.description ? dedent(cmd.description) : ''; + const flags = cmd.flagsHelp ? dedent(cmd.flagsHelp) : ''; + + return [ + indent( + depth, + `${title(`yarn kbn ${cmd.name}${cmd.usage ? ` ${cmd.usage}` : ''}`)}${ + intro ? ` ${intro}` : '' + }` + ), + '', + ...(desc ? [indent(depth + 2, desc), ''] : []), + ...(flags ? [indent(depth + 2, 'Flags:'), indent(depth + 4, flags), ''] : []), + ]; + }; + + if (cmd) { + return ['', ...cmdLines(0, cmd)].join('\n'); + } + + const lines = [ + 'Usage:', + ' yarn kbn [...flags]', + '', + 'Commands:', + ...COMMANDS.map((cmd) => cmdLines(2, cmd)).flat(), + ]; + + return lines.join('\n'); +} diff --git a/kbn_pm/src/lib/indent.mjs b/kbn_pm/src/lib/indent.mjs new file mode 100644 index 0000000000000..c1efe6a24a845 --- /dev/null +++ b/kbn_pm/src/lib/indent.mjs @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const NON_WS_RE = /\S/; + +/** + * @param {string} line + */ +const nonWsStart = (line) => line.match(NON_WS_RE)?.index ?? line.length; + +/** + * Dedent the string, trimming all empty lines from the beggining of + * `txt` and finding the first line with non-whitespace characters, then + * subtracting the indent from that line from all subsequent lines + * @param {TemplateStringsArray | string} txts + * @param {...any} vars + */ +export function dedent(txts, ...vars) { + /** @type {string[]} */ + const lines = ( + Array.isArray(txts) ? txts.reduce((acc, txt, i) => `${acc}${vars[i - 1]}${txt}`) : txts + ).split('\n'); + + while (lines.length && lines[0].trim() === '') { + lines.shift(); + } + + /** @type {number | undefined} */ + let depth; + return lines + .map((l) => { + if (depth === undefined) { + depth = nonWsStart(l); + } + + return l.slice(Math.min(nonWsStart(l), depth)); + }) + .join('\n'); +} + +/** + * @param {number} width + * @param {string} txt + * @returns {string} + */ +export const indent = (width, txt) => + txt + .split('\n') + .map((l) => `${' '.repeat(width)}${l}`) + .join('\n'); diff --git a/kbn_pm/src/lib/log.mjs b/kbn_pm/src/lib/log.mjs new file mode 100644 index 0000000000000..d05ff0eaf03c3 --- /dev/null +++ b/kbn_pm/src/lib/log.mjs @@ -0,0 +1,120 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { format } from 'util'; + +import * as Colors from './colors.mjs'; + +/** @typedef {import('@kbn/some-dev-log').SomeDevLog} SomeDevLog */ + +/** + * @implements {SomeDevLog} + */ +export class Log { + #flags; + + /** + * + * @param {import('@kbn/some-dev-log').SomeLogLevel} level + */ + constructor(level) { + this.#flags = { + error: true, + success: true, + info: level !== 'quiet', + warning: level !== 'quiet', + debug: level === 'debug' || level === 'verbose', + verbose: level === 'verbose', + }; + } + + /** + * Log an error message + * @param {string} msg + * @param {...any} rest + */ + error(msg, ...rest) { + if (this.#flags.error) { + this._fmt(' ERROR ', Colors.err, msg, rest); + } + } + + /** + * Log a verbose message, only shown when using --verbose + * @param {string} msg + * @param {...any} rest + */ + warning(msg, ...rest) { + if (this.#flags.warning) { + this._fmt('warn', Colors.warning, msg, rest); + } + } + + /** + * Log a standard message to the log + * @param {string} msg + * @param {...any} rest + */ + info(msg, ...rest) { + if (this.#flags.info) { + this._fmt('info', Colors.info, msg, rest); + } + } + + /** + * Log a verbose message, only shown when using --verbose + * @param {string} msg + * @param {...any} rest + */ + success(msg, ...rest) { + if (this.#flags.success) { + this._fmt('success', Colors.success, msg, rest); + } + } + + /** + * Log a debug message, only shown when using --debug or --verbose + * @param {string} msg + * @param {...any} rest + */ + debug(msg, ...rest) { + if (this.#flags.debug) { + this._fmt('debg', Colors.debug, msg, rest); + } + } + + /** + * Log a verbose message, only shown when using --verbose + * @param {string} msg + * @param {...any} rest + */ + verbose(msg, ...rest) { + if (this.#flags.verbose) { + this._fmt('verb', Colors.verbose, msg, rest); + } + } + + /** + * @param {string} tag + * @param {(txt: string) => string} color + * @param {string} msg + * @param {...any} rest + */ + _fmt(tag, color, msg, rest) { + const lines = format(msg, ...rest).split('\n'); + const padding = ' '.repeat(tag.length + 1); + this._write(`${color(tag)} ${lines.map((l, i) => (i > 0 ? `${padding}${l}` : l)).join('\n')}`); + } + + /** + * @param {string} txt + */ + _write(txt) { + console.log(txt); + } +} diff --git a/kbn_pm/src/lib/obj_helpers.mjs b/kbn_pm/src/lib/obj_helpers.mjs new file mode 100644 index 0000000000000..b54f332ce37f6 --- /dev/null +++ b/kbn_pm/src/lib/obj_helpers.mjs @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * @param {unknown} v + * @returns {v is Record} + */ +export const isObj = (v) => typeof v === 'object' && v !== null; diff --git a/kbn_pm/src/lib/paths.mjs b/kbn_pm/src/lib/paths.mjs new file mode 100644 index 0000000000000..f133642792681 --- /dev/null +++ b/kbn_pm/src/lib/paths.mjs @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; + +export const REPO_ROOT = Path.resolve(Path.dirname(new URL(import.meta.url).pathname), '../../..'); diff --git a/kbn_pm/src/lib/spawn.mjs b/kbn_pm/src/lib/spawn.mjs new file mode 100644 index 0000000000000..68a25289184c1 --- /dev/null +++ b/kbn_pm/src/lib/spawn.mjs @@ -0,0 +1,113 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import ChildProcess from 'child_process'; +import Readline from 'readline'; + +import { createCliError } from './cli_error.mjs'; +import { REPO_ROOT } from './paths.mjs'; +import { indent } from './indent.mjs'; + +/** @typedef {{ cwd?: string, env?: Record }} SpawnOpts */ + +/** + * Run a child process and return it's stdout + * @param {string} cmd + * @param {string[]} args + * @param {undefined | (SpawnOpts & { description?: string })} opts + */ +export function spawnSync(cmd, args, opts = undefined) { + const result = ChildProcess.spawnSync(cmd === 'node' ? process.execPath : cmd, args, { + cwd: opts?.cwd ?? REPO_ROOT, + encoding: 'utf8', + env: { + ...process.env, + ...opts?.env, + }, + }); + + if (result.status !== null && result.status > 0) { + throw createCliError( + `[${opts?.description ?? cmd}] exitted with ${result.status}:\n${ + result.stdout.trim() + ? ` stdout:\n${indent(4, result.stdout.trim())}\n\n` + : ' stdout: no output\n' + }${ + result.stderr.trim() + ? ` stderr:\n${indent(4, result.stderr.trim())}\n\n` + : ' stderr: no output\n' + }` + ); + } + + return result.stdout; +} + +/** + * Print each line of output to the console + * @param {import('stream').Readable} stream + * @param {string | undefined} prefix + */ +async function printLines(stream, prefix) { + const int = Readline.createInterface({ + input: stream, + crlfDelay: Infinity, + }); + + for await (const line of int) { + console.log(prefix ? `${prefix} ${line}` : line); + } +} + +/** + * @param {import('events').EventEmitter} emitter + * @param {string} event + * @returns {Promise} + */ +function once(emitter, event) { + return new Promise((resolve) => { + emitter.once(event, resolve); + }); +} + +/** + * Run a child process and print the output to the log + * @param {string} cmd + * @param {string[]} args + * @param {undefined | (SpawnOpts & { logPrefix?: string })} options + */ +export async function spawnStreaming(cmd, args, options = undefined) { + const proc = ChildProcess.spawn(cmd, args, { + env: { + ...process.env, + ...options?.env, + }, + cwd: options?.cwd, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + await Promise.all([ + printLines(proc.stdout, options?.logPrefix), + printLines(proc.stderr, options?.logPrefix), + + // Wait for process to exit, or error + Promise.race([ + once(proc, 'exit').then((code) => { + if (typeof code !== 'number' || code === 0) { + return; + } + + throw new Error(`[${cmd}] exitted with code [${code}]`); + }), + + once(proc, 'error').then((error) => { + throw error; + }), + ]), + ]); +} diff --git a/kbn_pm/tsconfig.json b/kbn_pm/tsconfig.json new file mode 100644 index 0000000000000..06582d6dbd655 --- /dev/null +++ b/kbn_pm/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "target", + "allowJs": true, + "checkJs": true, + "composite": false, + "target": "ES2022", + "module": "ESNext" + }, + "include": [ + "src/**/*.mjs", + "src/**/*.ts", + ], + "exclude": [] +} diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index f31483fa76849..96f4074d9a7f7 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -229,9 +229,6 @@ { "id": "kibCoreChromePluginApi" }, - { - "id": "kibCoreHttpPluginApi" - }, { "id": "kibCoreSavedObjectsPluginApi" }, @@ -450,6 +447,9 @@ { "label": "Build tooling", "items": [ + { + "id": "kibDevDocsOpsKbnPm" + }, { "id": "kibDevDocsOpsOptimizer" }, @@ -487,6 +487,12 @@ }, { "id": "kibDevDocsOpsEslintPluginImports" + }, + { + "id": "kibDevDocsOpsEslintPluginDisable" + }, + { + "id": "kibDevDocsOpsKbnYarnLockValidator" } ] }, @@ -519,6 +525,12 @@ }, { "id": "kibDevDocsOpsEs" + }, + { + "id": "kibDevDocsOpsSomeDevLog" + }, + { + "id": "kibDevDocsOpsDevCliRunner" } ] } diff --git a/package.json b/package.json index 4f98a16e13959..f23ef1aa97723 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@elastic/apm-rum": "^5.12.0", "@elastic/apm-rum-react": "^1.4.2", "@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace", - "@elastic/charts": "46.12.0", + "@elastic/charts": "46.13.0", "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1", "@elastic/ems-client": "8.3.3", @@ -169,6 +169,12 @@ "@kbn/core-doc-links-server": "link:bazel-bin/packages/core/doc-links/core-doc-links-server", "@kbn/core-doc-links-server-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-internal", "@kbn/core-doc-links-server-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-mocks", + "@kbn/core-elasticsearch-client-server": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server", + "@kbn/core-elasticsearch-client-server-internal": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-internal", + "@kbn/core-elasticsearch-client-server-mocks": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-mocks", + "@kbn/core-elasticsearch-server": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server", + "@kbn/core-elasticsearch-server-internal": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-internal", + "@kbn/core-elasticsearch-server-mocks": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-mocks", "@kbn/core-environment-server-internal": "link:bazel-bin/packages/core/environment/core-environment-server-internal", "@kbn/core-environment-server-mocks": "link:bazel-bin/packages/core/environment/core-environment-server-mocks", "@kbn/core-execution-context-browser": "link:bazel-bin/packages/core/execution-context/core-execution-context-browser", @@ -199,6 +205,8 @@ "@kbn/core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal", "@kbn/core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks", "@kbn/core-injected-metadata-common-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-common-internal", + "@kbn/core-integrations-browser-internal": "link:bazel-bin/packages/core/integrations/core-integrations-browser-internal", + "@kbn/core-integrations-browser-mocks": "link:bazel-bin/packages/core/integrations/core-integrations-browser-mocks", "@kbn/core-logging-server": "link:bazel-bin/packages/core/logging/core-logging-server", "@kbn/core-logging-server-internal": "link:bazel-bin/packages/core/logging/core-logging-server-internal", "@kbn/core-logging-server-mocks": "link:bazel-bin/packages/core/logging/core-logging-server-mocks", @@ -222,6 +230,7 @@ "@kbn/doc-links": "link:bazel-bin/packages/kbn-doc-links", "@kbn/es-errors": "link:bazel-bin/packages/kbn-es-errors", "@kbn/es-query": "link:bazel-bin/packages/kbn-es-query", + "@kbn/eslint-plugin-disable": "link:bazel-bin/packages/kbn-eslint-plugin-disable", "@kbn/eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports", "@kbn/field-types": "link:bazel-bin/packages/kbn-field-types", "@kbn/flot-charts": "link:bazel-bin/packages/kbn-flot-charts", @@ -328,7 +337,7 @@ "constate": "^1.3.2", "content-disposition": "0.5.3", "copy-to-clipboard": "^3.0.8", - "core-js": "^3.22.8", + "core-js": "^3.23.5", "cronstrue": "^1.51.0", "cytoscape": "^3.10.0", "cytoscape-dagre": "^2.2.2", @@ -346,7 +355,7 @@ "deep-freeze-strict": "^1.1.1", "deepmerge": "^4.2.2", "del": "^5.1.0", - "elastic-apm-node": "^3.36.0", + "elastic-apm-node": "^3.37.0", "email-addresses": "^5.0.0", "execa": "^4.0.2", "expiry-js": "0.1.7", @@ -458,7 +467,7 @@ "react-moment-proptypes": "^1.7.0", "react-monaco-editor": "^0.41.2", "react-popper-tooltip": "^2.10.1", - "react-query": "^3.34.7", + "react-query": "^3.39.1", "react-redux": "^7.2.0", "react-resizable": "^1.7.5", "react-resize-detector": "^4.2.0", @@ -501,7 +510,6 @@ "source-map-support": "^0.5.19", "stats-lite": "^2.2.0", "strip-ansi": "^6.0.0", - "style-it": "^2.1.3", "styled-components": "^5.1.0", "suricata-sid-db": "^1.0.2", "symbol-observable": "^1.2.0", @@ -597,8 +605,8 @@ "@kbn/performance-testing-dataset-extractor": "link:bazel-bin/packages/kbn-performance-testing-dataset-extractor", "@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator", "@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers", - "@kbn/pm": "link:packages/kbn-pm", "@kbn/scalability-simulation-generator": "link:bazel-bin/packages/kbn-scalability-simulation-generator", + "@kbn/some-dev-log": "link:bazel-bin/packages/kbn-some-dev-log", "@kbn/sort-package-json": "link:bazel-bin/packages/kbn-sort-package-json", "@kbn/spec-to-console": "link:bazel-bin/packages/kbn-spec-to-console", "@kbn/stdio-dev-helpers": "link:bazel-bin/packages/kbn-stdio-dev-helpers", @@ -612,6 +620,7 @@ "@kbn/type-summarizer": "link:bazel-bin/packages/kbn-type-summarizer", "@kbn/type-summarizer-cli": "link:bazel-bin/packages/kbn-type-summarizer-cli", "@kbn/type-summarizer-core": "link:bazel-bin/packages/kbn-type-summarizer-core", + "@kbn/yarn-lock-validator": "link:bazel-bin/packages/kbn-yarn-lock-validator", "@loaders.gl/polyfills": "^2.3.5", "@mapbox/vector-tile": "1.3.1", "@octokit/rest": "^16.35.0", @@ -648,7 +657,6 @@ "@types/chroma-js": "^1.4.2", "@types/chromedriver": "^81.0.1", "@types/classnames": "^2.2.9", - "@types/cmd-shim": "^2.0.0", "@types/color": "^3.0.3", "@types/compression-webpack-plugin": "^2.0.2", "@types/cytoscape": "^3.14.0", @@ -755,6 +763,12 @@ "@types/kbn__core-doc-links-server": "link:bazel-bin/packages/core/doc-links/core-doc-links-server/npm_module_types", "@types/kbn__core-doc-links-server-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-internal/npm_module_types", "@types/kbn__core-doc-links-server-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-mocks/npm_module_types", + "@types/kbn__core-elasticsearch-client-server": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server/npm_module_types", + "@types/kbn__core-elasticsearch-client-server-internal": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-internal/npm_module_types", + "@types/kbn__core-elasticsearch-client-server-mocks": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/npm_module_types", + "@types/kbn__core-elasticsearch-server": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server/npm_module_types", + "@types/kbn__core-elasticsearch-server-internal": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-internal/npm_module_types", + "@types/kbn__core-elasticsearch-server-mocks": "link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-mocks/npm_module_types", "@types/kbn__core-environment-server-internal": "link:bazel-bin/packages/core/environment/core-environment-server-internal/npm_module_types", "@types/kbn__core-environment-server-mocks": "link:bazel-bin/packages/core/environment/core-environment-server-mocks/npm_module_types", "@types/kbn__core-execution-context-browser": "link:bazel-bin/packages/core/execution-context/core-execution-context-browser/npm_module_types", @@ -785,6 +799,8 @@ "@types/kbn__core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal/npm_module_types", "@types/kbn__core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks/npm_module_types", "@types/kbn__core-injected-metadata-common-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-common-internal/npm_module_types", + "@types/kbn__core-integrations-browser-internal": "link:bazel-bin/packages/core/integrations/core-integrations-browser-internal/npm_module_types", + "@types/kbn__core-integrations-browser-mocks": "link:bazel-bin/packages/core/integrations/core-integrations-browser-mocks/npm_module_types", "@types/kbn__core-logging-server": "link:bazel-bin/packages/core/logging/core-logging-server/npm_module_types", "@types/kbn__core-logging-server-internal": "link:bazel-bin/packages/core/logging/core-logging-server-internal/npm_module_types", "@types/kbn__core-logging-server-mocks": "link:bazel-bin/packages/core/logging/core-logging-server-mocks/npm_module_types", @@ -816,6 +832,7 @@ "@types/kbn__es-archiver": "link:bazel-bin/packages/kbn-es-archiver/npm_module_types", "@types/kbn__es-errors": "link:bazel-bin/packages/kbn-es-errors/npm_module_types", "@types/kbn__es-query": "link:bazel-bin/packages/kbn-es-query/npm_module_types", + "@types/kbn__eslint-plugin-disable": "link:bazel-bin/packages/kbn-eslint-plugin-disable/npm_module_types", "@types/kbn__eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports/npm_module_types", "@types/kbn__field-types": "link:bazel-bin/packages/kbn-field-types/npm_module_types", "@types/kbn__find-used-node-modules": "link:bazel-bin/packages/kbn-find-used-node-modules/npm_module_types", @@ -876,6 +893,7 @@ "@types/kbn__shared-ux-services": "link:bazel-bin/packages/kbn-shared-ux-services/npm_module_types", "@types/kbn__shared-ux-storybook": "link:bazel-bin/packages/kbn-shared-ux-storybook/npm_module_types", "@types/kbn__shared-ux-utility": "link:bazel-bin/packages/kbn-shared-ux-utility/npm_module_types", + "@types/kbn__some-dev-log": "link:bazel-bin/packages/kbn-some-dev-log/npm_module_types", "@types/kbn__sort-package-json": "link:bazel-bin/packages/kbn-sort-package-json/npm_module_types", "@types/kbn__std": "link:bazel-bin/packages/kbn-std/npm_module_types", "@types/kbn__stdio-dev-helpers": "link:bazel-bin/packages/kbn-stdio-dev-helpers/npm_module_types", @@ -894,6 +912,7 @@ "@types/kbn__utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module_types", "@types/kbn__utility-types-jest": "link:bazel-bin/packages/kbn-utility-types-jest/npm_module_types", "@types/kbn__utils": "link:bazel-bin/packages/kbn-utils/npm_module_types", + "@types/kbn__yarn-lock-validator": "link:bazel-bin/packages/kbn-yarn-lock-validator/npm_module_types", "@types/license-checker": "15.0.0", "@types/listr": "^0.14.0", "@types/loader-utils": "^1.1.3", @@ -913,7 +932,6 @@ "@types/moment-duration-format": "^2.2.3", "@types/moment-timezone": "^0.5.30", "@types/mustache": "^0.8.31", - "@types/ncp": "^2.0.1", "@types/nock": "^10.0.3", "@types/node": "16.11.41", "@types/node-fetch": "^2.6.0", @@ -946,7 +964,6 @@ "@types/react-test-renderer": "^16.9.1", "@types/react-virtualized": "^9.18.7", "@types/react-vis": "^1.11.9", - "@types/read-pkg": "^4.0.0", "@types/recompose": "^0.30.6", "@types/reduce-reducers": "^1.0.0", "@types/redux-actions": "^2.6.1", @@ -961,7 +978,6 @@ "@types/source-map-support": "^0.5.3", "@types/stats-lite": "^2.2.0", "@types/strip-ansi": "^5.2.1", - "@types/strong-log-transformer": "^1.0.0", "@types/styled-components": "^5.1.0", "@types/supertest": "^2.0.5", "@types/tapable": "^1.0.6", @@ -980,7 +996,6 @@ "@types/webpack-env": "^1.15.3", "@types/webpack-merge": "^4.1.5", "@types/webpack-sources": "^0.1.4", - "@types/write-pkg": "^3.1.0", "@types/xml-crypto": "^1.4.2", "@types/xml2js": "^0.4.5", "@types/yargs": "^15.0.0", @@ -996,7 +1011,7 @@ "apidoc": "^0.29.0", "apidoc-markdown": "^6.0.0", "argsplit": "^1.0.5", - "autoprefixer": "^9.7.4", + "autoprefixer": "^10.4.7", "axe-core": "^4.0.2", "babel-jest": "^26.6.3", "babel-loader": "^8.2.2", @@ -1005,13 +1020,12 @@ "babel-plugin-require-context-hook": "^1.0.0", "babel-plugin-styled-components": "^2.0.7", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "backport": "^8.8.0", + "backport": "^8.9.2", "callsites": "^3.1.0", "chance": "1.0.18", "chokidar": "^3.4.3", "chromedriver": "^103.0.0", "clean-webpack-plugin": "^3.0.0", - "cmd-shim": "^2.1.0", "compression-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^6.0.2", "cpy": "^8.1.1", @@ -1062,12 +1076,12 @@ "fetch-mock": "^7.3.9", "file-loader": "^4.2.0", "form-data": "^4.0.0", - "geckodriver": "^3.0.1", + "geckodriver": "^3.0.2", "gulp": "4.0.2", "gulp-babel": "^8.0.0", "gulp-brotli": "^3.0.0", "gulp-gzip": "^1.4.2", - "gulp-postcss": "^8.0.0", + "gulp-postcss": "^9.0.1", "gulp-sourcemaps": "2.6.5", "gulp-terser": "^2.1.0", "gulp-zip": "^5.0.2", @@ -1111,9 +1125,7 @@ "mochawesome-merge": "^4.2.1", "mock-fs": "^5.1.2", "ms-chromium-edge-driver": "^0.5.1", - "multimatch": "^4.0.0", "mutation-observer": "^1.0.3", - "ncp": "^2.0.0", "nock": "12.0.3", "node-sass": "7.0.1", "null-loader": "^3.0.0", @@ -1125,26 +1137,24 @@ "pirates": "^4.0.1", "playwright": "^1.17.1", "pngjs": "^3.4.0", - "postcss": "^7.0.32", - "postcss-loader": "^3.0.0", - "postcss-prefix-selector": "^1.7.2", + "postcss": "^8.4.14", + "postcss-loader": "^4.2.0", + "postcss-prefix-selector": "^1.16.0", "prettier": "^2.7.1", "pretty-format": "^27.5.1", "q": "^1.5.1", "raw-loader": "^3.1.0", "react-test-renderer": "^16.14.0", - "read-pkg": "^5.2.0", "regenerate": "^1.4.0", "resolve": "^1.22.0", "rxjs-marbles": "^5.0.6", "sass-loader": "^10.3.1", - "selenium-webdriver": "^4.3.0", + "selenium-webdriver": "^4.3.1", "simple-git": "1.116.0", "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.3", "string-replace-loader": "^2.2.0", - "strong-log-transformer": "^2.1.0", "style-loader": "^1.1.3", "stylelint": "13.8.0", "stylelint-scss": "^3.18.0", @@ -1161,7 +1171,6 @@ "ts-morph": "^13.0.2", "tsd": "^0.20.0", "typescript": "4.6.3", - "unlazy-loader": "^0.1.3", "url-loader": "^2.2.0", "val-loader": "^1.1.1", "vinyl-fs": "^3.0.3", @@ -1172,7 +1181,6 @@ "webpack-dev-server": "^3.11.0", "webpack-merge": "^4.2.2", "webpack-sources": "^1.4.1", - "write-pkg": "^4.0.0", "xml-crypto": "^2.1.3", "xmlbuilder": "13.0.2", "yargs": "^15.4.1" diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index fb1f7a6bdb146..d4bf2ee0807e5 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -37,6 +37,11 @@ filegroup( "//packages/core/doc-links/core-doc-links-server-internal:build", "//packages/core/doc-links/core-doc-links-server-mocks:build", "//packages/core/doc-links/core-doc-links-server:build", + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal:build", + "//packages/core/elasticsearch/core-elasticsearch-client-server-mocks:build", + "//packages/core/elasticsearch/core-elasticsearch-server-internal:build", + "//packages/core/elasticsearch/core-elasticsearch-server-mocks:build", + "//packages/core/elasticsearch/core-elasticsearch-server:build", "//packages/core/environment/core-environment-server-internal:build", "//packages/core/environment/core-environment-server-mocks:build", "//packages/core/execution-context/core-execution-context-browser-internal:build", @@ -67,6 +72,8 @@ filegroup( "//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build", "//packages/core/injected-metadata/core-injected-metadata-browser:build", "//packages/core/injected-metadata/core-injected-metadata-common-internal:build", + "//packages/core/integrations/core-integrations-browser-internal:build", + "//packages/core/integrations/core-integrations-browser-mocks:build", "//packages/core/logging/core-logging-server-internal:build", "//packages/core/logging/core-logging-server-mocks:build", "//packages/core/logging/core-logging-server:build", @@ -121,6 +128,7 @@ filegroup( "//packages/kbn-es-query:build", "//packages/kbn-es:build", "//packages/kbn-eslint-config:build", + "//packages/kbn-eslint-plugin-disable:build", "//packages/kbn-eslint-plugin-eslint:build", "//packages/kbn-eslint-plugin-imports:build", "//packages/kbn-expect:build", @@ -170,6 +178,7 @@ filegroup( "//packages/kbn-shared-ux-services:build", "//packages/kbn-shared-ux-storybook:build", "//packages/kbn-shared-ux-utility:build", + "//packages/kbn-some-dev-log:build", "//packages/kbn-sort-package-json:build", "//packages/kbn-spec-to-console:build", "//packages/kbn-std:build", @@ -194,6 +203,7 @@ filegroup( "//packages/kbn-utility-types-jest:build", "//packages/kbn-utility-types:build", "//packages/kbn-utils:build", + "//packages/kbn-yarn-lock-validator:build", "//packages/shared-ux/avatar/solution:build", "//packages/shared-ux/button_toolbar:build", "//packages/shared-ux/button/exit_full_screen:build", @@ -243,6 +253,11 @@ filegroup( "//packages/core/doc-links/core-doc-links-server-internal:build_types", "//packages/core/doc-links/core-doc-links-server-mocks:build_types", "//packages/core/doc-links/core-doc-links-server:build_types", + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal:build_types", + "//packages/core/elasticsearch/core-elasticsearch-client-server-mocks:build_types", + "//packages/core/elasticsearch/core-elasticsearch-server-internal:build_types", + "//packages/core/elasticsearch/core-elasticsearch-server-mocks:build_types", + "//packages/core/elasticsearch/core-elasticsearch-server:build_types", "//packages/core/environment/core-environment-server-internal:build_types", "//packages/core/environment/core-environment-server-mocks:build_types", "//packages/core/execution-context/core-execution-context-browser-internal:build_types", @@ -273,6 +288,8 @@ filegroup( "//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build_types", "//packages/core/injected-metadata/core-injected-metadata-browser:build_types", "//packages/core/injected-metadata/core-injected-metadata-common-internal:build_types", + "//packages/core/integrations/core-integrations-browser-internal:build_types", + "//packages/core/integrations/core-integrations-browser-mocks:build_types", "//packages/core/logging/core-logging-server-internal:build_types", "//packages/core/logging/core-logging-server-mocks:build_types", "//packages/core/logging/core-logging-server:build_types", @@ -321,6 +338,7 @@ filegroup( "//packages/kbn-es-archiver:build_types", "//packages/kbn-es-errors:build_types", "//packages/kbn-es-query:build_types", + "//packages/kbn-eslint-plugin-disable:build_types", "//packages/kbn-eslint-plugin-imports:build_types", "//packages/kbn-field-types:build_types", "//packages/kbn-find-used-node-modules:build_types", @@ -367,6 +385,7 @@ filegroup( "//packages/kbn-shared-ux-services:build_types", "//packages/kbn-shared-ux-storybook:build_types", "//packages/kbn-shared-ux-utility:build_types", + "//packages/kbn-some-dev-log:build_types", "//packages/kbn-sort-package-json:build_types", "//packages/kbn-std:build_types", "//packages/kbn-stdio-dev-helpers:build_types", @@ -385,6 +404,7 @@ filegroup( "//packages/kbn-utility-types-jest:build_types", "//packages/kbn-utility-types:build_types", "//packages/kbn-utils:build_types", + "//packages/kbn-yarn-lock-validator:build_types", "//packages/shared-ux/avatar/solution:build_types", "//packages/shared-ux/button_toolbar:build_types", "//packages/shared-ux/button/exit_full_screen:build_types", diff --git a/packages/README.md b/packages/README.md index 57c865aedf649..2dbbc7220221e 100644 --- a/packages/README.md +++ b/packages/README.md @@ -30,9 +30,6 @@ instead be: "@kbn/i18n": "link:../../kibana/packages/kbn-i18n" ``` -How all of this works is described in more detail in the -[`@kbn/pm` docs](./kbn-pm#how-it-works). - ## Creating a new package Create a new sub-folder. The name of the folder should mirror the `name` in the diff --git a/packages/analytics/shippers/fullstory/src/load_snippet.ts b/packages/analytics/shippers/fullstory/src/load_snippet.ts index b06530111d672..2c37eee6608e9 100644 --- a/packages/analytics/shippers/fullstory/src/load_snippet.ts +++ b/packages/analytics/shippers/fullstory/src/load_snippet.ts @@ -48,7 +48,7 @@ export function loadSnippet({ window._fs_org = fullStoryOrgId; window._fs_namespace = namespace; - /* eslint-disable */ + /* eslint-disable dot-notation,prettier/prettier,@typescript-eslint/no-shadow,prefer-rest-params,@typescript-eslint/no-unused-expressions */ (function(m,n,e,t,l,o,g,y){ if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;} // @ts-expect-error diff --git a/packages/core/base/core-base-common/BUILD.bazel b/packages/core/base/core-base-common/BUILD.bazel index 7282d7ad4af18..0dd9cf7a57d94 100644 --- a/packages/core/base/core-base-common/BUILD.bazel +++ b/packages/core/base/core-base-common/BUILD.bazel @@ -26,11 +26,13 @@ NPM_MODULE_EXTRA_FILES = [ ] RUNTIME_DEPS = [ + "//packages/kbn-std", ] TYPES_DEPS = [ "@npm//@types/node", "@npm//@types/jest", + "//packages/kbn-std:npm_module_types", "//packages/kbn-config:npm_module_types", ] diff --git a/packages/core/base/core-base-common/src/index.ts b/packages/core/base/core-base-common/src/index.ts index ae2ac637e3e08..7785bd332aecd 100644 --- a/packages/core/base/core-base-common/src/index.ts +++ b/packages/core/base/core-base-common/src/index.ts @@ -9,3 +9,5 @@ export type { PluginOpaqueId, PluginName, DiscoveredPlugin } from './plugins'; export { PluginType } from './plugins'; export { EUI_STYLES_GLOBAL } from './eui'; +export { ServiceStatusLevels } from './service_status'; +export type { ServiceStatus, ServiceStatusLevel } from './service_status'; diff --git a/packages/core/base/core-base-common/src/service_status.ts b/packages/core/base/core-base-common/src/service_status.ts new file mode 100644 index 0000000000000..4c9539f015d86 --- /dev/null +++ b/packages/core/base/core-base-common/src/service_status.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { deepFreeze } from '@kbn/std'; + +/** + * The current status of a service at a point in time. + * + * @typeParam Meta - JSON-serializable object. Plugins should export this type to allow other plugins to read the `meta` + * field in a type-safe way. + * @public + */ +export interface ServiceStatus | unknown = unknown> { + /** + * The current availability level of the service. + */ + level: ServiceStatusLevel; + /** + * A high-level summary of the service status. + */ + summary: string; + /** + * A more detailed description of the service status. + */ + detail?: string; + /** + * A URL to open in a new tab about how to resolve or troubleshoot the problem. + */ + documentationUrl?: string; + /** + * Any JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained, + * machine-readable information about the service status. May include status information for underlying features. + */ + meta?: Meta; +} + +/** + * The current "level" of availability of a service. + * + * @remarks + * The values implement `valueOf` to allow for easy comparisons between status levels with <, >, etc. Higher values + * represent higher severities. Note that the default `Array.prototype.sort` implementation does not correctly sort + * these values. + * + * A snapshot serializer is available in `src/core/server/test_utils` to ease testing of these values with Jest. + * + * @public + */ +export const ServiceStatusLevels = deepFreeze({ + /** + * Everything is working! + */ + available: { + toString: () => 'available', + valueOf: () => 0, + toJSON() { + return this.toString(); + }, + }, + /** + * Some features may not be working. + */ + degraded: { + toString: () => 'degraded', + valueOf: () => 1, + toJSON() { + return this.toString(); + }, + }, + /** + * The service is unavailable, but other functions that do not depend on this service should work. + */ + unavailable: { + toString: () => 'unavailable', + valueOf: () => 2, + toJSON() { + return this.toString(); + }, + }, + /** + * Block all user functions and display the status page, reserved for Core services only. + */ + critical: { + toString: () => 'critical', + valueOf: () => 3, + toJSON() { + return this.toString(); + }, + }, +}); + +/** + * A convenience type that represents the union of each value in {@link ServiceStatusLevels}. + * @public + */ +export type ServiceStatusLevel = typeof ServiceStatusLevels[keyof typeof ServiceStatusLevels]; diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/BUILD.bazel b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/BUILD.bazel new file mode 100644 index 0000000000000..c297697811253 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/BUILD.bazel @@ -0,0 +1,116 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-elasticsearch-client-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-elasticsearch-client-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//moment", + "@npm//@elastic/elasticsearch", + "@npm//@elastic/numeral", + "//packages/kbn-std", + "//packages/kbn-es-errors", + "//packages/core/http/core-http-router-server-internal", + ### test dependencies + "//packages/core/logging/core-logging-server-mocks", + "//packages/core/http/core-http-server-mocks", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//moment", + "@npm//@elastic/elasticsearch", + "@npm//@elastic/numeral", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-std:npm_module_types", + "//packages/kbn-es-errors:npm_module_types", + "//packages/kbn-logging:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-router-server-internal:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/README.md b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/README.md new file mode 100644 index 0000000000000..019af4b68bc66 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-elasticsearch-client-server-internal + +This package contains the internal implementation for Core's server-side elasticsearch client. diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/jest.config.js b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/jest.config.js new file mode 100644 index 0000000000000..49e02733250cf --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/elasticsearch/core-elasticsearch-client-server-internal'], +}; diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/package.json b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/package.json new file mode 100644 index 0000000000000..8029d8dfcf9f5 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-elasticsearch-client-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/elasticsearch/client/client_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts similarity index 98% rename from src/core/server/elasticsearch/client/client_config.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts index dcc6d25c565bf..f7988a19009bb 100644 --- a/src/core/server/elasticsearch/client/client_config.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts @@ -7,8 +7,9 @@ */ import { duration } from 'moment'; -import { ElasticsearchClientConfig, parseClientOptions } from './client_config'; -import { DEFAULT_HEADERS } from '../default_headers'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; +import { parseClientOptions } from './client_config'; +import { DEFAULT_HEADERS } from './headers'; const createConfig = ( parts: Partial = {} diff --git a/src/core/server/elasticsearch/client/client_config.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.ts similarity index 81% rename from src/core/server/elasticsearch/client/client_config.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.ts index 63b9555a420ab..9d380fcbaa455 100644 --- a/src/core/server/elasticsearch/client/client_config.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.ts @@ -10,35 +10,8 @@ import { ConnectionOptions as TlsConnectionOptions } from 'tls'; import { URL } from 'url'; import { Duration } from 'moment'; import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; -import { ElasticsearchConfig } from '../elasticsearch_config'; -import { DEFAULT_HEADERS } from '../default_headers'; - -/** - * Configuration options to be used to create a {@link IClusterClient | cluster client} using the - * {@link ElasticsearchServiceStart.createClient | createClient API} - * - * @public - */ -export type ElasticsearchClientConfig = Pick< - ElasticsearchConfig, - | 'customHeaders' - | 'maxSockets' - | 'compression' - | 'sniffOnStart' - | 'sniffOnConnectionFault' - | 'requestHeadersWhitelist' - | 'sniffInterval' - | 'hosts' - | 'username' - | 'password' - | 'serviceAccountToken' -> & { - pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout']; - requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout']; - ssl?: Partial; - keepAlive?: boolean; - caFingerprint?: ClientOptions['caFingerprint']; -}; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; +import { DEFAULT_HEADERS } from './headers'; /** * Parse the client options from given client config and `scoped` flag. diff --git a/src/core/server/elasticsearch/client/cluster_client.test.mocks.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.test.mocks.ts similarity index 100% rename from src/core/server/elasticsearch/client/cluster_client.test.mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.test.mocks.ts diff --git a/src/core/server/elasticsearch/client/cluster_client.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.test.ts similarity index 97% rename from src/core/server/elasticsearch/client/cluster_client.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.test.ts index 78fc0494951a7..3b2e6f82fe40d 100644 --- a/src/core/server/elasticsearch/client/cluster_client.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.test.ts @@ -11,12 +11,12 @@ import { createTransportMock, createInternalErrorHandlerMock, } from './cluster_client.test.mocks'; +import type { Client } from '@elastic/elasticsearch'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { httpServerMock, httpServiceMock } from '@kbn/core-http-server-mocks'; -import { elasticsearchClientMock } from './mocks'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; import { ClusterClient } from './cluster_client'; -import { ElasticsearchClientConfig } from './client_config'; -import { DEFAULT_HEADERS } from '../default_headers'; +import { DEFAULT_HEADERS } from './headers'; const createConfig = ( parts: Partial = {} @@ -34,18 +34,21 @@ const createConfig = ( }; }; +const createClient = () => + ({ close: jest.fn(), child: jest.fn() } as unknown as jest.Mocked); + describe('ClusterClient', () => { let logger: ReturnType; let authHeaders: ReturnType; - let internalClient: ReturnType; - let scopedClient: ReturnType; + let internalClient: jest.Mocked; + let scopedClient: jest.Mocked; const mockTransport = { mockTransport: true }; beforeEach(() => { logger = loggingSystemMock.createLogger(); - internalClient = elasticsearchClientMock.createInternalClient(); - scopedClient = elasticsearchClientMock.createInternalClient(); + internalClient = createClient(); + scopedClient = createClient(); authHeaders = httpServiceMock.createAuthHeaderStorage(); authHeaders.get.mockImplementation(() => ({ diff --git a/src/core/server/elasticsearch/client/cluster_client.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.ts similarity index 74% rename from src/core/server/elasticsearch/client/cluster_client.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.ts index 2eaaa0d6efca4..088a99c7642f0 100644 --- a/src/core/server/elasticsearch/client/cluster_client.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/cluster_client.ts @@ -15,52 +15,20 @@ import { isKibanaRequest, isRealRequest, } from '@kbn/core-http-router-server-internal'; -import { ScopeableRequest } from '../types'; -import { ElasticsearchClient } from './types'; -import { configureClient } from './configure_client'; -import { ElasticsearchClientConfig } from './client_config'; -import { ScopedClusterClient, IScopedClusterClient } from './scoped_cluster_client'; -import { DEFAULT_HEADERS } from '../default_headers'; -import { +import type { + ScopeableRequest, UnauthorizedErrorHandler, - createInternalErrorHandler, - InternalUnauthorizedErrorHandler, -} from './retry_unauthorized'; + ICustomClusterClient, +} from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; +import { configureClient } from './configure_client'; +import { ScopedClusterClient } from './scoped_cluster_client'; +import { DEFAULT_HEADERS } from './headers'; +import { createInternalErrorHandler, InternalUnauthorizedErrorHandler } from './retry_unauthorized'; import { createTransport } from './create_transport'; const noop = () => undefined; -/** - * Represents an Elasticsearch cluster API client created by the platform. - * It allows to call API on behalf of the internal Kibana user and - * the actual user that is derived from the request headers (via `asScoped(...)`). - * - * @public - **/ -export interface IClusterClient { - /** - * A {@link ElasticsearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user - */ - readonly asInternalUser: ElasticsearchClient; - /** - * Creates a {@link IScopedClusterClient | scoped cluster client} bound to given {@link ScopeableRequest | request} - */ - asScoped: (request: ScopeableRequest) => IScopedClusterClient; -} - -/** - * See {@link IClusterClient} - * - * @public - */ -export interface ICustomClusterClient extends IClusterClient { - /** - * Closes the cluster client. After that client cannot be used and one should - * create a new client instance to be able to interact with Elasticsearch API. - */ - close: () => Promise; -} - /** @internal **/ export class ClusterClient implements ICustomClusterClient { private readonly config: ElasticsearchClientConfig; diff --git a/src/core/server/elasticsearch/client/configure_client.test.mocks.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.test.mocks.ts similarity index 100% rename from src/core/server/elasticsearch/client/configure_client.test.mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.test.mocks.ts diff --git a/src/core/server/elasticsearch/client/configure_client.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.test.ts similarity index 98% rename from src/core/server/elasticsearch/client/configure_client.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.test.ts index b25568bbd906e..e4fb582972b1b 100644 --- a/src/core/server/elasticsearch/client/configure_client.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.test.ts @@ -18,7 +18,7 @@ import { } from './configure_client.test.mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { ClusterConnectionPool } from '@elastic/elasticsearch'; -import type { ElasticsearchClientConfig } from './client_config'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; import { configureClient } from './configure_client'; import { instrumentEsQueryAndDeprecationLogger } from './log_query_and_deprecation'; diff --git a/src/core/server/elasticsearch/client/configure_client.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.ts similarity index 91% rename from src/core/server/elasticsearch/client/configure_client.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.ts index 248820ceb1f56..4901349e6b487 100644 --- a/src/core/server/elasticsearch/client/configure_client.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/configure_client.ts @@ -8,7 +8,8 @@ import { Client, HttpConnection, ClusterConnectionPool } from '@elastic/elasticsearch'; import type { Logger } from '@kbn/logging'; -import { parseClientOptions, ElasticsearchClientConfig } from './client_config'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; +import { parseClientOptions } from './client_config'; import { instrumentEsQueryAndDeprecationLogger } from './log_query_and_deprecation'; import { createTransport } from './create_transport'; diff --git a/src/core/server/elasticsearch/client/create_transport.test.mocks.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.test.mocks.ts similarity index 100% rename from src/core/server/elasticsearch/client/create_transport.test.mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.test.mocks.ts diff --git a/src/core/server/elasticsearch/client/create_transport.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.test.ts similarity index 100% rename from src/core/server/elasticsearch/client/create_transport.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.test.ts diff --git a/src/core/server/elasticsearch/client/create_transport.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.ts similarity index 91% rename from src/core/server/elasticsearch/client/create_transport.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.ts index 363dbb416979d..07ed3833a7af2 100644 --- a/src/core/server/elasticsearch/client/create_transport.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/create_transport.ts @@ -7,13 +7,13 @@ */ import type { IncomingHttpHeaders } from 'http'; -import type { - TransportRequestParams, - TransportRequestOptions, - TransportResult, -} from '@elastic/transport'; -import type { TransportOptions } from '@elastic/transport/lib/Transport'; -import { Transport } from '@elastic/elasticsearch'; +import { + Transport, + type TransportOptions, + type TransportRequestParams, + type TransportRequestOptions, + type TransportResult, +} from '@elastic/elasticsearch'; import { isUnauthorizedError } from '@kbn/es-errors'; import { InternalUnauthorizedErrorHandler, isRetryResult } from './retry_unauthorized'; diff --git a/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.test.ts similarity index 99% rename from src/core/server/elasticsearch/client/get_ecs_response_log.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.test.ts index ec00badbcdf28..03c8c118edcf2 100644 --- a/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.test.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import { type DiagnosticResult, type ConnectionRequestParams } from '@elastic/elasticsearch'; import { getEcsResponseLog } from './get_ecs_response_log'; diff --git a/src/core/server/elasticsearch/client/get_ecs_response_log.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.ts similarity index 99% rename from src/core/server/elasticsearch/client/get_ecs_response_log.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.ts index b977f03a9a062..fa122166ada08 100644 --- a/src/core/server/elasticsearch/client/get_ecs_response_log.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/get_ecs_response_log.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import { type IncomingHttpHeaders } from 'http'; import { type DiagnosticResult } from '@elastic/elasticsearch'; import { type LogMeta } from '@kbn/logging'; diff --git a/src/core/server/elasticsearch/default_headers.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/headers.ts similarity index 72% rename from src/core/server/elasticsearch/default_headers.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/headers.ts index eef04754cd958..755947490f05c 100644 --- a/src/core/server/elasticsearch/default_headers.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/headers.ts @@ -8,22 +8,26 @@ import { deepFreeze } from '@kbn/std'; +/** + * @internal + */ +export const PRODUCT_RESPONSE_HEADER = 'x-elastic-product'; + +/** + * @internal + */ export const PRODUCT_ORIGIN_HEADER = 'x-elastic-product-origin'; +/** + * @internal + */ export const RESERVED_HEADERS = deepFreeze([PRODUCT_ORIGIN_HEADER]); +/** + * @internal + */ export const DEFAULT_HEADERS = deepFreeze({ // Elasticsearch uses this to identify when a request is coming from Kibana, to allow Kibana to // access system indices using the standard ES APIs. [PRODUCT_ORIGIN_HEADER]: 'kibana', }); - -export const getReservedHeaders = (headerNames: string[]): string[] => { - const reservedHeaders = []; - for (const headerName of headerNames) { - if (RESERVED_HEADERS.includes(headerName.toLowerCase())) { - reservedHeaders.push(headerName); - } - } - return reservedHeaders; -}; diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/index.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/index.ts new file mode 100644 index 0000000000000..a4ca96fdd7036 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { ScopedClusterClient } from './scoped_cluster_client'; +export { ClusterClient } from './cluster_client'; +export { configureClient } from './configure_client'; +export { getRequestDebugMeta, getErrorMessage } from './log_query_and_deprecation'; +export { + PRODUCT_RESPONSE_HEADER, + DEFAULT_HEADERS, + PRODUCT_ORIGIN_HEADER, + RESERVED_HEADERS, +} from './headers'; diff --git a/src/core/server/elasticsearch/client/log_query_and_deprecation.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/log_query_and_deprecation.test.ts similarity index 100% rename from src/core/server/elasticsearch/client/log_query_and_deprecation.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/log_query_and_deprecation.test.ts diff --git a/src/core/server/elasticsearch/client/log_query_and_deprecation.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/log_query_and_deprecation.ts similarity index 99% rename from src/core/server/elasticsearch/client/log_query_and_deprecation.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/log_query_and_deprecation.ts index 7d48b924cdf36..460ca0446f0fc 100644 --- a/src/core/server/elasticsearch/client/log_query_and_deprecation.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/log_query_and_deprecation.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import type { IncomingHttpHeaders } from 'http'; import { Buffer } from 'buffer'; import { stringify } from 'querystring'; diff --git a/src/core/server/elasticsearch/client/retry_unauthorized.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/retry_unauthorized.test.ts similarity index 100% rename from src/core/server/elasticsearch/client/retry_unauthorized.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/retry_unauthorized.test.ts diff --git a/src/core/server/elasticsearch/client/retry_unauthorized.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/retry_unauthorized.ts similarity index 58% rename from src/core/server/elasticsearch/client/retry_unauthorized.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/retry_unauthorized.ts index 568bc530e2fe8..e8337898eb6c3 100644 --- a/src/core/server/elasticsearch/client/retry_unauthorized.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/retry_unauthorized.ts @@ -8,71 +8,16 @@ import { MaybePromise } from '@kbn/utility-types'; import { UnauthorizedError } from '@kbn/es-errors'; -import type { AuthHeaders, KibanaRequest, SetAuthHeaders } from '@kbn/core-http-server'; +import type { SetAuthHeaders } from '@kbn/core-http-server'; import { isRealRequest } from '@kbn/core-http-router-server-internal'; -import { ScopeableRequest } from '../types'; - -/** - * @public - */ -export interface UnauthorizedErrorHandlerOptions { - error: UnauthorizedError; - request: KibanaRequest; -} - -/** - * @public - */ -export interface UnauthorizedErrorHandlerResultRetryParams { - authHeaders: AuthHeaders; -} - -/** - * @public - */ -export interface UnauthorizedErrorHandlerRetryResult - extends UnauthorizedErrorHandlerResultRetryParams { - type: 'retry'; -} - -/** - * @public - */ -export interface UnauthorizedErrorHandlerNotHandledResult { - type: 'notHandled'; -} - -/** - * @public - */ -export type UnauthorizedErrorHandlerResult = - | UnauthorizedErrorHandlerRetryResult - | UnauthorizedErrorHandlerNotHandledResult; - -/** - * Toolkit passed to a {@link UnauthorizedErrorHandler} used to generate responses from the handler - * @public - */ -export interface UnauthorizedErrorHandlerToolkit { - /** - * The handler cannot handle the error, or was not able to authenticate. - */ - notHandled: () => UnauthorizedErrorHandlerNotHandledResult; - /** - * The handler was able to authenticate. Will retry the failed request with new auth headers - */ - retry: (params: UnauthorizedErrorHandlerResultRetryParams) => UnauthorizedErrorHandlerRetryResult; -} - -/** - * A handler used to handle unauthorized error returned by elasticsearch - * - * @public - */ -export type UnauthorizedErrorHandler = ( - options: UnauthorizedErrorHandlerOptions, - toolkit: UnauthorizedErrorHandlerToolkit -) => MaybePromise; +import type { + ScopeableRequest, + UnauthorizedErrorHandler, + UnauthorizedErrorHandlerResult, + UnauthorizedErrorHandlerToolkit, + UnauthorizedErrorHandlerRetryResult, + UnauthorizedErrorHandlerNotHandledResult, +} from '@kbn/core-elasticsearch-server'; /** @internal */ export type InternalUnauthorizedErrorHandler = ( diff --git a/src/core/server/elasticsearch/client/scoped_cluster_client.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.test.ts similarity index 71% rename from src/core/server/elasticsearch/client/scoped_cluster_client.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.test.ts index 6635f32b8863f..75d2e9d9e6361 100644 --- a/src/core/server/elasticsearch/client/scoped_cluster_client.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.test.ts @@ -6,13 +6,15 @@ * Side Public License, v 1. */ -import { elasticsearchClientMock } from './mocks'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { ScopedClusterClient } from './scoped_cluster_client'; +const createEsClient = () => ({} as unknown as ElasticsearchClient); + describe('ScopedClusterClient', () => { it('uses the internal client passed in the constructor', () => { - const internalClient = elasticsearchClientMock.createElasticsearchClient(); - const scopedClient = elasticsearchClientMock.createElasticsearchClient(); + const internalClient = createEsClient(); + const scopedClient = createEsClient(); const scopedClusterClient = new ScopedClusterClient(internalClient, scopedClient); @@ -20,8 +22,8 @@ describe('ScopedClusterClient', () => { }); it('uses the scoped client passed in the constructor', () => { - const internalClient = elasticsearchClientMock.createElasticsearchClient(); - const scopedClient = elasticsearchClientMock.createElasticsearchClient(); + const internalClient = createEsClient(); + const scopedClient = createEsClient(); const scopedClusterClient = new ScopedClusterClient(internalClient, scopedClient); diff --git a/packages/kbn-pm/src/test_helpers/strip_ansi_snapshot_serializer.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.ts similarity index 52% rename from packages/kbn-pm/src/test_helpers/strip_ansi_snapshot_serializer.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.ts index ddb01680606e9..dedccacf43202 100644 --- a/packages/kbn-pm/src/test_helpers/strip_ansi_snapshot_serializer.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/scoped_cluster_client.ts @@ -6,15 +6,12 @@ * Side Public License, v 1. */ -import hasAnsi from 'has-ansi'; -import stripAnsi from 'strip-ansi'; +import type { ElasticsearchClient, IScopedClusterClient } from '@kbn/core-elasticsearch-server'; -export const stripAnsiSnapshotSerializer: jest.SnapshotSerializerPlugin = { - serialize(value: string) { - return stripAnsi(value); - }, - - test(value: any) { - return typeof value === 'string' && hasAnsi(value); - }, -}; +/** @internal **/ +export class ScopedClusterClient implements IScopedClusterClient { + constructor( + public readonly asInternalUser: ElasticsearchClient, + public readonly asCurrentUser: ElasticsearchClient + ) {} +} diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/tsconfig.json b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/BUILD.bazel b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/BUILD.bazel new file mode 100644 index 0000000000000..a8534e09fd929 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/BUILD.bazel @@ -0,0 +1,102 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-elasticsearch-client-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-elasticsearch-client-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@elastic/elasticsearch", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/README.md b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/README.md new file mode 100644 index 0000000000000..3f2b0129bd374 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-elasticsearch-client-server-mocks + +This package contains the mocks for the server-side elasticsearch client. diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/jest.config.js b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/jest.config.js new file mode 100644 index 0000000000000..a88ecf94eb734 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/elasticsearch/core-elasticsearch-client-server-mocks'], +}; diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/package.json b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/package.json new file mode 100644 index 0000000000000..5668979087411 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-elasticsearch-client-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/index.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/index.ts new file mode 100644 index 0000000000000..41192f12c2f65 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { elasticsearchClientMock } from './mocks'; +export type { + ClientApiMockInstance, + ClusterClientMock, + ScopedClusterClientMock, + CustomClusterClientMock, + DeeplyMockedApi, + ElasticsearchClientMock, +} from './mocks'; diff --git a/src/core/server/elasticsearch/client/mocks.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/mocks.test.ts similarity index 100% rename from src/core/server/elasticsearch/client/mocks.test.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/mocks.test.ts diff --git a/src/core/server/elasticsearch/client/mocks.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/mocks.ts similarity index 96% rename from src/core/server/elasticsearch/client/mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/mocks.ts index 2c34629f2fd57..be3fe6f839dce 100644 --- a/src/core/server/elasticsearch/client/mocks.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/src/mocks.ts @@ -6,12 +6,10 @@ * Side Public License, v 1. */ -import type { Client } from '@elastic/elasticsearch'; -import type { TransportResult, TransportRequestOptions } from '@elastic/elasticsearch'; +import type { Client, TransportResult, TransportRequestOptions } from '@elastic/elasticsearch'; import type { PublicKeys } from '@kbn/utility-types'; -import { ElasticsearchClient } from './types'; -import { ICustomClusterClient } from './cluster_client'; -import { PRODUCT_RESPONSE_HEADER } from '../supported_server_response_check'; +import type { ElasticsearchClient, ICustomClusterClient } from '@kbn/core-elasticsearch-server'; +import { PRODUCT_RESPONSE_HEADER } from '@kbn/core-elasticsearch-client-server-internal'; const omittedProps = [ 'diagnostic', diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/tsconfig.json b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/BUILD.bazel b/packages/core/elasticsearch/core-elasticsearch-server-internal/BUILD.bazel new file mode 100644 index 0000000000000..1593da93f0234 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/BUILD.bazel @@ -0,0 +1,132 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-elasticsearch-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-elasticsearch-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "@npm//semver", + "@npm//moment", + "@npm//@elastic/elasticsearch", + "//packages/kbn-std", + "//packages/kbn-i18n", + "//packages/kbn-crypto", + "//packages/kbn-config-schema", + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal", + ### test dependencies + "//packages/kbn-config-mocks", + "//packages/core/logging/core-logging-server-mocks", + "//packages/core/analytics/core-analytics-server-mocks", + "//packages/core/execution-context/core-execution-context-server-mocks", + "//packages/core/http/core-http-server-mocks", + "//packages/core/elasticsearch/core-elasticsearch-client-server-mocks", + "//packages/core/config/core-config-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "@npm//@types/semver", + "@npm//moment", + "@npm//@elastic/elasticsearch", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-std:npm_module_types", + "//packages/kbn-logging:npm_module_types", + "//packages/kbn-i18n:npm_module_types", + "//packages/kbn-crypto:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/analytics/core-analytics-server:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-server-internal:npm_module_types", + "//packages/core/execution-context/core-execution-context-server-internal:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-client-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/README.md b/packages/core/elasticsearch/core-elasticsearch-server-internal/README.md new file mode 100644 index 0000000000000..38df445ccf465 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-elasticsearch-server-internal + +This package contains the internal types and implementation for Core's server-side elasticsearch service. diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/jest.config.js b/packages/core/elasticsearch/core-elasticsearch-server-internal/jest.config.js new file mode 100644 index 0000000000000..bf51a18cb31b7 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/elasticsearch/core-elasticsearch-server-internal'], +}; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/package.json b/packages/core/elasticsearch/core-elasticsearch-server-internal/package.json new file mode 100644 index 0000000000000..c4d93c383d421 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-elasticsearch-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/elasticsearch/default_headers.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.test.ts similarity index 84% rename from src/core/server/elasticsearch/default_headers.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.test.ts index 58e6e222a3f2b..862020ba77fea 100644 --- a/src/core/server/elasticsearch/default_headers.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.test.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { getReservedHeaders, PRODUCT_ORIGIN_HEADER } from './default_headers'; +import { PRODUCT_ORIGIN_HEADER } from '@kbn/core-elasticsearch-client-server-internal'; +import { getReservedHeaders } from './default_headers'; describe('getReservedHeaders', () => { it('returns the list of reserved headers contained in a list', () => { diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.ts new file mode 100644 index 0000000000000..4c447d66fd57a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/default_headers.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { RESERVED_HEADERS } from '@kbn/core-elasticsearch-client-server-internal'; + +export const getReservedHeaders = (headerNames: string[]): string[] => { + const reservedHeaders = []; + for (const headerName of headerNames) { + if (RESERVED_HEADERS.includes(headerName.toLowerCase())) { + reservedHeaders.push(headerName); + } + } + return reservedHeaders; +}; diff --git a/src/core/server/elasticsearch/elasticsearch_config.test.mocks.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.mocks.ts similarity index 100% rename from src/core/server/elasticsearch/elasticsearch_config.test.mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.mocks.ts diff --git a/src/core/server/elasticsearch/elasticsearch_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts similarity index 100% rename from src/core/server/elasticsearch/elasticsearch_config.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts similarity index 98% rename from src/core/server/elasticsearch/elasticsearch_config.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts index 201f285d72874..8420d8d72346f 100644 --- a/src/core/server/elasticsearch/elasticsearch_config.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts @@ -12,7 +12,8 @@ import { i18n } from '@kbn/i18n'; import { Duration } from 'moment'; import { readFileSync } from 'fs'; import type { ServiceConfigDescriptor } from '@kbn/core-base-server-internal'; -import { ConfigDeprecationProvider } from '..'; +import type { ConfigDeprecationProvider } from '@kbn/config'; +import type { IElasticsearchConfig, ElasticsearchSslConfig } from '@kbn/core-elasticsearch-server'; import { getReservedHeaders } from './default_headers'; const hostURISchema = schema.uri({ scheme: ['http', 'https'] }); @@ -20,7 +21,6 @@ const hostURISchema = schema.uri({ scheme: ['http', 'https'] }); export const DEFAULT_API_VERSION = 'master'; export type ElasticsearchConfigType = TypeOf; -type SslConfigSchema = ElasticsearchConfigType['ssl']; /** * Validation schema for elasticsearch service config. It can be reused when plugins allow users @@ -270,9 +270,9 @@ export const config: ServiceConfigDescriptor = { /** * Wrapper of config schema. - * @public + * @internal */ -export class ElasticsearchConfig { +export class ElasticsearchConfig implements IElasticsearchConfig { /** * @internal * Only valid in dev mode. Skip the valid connection check during startup. The connection check allows @@ -381,10 +381,7 @@ export class ElasticsearchConfig { * are required when `xpack.ssl.verification_mode` in Elasticsearch is set to * either `certificate` or `full`. */ - public readonly ssl: Pick< - SslConfigSchema, - Exclude - > & { certificateAuthorities?: string[] }; + public readonly ssl: ElasticsearchSslConfig; /** * Header names and values to send to Elasticsearch with every request. These diff --git a/src/core/server/elasticsearch/elasticsearch_route_handler_context.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_route_handler_context.ts similarity index 82% rename from src/core/server/elasticsearch/elasticsearch_route_handler_context.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_route_handler_context.ts index e33cd854546fc..0b4a1474a88e8 100644 --- a/src/core/server/elasticsearch/elasticsearch_route_handler_context.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_route_handler_context.ts @@ -7,17 +7,12 @@ */ import type { KibanaRequest } from '@kbn/core-http-server'; -import type { IScopedClusterClient } from './client'; +import type { + IScopedClusterClient, + ElasticsearchRequestHandlerContext, +} from '@kbn/core-elasticsearch-server'; import type { InternalElasticsearchServiceStart } from './types'; -/** - * Core's `elasticsearch` request handler context. - * @public - */ -export interface ElasticsearchRequestHandlerContext { - client: IScopedClusterClient; -} - /** * The {@link UiSettingsRequestHandlerContext} implementation. * @internal diff --git a/src/core/server/elasticsearch/elasticsearch_service.test.mocks.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.mocks.ts similarity index 83% rename from src/core/server/elasticsearch/elasticsearch_service.test.mocks.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.mocks.ts index 0ac23c1b37cf6..29b9a2cda3dfd 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.test.mocks.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.mocks.ts @@ -7,7 +7,9 @@ */ export const MockClusterClient = jest.fn(); -jest.mock('./client/cluster_client', () => ({ ClusterClient: MockClusterClient })); +jest.mock('@kbn/core-elasticsearch-client-server-internal', () => ({ + ClusterClient: MockClusterClient, +})); export const isScriptingEnabledMock = jest.fn(); jest.doMock('./is_scripting_enabled', () => ({ diff --git a/src/core/server/elasticsearch/elasticsearch_service.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts similarity index 99% rename from src/core/server/elasticsearch/elasticsearch_service.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts index b40a157a4ca2f..aaf7344fdc3b6 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts @@ -16,9 +16,6 @@ jest.mock('./version_check/ensure_es_version', () => ({ pollEsNodesVersion: jest.fn(), })); -// Mocking the module to disable caching for tests -jest.mock('../ui_settings/cache'); - import { MockClusterClient, isScriptingEnabledMock } from './elasticsearch_service.test.mocks'; import type { NodesVersionCompatibility } from './version_check/ensure_es_version'; @@ -32,9 +29,9 @@ import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { configSchema, ElasticsearchConfig } from './elasticsearch_config'; import { ElasticsearchService, SetupDeps } from './elasticsearch_service'; -import { elasticsearchClientMock } from './client/mocks'; import { duration } from 'moment'; import { isValidConnection as isValidConnectionMock } from './is_valid_connection'; import { pollEsNodesVersion as pollEsNodesVersionMocked } from './version_check/ensure_es_version'; diff --git a/src/core/server/elasticsearch/elasticsearch_service.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts similarity index 97% rename from src/core/server/elasticsearch/elasticsearch_service.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts index a60069d644ca2..8e7ab46b0edd4 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts @@ -18,9 +18,13 @@ import type { } from '@kbn/core-execution-context-server-internal'; import type { IAuthHeadersStorage } from '@kbn/core-http-server'; import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import type { + UnauthorizedErrorHandler, + ElasticsearchClientConfig, +} from '@kbn/core-elasticsearch-server'; +import { ClusterClient } from '@kbn/core-elasticsearch-client-server-internal'; import { registerAnalyticsContextProvider } from './register_analytics_context_provider'; -import { ClusterClient, ElasticsearchClientConfig } from './client'; import { ElasticsearchConfig, ElasticsearchConfigType } from './elasticsearch_config'; import { InternalElasticsearchServicePreboot, @@ -32,7 +36,6 @@ import { pollEsNodesVersion } from './version_check/ensure_es_version'; import { calculateStatus$ } from './status'; import { isValidConnection } from './is_valid_connection'; import { isInlineScriptingEnabled } from './is_scripting_enabled'; -import type { UnauthorizedErrorHandler } from './client/retry_unauthorized'; import { mergeConfig } from './merge_config'; import { getClusterInfo$ } from './get_cluster_info'; diff --git a/src/core/server/elasticsearch/get_cluster_info.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.test.ts similarity index 96% rename from src/core/server/elasticsearch/get_cluster_info.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.test.ts index fd3b3b71844ac..100fac8e1197b 100644 --- a/src/core/server/elasticsearch/get_cluster_info.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { elasticsearchClientMock } from './client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { firstValueFrom } from 'rxjs'; import { getClusterInfo$ } from './get_cluster_info'; diff --git a/src/core/server/elasticsearch/get_cluster_info.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.ts similarity index 93% rename from src/core/server/elasticsearch/get_cluster_info.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.ts index c807965d3bbf8..96ef87430048c 100644 --- a/src/core/server/elasticsearch/get_cluster_info.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/get_cluster_info.ts @@ -8,7 +8,7 @@ import type { Observable } from 'rxjs'; import { defer, map, retry, shareReplay } from 'rxjs'; -import type { ElasticsearchClient } from './client'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; /** @private */ export interface ClusterInfo { diff --git a/src/core/server/elasticsearch/index.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/index.ts similarity index 51% rename from src/core/server/elasticsearch/index.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/index.ts index b23b12ffe392c..2554f225a58ab 100644 --- a/src/core/server/elasticsearch/index.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/index.ts @@ -7,45 +7,25 @@ */ export { ElasticsearchService } from './elasticsearch_service'; -export { config, configSchema } from './elasticsearch_config'; -export { ElasticsearchConfig } from './elasticsearch_config'; +export { config, configSchema, ElasticsearchConfig } from './elasticsearch_config'; +export type { ElasticsearchConfigType } from './elasticsearch_config'; export type { NodesVersionCompatibility, PollEsNodesVersionOptions, + NodesInfo, + NodeInfo, } from './version_check/ensure_es_version'; export type { - ElasticsearchServicePreboot, - ElasticsearchServiceSetup, - ElasticsearchServiceStart, ElasticsearchStatusMeta, InternalElasticsearchServicePreboot, InternalElasticsearchServiceSetup, InternalElasticsearchServiceStart, - FakeRequest, - ScopeableRequest, - ElasticsearchConfigPreboot, } from './types'; -export type { - IClusterClient, - ICustomClusterClient, - ElasticsearchClientConfig, - ElasticsearchClient, - IScopedClusterClient, - // unauthorized error handler - UnauthorizedErrorHandlerOptions, - UnauthorizedErrorHandlerResultRetryParams, - UnauthorizedErrorHandlerRetryResult, - UnauthorizedErrorHandlerNotHandledResult, - UnauthorizedErrorHandlerResult, - UnauthorizedErrorHandlerToolkit, - UnauthorizedErrorHandler, -} from './client'; -export { getRequestDebugMeta, getErrorMessage } from './client'; export { pollEsNodesVersion } from './version_check/ensure_es_version'; export { isSupportedEsServer, isNotFoundFromUnsupportedServer, - PRODUCT_RESPONSE_HEADER, } from './supported_server_response_check'; export { CoreElasticsearchRouteHandlerContext } from './elasticsearch_route_handler_context'; -export type { ElasticsearchRequestHandlerContext } from './elasticsearch_route_handler_context'; +export { retryCallCluster, migrationRetryCallCluster } from './retry_call_cluster'; +export { isInlineScriptingEnabled } from './is_scripting_enabled'; diff --git a/src/core/server/elasticsearch/is_scripting_enabled.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.test.ts similarity index 91% rename from src/core/server/elasticsearch/is_scripting_enabled.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.test.ts index 797ff8972b7be..d2922c0161c6f 100644 --- a/src/core/server/elasticsearch/is_scripting_enabled.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.test.ts @@ -7,14 +7,14 @@ */ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { elasticsearchServiceMock } from './elasticsearch_service.mock'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { isInlineScriptingEnabled } from './is_scripting_enabled'; describe('isInlineScriptingEnabled', () => { - let client: ReturnType; + let client: ReturnType; beforeEach(() => { - client = elasticsearchServiceMock.createElasticsearchClient(); + client = elasticsearchClientMock.createElasticsearchClient(); }); const mockSettingsValue = (settings: estypes.ClusterGetSettingsResponse) => { diff --git a/src/core/server/elasticsearch/is_scripting_enabled.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.ts similarity index 93% rename from src/core/server/elasticsearch/is_scripting_enabled.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.ts index 13685362c11ca..6a3900229c0d4 100644 --- a/src/core/server/elasticsearch/is_scripting_enabled.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_scripting_enabled.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ElasticsearchClient } from './client'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; const scriptAllowedTypesKey = 'script.allowed_types'; diff --git a/src/core/server/elasticsearch/is_valid_connection.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_valid_connection.test.ts similarity index 100% rename from src/core/server/elasticsearch/is_valid_connection.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_valid_connection.test.ts diff --git a/src/core/server/elasticsearch/is_valid_connection.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_valid_connection.ts similarity index 100% rename from src/core/server/elasticsearch/is_valid_connection.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/is_valid_connection.ts diff --git a/src/core/server/elasticsearch/merge_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.test.ts similarity index 97% rename from src/core/server/elasticsearch/merge_config.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.test.ts index c89a759435284..02317546a9dbc 100644 --- a/src/core/server/elasticsearch/merge_config.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; import { mergeConfig } from './merge_config'; -import type { ElasticsearchClientConfig } from './client'; import { configSchema, ElasticsearchConfig } from './elasticsearch_config'; const partialToConfig = (parts: Partial): ElasticsearchClientConfig => { diff --git a/src/core/server/elasticsearch/merge_config.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.ts similarity index 93% rename from src/core/server/elasticsearch/merge_config.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.ts index 373bf6fc6cbe0..9bb06670a09a9 100644 --- a/src/core/server/elasticsearch/merge_config.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/merge_config.ts @@ -8,7 +8,7 @@ import { merge } from '@kbn/std'; import { Writable } from '@kbn/utility-types'; -import type { ElasticsearchClientConfig } from './client'; +import type { ElasticsearchClientConfig } from '@kbn/core-elasticsearch-server'; type WritableConfig = Writable; diff --git a/src/core/server/elasticsearch/register_analytics_context_provider.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/register_analytics_context_provider.test.ts similarity index 100% rename from src/core/server/elasticsearch/register_analytics_context_provider.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/register_analytics_context_provider.test.ts diff --git a/src/core/server/elasticsearch/register_analytics_context_provider.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/register_analytics_context_provider.ts similarity index 100% rename from src/core/server/elasticsearch/register_analytics_context_provider.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/register_analytics_context_provider.ts diff --git a/src/core/server/elasticsearch/client/retry_call_cluster.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/retry_call_cluster.test.ts similarity index 99% rename from src/core/server/elasticsearch/client/retry_call_cluster.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/retry_call_cluster.test.ts index aacb683197882..78bb907c5cc48 100644 --- a/src/core/server/elasticsearch/client/retry_call_cluster.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/retry_call_cluster.test.ts @@ -8,7 +8,7 @@ import { errors } from '@elastic/elasticsearch'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { elasticsearchClientMock } from './mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { retryCallCluster, migrationRetryCallCluster } from './retry_call_cluster'; const dummyBody: any = { foo: 'bar' }; diff --git a/src/core/server/elasticsearch/client/retry_call_cluster.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/retry_call_cluster.ts similarity index 100% rename from src/core/server/elasticsearch/client/retry_call_cluster.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/retry_call_cluster.ts diff --git a/src/core/server/elasticsearch/status.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.test.ts similarity index 96% rename from src/core/server/elasticsearch/status.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.test.ts index c1f7cf0e35892..f6aec43e680c4 100644 --- a/src/core/server/elasticsearch/status.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.test.ts @@ -9,11 +9,15 @@ import { take } from 'rxjs/operators'; import { Subject, of } from 'rxjs'; +import { ServiceStatusLevels, ServiceStatusLevel, ServiceStatus } from '@kbn/core-base-common'; import { calculateStatus$ } from './status'; -import { ServiceStatusLevels, ServiceStatus } from '../status'; -import { ServiceStatusLevelSnapshotSerializer } from '../status/test_utils'; import { NodesVersionCompatibility } from './version_check/ensure_es_version'; +const ServiceStatusLevelSnapshotSerializer: jest.SnapshotSerializerPlugin = { + test: (val: any) => Object.values(ServiceStatusLevels).includes(val), + serialize: (val: ServiceStatusLevel) => val.toString(), +}; + expect.addSnapshotSerializer(ServiceStatusLevelSnapshotSerializer); const nodeInfo = { diff --git a/src/core/server/elasticsearch/status.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.ts similarity index 96% rename from src/core/server/elasticsearch/status.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.ts index 23e44b71863f1..5a38f11432b7b 100644 --- a/src/core/server/elasticsearch/status.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/status.ts @@ -8,8 +8,7 @@ import { Observable, merge, of } from 'rxjs'; import { map } from 'rxjs/operators'; - -import { ServiceStatus, ServiceStatusLevels } from '../status'; +import { ServiceStatus, ServiceStatusLevels } from '@kbn/core-base-common'; import { ElasticsearchStatusMeta } from './types'; import { NodesVersionCompatibility } from './version_check/ensure_es_version'; diff --git a/src/core/server/elasticsearch/supported_server_response_check.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/supported_server_response_check.test.ts similarity index 100% rename from src/core/server/elasticsearch/supported_server_response_check.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/supported_server_response_check.test.ts diff --git a/src/core/server/elasticsearch/supported_server_response_check.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/supported_server_response_check.ts similarity index 94% rename from src/core/server/elasticsearch/supported_server_response_check.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/supported_server_response_check.ts index 91aa06e132de8..43f3f4ca92ce8 100644 --- a/src/core/server/elasticsearch/supported_server_response_check.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/supported_server_response_check.ts @@ -5,7 +5,9 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -export const PRODUCT_RESPONSE_HEADER = 'x-elastic-product'; + +import { PRODUCT_RESPONSE_HEADER } from '@kbn/core-elasticsearch-client-server-internal'; + /** * Response headers check to determine if the response is from Elasticsearch * @param headers Response headers diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/types.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/types.ts new file mode 100644 index 0000000000000..57f3620a7911d --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/types.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Observable } from 'rxjs'; +import type { + ElasticsearchServicePreboot, + ElasticsearchServiceStart, + ElasticsearchServiceSetup, +} from '@kbn/core-elasticsearch-server'; +import type { ServiceStatus } from '@kbn/core-base-common'; +import type { NodesVersionCompatibility, NodeInfo } from './version_check/ensure_es_version'; +import type { ClusterInfo } from './get_cluster_info'; + +/** @internal */ +export type InternalElasticsearchServicePreboot = ElasticsearchServicePreboot; + +/** @internal */ +export interface InternalElasticsearchServiceSetup extends ElasticsearchServiceSetup { + clusterInfo$: Observable; + esNodesCompatibility$: Observable; + status$: Observable>; +} + +/** + * @internal + */ +export type InternalElasticsearchServiceStart = ElasticsearchServiceStart; + +/** @internal */ +export interface ElasticsearchStatusMeta { + warningNodes: NodeInfo[]; + incompatibleNodes: NodeInfo[]; + nodesInfoRequestError?: Error; +} diff --git a/src/core/server/elasticsearch/version_check/ensure_es_version.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts similarity index 99% rename from src/core/server/elasticsearch/version_check/ensure_es_version.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts index 49b8517f8c23e..dccb2722309c4 100644 --- a/src/core/server/elasticsearch/version_check/ensure_es_version.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts @@ -8,7 +8,7 @@ import { mapNodesVersionCompatibility, pollEsNodesVersion, NodesInfo } from './ensure_es_version'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { elasticsearchClientMock } from '../client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { take, delay } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { of } from 'rxjs'; diff --git a/src/core/server/elasticsearch/version_check/ensure_es_version.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts similarity index 98% rename from src/core/server/elasticsearch/version_check/ensure_es_version.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts index 7ef52dec33732..caa2dd372b8f3 100644 --- a/src/core/server/elasticsearch/version_check/ensure_es_version.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts @@ -14,11 +14,11 @@ import { timer, of, from, Observable } from 'rxjs'; import { map, distinctUntilChanged, catchError, exhaustMap } from 'rxjs/operators'; import type { Logger } from '@kbn/logging'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { esVersionCompatibleWithKibana, esVersionEqualsKibana, } from './es_kibana_version_compatability'; -import type { ElasticsearchClient } from '../client'; /** @public */ export interface PollEsNodesVersionOptions { @@ -29,7 +29,8 @@ export interface PollEsNodesVersionOptions { esVersionCheckInterval: number; } -interface NodeInfo { +/** @public */ +export interface NodeInfo { version: string; ip: string; http?: { diff --git a/src/core/server/elasticsearch/version_check/es_kibana_version_compatability.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/es_kibana_version_compatability.test.ts similarity index 100% rename from src/core/server/elasticsearch/version_check/es_kibana_version_compatability.test.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/es_kibana_version_compatability.test.ts diff --git a/src/core/server/elasticsearch/version_check/es_kibana_version_compatability.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/es_kibana_version_compatability.ts similarity index 100% rename from src/core/server/elasticsearch/version_check/es_kibana_version_compatability.ts rename to packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/es_kibana_version_compatability.ts diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/tsconfig.json b/packages/core/elasticsearch/core-elasticsearch-server-internal/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/BUILD.bazel b/packages/core/elasticsearch/core-elasticsearch-server-mocks/BUILD.bazel new file mode 100644 index 0000000000000..5b5f11738a10a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/BUILD.bazel @@ -0,0 +1,105 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-elasticsearch-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-elasticsearch-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "//packages/core/elasticsearch/core-elasticsearch-client-server-mocks", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-client-server-mocks:npm_module_types", + "//packages/core/elasticsearch/core-elasticsearch-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/README.md b/packages/core/elasticsearch/core-elasticsearch-server-mocks/README.md new file mode 100644 index 0000000000000..afc49df686dce --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-elasticsearch-server-mocks + +This package contains the mocks for Core's server-side elasticsearch service. diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/jest.config.js b/packages/core/elasticsearch/core-elasticsearch-server-mocks/jest.config.js new file mode 100644 index 0000000000000..297bfd70ae34a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/elasticsearch/core-elasticsearch-server-mocks'], +}; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/package.json b/packages/core/elasticsearch/core-elasticsearch-server-mocks/package.json new file mode 100644 index 0000000000000..4455a10b79d20 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-elasticsearch-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/elasticsearch/elasticsearch_service.mock.ts b/packages/core/elasticsearch/core-elasticsearch-server-mocks/src/elasticsearch_service.mock.ts similarity index 89% rename from src/core/server/elasticsearch/elasticsearch_service.mock.ts rename to packages/core/elasticsearch/core-elasticsearch-server-mocks/src/elasticsearch_service.mock.ts index 02a846a5b8011..aebf2c290ea57 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.mock.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/src/elasticsearch_service.mock.ts @@ -11,21 +11,23 @@ import type { PublicMethodsOf } from '@kbn/utility-types'; import { elasticsearchClientMock, - ClusterClientMock, - CustomClusterClientMock, -} from './client/mocks'; -import { ElasticsearchClientConfig } from './client'; -import { ElasticsearchConfig } from './elasticsearch_config'; -import { ElasticsearchService } from './elasticsearch_service'; -import { - InternalElasticsearchServiceSetup, + type ClusterClientMock, + type CustomClusterClientMock, +} from '@kbn/core-elasticsearch-client-server-mocks'; +import type { + ElasticsearchClientConfig, ElasticsearchServiceSetup, - ElasticsearchStatusMeta, ElasticsearchServicePreboot, -} from './types'; -import { NodesVersionCompatibility } from './version_check/ensure_es_version'; -import { ServiceStatus, ServiceStatusLevels } from '../status'; -import type { ClusterInfo } from './get_cluster_info'; +} from '@kbn/core-elasticsearch-server'; +import type { + ElasticsearchConfig, + ElasticsearchService, + InternalElasticsearchServiceSetup, + ElasticsearchStatusMeta, + NodesVersionCompatibility, + ClusterInfo, +} from '@kbn/core-elasticsearch-server-internal'; +import { type ServiceStatus, ServiceStatusLevels } from '@kbn/core-base-common'; type MockedElasticSearchServicePreboot = jest.Mocked; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/src/index.ts b/packages/core/elasticsearch/core-elasticsearch-server-mocks/src/index.ts new file mode 100644 index 0000000000000..0c58017fdc429 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { elasticsearchServiceMock } from './elasticsearch_service.mock'; +export type { + MockedElasticSearchServiceSetup, + MockedElasticSearchServiceStart, +} from './elasticsearch_service.mock'; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-mocks/tsconfig.json b/packages/core/elasticsearch/core-elasticsearch-server-mocks/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/elasticsearch/core-elasticsearch-server/BUILD.bazel b/packages/core/elasticsearch/core-elasticsearch-server/BUILD.bazel new file mode 100644 index 0000000000000..c097ff5b33fd2 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/BUILD.bazel @@ -0,0 +1,102 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-elasticsearch-server" +PKG_REQUIRE_NAME = "@kbn/core-elasticsearch-server" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//moment", + "@npm//@elastic/elasticsearch", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-es-errors:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/elasticsearch/core-elasticsearch-server/README.md b/packages/core/elasticsearch/core-elasticsearch-server/README.md new file mode 100644 index 0000000000000..3bcfd22475d34 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/README.md @@ -0,0 +1,3 @@ +# @kbn/core-elasticsearch-server + +This package contains the public type for Core's server-side `elasticsearch` domain. diff --git a/packages/core/elasticsearch/core-elasticsearch-server/jest.config.js b/packages/core/elasticsearch/core-elasticsearch-server/jest.config.js new file mode 100644 index 0000000000000..e3bdaf67022ce --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/elasticsearch/core-elasticsearch-server'], +}; diff --git a/packages/core/elasticsearch/core-elasticsearch-server/package.json b/packages/core/elasticsearch/core-elasticsearch-server/package.json new file mode 100644 index 0000000000000..87a6b652dbd44 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-elasticsearch-server", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/elasticsearch/client/types.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/client.ts similarity index 100% rename from src/core/server/elasticsearch/client/types.ts rename to packages/core/elasticsearch/core-elasticsearch-server/src/client/client.ts diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/client/client_config.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/client_config.ts new file mode 100644 index 0000000000000..8c8fa6343e546 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/client_config.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Duration } from 'moment'; + +/** + * Configuration options to be used to create a {@link IClusterClient | cluster client} + * + * @public + */ +export interface ElasticsearchClientConfig { + customHeaders: Record; + requestHeadersWhitelist: string[]; + maxSockets: number; + compression: boolean; + sniffOnStart: boolean; + sniffOnConnectionFault: boolean; + sniffInterval: false | Duration; + username?: string; + password?: string; + serviceAccountToken?: string; + hosts: string[]; + keepAlive?: boolean; + pingTimeout?: Duration | number; + requestTimeout?: Duration | number; + caFingerprint?: string; + ssl?: ElasticsearchClientSslConfig; +} + +/** + * @public + */ +export interface ElasticsearchClientSslConfig { + verificationMode?: 'none' | 'certificate' | 'full'; + certificate?: string; + certificateAuthorities?: string[]; + key?: string; + keyPassphrase?: string; + alwaysPresentCertificate?: boolean; +} diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/client/cluster_client.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/cluster_client.ts new file mode 100644 index 0000000000000..57eadf70ef68a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/cluster_client.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { ElasticsearchClient } from './client'; +import { ScopeableRequest } from './scopeable_request'; +import { IScopedClusterClient } from './scoped_cluster_client'; + +/** + * Represents an Elasticsearch cluster API client created by the platform. + * It allows to call API on behalf of the internal Kibana user and + * the actual user that is derived from the request headers (via `asScoped(...)`). + * + * @public + **/ +export interface IClusterClient { + /** + * A {@link ElasticsearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user + */ + readonly asInternalUser: ElasticsearchClient; + /** + * Creates a {@link IScopedClusterClient | scoped cluster client} bound to given {@link ScopeableRequest | request} + */ + asScoped: (request: ScopeableRequest) => IScopedClusterClient; +} + +/** + * See {@link IClusterClient} + * + * @public + */ +export interface ICustomClusterClient extends IClusterClient { + /** + * Closes the cluster client. After that client cannot be used and one should + * create a new client instance to be able to interact with Elasticsearch API. + */ + close: () => Promise; +} diff --git a/src/core/server/elasticsearch/client/index.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/index.ts similarity index 61% rename from src/core/server/elasticsearch/client/index.ts rename to packages/core/elasticsearch/core-elasticsearch-server/src/client/index.ts index b1630ec25c9ff..377d836508989 100644 --- a/src/core/server/elasticsearch/client/index.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/index.ts @@ -6,21 +6,17 @@ * Side Public License, v 1. */ -export type { ElasticsearchClient } from './types'; -export { ScopedClusterClient } from './scoped_cluster_client'; -export type { IScopedClusterClient } from './scoped_cluster_client'; -export type { ElasticsearchClientConfig } from './client_config'; -export { ClusterClient } from './cluster_client'; +export type { ElasticsearchClient } from './client'; export type { IClusterClient, ICustomClusterClient } from './cluster_client'; -export { configureClient } from './configure_client'; -export { getRequestDebugMeta, getErrorMessage } from './log_query_and_deprecation'; -export { retryCallCluster, migrationRetryCallCluster } from './retry_call_cluster'; +export type { ScopeableRequest, FakeRequest } from './scopeable_request'; +export type { IScopedClusterClient } from './scoped_cluster_client'; export type { + UnauthorizedErrorHandler, UnauthorizedErrorHandlerOptions, + UnauthorizedErrorHandlerResult, UnauthorizedErrorHandlerResultRetryParams, + UnauthorizedErrorHandlerToolkit, UnauthorizedErrorHandlerRetryResult, UnauthorizedErrorHandlerNotHandledResult, - UnauthorizedErrorHandlerResult, - UnauthorizedErrorHandlerToolkit, - UnauthorizedErrorHandler, -} from './retry_unauthorized'; +} from './unauthorized_error_handler'; +export type { ElasticsearchClientConfig, ElasticsearchClientSslConfig } from './client_config'; diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/client/scopeable_request.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/scopeable_request.ts new file mode 100644 index 0000000000000..ab0eed169d5a8 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/scopeable_request.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Headers, KibanaRequest } from '@kbn/core-http-server'; + +/** + * Fake request object created manually by Kibana plugins. + * @public + */ +export interface FakeRequest { + /** Headers used for authentication against Elasticsearch */ + headers: Headers; +} + +/** + A user credentials container. + * It accommodates the necessary auth credentials to impersonate the current user. + * + * @public + * See {@link KibanaRequest}. + */ +export type ScopeableRequest = KibanaRequest | FakeRequest; diff --git a/src/core/server/elasticsearch/client/scoped_cluster_client.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts similarity index 81% rename from src/core/server/elasticsearch/client/scoped_cluster_client.ts rename to packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts index 9ef77e200b0ed..4e3f7b6924e7c 100644 --- a/src/core/server/elasticsearch/client/scoped_cluster_client.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ElasticsearchClient } from './types'; +import { ElasticsearchClient } from './client'; /** * Serves the same purpose as the normal {@link IClusterClient | cluster client} but exposes @@ -28,11 +28,3 @@ export interface IScopedClusterClient { */ readonly asCurrentUser: ElasticsearchClient; } - -/** @internal **/ -export class ScopedClusterClient implements IScopedClusterClient { - constructor( - public readonly asInternalUser: ElasticsearchClient, - public readonly asCurrentUser: ElasticsearchClient - ) {} -} diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/client/unauthorized_error_handler.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/client/unauthorized_error_handler.ts new file mode 100644 index 0000000000000..3463e091a650c --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/client/unauthorized_error_handler.ts @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { MaybePromise } from '@kbn/utility-types'; +import type { UnauthorizedError } from '@kbn/es-errors'; +import type { AuthHeaders, KibanaRequest } from '@kbn/core-http-server'; + +/** + * @public + */ +export interface UnauthorizedErrorHandlerOptions { + error: UnauthorizedError; + request: KibanaRequest; +} + +/** + * @public + */ +export interface UnauthorizedErrorHandlerResultRetryParams { + authHeaders: AuthHeaders; +} + +/** + * @public + */ +export interface UnauthorizedErrorHandlerRetryResult + extends UnauthorizedErrorHandlerResultRetryParams { + type: 'retry'; +} + +/** + * @public + */ +export interface UnauthorizedErrorHandlerNotHandledResult { + type: 'notHandled'; +} + +/** + * @public + */ +export type UnauthorizedErrorHandlerResult = + | UnauthorizedErrorHandlerRetryResult + | UnauthorizedErrorHandlerNotHandledResult; + +/** + * Toolkit passed to a {@link UnauthorizedErrorHandler} used to generate responses from the handler + * @public + */ +export interface UnauthorizedErrorHandlerToolkit { + /** + * The handler cannot handle the error, or was not able to authenticate. + */ + notHandled: () => UnauthorizedErrorHandlerNotHandledResult; + /** + * The handler was able to authenticate. Will retry the failed request with new auth headers + */ + retry: (params: UnauthorizedErrorHandlerResultRetryParams) => UnauthorizedErrorHandlerRetryResult; +} + +/** + * A handler used to handle unauthorized error returned by elasticsearch + * + * @public + */ +export type UnauthorizedErrorHandler = ( + options: UnauthorizedErrorHandlerOptions, + toolkit: UnauthorizedErrorHandlerToolkit +) => MaybePromise; diff --git a/src/core/server/elasticsearch/types.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/contracts.ts similarity index 72% rename from src/core/server/elasticsearch/types.ts rename to packages/core/elasticsearch/core-elasticsearch-server/src/contracts.ts index 5caf4dabc4a5a..39fed7cbd2803 100644 --- a/src/core/server/elasticsearch/types.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/contracts.ts @@ -7,13 +7,13 @@ */ import { Observable } from 'rxjs'; -import type { Headers, KibanaRequest } from '@kbn/core-http-server'; -import { ElasticsearchConfig } from './elasticsearch_config'; -import { IClusterClient, ICustomClusterClient, ElasticsearchClientConfig } from './client'; -import { NodesVersionCompatibility } from './version_check/ensure_es_version'; -import { ServiceStatus } from '../status'; -import type { UnauthorizedErrorHandler } from './client/retry_unauthorized'; -import { ClusterInfo } from './get_cluster_info'; +import type { + IClusterClient, + ICustomClusterClient, + ElasticsearchClientConfig, + UnauthorizedErrorHandler, +} from './client'; +import { IElasticsearchConfig } from './elasticsearch_config'; /** * @public @@ -88,20 +88,10 @@ export interface ElasticsearchServiceSetup { * * @deprecated Can be removed when https://github.com/elastic/kibana/issues/119862 is done. */ - readonly config$: Observable; + readonly config$: Observable; }; } -/** @internal */ -export type InternalElasticsearchServicePreboot = ElasticsearchServicePreboot; - -/** @internal */ -export interface InternalElasticsearchServiceSetup extends ElasticsearchServiceSetup { - clusterInfo$: Observable; - esNodesCompatibility$: Observable; - status$: Observable>; -} - /** * @public */ @@ -138,36 +128,6 @@ export interface ElasticsearchServiceStart { ) => ICustomClusterClient; } -/** - * @internal - */ -export type InternalElasticsearchServiceStart = ElasticsearchServiceStart; - -/** @public */ -export interface ElasticsearchStatusMeta { - warningNodes: NodesVersionCompatibility['warningNodes']; - incompatibleNodes: NodesVersionCompatibility['incompatibleNodes']; - nodesInfoRequestError?: NodesVersionCompatibility['nodesInfoRequestError']; -} - -/** - * Fake request object created manually by Kibana plugins. - * @public - */ -export interface FakeRequest { - /** Headers used for authentication against Elasticsearch */ - headers: Headers; -} - -/** - A user credentials container. - * It accommodates the necessary auth credentials to impersonate the current user. - * - * @public - * See {@link KibanaRequest}. - */ -export type ScopeableRequest = KibanaRequest | FakeRequest; - /** * A limited set of Elasticsearch configuration entries exposed to the `preboot` plugins at `setup`. * diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts new file mode 100644 index 0000000000000..a0cd6a34cca89 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts @@ -0,0 +1,144 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Duration } from 'moment'; + +/** + * @public + */ +export interface IElasticsearchConfig { + /** + * The interval between health check requests Kibana sends to the Elasticsearch. + */ + readonly healthCheckDelay: Duration; + + /** + * Whether to allow kibana to connect to a non-compatible elasticsearch node. + */ + readonly ignoreVersionMismatch: boolean; + + /** + * Version of the Elasticsearch (6.7, 7.1 or `master`) client will be connecting to. + */ + readonly apiVersion: string; + + /** + * The maximum number of sockets that can be used for communications with elasticsearch. + */ + readonly maxSockets: number; + + /** + * Whether to use compression for communications with elasticsearch. + */ + readonly compression: boolean; + + /** + * Hosts that the client will connect to. If sniffing is enabled, this list will + * be used as seeds to discover the rest of your cluster. + */ + readonly hosts: string[]; + + /** + * List of Kibana client-side headers to send to Elasticsearch when request + * scoped cluster client is used. If this is an empty array then *no* client-side + * will be sent. + */ + readonly requestHeadersWhitelist: string[]; + + /** + * Timeout after which PING HTTP request will be aborted and retried. + */ + readonly pingTimeout: Duration; + + /** + * Timeout after which HTTP request will be aborted and retried. + */ + readonly requestTimeout: Duration; + + /** + * Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable. + */ + readonly shardTimeout: Duration; + + /** + * Specifies whether the client should attempt to detect the rest of the cluster + * when it is first instantiated. + */ + readonly sniffOnStart: boolean; + + /** + * Interval to perform a sniff operation and make sure the list of nodes is complete. + * If `false` then sniffing is disabled. + */ + readonly sniffInterval: false | Duration; + + /** + * Specifies whether the client should immediately sniff for a more current list + * of nodes when a connection dies. + */ + readonly sniffOnConnectionFault: boolean; + + /** + * If Elasticsearch is protected with basic authentication, this setting provides + * the username that the Kibana server uses to perform its administrative functions. + * Cannot be used in conjunction with serviceAccountToken. + */ + readonly username?: string; + + /** + * If Elasticsearch is protected with basic authentication, this setting provides + * the password that the Kibana server uses to perform its administrative functions. + */ + readonly password?: string; + + /** + * If Elasticsearch security features are enabled, this setting provides the service account + * token that the Kibana server users to perform its administrative functions. + * + * This is an alternative to specifying a username and password. + */ + readonly serviceAccountToken?: string; + + /** + * Header names and values to send to Elasticsearch with every request. These + * headers cannot be overwritten by client-side headers and aren't affected by + * `requestHeadersWhitelist` configuration. + */ + readonly customHeaders: Record; + + /** + * @internal + * Only valid in dev mode. Skip the valid connection check during startup. The connection check allows + * Kibana to ensure that the Elasticsearch connection is valid before allowing + * any other services to be set up. + * + * @remarks + * You should disable this check at your own risk: Other services in Kibana + * may fail if this step is not completed. + */ + readonly skipStartupConnectionCheck: boolean; + + /** + * Set of settings configure SSL connection between Kibana and Elasticsearch that + * are required when `xpack.ssl.verification_mode` in Elasticsearch is set to + * either `certificate` or `full`. + */ + readonly ssl: ElasticsearchSslConfig; +} + +/** + * @public + */ +export interface ElasticsearchSslConfig { + verificationMode: 'none' | 'certificate' | 'full'; + certificate?: string; + certificateAuthorities?: string[]; + key?: string; + keyPassphrase?: string; + alwaysPresentCertificate: boolean; +} diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/index.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/index.ts new file mode 100644 index 0000000000000..ad418bc2f5940 --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/index.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + ElasticsearchClient, + IScopedClusterClient, + IClusterClient, + ICustomClusterClient, + ScopeableRequest, + UnauthorizedErrorHandlerResult, + UnauthorizedErrorHandler, + UnauthorizedErrorHandlerRetryResult, + UnauthorizedErrorHandlerToolkit, + UnauthorizedErrorHandlerResultRetryParams, + UnauthorizedErrorHandlerNotHandledResult, + UnauthorizedErrorHandlerOptions, + FakeRequest, + ElasticsearchClientSslConfig, + ElasticsearchClientConfig, +} from './client'; + +export type { + ElasticsearchConfigPreboot, + ElasticsearchServicePreboot, + ElasticsearchServiceStart, + ElasticsearchServiceSetup, +} from './contracts'; +export type { IElasticsearchConfig, ElasticsearchSslConfig } from './elasticsearch_config'; +export type { ElasticsearchRequestHandlerContext } from './request_handler_context'; diff --git a/packages/kbn-pm/src/utils/errors.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/request_handler_context.ts similarity index 62% rename from packages/kbn-pm/src/utils/errors.ts rename to packages/core/elasticsearch/core-elasticsearch-server/src/request_handler_context.ts index c0e10623a3cef..af59db5c5d85b 100644 --- a/packages/kbn-pm/src/utils/errors.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/request_handler_context.ts @@ -6,8 +6,12 @@ * Side Public License, v 1. */ -export class CliError extends Error { - constructor(message: string, public readonly meta = {}) { - super(message); - } +import type { IScopedClusterClient } from './client'; + +/** + * Core's `elasticsearch` request handler context. + * @public + */ +export interface ElasticsearchRequestHandlerContext { + client: IScopedClusterClient; } diff --git a/packages/core/elasticsearch/core-elasticsearch-server/tsconfig.json b/packages/core/elasticsearch/core-elasticsearch-server/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/elasticsearch/core-elasticsearch-server/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/integrations/core-integrations-browser-internal/BUILD.bazel b/packages/core/integrations/core-integrations-browser-internal/BUILD.bazel new file mode 100644 index 0000000000000..dfe42f76679cd --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/BUILD.bazel @@ -0,0 +1,118 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-integrations-browser-internal" +PKG_REQUIRE_NAME = "@kbn/core-integrations-browser-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.css", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "@npm//moment-timezone", + ### test dependencies + "//packages/core/ui-settings/core-ui-settings-browser-mocks" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/moment-timezone", + "@npm//rxjs", + "//packages/core/base/core-base-browser-internal:npm_module_types", + "//packages/core/ui-settings/core-ui-settings-browser:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, + additional_args = [ + "--copy-files", + "--quiet" + ], +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/integrations/core-integrations-browser-internal/README.md b/packages/core/integrations/core-integrations-browser-internal/README.md new file mode 100644 index 0000000000000..03785889401bc --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-integrations-browser-internal + +Empty package generated by @kbn/generate diff --git a/packages/core/integrations/core-integrations-browser-internal/jest.config.js b/packages/core/integrations/core-integrations-browser-internal/jest.config.js new file mode 100644 index 0000000000000..b63782c426e7d --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/integrations/core-integrations-browser-internal'], +}; diff --git a/packages/core/integrations/core-integrations-browser-internal/package.json b/packages/core/integrations/core-integrations-browser-internal/package.json new file mode 100644 index 0000000000000..999e81599f4aa --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-integrations-browser-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/integrations/core-integrations-browser-internal/src/index.ts b/packages/core/integrations/core-integrations-browser-internal/src/index.ts new file mode 100644 index 0000000000000..8fe6e6ad49b61 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/src/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { IntegrationsService } from './integrations_service'; +export type { IntegrationsServiceSetupDeps } from './integrations_service'; diff --git a/src/core/public/integrations/integrations_service.test.mocks.ts b/packages/core/integrations/core-integrations-browser-internal/src/integrations_service.test.mocks.ts similarity index 100% rename from src/core/public/integrations/integrations_service.test.mocks.ts rename to packages/core/integrations/core-integrations-browser-internal/src/integrations_service.test.mocks.ts diff --git a/src/core/public/integrations/integrations_service.test.ts b/packages/core/integrations/core-integrations-browser-internal/src/integrations_service.test.ts similarity index 100% rename from src/core/public/integrations/integrations_service.test.ts rename to packages/core/integrations/core-integrations-browser-internal/src/integrations_service.test.ts diff --git a/src/core/public/integrations/integrations_service.ts b/packages/core/integrations/core-integrations-browser-internal/src/integrations_service.ts similarity index 90% rename from src/core/public/integrations/integrations_service.ts rename to packages/core/integrations/core-integrations-browser-internal/src/integrations_service.ts index ca01e1b86ce7e..a57049e636537 100644 --- a/src/core/public/integrations/integrations_service.ts +++ b/packages/core/integrations/core-integrations-browser-internal/src/integrations_service.ts @@ -12,7 +12,7 @@ import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { MomentService } from './moment'; import { StylesService } from './styles'; -export interface Deps { +export interface IntegrationsServiceSetupDeps { uiSettings: IUiSettingsClient; } @@ -26,7 +26,7 @@ export class IntegrationsService implements CoreService { await this.moment.setup(); } - public async start({ uiSettings }: Deps) { + public async start({ uiSettings }: IntegrationsServiceSetupDeps) { await this.styles.start({ uiSettings }); await this.moment.start({ uiSettings }); } diff --git a/src/core/public/integrations/moment/index.ts b/packages/core/integrations/core-integrations-browser-internal/src/moment/index.ts similarity index 100% rename from src/core/public/integrations/moment/index.ts rename to packages/core/integrations/core-integrations-browser-internal/src/moment/index.ts diff --git a/src/core/public/integrations/moment/moment_service.test.mocks.ts b/packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.test.mocks.ts similarity index 100% rename from src/core/public/integrations/moment/moment_service.test.mocks.ts rename to packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.test.mocks.ts diff --git a/src/core/public/integrations/moment/moment_service.test.ts b/packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.test.ts similarity index 100% rename from src/core/public/integrations/moment/moment_service.test.ts rename to packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.test.ts diff --git a/src/core/public/integrations/moment/moment_service.ts b/packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.ts similarity index 100% rename from src/core/public/integrations/moment/moment_service.ts rename to packages/core/integrations/core-integrations-browser-internal/src/moment/moment_service.ts diff --git a/src/core/public/integrations/styles/disable_animations.css b/packages/core/integrations/core-integrations-browser-internal/src/styles/disable_animations.css similarity index 92% rename from src/core/public/integrations/styles/disable_animations.css rename to packages/core/integrations/core-integrations-browser-internal/src/styles/disable_animations.css index 85fd9c2521f48..55cd2018bfcfd 100644 --- a/src/core/public/integrations/styles/disable_animations.css +++ b/packages/core/integrations/core-integrations-browser-internal/src/styles/disable_animations.css @@ -1,6 +1,6 @@ -/** +/** * `react-beautiful-dnd` relies on `transition` for functionality - * https://github.com/elastic/kibana/issues/95133 + * https://github.com/elastic/kibana/issues/95133 */ *:not(.essentialAnimation):not([data-rbd-draggable-context-id]):not([data-rbd-droppable-context-id]), *:not(.essentialAnimation):before, diff --git a/src/core/public/integrations/styles/index.ts b/packages/core/integrations/core-integrations-browser-internal/src/styles/index.ts similarity index 100% rename from src/core/public/integrations/styles/index.ts rename to packages/core/integrations/core-integrations-browser-internal/src/styles/index.ts diff --git a/src/core/public/integrations/styles/styles_service.test.ts b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts similarity index 100% rename from src/core/public/integrations/styles/styles_service.test.ts rename to packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.test.ts diff --git a/src/core/public/integrations/styles/styles_service.ts b/packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts similarity index 100% rename from src/core/public/integrations/styles/styles_service.ts rename to packages/core/integrations/core-integrations-browser-internal/src/styles/styles_service.ts diff --git a/packages/core/integrations/core-integrations-browser-internal/tsconfig.json b/packages/core/integrations/core-integrations-browser-internal/tsconfig.json new file mode 100644 index 0000000000000..d10eb479b3697 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-internal/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/integrations/core-integrations-browser-mocks/BUILD.bazel b/packages/core/integrations/core-integrations-browser-mocks/BUILD.bazel new file mode 100644 index 0000000000000..aafe81bd57993 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-mocks/BUILD.bazel @@ -0,0 +1,107 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-integrations-browser-mocks" +PKG_REQUIRE_NAME = "@kbn/core-integrations-browser-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/integrations/core-integrations-browser-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/integrations/core-integrations-browser-mocks/README.md b/packages/core/integrations/core-integrations-browser-mocks/README.md new file mode 100644 index 0000000000000..82ade1b873b36 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-integrations-browser-mocks + +This package contains the mocks from core's browser-side internal integration service. diff --git a/packages/core/integrations/core-integrations-browser-mocks/jest.config.js b/packages/core/integrations/core-integrations-browser-mocks/jest.config.js new file mode 100644 index 0000000000000..f58de84d459c0 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/integrations/core-integrations-browser-mocks'], +}; diff --git a/packages/core/integrations/core-integrations-browser-mocks/package.json b/packages/core/integrations/core-integrations-browser-mocks/package.json new file mode 100644 index 0000000000000..b3a20978cfd3d --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-mocks/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-integrations-browser-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/kbn-pm/src/index.ts b/packages/core/integrations/core-integrations-browser-mocks/src/index.ts similarity index 66% rename from packages/kbn-pm/src/index.ts rename to packages/core/integrations/core-integrations-browser-mocks/src/index.ts index d2f907a43db20..18651852fea94 100644 --- a/packages/kbn-pm/src/index.ts +++ b/packages/core/integrations/core-integrations-browser-mocks/src/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { run } from './cli'; -export { getProjects } from './utils/projects'; -export { Project } from './utils/project'; -export { getProjectPaths } from './config'; +export { integrationsServiceMock } from './integrations_service.mock'; +export type { + IntegrationsServiceContract, + IntegrationsServiceMock, +} from './integrations_service.mock'; diff --git a/src/core/public/integrations/integrations_service.mock.ts b/packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts similarity index 64% rename from src/core/public/integrations/integrations_service.mock.ts rename to packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts index 83a62acac279e..6cacfda6c8645 100644 --- a/src/core/public/integrations/integrations_service.mock.ts +++ b/packages/core/integrations/core-integrations-browser-mocks/src/integrations_service.mock.ts @@ -7,10 +7,12 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import { IntegrationsService } from './integrations_service'; +import type { IntegrationsService } from '@kbn/core-integrations-browser-internal'; -type IntegrationsServiceContract = PublicMethodsOf; -const createMock = (): jest.Mocked => ({ +export type IntegrationsServiceContract = PublicMethodsOf; +export type IntegrationsServiceMock = jest.Mocked; + +const createMock = (): IntegrationsServiceMock => ({ setup: jest.fn(), start: jest.fn(), stop: jest.fn(), diff --git a/packages/core/integrations/core-integrations-browser-mocks/tsconfig.json b/packages/core/integrations/core-integrations-browser-mocks/tsconfig.json new file mode 100644 index 0000000000000..d10eb479b3697 --- /dev/null +++ b/packages/core/integrations/core-integrations-browser-mocks/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts b/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts index ea1e5f92a7491..ec0d900773c56 100644 --- a/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts +++ b/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts @@ -50,7 +50,7 @@ export interface UiSettingsParams { /** used to group the configured setting in the UI */ category?: string[]; /** array of permitted values for this setting */ - options?: string[]; + options?: string[] | number[]; /** text labels for 'select' type UI element */ optionLabels?: Record; /** a flag indicating whether new value applying requires page reloading */ diff --git a/packages/elastic-apm-synthtrace/src/lib/apm/transaction.ts b/packages/elastic-apm-synthtrace/src/lib/apm/transaction.ts index 47924e49e9b84..7ca376824b638 100644 --- a/packages/elastic-apm-synthtrace/src/lib/apm/transaction.ts +++ b/packages/elastic-apm-synthtrace/src/lib/apm/transaction.ts @@ -40,6 +40,7 @@ export class Transaction extends BaseSpan { errors.forEach((error) => { error.fields['trace.id'] = this.fields['trace.id']; error.fields['transaction.id'] = this.fields['transaction.id']; + error.fields['transaction.name'] = this.fields['transaction.name']; error.fields['transaction.type'] = this.fields['transaction.type']; }); diff --git a/packages/elastic-safer-lodash-set/lodash/_baseSet.js b/packages/elastic-safer-lodash-set/lodash/_baseSet.js index 9cbf19808edd7..f2ac3351b5afa 100644 --- a/packages/elastic-safer-lodash-set/lodash/_baseSet.js +++ b/packages/elastic-safer-lodash-set/lodash/_baseSet.js @@ -5,7 +5,7 @@ * See `packages/elastic-safer-lodash-set/LICENSE` for more information. */ -/* eslint-disable */ +/* eslint-disable one-var,prettier/prettier,no-var,eqeqeq,no-nested-ternary */ var assignValue = require('lodash/_assignValue'), castPath = require('lodash/_castPath'), diff --git a/packages/elastic-safer-lodash-set/lodash/set.js b/packages/elastic-safer-lodash-set/lodash/set.js index 740f7c926ee40..e911e853d64fb 100644 --- a/packages/elastic-safer-lodash-set/lodash/set.js +++ b/packages/elastic-safer-lodash-set/lodash/set.js @@ -5,7 +5,7 @@ * See `packages/elastic-safer-lodash-set/LICENSE` for more information. */ -/* eslint-disable */ +/* eslint-disable no-var */ var baseSet = require('./_baseSet'); diff --git a/packages/elastic-safer-lodash-set/lodash/setWith.js b/packages/elastic-safer-lodash-set/lodash/setWith.js index 0ac4f4c9cf39f..0295c9ae137d6 100644 --- a/packages/elastic-safer-lodash-set/lodash/setWith.js +++ b/packages/elastic-safer-lodash-set/lodash/setWith.js @@ -5,7 +5,7 @@ * See `packages/elastic-safer-lodash-set/LICENSE` for more information. */ -/* eslint-disable */ +/* eslint-disable no-var,eqeqeq */ var baseSet = require('./_baseSet'); diff --git a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js index 751f93808f892..c27e96624a8b7 100644 --- a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js +++ b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js @@ -39,7 +39,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* eslint-disable */ +/* eslint-disable prettier/prettier,no-var,eqeqeq,no-use-before-define,block-scoped-var,no-undef, + guard-for-in,one-var,strict,no-redeclare,no-sequences,no-proto,new-cap,no-nested-ternary,no-unused-vars, + prefer-const,no-empty,no-extend-native,camelcase */ /* This file is loaded up as a blob by Brace to hand to Ace to load as Jsonp (hence the redefining of everything). It is based on the json diff --git a/packages/kbn-analytics/src/reporter.ts b/packages/kbn-analytics/src/reporter.ts index 93ef2c91d2589..eb9d6ea61f831 100644 --- a/packages/kbn-analytics/src/reporter.ts +++ b/packages/kbn-analytics/src/reporter.ts @@ -64,7 +64,7 @@ export class Reporter { private log(message: unknown) { if (this.debug) { - // eslint-disable-next-line + // eslint-disable-next-line no-console console.debug(message); } } diff --git a/packages/kbn-bazel-packages/src/bazel_package.ts b/packages/kbn-bazel-packages/src/bazel_package.ts index 930eed591a853..91e411770175b 100644 --- a/packages/kbn-bazel-packages/src/bazel_package.ts +++ b/packages/kbn-bazel-packages/src/bazel_package.ts @@ -30,12 +30,10 @@ export class BazelPackage { const pkg = readPackageJson(Path.resolve(dir, 'package.json')); let buildBazelContent; - if (pkg.name !== '@kbn/pm') { - try { - buildBazelContent = await Fsp.readFile(Path.resolve(dir, 'BUILD.bazel'), 'utf8'); - } catch (error) { - throw new Error(`unable to read BUILD.bazel file in [${dir}]: ${error.message}`); - } + try { + buildBazelContent = await Fsp.readFile(Path.resolve(dir, 'BUILD.bazel'), 'utf8'); + } catch (error) { + throw new Error(`unable to read BUILD.bazel file in [${dir}]: ${error.message}`); } return new BazelPackage(normalizePath(Path.relative(REPO_ROOT, dir)), pkg, buildBazelContent); diff --git a/packages/kbn-bazel-packages/src/parse_package_json.ts b/packages/kbn-bazel-packages/src/parse_package_json.ts index c3ad446b66823..b060656c0c512 100644 --- a/packages/kbn-bazel-packages/src/parse_package_json.ts +++ b/packages/kbn-bazel-packages/src/parse_package_json.ts @@ -24,6 +24,10 @@ export interface ParsedPackageJson { /** Is this package only intended for dev? */ devOnly?: boolean; }; + /** Scripts defined in the package.json file */ + scripts?: { + [key: string]: string | undefined; + }; /** All other fields in the package.json are typed as unknown as we don't care what they are */ [key: string]: unknown; } diff --git a/packages/kbn-bazel-runner/BUILD.bazel b/packages/kbn-bazel-runner/BUILD.bazel index 1f7c95fc9d2b4..2620e6b1ef783 100644 --- a/packages/kbn-bazel-runner/BUILD.bazel +++ b/packages/kbn-bazel-runner/BUILD.bazel @@ -7,6 +7,7 @@ PKG_REQUIRE_NAME = "@kbn/bazel-runner" SOURCE_FILES = glob( [ + "src/**/*.js", "src/**/*.ts", ], exclude = [ @@ -81,6 +82,7 @@ ts_project( args = ['--pretty'], srcs = SRCS, deps = TYPES_DEPS, + allow_js = True, declaration = True, declaration_map = True, emit_declaration_only = True, diff --git a/packages/kbn-bazel-runner/README.mdx b/packages/kbn-bazel-runner/README.mdx index 23459e6a5ba70..2e7e288bb198a 100644 --- a/packages/kbn-bazel-runner/README.mdx +++ b/packages/kbn-bazel-runner/README.mdx @@ -9,29 +9,38 @@ tags: ['kibana', 'dev', 'contributor', 'operations', 'bazel', 'runner'] This is a package with helpers for invoking bazel and iBazel commands, used everywhere we programmatically run bazel. -## async runBazel(options: BazelRunOptions) +## API + +### async runBazel(args: string[], options: BazelRunOptions) It runs bazel on the background with the given options -## async runIBazel(options: BazelRunOptions) +### async runIBazel(args: string[], options: BazelRunOptions) It runs a IBazel on the background with the given options -### BazelRunOptions +#### BazelRunOptions ``` { // a logger to print the command output - log: ToolingLog; - // the arguments to run the bazel or ibazel with - bazelArgs: string[]; + log: SomeDevLog; // run bazel with the no connection compatible config or not offline?: boolean; - // additional options to pass into execa process - execaOpts?: execa.Options; + // environment variables to set in process running Bazel + env?: Record; + // directory to run bazel in + cwd?: string; + // text to include at the beginning on each line of log output produced by bazel + logPrefix?: string; + // handler to implement custom error handling + onErrorExit?: (code: number) => void; } ``` -### execa.Options -Info around available execa options can be found [here](https://github.com/sindresorhus/execa/blob/9a157b3bc247b19d55cc6fbec77800a5ac348d19/readme.md#options) \ No newline at end of file +## NOTE: + +This code is needed in order to properly bootstrap the repository. As such, it can't have any NPM dependencies or require being built. This code is loaded directly into the node.js process that boostraps the repository from source while also being built into a package and exposed to the rest of the package system. Please consider this when making any changes to the source. + +The code is still type-checked as JS with JSDoc comments, and a single .ts file which provides interfaces to the JS validation and are publically available to package consumers. \ No newline at end of file diff --git a/packages/kbn-bazel-runner/src/bazel_runner.js b/packages/kbn-bazel-runner/src/bazel_runner.js new file mode 100644 index 0000000000000..257c7e695b312 --- /dev/null +++ b/packages/kbn-bazel-runner/src/bazel_runner.js @@ -0,0 +1,128 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const ChildProcess = require('child_process'); +const Readline = require('readline'); + +/** + * Print each line of output to the console + * @param {import('stream').Readable} stream + * @param {string | undefined} prefix + */ +async function printLines(stream, prefix) { + const int = Readline.createInterface({ + input: stream, + crlfDelay: Infinity, + }); + + for await (const line of int) { + console.log(prefix ? `${prefix} ${line}` : line); + } +} + +/** + * Buffer each line of output to an array so that it can be printed if necessary + * @param {import('stream').Readable} stream + * @param {string[]} buffer + */ +async function bufferLines(stream, buffer) { + const int = Readline.createInterface({ + input: stream, + crlfDelay: Infinity, + }); + + for await (const line of int) { + buffer.push(line); + } +} + +/** + * @param {import('events').EventEmitter} emitter + * @param {string} event + * @returns {Promise} + */ +function once(emitter, event) { + return new Promise((resolve) => { + emitter.once(event, resolve); + }); +} + +/** + * @param {'bazel' | 'ibazel'} runner + * @param {string[]} args + * @param {import('./types').BazelRunOptions | undefined} options + */ +async function runBazelRunner(runner, args, options = undefined) { + const proc = ChildProcess.spawn(runner, args, { + env: { + ...process.env, + ...options?.env, + }, + cwd: options?.cwd, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + /** @type {string[]} */ + const buffer = []; + + await Promise.all([ + options?.quiet + ? Promise.all([bufferLines(proc.stdout, buffer), bufferLines(proc.stderr, buffer)]) + : Promise.all([ + printLines(proc.stdout, options?.logPrefix), + printLines(proc.stderr, options?.logPrefix), + ]), + + // Wait for process to exit, or error + Promise.race([ + once(proc, 'exit').then((code) => { + if (typeof code !== 'number' || code === 0) { + return; + } + + if (options?.onErrorExit) { + options.onErrorExit(code, buffer.join('\n')); + } else { + throw new Error( + `The bazel command that was running exitted with code [${code}]${ + buffer.length ? `\n output:\n${buffer.map((l) => ` ${l}`).join('\n')}` : '' + }` + ); + } + }), + + once(proc, 'error').then((error) => { + throw error; + }), + ]), + ]); +} + +/** + * @param {string[]} args + * @param {import('./types').BazelRunOptions | undefined} options + */ +async function runBazel(args, options = undefined) { + return await runBazelRunner('bazel', args, options); +} + +/** + * @param {string[]} args + * @param {import('./types').BazelRunOptions | undefined} options + */ +async function runIBazel(args, options = undefined) { + return await runBazelRunner('ibazel', args, { + ...options, + env: { + IBAZEL_USE_LEGACY_WATCHER: '0', + ...options?.env, + }, + }); +} + +module.exports = { runBazel, runIBazel }; diff --git a/packages/kbn-bazel-runner/src/bazel_runner.ts b/packages/kbn-bazel-runner/src/bazel_runner.ts deleted file mode 100644 index a07ec35285872..0000000000000 --- a/packages/kbn-bazel-runner/src/bazel_runner.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import chalk from 'chalk'; -import execa from 'execa'; -import * as Rx from 'rxjs'; -import { tap } from 'rxjs/operators'; -import { ToolingLog } from '@kbn/tooling-log'; -import { observeLines } from '@kbn/stdio-dev-helpers'; - -type BazelCommandRunner = 'bazel' | 'ibazel'; - -interface BazelRunOptions { - log: ToolingLog; - bazelArgs: string[]; - offline?: boolean; - execaOpts?: execa.Options; -} - -async function runBazelCommandWithRunner(runner: BazelCommandRunner, options: BazelRunOptions) { - const bazelProc = execa( - runner, - options.offline ? [...options.bazelArgs, '--config=offline'] : options.bazelArgs, - { - ...options.execaOpts, - stdio: 'pipe', - preferLocal: true, - } - ); - - await Promise.all([ - // Bazel outputs machine readable output into stdout and human readable output goes to stderr. - // Therefore we need to get both. In order to get errors we need to parse the actual text line - Rx.lastValueFrom( - Rx.merge( - observeLines(bazelProc.stdout!).pipe( - tap((line) => options.log.info(`${chalk.cyan(`[${runner}]`)} ${line}`)) - ), - observeLines(bazelProc.stderr!).pipe( - tap((line) => options.log.info(`${chalk.cyan(`[${runner}]`)} ${line}`)) - ) - ).pipe(Rx.defaultIfEmpty(undefined)) - ), - - // Wait for process and logs to finish, unsubscribing in the end - bazelProc.catch(() => { - options.log.error( - 'HINT: If experiencing problems with node_modules try `yarn kbn bootstrap --force-install` or as last resort `yarn kbn reset && yarn kbn bootstrap`' - ); - - throw new Error(`The bazel command that was running failed to complete.`); - }), - ]); -} - -export async function runBazel(options: BazelRunOptions) { - await runBazelCommandWithRunner('bazel', options); -} - -export async function runIBazel(options: BazelRunOptions) { - await runBazelCommandWithRunner('ibazel', { - ...options, - execaOpts: { - ...options.execaOpts, - env: { - ...options.execaOpts?.env, - IBAZEL_USE_LEGACY_WATCHER: '0', - }, - }, - }); -} diff --git a/packages/kbn-pm/src/utils/bazel/index.ts b/packages/kbn-bazel-runner/src/index.js similarity index 77% rename from packages/kbn-pm/src/utils/bazel/index.ts rename to packages/kbn-bazel-runner/src/index.js index d1460d5598f55..cc7af490e8fd0 100644 --- a/packages/kbn-pm/src/utils/bazel/index.ts +++ b/packages/kbn-bazel-runner/src/index.js @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export * from './get_cache_folders'; -export * from './install_tools'; -export * from './yarn'; +const { runBazel, runIBazel } = require('./bazel_runner'); + +module.exports = { runBazel, runIBazel }; diff --git a/packages/kbn-bazel-runner/src/types.ts b/packages/kbn-bazel-runner/src/types.ts new file mode 100644 index 0000000000000..23d9ed3473fbe --- /dev/null +++ b/packages/kbn-bazel-runner/src/types.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Options that can be used to customize how Bazel is run + */ +export interface BazelRunOptions { + /** + * Current working directory to run bazel in + */ + cwd?: string; + /** + * Custom environment variables to define for the bazel process + */ + env?: Record; + /** + * Prevent logging bazel output unless there is something wrong + */ + quiet?: boolean; + /** + * Prefix to write before each line of output, does nothing if `quiet` is true. + */ + logPrefix?: string; + /** + * Error handler which can be used to throw custom error types when bazel failes. Output will + * be empty unless `quiet` is true + */ + onErrorExit?: (core: number, output: string) => void; +} diff --git a/packages/kbn-bazel-runner/tsconfig.json b/packages/kbn-bazel-runner/tsconfig.json index 789c6b3111115..9f78bc243ac66 100644 --- a/packages/kbn-bazel-runner/tsconfig.json +++ b/packages/kbn-bazel-runner/tsconfig.json @@ -4,6 +4,8 @@ "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, + "allowJs": true, + "checkJs": true, "outDir": "target_types", "rootDir": "src", "stripInternal": false, diff --git a/packages/kbn-ci-stats-core/BUILD.bazel b/packages/kbn-ci-stats-core/BUILD.bazel index 0ffe582109949..c9320c4f3b20a 100644 --- a/packages/kbn-ci-stats-core/BUILD.bazel +++ b/packages/kbn-ci-stats-core/BUILD.bazel @@ -52,6 +52,7 @@ TYPES_DEPS = [ "@npm//@types/node", "@npm//@types/jest", "//packages/kbn-tooling-log:npm_module_types", + "//packages/kbn-some-dev-log:npm_module_types", ] jsts_transpiler( diff --git a/packages/kbn-ci-stats-core/src/ci_stats_config.ts b/packages/kbn-ci-stats-core/src/ci_stats_config.ts index c97d99c53bf6a..8bef950324d87 100644 --- a/packages/kbn-ci-stats-core/src/ci_stats_config.ts +++ b/packages/kbn-ci-stats-core/src/ci_stats_config.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { ToolingLog } from '@kbn/tooling-log'; +import { SomeDevLog } from '@kbn/some-dev-log'; /** * Information about how CiStatsReporter should talk to the ci-stats service. Normally @@ -23,7 +23,7 @@ export interface Config { buildId: string; } -function validateConfig(log: ToolingLog, config: { [k in keyof Config]: unknown }) { +function validateConfig(log: SomeDevLog, config: { [k in keyof Config]: unknown }) { const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; if (!validApiToken) { log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api token, stats will not be reported'); @@ -39,7 +39,7 @@ function validateConfig(log: ToolingLog, config: { [k in keyof Config]: unknown return config as Config; } -export function parseConfig(log: ToolingLog) { +export function parseConfig(log: SomeDevLog) { const configJson = process.env.KIBANA_CI_STATS_CONFIG; if (!configJson) { log.debug('KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter'); diff --git a/packages/kbn-ci-stats-reporter/BUILD.bazel b/packages/kbn-ci-stats-reporter/BUILD.bazel index d3fd4780dc2ab..2e6e85c6a7c26 100644 --- a/packages/kbn-ci-stats-reporter/BUILD.bazel +++ b/packages/kbn-ci-stats-reporter/BUILD.bazel @@ -58,6 +58,7 @@ TYPES_DEPS = [ "@npm//@types/jest", "//packages/kbn-tooling-log:npm_module_types", "//packages/kbn-ci-stats-core:npm_module_types", + "//packages/kbn-some-dev-log:npm_module_types", ] jsts_transpiler( diff --git a/packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts b/packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts index 7a23f20143d94..ecc6221250bec 100644 --- a/packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts +++ b/packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts @@ -14,11 +14,13 @@ import crypto from 'crypto'; import execa from 'execa'; import Axios, { AxiosRequestConfig } from 'axios'; +import { REPO_ROOT, kibanaPackageJson } from '@kbn/utils'; +import { parseConfig, Config, CiStatsMetadata } from '@kbn/ci-stats-core'; +import type { SomeDevLog } from '@kbn/some-dev-log'; + // @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things import httpAdapter from 'axios/lib/adapters/http'; -import { ToolingLog } from '@kbn/tooling-log'; -import { parseConfig, Config, CiStatsMetadata } from '@kbn/ci-stats-core'; import type { CiStatsTestGroupInfo, CiStatsTestRun } from './ci_stats_test_group_types'; const BASE_URL = 'https://ci-stats.kibana.dev'; @@ -119,11 +121,11 @@ export class CiStatsReporter { /** * Create a CiStatsReporter by inspecting the ENV for the necessary config */ - static fromEnv(log: ToolingLog) { + static fromEnv(log: SomeDevLog) { return new CiStatsReporter(parseConfig(log), log); } - constructor(private readonly config: Config | undefined, private readonly log: ToolingLog) {} + constructor(private readonly config: Config | undefined, private readonly log: SomeDevLog) {} /** * Determine if CI_STATS is explicitly disabled by the environment. To determine @@ -327,28 +329,16 @@ export class CiStatsReporter { } /** - * In order to allow this code to run before @kbn/utils is built, @kbn/pm will pass - * in the upstreamBranch when calling the timings() method. Outside of @kbn/pm - * we rely on @kbn/utils to find the package.json file. + * In order to allow this code to run before @kbn/utils is built */ private getUpstreamBranch() { - // specify the module id in a way that will keep webpack from bundling extra code into @kbn/pm - const hideFromWebpack = ['@', 'kbn/utils']; - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { kibanaPackageJson } = require(hideFromWebpack.join('')); return kibanaPackageJson.branch; } /** - * In order to allow this code to run before @kbn/utils is built, @kbn/pm will pass - * in the kibanaUuid when calling the timings() method. Outside of @kbn/pm - * we rely on @kbn/utils to find the repo root. + * In order to allow this code to run before @kbn/utils is built */ private getKibanaUuid() { - // specify the module id in a way that will keep webpack from bundling extra code into @kbn/pm - const hideFromWebpack = ['@', 'kbn/utils']; - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { REPO_ROOT } = require(hideFromWebpack.join('')); try { return Fs.readFileSync(Path.resolve(REPO_ROOT, 'data/uuid'), 'utf-8').trim(); } catch (error) { diff --git a/packages/kbn-cli-dev-mode/jest.config.js b/packages/kbn-cli-dev-mode/jest.config.js index d04dc571ef2a0..463170417d609 100644 --- a/packages/kbn-cli-dev-mode/jest.config.js +++ b/packages/kbn-cli-dev-mode/jest.config.js @@ -7,7 +7,7 @@ */ module.exports = { - preset: '@kbn/test', + preset: '@kbn/test/jest_node', rootDir: '../..', roots: ['/packages/kbn-cli-dev-mode'], }; diff --git a/packages/kbn-cli-dev-mode/jest.integration.config.js b/packages/kbn-cli-dev-mode/jest.integration.config.js new file mode 100644 index 0000000000000..a6ee6e92a5c47 --- /dev/null +++ b/packages/kbn-cli-dev-mode/jest.integration.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_integration_node', + rootDir: '../..', + roots: ['/packages/kbn-cli-dev-mode'], +}; diff --git a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts b/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts similarity index 99% rename from packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts rename to packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts index 34c6be02847a7..663f4f8b04b97 100644 --- a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts +++ b/packages/kbn-cli-dev-mode/src/integration_tests/base_path_proxy_server.test.ts @@ -18,9 +18,9 @@ import { } from '@kbn/server-http-tools'; import { ByteSizeValue } from '@kbn/config-schema'; -import { BasePathProxyServer, BasePathProxyServerOptions } from './base_path_proxy_server'; -import { DevConfig } from './config/dev_config'; -import { TestLog } from './log'; +import { BasePathProxyServer, BasePathProxyServerOptions } from '../base_path_proxy_server'; +import { DevConfig } from '../config/dev_config'; +import { TestLog } from '../log'; describe('BasePathProxyServer', () => { let server: Server; diff --git a/packages/kbn-dev-cli-runner/README.md b/packages/kbn-dev-cli-runner/README.mdx similarity index 93% rename from packages/kbn-dev-cli-runner/README.md rename to packages/kbn-dev-cli-runner/README.mdx index 0ef87f0e8e078..cb4582cc9e735 100644 --- a/packages/kbn-dev-cli-runner/README.md +++ b/packages/kbn-dev-cli-runner/README.mdx @@ -1,8 +1,17 @@ -# @kbn/dev-cli-runner +--- +id: kibDevDocsOpsDevCliRunner +slug: /kibana-dev-docs/ops/kbn-dev-cli-runner +title: "@kbn/dev-cli-runner" +description: 'Helper functions for writing little scripts for random build/ci/dev tasks' +date: 2022-07-14 +tags: ['kibana', 'dev', 'contributor', 'operations', 'packages', 'scripts', 'cli'] +--- + +## @kbn/dev-cli-runner Helper functions for writing little scripts for random build/ci/dev tasks. -## Usage +### Usage Define the function that should validate the CLI arguments and call your task fn: @@ -63,7 +72,7 @@ $ node scripts/my_task # ``` -## API +### API - ***`run(fn: async ({ flags: Flags, log: ToolingLog, addCleanupTask }) => Promise, options: Options)`*** diff --git a/packages/kbn-es-query/src/filters/build_filters/types.ts b/packages/kbn-es-query/src/filters/build_filters/types.ts index 3f6d586feed98..30d44fd0b1cba 100644 --- a/packages/kbn-es-query/src/filters/build_filters/types.ts +++ b/packages/kbn-es-query/src/filters/build_filters/types.ts @@ -49,7 +49,7 @@ export enum FilterStateStore { GLOBAL_STATE = 'globalState', } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type FilterMeta = { alias?: string | null; disabled?: boolean; @@ -67,7 +67,7 @@ export type FilterMeta = { value?: string; }; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type Filter = { $state?: { store: FilterStateStore; @@ -76,7 +76,7 @@ export type Filter = { query?: Record; }; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type Query = { query: string | { [key: string]: any }; language: string; diff --git a/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js b/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js index c29ee0934ed4c..418788052a5a3 100644 --- a/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js +++ b/packages/kbn-es-query/src/kuery/grammar/__mocks__/grammar.js @@ -9,7 +9,7 @@ // Generated by Peggy 1.2.0. // // https://peggyjs.org/ -/* eslint-disable */ +/* eslint-disable prettier/prettier,no-var,strict,no-use-before-define,one-var,no-undef,no-unused-vars,new-cap */ "use strict"; diff --git a/packages/kbn-eslint-config/.eslintrc.js b/packages/kbn-eslint-config/.eslintrc.js index 5a9d49934c255..f8db0bf504cf8 100644 --- a/packages/kbn-eslint-config/.eslintrc.js +++ b/packages/kbn-eslint-config/.eslintrc.js @@ -9,6 +9,7 @@ module.exports = { ], plugins: [ + '@kbn/eslint-plugin-disable', '@kbn/eslint-plugin-eslint', '@kbn/eslint-plugin-imports', 'prettier', @@ -232,6 +233,7 @@ module.exports = { }, ]], + '@kbn/disable/no_naked_eslint_disable': 'error', '@kbn/eslint/no_async_promise_body': 'error', '@kbn/eslint/no_async_foreach': 'error', '@kbn/eslint/no_trailing_import_slash': 'error', diff --git a/packages/kbn-eslint-config/BUILD.bazel b/packages/kbn-eslint-config/BUILD.bazel index 6eb7ff7c723ac..73f834f7d5f63 100644 --- a/packages/kbn-eslint-config/BUILD.bazel +++ b/packages/kbn-eslint-config/BUILD.bazel @@ -27,6 +27,7 @@ NPM_MODULE_EXTRA_FILES = [ RUNTIME_DEPS = [ "//packages/kbn-babel-preset", "//packages/kbn-dev-utils", + "//packages/kbn-eslint-plugin-disable", "//packages/kbn-eslint-plugin-imports", "@npm//eslint-config-prettier", "@npm//semver", diff --git a/packages/kbn-eslint-config/javascript.js b/packages/kbn-eslint-config/javascript.js index 3e59731caa314..d048d9a93bdda 100644 --- a/packages/kbn-eslint-config/javascript.js +++ b/packages/kbn-eslint-config/javascript.js @@ -7,7 +7,7 @@ module.exports = { * Main JS configuration */ { - files: ['**/*.js'], + files: ['**/*.js', '**/*.mjs'], parser: require.resolve('@babel/eslint-parser'), plugins: [ diff --git a/packages/kbn-eslint-plugin-disable/BUILD.bazel b/packages/kbn-eslint-plugin-disable/BUILD.bazel new file mode 100644 index 0000000000000..a5e1cc6b04fde --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/BUILD.bazel @@ -0,0 +1,117 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-eslint-plugin-disable" +PKG_REQUIRE_NAME = "@kbn/eslint-plugin-disable" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ + "@npm//eslint", +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "@npm//@types/eslint", + "@npm//@types/jest", + "@npm//@types/node", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-eslint-plugin-disable/README.mdx b/packages/kbn-eslint-plugin-disable/README.mdx new file mode 100644 index 0000000000000..6f9abdfb7474b --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/README.mdx @@ -0,0 +1,13 @@ +--- +id: kibDevDocsOpsEslintPluginDisable +slug: /kibana-dev-docs/ops/kbn-eslint-plugin-disable +title: "@kbn/eslint-plugin-disable" +description: Custom ESLint rules for managing eslint rules disable in the Kibana repository +tags: ['kibana', 'dev', 'contributor', 'operations', 'eslint', 'disable'] +--- + +`@kbn/eslint-plugin-disable` is an ESLint plugin providing custom rules to allow us to enforce specific eslint rules behaviours around eslint disables that we need to implement Bazel packages across the monorepo as our main development unit. + +## `@kbn/disable/no_naked_eslint_disable` + +Disallows the usage of naked eslint-disable comments without being specific about each rule to disable. \ No newline at end of file diff --git a/packages/kbn-eslint-plugin-disable/jest.config.js b/packages/kbn-eslint-plugin-disable/jest.config.js new file mode 100644 index 0000000000000..b2651bee84f2a --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-eslint-plugin-disable'], +}; diff --git a/packages/kbn-eslint-plugin-disable/package.json b/packages/kbn-eslint-plugin-disable/package.json new file mode 100644 index 0000000000000..f7dc82db82217 --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/eslint-plugin-disable", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/kbn-eslint-plugin-disable/src/index.ts b/packages/kbn-eslint-plugin-disable/src/index.ts new file mode 100644 index 0000000000000..0e42d6325e42f --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { NoNakedESLintDisableRule } from './rules/no_naked_eslint_disable'; + +/** + * Custom ESLint rules, add `'@kbn/eslint-plugin-disable'` to your eslint config to use them + * @internal + */ +export const rules = { + no_naked_eslint_disable: NoNakedESLintDisableRule, +}; diff --git a/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.test.ts b/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.test.ts new file mode 100644 index 0000000000000..1149150d023b5 --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.test.ts @@ -0,0 +1,277 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import dedent from 'dedent'; +import { RuleTester } from 'eslint'; +import { NoNakedESLintDisableRule, NAKED_DISABLE_MSG_ID } from './no_naked_eslint_disable'; + +const tsTester = [ + '@typescript-eslint/parser', + new RuleTester({ + parser: require.resolve('@typescript-eslint/parser'), + parserOptions: { + sourceType: 'module', + ecmaVersion: 2018, + ecmaFeatures: { + jsx: true, + }, + }, + }), +] as const; + +const babelTester = [ + '@babel/eslint-parser', + new RuleTester({ + parser: require.resolve('@babel/eslint-parser'), + parserOptions: { + sourceType: 'module', + ecmaVersion: 2018, + requireConfigFile: false, + babelOptions: { + presets: ['@kbn/babel-preset/node_preset'], + }, + }, + }), +] as const; + +for (const [name, tester] of [tsTester, babelTester]) { + describe(name, () => { + tester.run('@kbn/disable/no_naked_eslint_disable', NoNakedESLintDisableRule, { + valid: [ + { + filename: 'foo.ts', + code: dedent` + // eslint-disable no-var + `, + }, + { + filename: 'foo.ts', + code: dedent` + // eslint-disable-next-line no-use-before-define + `, + }, + { + filename: 'foo.ts', + code: dedent` + // eslint-disable-line no-use-before-define + `, + }, + { + filename: 'foo.ts', + code: dedent` + /* eslint-disable no-var */ + `, + }, + { + filename: 'foo.ts', + code: dedent` + /* eslint-disable no-console, no-control-regex*/ + `, + }, + { + filename: 'foo.ts', + code: dedent` + alert('foo'); // eslint-disable-line no-alert + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + /* eslint-disable no-alert */ + alert(foo); + /* eslint-enable no-alert */ + bar += 'r'; + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + /* eslint-disable-next-line no-alert */ + alert(foo); + bar += 'r'; + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + alert(foo);/* eslint-disable-line no-alert */ + bar += 'r'; + `, + }, + ], + + invalid: [ + { + filename: 'foo.ts', + code: dedent` + /* eslint-disable */ + const a = 1; + `, + errors: [ + { + line: 1, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: '\nconst a = 1;', + }, + { + filename: 'foo.ts', + code: dedent` + // eslint-disable-next-line + const a = 1; + `, + errors: [ + { + line: 1, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: `\nconst a = 1;`, + }, + { + filename: 'foo.ts', + code: dedent` + /* eslint-disable */ + `, + errors: [ + { + line: 1, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: '', + }, + { + filename: 'foo.ts', + code: dedent` + // eslint-disable-next-line + `, + errors: [ + { + line: 1, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: '', + }, + { + filename: 'foo.ts', + code: dedent` + alert('foo');// eslint-disable-line + `, + errors: [ + { + line: 1, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: `alert('foo');`, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + /* eslint-disable */ + alert(foo); + /* eslint-enable */ + bar += 'r'; + `, + errors: [ + { + line: 3, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: dedent` + const foo = 'foo'; + let bar = 'ba'; + + alert(foo); + /* eslint-enable */ + bar += 'r'; + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + /* eslint-disable */ + alert(foo); + bar += 'r'; + `, + errors: [ + { + line: 3, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: dedent` + const foo = 'foo'; + let bar = 'ba'; + + alert(foo); + bar += 'r'; + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + /* eslint-disable-next-line */ + alert(foo); + bar += 'r'; + `, + errors: [ + { + line: 3, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: dedent` + const foo = 'foo'; + let bar = 'ba'; + + alert(foo); + bar += 'r'; + `, + }, + { + filename: 'foo.ts', + code: dedent` + const foo = 'foo'; + let bar = 'ba'; + alert(foo);/* eslint-disable-line */ + bar += 'r'; + `, + errors: [ + { + line: 3, + messageId: NAKED_DISABLE_MSG_ID, + }, + ], + output: dedent` + const foo = 'foo'; + let bar = 'ba'; + alert(foo); + bar += 'r'; + `, + }, + ], + }); + }); +} diff --git a/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.ts b/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.ts new file mode 100644 index 0000000000000..7fdc7ec851771 --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/src/rules/no_naked_eslint_disable.ts @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Eslint from 'eslint'; + +export const NAKED_DISABLE_MSG_ID = 'no-naked-eslint-disable'; +const messages = { + [NAKED_DISABLE_MSG_ID]: + 'Using a naked eslint disable is not allowed. Please specify the specific rules to disable.', +}; + +const meta: Eslint.Rule.RuleMetaData = { + type: 'problem', + fixable: 'code', + docs: { + description: + 'Prevents declaring naked eslint-disable* comments who do not provide specific rules to disable', + }, + messages, +}; + +const ESLINT_DISABLE_RE = + /^eslint-disable(?:-next-line|-line)?(?$|(?:\s+(?:@(?:[\w-]+\/){1,2})?[\w-]+)?)/; + +const create = (context: Eslint.Rule.RuleContext): Eslint.Rule.RuleListener => { + return { + Program(node) { + const nodeComments = node.comments || []; + + nodeComments.forEach((comment) => { + const commentVal = comment.value.trim(); + const nakedESLintRegexResult = commentVal.match(ESLINT_DISABLE_RE); + const ruleName = nakedESLintRegexResult?.groups?.ruleName; + + // no regex match, exit early + if (!nakedESLintRegexResult) { + return; + } + + // we have a rule name, exit early + if (ruleName) { + return; + } + + const cStart = comment?.loc?.start; + const cEnd = comment?.loc?.end; + const cStartLine = comment?.loc?.start?.line; + + // start or end loc is undefined, exit early + if (cStart === undefined || cEnd === undefined || cStartLine === undefined) { + return; + } + + const disableStartsOnNextLine = comment.value.includes('disable-next-line'); + const disableStartsInline = comment.value.includes('disable-line'); + const cStartColumn = comment?.loc?.start?.column ?? 0; + const reportLoc = disableStartsOnNextLine + ? { start: cStart, end: cEnd } + : { + // At this point we could have eslint-disable block or an eslint-disable-line. + // If we have an inline disable we need to report the column as -1 in order to get the report + start: { line: cStartLine, column: disableStartsInline ? -1 : cStartColumn - 1 }, + end: cEnd, + }; + + // At this point we have a regex match, no rule name and a valid loc so lets report here + context.report({ + node, + loc: reportLoc, + messageId: NAKED_DISABLE_MSG_ID, + fix(fixer) { + return fixer.removeRange(comment.range as Eslint.AST.Range); + }, + }); + }); + }, + }; +}; + +export const NoNakedESLintDisableRule: Eslint.Rule.RuleModule = { + meta, + create, +}; diff --git a/packages/kbn-eslint-plugin-disable/tsconfig.json b/packages/kbn-eslint-plugin-disable/tsconfig.json new file mode 100644 index 0000000000000..789c6b3111115 --- /dev/null +++ b/packages/kbn-eslint-plugin-disable/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/client/a.js b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/client/a.js index d15de7d98a9e0..32143a7d5f46a 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/client/a.js +++ b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/client/a.js @@ -1 +1 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header */ diff --git a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/b.js b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/b.js index d15de7d98a9e0..32143a7d5f46a 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/b.js +++ b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/b.js @@ -1 +1 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header */ diff --git a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/c.js b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/c.js index d15de7d98a9e0..32143a7d5f46a 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/c.js +++ b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/c.js @@ -1 +1 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header */ diff --git a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/deep/d.js b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/deep/d.js index d15de7d98a9e0..32143a7d5f46a 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/deep/d.js +++ b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/deep/d.js @@ -1 +1 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header */ diff --git a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/index_patterns/index.js b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/index_patterns/index.js index d15de7d98a9e0..32143a7d5f46a 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/index_patterns/index.js +++ b/packages/kbn-eslint-plugin-eslint/rules/__fixtures__/no_restricted_paths/server/index_patterns/index.js @@ -1 +1 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header */ diff --git a/packages/kbn-expect/expect.d.ts b/packages/kbn-expect/expect.d.ts index b957a1f9ab109..7126ae1996126 100644 --- a/packages/kbn-expect/expect.d.ts +++ b/packages/kbn-expect/expect.d.ts @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header,import/no-default-export,@typescript-eslint/adjacent-overload-signatures,@typescript-eslint/unified-signatures */ // Type definitions for expect.js 0.3.1 // Project: https://github.com/Automattic/expect.js diff --git a/packages/kbn-expect/expect.js b/packages/kbn-expect/expect.js index bc75d19d2ab1f..8a7d1802a7e0e 100644 --- a/packages/kbn-expect/expect.js +++ b/packages/kbn-expect/expect.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header,no-var,prettier/prettier,eqeqeq,block-scoped-var,no-redeclare,one-var,no-loop-func,dot-notation,no-nested-ternary,camelcase,no-unused-vars,no-undef */ var exports = module.exports; diff --git a/packages/kbn-i18n/src/core/locales.js b/packages/kbn-i18n/src/core/locales.js index 1af06b2f9eea1..a989dfa6fe3c1 100644 --- a/packages/kbn-i18n/src/core/locales.js +++ b/packages/kbn-i18n/src/core/locales.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header,prettier/prettier,eqeqeq,no-nested-ternary,one-var,no-var */ // Copied from https://github.com/yahoo/intl-relativeformat/tree/master/dist/locale-data diff --git a/packages/kbn-monaco/src/xjson/grammar.ts b/packages/kbn-monaco/src/xjson/grammar.ts index 5d26e92f005ba..6b2f3db0edcef 100644 --- a/packages/kbn-monaco/src/xjson/grammar.ts +++ b/packages/kbn-monaco/src/xjson/grammar.ts @@ -24,7 +24,7 @@ export interface ParseResult { annotations: Annotation[]; } -/* eslint-disable */ +/* eslint-disable prettier/prettier,no-var,prefer-const,no-throw-literal,@typescript-eslint/no-shadow,one-var,@typescript-eslint/no-unused-expressions,object-shorthand,eqeqeq */ export const createParser = () => { 'use strict'; diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 876bc347a21c5..13e342356a2bc 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -166,8 +166,8 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker: loader: 'postcss-loader', options: { sourceMap: !worker.dist, - config: { - path: require.resolve('@kbn/optimizer/postcss.config.js'), + postcssOptions: { + config: require.resolve('@kbn/optimizer/postcss.config.js'), }, }, }, diff --git a/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts b/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts index d115b2f3bbabd..83ba9a16e851b 100644 --- a/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts +++ b/packages/kbn-performance-testing-dataset-extractor/src/es_client.ts @@ -8,6 +8,8 @@ import { Client } from '@elastic/elasticsearch'; import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import { SearchRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { ToolingLog } from '@kbn/tooling-log'; interface ClientOptions { node: string; @@ -81,7 +83,7 @@ const addRangeFilter = (range: { startTime: string; endTime: string }): QueryDsl }; }; -export function initClient(options: ClientOptions) { +export function initClient(options: ClientOptions, log: ToolingLog) { const client = new Client({ node: options.node, auth: { @@ -119,8 +121,9 @@ export function initClient(options: ClientOptions) { const queryFilters = filters.map((filter) => addBooleanFilter(filter)); return await this.getTransactions(queryFilters); }, + async getTransactions(queryFilters: QueryDslQueryContainer[]) { - const result = await client.search({ + const searchRequest: SearchRequest = { body: { track_total_hits: true, sort: [ @@ -149,7 +152,11 @@ export function initClient(options: ClientOptions) { }, }, }, - }); + }; + + log.debug(`Search request: ${JSON.stringify(searchRequest)}`); + const result = await client.search(searchRequest); + log.debug(`Search result: ${JSON.stringify(result)}`); return result?.hits?.hits; }, }; diff --git a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts index 1e2b1234c52cc..1335f6c4b47c5 100644 --- a/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts +++ b/packages/kbn-performance-testing-dataset-extractor/src/extractor.ts @@ -107,7 +107,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => { log.info( `Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'` ); - const esClient = initClient(authOptions); + const esClient = initClient(authOptions, log); const ftrTransactionHits = await esClient.getFtrTransactions(buildId, journeyName); if (!ftrTransactionHits || ftrTransactionHits.length === 0) { log.warning( diff --git a/packages/kbn-plugin-discovery/BUILD.bazel b/packages/kbn-plugin-discovery/BUILD.bazel index b2e5ecde9c426..a051005a61ef2 100644 --- a/packages/kbn-plugin-discovery/BUILD.bazel +++ b/packages/kbn-plugin-discovery/BUILD.bazel @@ -7,6 +7,7 @@ PKG_REQUIRE_NAME = "@kbn/plugin-discovery" SOURCE_FILES = glob( [ + "src/**/*.js", "src/**/*.ts", ], exclude = [ @@ -36,10 +37,6 @@ NPM_MODULE_EXTRA_FILES = [ # "@npm//name-of-package" # eg. "@npm//lodash" RUNTIME_DEPS = [ - "@npm//globby", - "@npm//load-json-file", - "@npm//normalize-path", - "@npm//tslib", ] # In this array place dependencies necessary to build the types, which will include the @@ -54,11 +51,6 @@ RUNTIME_DEPS = [ TYPES_DEPS = [ "@npm//@types/jest", "@npm//@types/node", - "@npm//@types/normalize-path", - "@npm//globby", - "@npm//load-json-file", - "@npm//normalize-path", - "@npm//tslib", ] jsts_transpiler( @@ -83,6 +75,7 @@ ts_project( deps = TYPES_DEPS, declaration = True, declaration_map = True, + allow_js = True, emit_declaration_only = True, out_dir = "target_types", root_dir = "src", diff --git a/packages/kbn-plugin-discovery/README.mdx b/packages/kbn-plugin-discovery/README.mdx index 973db3fb2a1e1..97689cd9458d4 100644 --- a/packages/kbn-plugin-discovery/README.mdx +++ b/packages/kbn-plugin-discovery/README.mdx @@ -11,14 +11,22 @@ At the moment plugins can live in a couple of different places and in the future to live anywhere in the repository. This is a package that holds custom logic useful to find and parse those. -## parseKibanaPlatformPlugin +## API + +### parseKibanaPlatformPlugin It returns a platform plugin for a given manifest path -## getPluginSearchPaths +### getPluginSearchPaths It returns the paths where plugins will be searched for -## simpleKibanaPlatformPluginDiscovery +### simpleKibanaPlatformPluginDiscovery It finds and returns the new platform plugins + +## NOTE: + +This code is needed in order to properly bootstrap the repository. As such, it can't have any NPM dependencies or require being built. This code is loaded directly into the node.js process that boostraps the repository from source while also being built into a package and exposed to the rest of the package system. Please consider this when making any changes to the source. + +The code is still type-checked as JS with JSDoc comments, and a single .ts file which provides interfaces to the JS validation and are publically available to package consumers. \ No newline at end of file diff --git a/packages/kbn-plugin-discovery/src/find_kibana_json_files.js b/packages/kbn-plugin-discovery/src/find_kibana_json_files.js new file mode 100644 index 0000000000000..f1687859627a8 --- /dev/null +++ b/packages/kbn-plugin-discovery/src/find_kibana_json_files.js @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const Path = require('path'); +const Fs = require('fs'); + +/** + * @param {string} path + */ +function safeReadDir(path) { + try { + return Fs.readdirSync(path, { + withFileTypes: true, + }); + } catch (error) { + if (error.code === 'ENOENT' || error.code === 'ENOTDIR') { + return []; + } + + throw error; + } +} + +/** + * Given an iterable of paths with optoinal "*" segments, expand the path to the + * list of actual absolute paths, removing all "*" segments, and then return the + * set of paths which end up pointing to actual files. + * + * @param {string} dir + * @param {number} depth + * @returns {string[]} + */ +function findKibanaJsonFiles(dir, depth) { + // if depth = 0 then we just need to determine if there is a kibana.json file in this directory + // and return either that path or an empty array + if (depth === 0) { + const path = Path.resolve(dir, 'kibana.json'); + return Fs.existsSync(path) ? [path] : []; + } + + // if depth > 0 read the files in this directory, if we find a kibana.json file then we can stop + // otherwise we will iterate through the child directories and try to find kibana.json files there. + const files = safeReadDir(dir); + + /** @type {string[]} */ + const childDirs = []; + for (const ent of files) { + if (ent.isFile()) { + if (ent.name === 'kibana.json') { + return [Path.resolve(dir, ent.name)]; + } + } else if (ent.isDirectory()) { + childDirs.push(Path.resolve(dir, ent.name)); + } + } + + return childDirs.flatMap((dir) => findKibanaJsonFiles(dir, depth - 1)); +} + +module.exports = { findKibanaJsonFiles }; diff --git a/packages/kbn-plugin-discovery/src/index.js b/packages/kbn-plugin-discovery/src/index.js new file mode 100644 index 0000000000000..4d2f0bbffaa50 --- /dev/null +++ b/packages/kbn-plugin-discovery/src/index.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { parseKibanaPlatformPlugin } = require('./parse_kibana_platform_plugin'); +const { getPluginSearchPaths } = require('./plugin_search_paths'); +const { + simpleKibanaPlatformPluginDiscovery, +} = require('./simple_kibana_platform_plugin_discovery'); + +module.exports = { + parseKibanaPlatformPlugin, + getPluginSearchPaths, + simpleKibanaPlatformPluginDiscovery, +}; diff --git a/packages/kbn-plugin-discovery/src/load_json_file.js b/packages/kbn-plugin-discovery/src/load_json_file.js new file mode 100644 index 0000000000000..2e35a503ccf4c --- /dev/null +++ b/packages/kbn-plugin-discovery/src/load_json_file.js @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const Fs = require('fs'); +const Path = require('path'); + +/** + * @param {string} path + * @returns {any} + */ +function loadJsonFile(path) { + try { + return JSON.parse(Fs.readFileSync(path, 'utf8')); + } catch (error) { + if (error.code === 'ENOENT') { + throw new Error(`Missing file: ${path}`); + } + + throw new Error( + `Unable to read JSON at [${Path.relative(process.cwd(), path)}]: ${error.message}` + ); + } +} + +module.exports = { loadJsonFile }; diff --git a/packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts b/packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.js similarity index 65% rename from packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts rename to packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.js index e9fd2a285f09d..6137d5ad40187 100644 --- a/packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.ts +++ b/packages/kbn-plugin-discovery/src/parse_kibana_platform_plugin.js @@ -6,16 +6,16 @@ * Side Public License, v 1. */ -import Path from 'path'; -import loadJsonFile from 'load-json-file'; +const Path = require('path'); -export interface KibanaPlatformPlugin { - readonly directory: string; - readonly manifestPath: string; - readonly manifest: KibanaPlatformPluginManifest; -} +const { loadJsonFile } = require('./load_json_file'); -function isValidDepsDeclaration(input: unknown, type: string): string[] { +/** + * @param {unknown} input + * @param {string} type + * @returns {string[]} + */ +function isValidDepsDeclaration(input, type) { if (typeof input === 'undefined') return []; if (Array.isArray(input) && input.every((i) => typeof i === 'string')) { return input; @@ -23,35 +23,17 @@ function isValidDepsDeclaration(input: unknown, type: string): string[] { throw new TypeError(`The "${type}" in plugin manifest should be an array of strings.`); } -export interface KibanaPlatformPluginManifest { - id: string; - ui: boolean; - server: boolean; - kibanaVersion: string; - version: string; - owner: { - // Internally, this should be a team name. - name: string; - // All internally owned plugins should have a github team specified that can be pinged in issues, or used to look up - // members who can be asked questions regarding the plugin. - githubTeam?: string; - }; - // TODO: make required. - description?: string; - enabledOnAnonymousPages?: boolean; - serviceFolders: readonly string[]; - requiredPlugins: readonly string[]; - optionalPlugins: readonly string[]; - requiredBundles: readonly string[]; - extraPublicDirs: readonly string[]; -} - -export function parseKibanaPlatformPlugin(manifestPath: string): KibanaPlatformPlugin { +/** + * @param {string} manifestPath + * @returns {import('./types').KibanaPlatformPlugin} + */ +function parseKibanaPlatformPlugin(manifestPath) { if (!Path.isAbsolute(manifestPath)) { throw new TypeError('expected new platform manifest path to be absolute'); } - const manifest: Partial = loadJsonFile.sync(manifestPath); + /** @type {Partial} */ + const manifest = loadJsonFile(manifestPath); if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) { throw new TypeError('expected new platform plugin manifest to be a JSON encoded object'); } @@ -92,3 +74,5 @@ export function parseKibanaPlatformPlugin(manifestPath: string): KibanaPlatformP }, }; } + +module.exports = { parseKibanaPlatformPlugin }; diff --git a/packages/kbn-plugin-discovery/src/plugin_search_paths.ts b/packages/kbn-plugin-discovery/src/plugin_search_paths.js similarity index 85% rename from packages/kbn-plugin-discovery/src/plugin_search_paths.ts rename to packages/kbn-plugin-discovery/src/plugin_search_paths.js index dce55698e88ee..6012f42a38ee1 100644 --- a/packages/kbn-plugin-discovery/src/plugin_search_paths.ts +++ b/packages/kbn-plugin-discovery/src/plugin_search_paths.js @@ -6,16 +6,13 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +const { resolve } = require('path'); -export interface SearchOptions { - rootDir: string; - oss: boolean; - examples: boolean; - testPlugins?: boolean; -} - -export function getPluginSearchPaths({ rootDir, oss, examples, testPlugins }: SearchOptions) { +/** + * @param {{ rootDir: string; oss: boolean; examples: boolean; testPlugins?: boolean; }} options + * @returns {string[]} + */ +function getPluginSearchPaths({ rootDir, oss, examples, testPlugins }) { return [ resolve(rootDir, 'src', 'plugins'), ...(oss ? [] : [resolve(rootDir, 'x-pack', 'plugins')]), @@ -45,3 +42,5 @@ export function getPluginSearchPaths({ rootDir, oss, examples, testPlugins }: Se : []), ]; } + +module.exports = { getPluginSearchPaths }; diff --git a/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js b/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js new file mode 100644 index 0000000000000..8ea7bb6d563ab --- /dev/null +++ b/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.js @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { parseKibanaPlatformPlugin } = require('./parse_kibana_platform_plugin'); +const { findKibanaJsonFiles } = require('./find_kibana_json_files'); + +/** + * Helper to find the new platform plugins. + * @param {string[]} scanDirs + * @param {string[]} pluginPaths + * @returns {Array} + */ +function simpleKibanaPlatformPluginDiscovery(scanDirs, pluginPaths) { + return Array.from( + new Set([ + // find kibana.json files up to 5 levels within each scan dir + ...scanDirs.flatMap((dir) => findKibanaJsonFiles(dir, 5)), + // find kibana.json files at the root of each plugin path + ...pluginPaths.flatMap((path) => findKibanaJsonFiles(path, 0)), + ]) + ).map(parseKibanaPlatformPlugin); +} + +module.exports = { simpleKibanaPlatformPluginDiscovery }; diff --git a/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts b/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts deleted file mode 100644 index ebf476a668851..0000000000000 --- a/packages/kbn-plugin-discovery/src/simple_kibana_platform_plugin_discovery.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import Path from 'path'; - -import globby from 'globby'; -import normalize from 'normalize-path'; - -import { parseKibanaPlatformPlugin, KibanaPlatformPlugin } from './parse_kibana_platform_plugin'; - -/** - * Helper to find the new platform plugins. - */ -export function simpleKibanaPlatformPluginDiscovery( - scanDirs: string[], - pluginPaths: string[] -): KibanaPlatformPlugin[] { - const patterns = Array.from( - new Set([ - // find kibana.json files up to 5 levels within the scan dir - ...scanDirs.reduce( - (acc: string[], dir) => [ - ...acc, - Path.resolve(dir, '*/kibana.json'), - Path.resolve(dir, '*/*/kibana.json'), - Path.resolve(dir, '*/*/*/kibana.json'), - Path.resolve(dir, '*/*/*/*/kibana.json'), - Path.resolve(dir, '*/*/*/*/*/kibana.json'), - ], - [] - ), - ...pluginPaths.map((path) => Path.resolve(path, `kibana.json`)), - ]) - ).map((path) => normalize(path)); - - const manifestPaths = globby.sync(patterns, { absolute: true }).map((path) => - // absolute paths returned from globby are using normalize or - // something so the path separators are `/` even on windows, - // Path.resolve solves this - Path.resolve(path) - ); - - return manifestPaths.map(parseKibanaPlatformPlugin); -} diff --git a/packages/kbn-plugin-discovery/src/types.ts b/packages/kbn-plugin-discovery/src/types.ts new file mode 100644 index 0000000000000..ebf3f68074c7b --- /dev/null +++ b/packages/kbn-plugin-discovery/src/types.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type JsonValue = + | { [key: string]: JsonValue } + | JsonValue[] + | string + | number + | boolean + | null; + +export interface KibanaPlatformPlugin { + readonly directory: string; + readonly manifestPath: string; + readonly manifest: KibanaPlatformPluginManifest; +} + +export interface KibanaPlatformPluginManifest { + id: string; + ui: boolean; + server: boolean; + kibanaVersion: string; + version: string; + owner: { + // Internally, this should be a team name. + name: string; + // All internally owned plugins should have a github team specified that can be pinged in issues, or used to look up + // members who can be asked questions regarding the plugin. + githubTeam?: string; + }; + // TODO: make required. + description?: string; + enabledOnAnonymousPages?: boolean; + serviceFolders: readonly string[]; + requiredPlugins: readonly string[]; + optionalPlugins: readonly string[]; + requiredBundles: readonly string[]; + extraPublicDirs: readonly string[]; +} diff --git a/packages/kbn-plugin-discovery/tsconfig.json b/packages/kbn-plugin-discovery/tsconfig.json index 789c6b3111115..88aeef31ff2da 100644 --- a/packages/kbn-plugin-discovery/tsconfig.json +++ b/packages/kbn-plugin-discovery/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "emitDeclarationOnly": true, + "allowJs": true, + "checkJs": true, "outDir": "target_types", "rootDir": "src", "stripInternal": false, @@ -13,6 +14,6 @@ ] }, "include": [ - "src/**/*" + "src/**/*", ] } diff --git a/packages/kbn-pm/.babelrc b/packages/kbn-pm/.babelrc deleted file mode 100644 index 9ea6ecafe7287..0000000000000 --- a/packages/kbn-pm/.babelrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "presets": [ - "@babel/typescript", - ["@babel/preset-env", { - "targets": { - "node": "current" - } - }] - ], - "plugins": [ - "@babel/proposal-class-properties", - "@babel/proposal-object-rest-spread", - "@babel/proposal-optional-chaining" - ] -} diff --git a/packages/kbn-pm/README.md b/packages/kbn-pm/README.md deleted file mode 100644 index 33d1fe6590f4b..0000000000000 --- a/packages/kbn-pm/README.md +++ /dev/null @@ -1,266 +0,0 @@ -# `@kbn/pm` — The Kibana project management tool - -`@kbn/pm` is a project management tool inspired by Lerna, which enables sharing -code between Kibana and Kibana plugins. - -To run `@kbn/pm`, go to Kibana root and run `yarn kbn`. - -## Why `@kbn/pm`? - -Long-term we want to get rid of Webpack from production (basically, it's causing -a lot of problems, using a lot of memory and adding a lot of complexity). -Ideally we want each plugin to build its own separate production bundles for -both server and UI. To get there all Kibana plugins (including x-pack) need to -be able to build their production bundles separately from Kibana, which means -they need to be able to depend on code from Kibana without `import`-ing random -files directly from the Kibana source code. - -From a plugin perspective there are two different types of Kibana dependencies: -runtime and static dependencies. Runtime dependencies are things that are -instantiated at runtime and that are injected into the plugin, for example -config and elasticsearch clients. Static dependencies are those dependencies -that we want to `import`. `kbn-eslint-config` is one example of this, and -it's actually needed because eslint requires it to be a separate package. But we -also have dependencies like `datemath`, `flot`, `eui` and others that we -control, but where we want to `import` them in plugins instead of injecting them -(because injecting them would be painful to work with). (Btw, these examples -aren't necessarily a part of the Kibana repo today, they are just meant as -examples of code that we might at some point want to include in the repo while -having them be `import`able in Kibana plugins like any other npm package) - -Another reason we need static dependencies is that we're starting to introduce -TypeScript into Kibana, and to work nicely with TypeScript across plugins we -need to be able to statically import dependencies. We have for example built an -observable library for Kibana in TypeScript and we need to expose both the -functionality and the TypeScript types to plugins (so other plugins built with -TypeScript can depend on the types for the lib). - -However, even though we have multiple packages we don't necessarily want to -`npm publish` them. The ideal solution for us is being able to work on code -locally in the Kibana repo and have a nice workflow that doesn't require -publishing, but where we still get the value of having "packages" that are -available to plugins, without these plugins having to import files directly from -the Kibana folder. - -Basically, we just want to be able to share "static code" (aka being able to -`import`) between Kibana and Kibana plugins. To get there we need tooling. - -`@kbn/pm` is a tool that helps us manage these static dependencies, and it -enables us to share these packages between Kibana and Kibana plugins. It also -enables these packages to have their own dependencies and their own build -scripts, while still having a nice developer experience. - -## How it works - -### Internal usage - -For packages that are referenced within the Kibana repo itself (for example, -using the `@kbn/i18n` package from an `x-pack` plugin), we are leveraging -Yarn's workspaces feature. This allows yarn to optimize node_modules within -the entire repo to avoid duplicate modules by hoisting common packages as high -in the dependency tree as possible. - -To reference a package from within the Kibana repo, simply use the current -version number from that package's package.json file. Then, running `yarn kbn -bootstrap` will symlink that package into your dependency tree. That means -you can make changes to `@kbn/i18n` and immediately have them available -in Kibana itself. No `npm publish` needed anymore — Kibana will always rely -directly on the code that's in the local packages. - -### External Plugins - -For external plugins, referencing packages in Kibana relies on -`link:` style dependencies in Yarn. With `link:` dependencies you specify the -relative location to a package instead of a version when adding it to -`package.json`. For example: - -``` -"@kbn/i18n": "link:packages/kbn-i18n" -``` - -Now when you run `yarn` it will set up a symlink to this folder instead of -downloading code from the npm registry. This allows external plugins to always -use the versions of the package that is bundled with the Kibana version they -are running inside of. - -``` -"@kbn/i18n": "link:../../kibana/packages/kbn-date-math" -``` - -This works because we moved to a strict location of Kibana plugins, -`./plugins/{pluginName}` inside of Kibana, or `../kibana-extra/{pluginName}` -relative to Kibana. This is one of the reasons we wanted to move towards a setup -that looks like this: - -``` -elastic -└── kibana - └── plugins - ├── kibana-canvas - └── x-pack-kibana -``` - -Relying on `link:` style dependencies means we no longer need to `npm publish` -our Kibana specific packages. It also means that plugin authors no longer need -to worry about the versions of the Kibana packages, as they will always use the -packages from their local Kibana. - -## The `kbn` use-cases - -### Bootstrapping - -Now, instead of installing all the dependencies with just running `yarn` you use -the `@kbn/pm` tool, which can install dependencies (and set up symlinks) in -all the packages using one command (aka "bootstrap" the setup). - -To bootstrap Kibana: - -``` -yarn kbn bootstrap -``` - -By default, `@kbn/pm` will bootstrap all packages within Kibana, plus all -Kibana plugins located in `./plugins` or `../kibana-extra`. There are several -options for skipping parts of this, e.g. to skip bootstrapping of Kibana -plugins: - -``` -yarn kbn bootstrap --skip-kibana-plugins -``` - -Or just skip few selected packages: - -``` -yarn kbn bootstrap --exclude @kbn/pm --exclude @kbn/i18n -``` - -For more details, run: - -``` -yarn kbn -``` - -Bootstrapping also calls the `kbn:bootstrap` script for every included project. -This is intended for packages that need to be built/transpiled to be usable. - -### Running scripts - -Some times you want to run the same script across multiple packages and plugins, -e.g. `build` or `test`. Instead of jumping into each package and running -`yarn build` you can run: - -``` -yarn kbn run build --skip-missing -``` - -And if needed, you can skip packages in the same way as for bootstrapping, e.g. -with `--exclude` and `--skip-kibana-plugins`: - -``` -yarn kbn run build --exclude kibana --skip-missing -``` - -### Watching - -During development you can also use `kbn` to watch for changes. For this to work -package should define `kbn:watch` script in the `package.json`: - -``` -yarn kbn watch -``` - -By default `kbn watch` will sort all packages within Kibana into batches based on -their mutual dependencies and run watch script for all packages in the correct order. - -As with any other `kbn` command, you can use `--include` and `--exclude` filters to watch -only for a selected packages: - -``` -yarn kbn watch --include @kbn/pm --include kibana -``` - -## Building packages for production - -The production build process relies on both the Grunt setup at the root of the -Kibana project and code in `@kbn/pm`. The full process is described in -`tasks/build/packages.js`. - -## Development - -This package is run from Kibana root, using `yarn kbn`. This will run the -"pre-built" (aka built and committed to git) version of this tool, which is -located in the `dist/` folder. This will also use the included version of Yarn -instead of using your local install of Yarn. - -If you need to build a new version of this package, run `yarn build` in this -folder. - -Even though this file is generated we commit it to Kibana, because it's used -_before_ dependencies are fetched (as this is the tool actually responsible for -fetching dependencies). - -## Technical decisions - -### Why our own tool? - -While exploring the approach to static dependencies we built PoCs using npm 5 -(which symlinks packages using [`file:` dependencies][npm5-file]), [Yarn -workspaces][yarn-workspaces], Yarn (using `link:` dependencies), and -[Lerna][lerna]. - -In the end we decided to build our own tool, based on Yarn, and `link:` -dependencies, and workspaces. This gave us the control we wanted, and it fits -nicely into our context (e.g. where publishing to npm isn't necessarily -something we want to do). - -### Some notes from this exploration - -#### `file:` dependencies in npm<5 and in yarn - -When you add a dependency like `"foo": "file:../../kibana/packages/foo"`, both -npm<5 and yarn copies the files into the `node_modules` folder. This means you -can't easily make changes to the plugin while developing. Therefore this is a -no-go. - -#### `file:` dependencies in npm5 - -In npm5 `file:` dependencies changed to symlink instead of copy the files. This -means you can have a nicer workflow while developing packages locally. However, -we hit several bugs when using this feature, and we often had to re-run -`npm install` in packages. This is likely because we used an early version of -the new `file:` dependencies in npm5. - -#### `link:` dependencies in Yarn - -This is the same feature as `file:` dependencies in npm5. However, we did not -hit any problems with them during our exploration. - -#### Yarn workspaces - -Enables specifying multiple "workspaces" (aka packages/projects) in -`package.json`. When running `yarn` from the root, Yarn will install all the -dependencies for these workspaces and hoist the dependencies to the root (to -"deduplicate" packages). However: - -> Workspaces must be children of the workspace root in term of folder hierarchy. -> You cannot and must not reference a workspace that is located outside of this -> filesystem hierarchy. - -So Yarn workspaces requires a shared root, which (at least currently) doesn't -fit Kibana, and it's therefore a no-go for now. - -#### Lerna - -Lerna is based on symlinking packages (similarly to the [`link`][npm-link] -feature which exists in both npm and Yarn, but it's not directly using that -feature). It's a tool built specifically for managing JavaScript projects with -multiple packages. However, it's primarily built (i.e. optimized) for monorepo -_libraries_, so it's focused on publishing packages and other use-cases that are -not necessarily optimized for our use-cases. It's also not ideal for the setup -we currently have, with one app that "owns everything" and the rest being -packages for that app. - -[npm-link]: https://docs.npmjs.com/cli/link -[npm5-file]: https://github.com/npm/npm/pull/15900 -[yarn-workspaces]: https://yarnpkg.com/lang/en/docs/workspaces/ -[lerna]: https://github.com/lerna/lerna diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js deleted file mode 100644 index 647e8a8d4bbbe..0000000000000 --- a/packages/kbn-pm/dist/index.js +++ /dev/null @@ -1,63187 +0,0 @@ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../../node_modules/@babel/code-frame/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.codeFrameColumns = codeFrameColumns; -exports.default = _default; - -var _highlight = __webpack_require__("../../node_modules/@babel/highlight/lib/index.js"); - -let deprecationWarningShown = false; - -function getDefs(chalk) { - return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - -function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - - if (startLine === -1) { - start = 0; - } - - if (endLine === -1) { - end = source.length; - } - - const lineDiff = endLine - startLine; - const markerLines = {}; - - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - - return { - start, - end, - markerLines - }; -} - -function codeFrameColumns(rawLines, loc, opts = {}) { - const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); - const chalk = (0, _highlight.getChalk)(opts); - const defs = getDefs(chalk); - - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; - }; - - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} |`; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - - if (hasMarker) { - let markerLine = ""; - - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); - } else { - return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; - } - }).join("\n"); - - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; - } - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } -} - -function _default(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); -} - -/***/ }), - -/***/ "../../node_modules/@babel/helper-validator-identifier/lib/identifier.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isIdentifierChar = isIdentifierChar; -exports.isIdentifierName = isIdentifierName; -exports.isIdentifierStart = isIdentifierStart; -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; -const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - -function isInAstralSet(code, set) { - let pos = 0x10000; - - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} - -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -function isIdentifierName(name) { - let isFirst = true; - - for (let i = 0; i < name.length; i++) { - let cp = name.charCodeAt(i); - - if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { - const trail = name.charCodeAt(++i); - - if ((trail & 0xfc00) === 0xdc00) { - cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); - } - } - - if (isFirst) { - isFirst = false; - - if (!isIdentifierStart(cp)) { - return false; - } - } else if (!isIdentifierChar(cp)) { - return false; - } - } - - return !isFirst; -} - -/***/ }), - -/***/ "../../node_modules/@babel/helper-validator-identifier/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "isIdentifierChar", { - enumerable: true, - get: function () { - return _identifier.isIdentifierChar; - } -}); -Object.defineProperty(exports, "isIdentifierName", { - enumerable: true, - get: function () { - return _identifier.isIdentifierName; - } -}); -Object.defineProperty(exports, "isIdentifierStart", { - enumerable: true, - get: function () { - return _identifier.isIdentifierStart; - } -}); -Object.defineProperty(exports, "isKeyword", { - enumerable: true, - get: function () { - return _keyword.isKeyword; - } -}); -Object.defineProperty(exports, "isReservedWord", { - enumerable: true, - get: function () { - return _keyword.isReservedWord; - } -}); -Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictBindOnlyReservedWord; - } -}); -Object.defineProperty(exports, "isStrictBindReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictBindReservedWord; - } -}); -Object.defineProperty(exports, "isStrictReservedWord", { - enumerable: true, - get: function () { - return _keyword.isStrictReservedWord; - } -}); - -var _identifier = __webpack_require__("../../node_modules/@babel/helper-validator-identifier/lib/identifier.js"); - -var _keyword = __webpack_require__("../../node_modules/@babel/helper-validator-identifier/lib/keyword.js"); - -/***/ }), - -/***/ "../../node_modules/@babel/helper-validator-identifier/lib/keyword.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isKeyword = isKeyword; -exports.isReservedWord = isReservedWord; -exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; -exports.isStrictBindReservedWord = isStrictBindReservedWord; -exports.isStrictReservedWord = isStrictReservedWord; -const reservedWords = { - keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] -}; -const keywords = new Set(reservedWords.keyword); -const reservedWordsStrictSet = new Set(reservedWords.strict); -const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); - -function isReservedWord(word, inModule) { - return inModule && word === "await" || word === "enum"; -} - -function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); -} - -function isStrictBindOnlyReservedWord(word) { - return reservedWordsStrictBindSet.has(word); -} - -function isStrictBindReservedWord(word, inModule) { - return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); -} - -function isKeyword(word) { - return keywords.has(word); -} - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = highlight; -exports.getChalk = getChalk; -exports.shouldHighlight = shouldHighlight; - -var _jsTokens = __webpack_require__("../../node_modules/@babel/highlight/node_modules/js-tokens/index.js"); - -var _helperValidatorIdentifier = __webpack_require__("../../node_modules/@babel/helper-validator-identifier/lib/index.js"); - -var _chalk = __webpack_require__("../../node_modules/@babel/highlight/node_modules/chalk/index.js"); - -const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); - -function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsxIdentifier: chalk.yellow, - punctuator: chalk.yellow, - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; -const BRACKET = /^[()[\]{}]$/; -let tokenize; -{ - const JSX_TAG = /^[a-z][\w-]*$/i; - - const getTokenType = function (token, offset, text) { - if (token.type === "name") { - if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); - } else { - highlighted += value; - } - } - - return highlighted; -} - -function shouldHighlight(options) { - return !!_chalk.supportsColor || options.forceColor; -} - -function getChalk(options) { - return options.forceColor ? new _chalk.constructor({ - enabled: true, - level: 1 - }) : _chalk; -} - -function highlight(code, options = {}) { - if (code !== "" && shouldHighlight(options)) { - const chalk = getChalk(options); - const defs = getDefs(chalk); - return highlightTokens(defs, code); - } else { - return code; - } -} - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/ansi-styles/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__("../../node_modules/color-convert/index.js"); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("../../node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/chalk/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const escapeStringRegexp = __webpack_require__("../../node_modules/escape-string-regexp/index.js"); -const ansiStyles = __webpack_require__("../../node_modules/@babel/highlight/node_modules/ansi-styles/index.js"); -const stdoutColor = __webpack_require__("../../node_modules/@babel/highlight/node_modules/supports-color/index.js").stdout; - -const template = __webpack_require__("../../node_modules/@babel/highlight/node_modules/chalk/templates.js"); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript - - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/chalk/templates.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - - return current; -} - -module.exports = (chalk, tmp) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(chr); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } - - return chunks.join(''); -}; - - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/has-flag/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; - - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/js-tokens/index.js": -/***/ (function(module, exports) { - -// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell -// License: MIT. (See LICENSE.) - -Object.defineProperty(exports, "__esModule", { - value: true -}) - -// This regex comes from regex.coffee, and is inserted here by generate-index.js -// (run `npm run build`). -exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g - -exports.matchToToken = function(match) { - var token = {type: "invalid", value: match[0], closed: undefined} - if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) - else if (match[ 5]) token.type = "comment" - else if (match[ 6]) token.type = "comment", token.closed = !!match[7] - else if (match[ 8]) token.type = "regex" - else if (match[ 9]) token.type = "number" - else if (match[10]) token.type = "name" - else if (match[11]) token.type = "punctuator" - else if (match[12]) token.type = "whitespace" - return token -} - - -/***/ }), - -/***/ "../../node_modules/@babel/highlight/node_modules/supports-color/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__("os"); -const hasFlag = __webpack_require__("../../node_modules/@babel/highlight/node_modules/has-flag/index.js"); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; - - -/***/ }), - -/***/ "../../node_modules/@babel/runtime/helpers/defineProperty.js": -/***/ (function(module, exports) { - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js": -/***/ (function(module, exports) { - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; -} - -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ "../../node_modules/@kbn/bazel-runner/target_node/bazel_runner.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.runBazel = runBazel; -exports.runIBazel = runIBazel; - -var _chalk = _interopRequireDefault(__webpack_require__("../../node_modules/chalk/source/index.js")); - -var _execa = _interopRequireDefault(__webpack_require__("../../node_modules/execa/index.js")); - -var Rx = _interopRequireWildcard(__webpack_require__("../../node_modules/rxjs/dist/esm5/index.js")); - -var _operators = __webpack_require__("../../node_modules/rxjs/dist/esm5/operators/index.js"); - -var _stdioDevHelpers = __webpack_require__("../../node_modules/@kbn/stdio-dev-helpers/target_node/index.js"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -async function runBazelCommandWithRunner(runner, options) { - const bazelProc = (0, _execa.default)(runner, options.offline ? [...options.bazelArgs, '--config=offline'] : options.bazelArgs, { ...options.execaOpts, - stdio: 'pipe', - preferLocal: true - }); - await Promise.all([// Bazel outputs machine readable output into stdout and human readable output goes to stderr. - // Therefore we need to get both. In order to get errors we need to parse the actual text line - Rx.lastValueFrom(Rx.merge((0, _stdioDevHelpers.observeLines)(bazelProc.stdout).pipe((0, _operators.tap)(line => options.log.info(`${_chalk.default.cyan(`[${runner}]`)} ${line}`))), (0, _stdioDevHelpers.observeLines)(bazelProc.stderr).pipe((0, _operators.tap)(line => options.log.info(`${_chalk.default.cyan(`[${runner}]`)} ${line}`)))).pipe(Rx.defaultIfEmpty(undefined))), // Wait for process and logs to finish, unsubscribing in the end - bazelProc.catch(() => { - options.log.error('HINT: If experiencing problems with node_modules try `yarn kbn bootstrap --force-install` or as last resort `yarn kbn reset && yarn kbn bootstrap`'); - throw new Error(`The bazel command that was running failed to complete.`); - })]); -} - -async function runBazel(options) { - await runBazelCommandWithRunner('bazel', options); -} - -async function runIBazel(options) { - var _options$execaOpts; - - await runBazelCommandWithRunner('ibazel', { ...options, - execaOpts: { ...options.execaOpts, - env: { ...((_options$execaOpts = options.execaOpts) === null || _options$execaOpts === void 0 ? void 0 : _options$execaOpts.env), - IBAZEL_USE_LEGACY_WATCHER: '0' - } - } - }); -} - -/***/ }), - -/***/ "../../node_modules/@kbn/bazel-runner/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _bazel_runner = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/bazel_runner.js"); - -Object.keys(_bazel_runner).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _bazel_runner[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _bazel_runner[key]; - } - }); -}); - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-core/target_node/ci_stats_config.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parseConfig = parseConfig; - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -/** - * Information about how CiStatsReporter should talk to the ci-stats service. Normally - * it is read from a JSON environment variable using the `parseConfig()` function - * exported by this module. - */ -function validateConfig(log, config) { - const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; - - if (!validApiToken) { - log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api token, stats will not be reported'); - return; - } - - const validId = typeof config.buildId === 'string' && config.buildId.length !== 0; - - if (!validId) { - log.warning('KIBANA_CI_STATS_CONFIG is missing a valid build id, stats will not be reported'); - return; - } - - return config; -} - -function parseConfig(log) { - const configJson = process.env.KIBANA_CI_STATS_CONFIG; - - if (!configJson) { - log.debug('KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter'); - return; - } - - let config; - - try { - config = JSON.parse(configJson); - } catch (_) {// handled below - } - - if (typeof config === 'object' && config !== null) { - return validateConfig(log, config); - } - - log.warning('KIBANA_CI_STATS_CONFIG is invalid, stats will not be reported'); - return; -} - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-core/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "parseConfig", { - enumerable: true, - get: function () { - return _ci_stats_config.parseConfig; - } -}); - -var _ci_stats_config = __webpack_require__("../../node_modules/@kbn/ci-stats-core/target_node/ci_stats_config.js"); - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-reporter/target_node sync recursive": -/***/ (function(module, exports) { - -function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; -} -webpackEmptyContext.keys = function() { return []; }; -webpackEmptyContext.resolve = webpackEmptyContext; -module.exports = webpackEmptyContext; -webpackEmptyContext.id = "../../node_modules/@kbn/ci-stats-reporter/target_node sync recursive"; - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-reporter/target_node/ci_stats_reporter.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.CiStatsReporter = void 0; - -var _util = __webpack_require__("util"); - -var _os = _interopRequireDefault(__webpack_require__("os")); - -var _fs = _interopRequireDefault(__webpack_require__("fs")); - -var _path = _interopRequireDefault(__webpack_require__("path")); - -var _crypto = _interopRequireDefault(__webpack_require__("crypto")); - -var _execa = _interopRequireDefault(__webpack_require__("../../node_modules/execa/index.js")); - -var _axios = _interopRequireDefault(__webpack_require__("../../node_modules/axios/index.js")); - -var _http = _interopRequireDefault(__webpack_require__("../../node_modules/axios/lib/adapters/http.js")); - -var _ciStatsCore = __webpack_require__("../../node_modules/@kbn/ci-stats-core/target_node/index.js"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -// @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things -const BASE_URL = 'https://ci-stats.kibana.dev'; -const SECOND = 1000; -const MINUTE = 60 * SECOND; - -function limitMetaStrings(meta) { - return Object.fromEntries(Object.entries(meta).map(([key, value]) => { - if (typeof value === 'string' && value.length > 2000) { - return [key, value.slice(0, 2000)]; - } - - return [key, value]; - })); -} -/** A ci-stats metric record */ - - -/** Object that helps report data to the ci-stats service */ -class CiStatsReporter { - /** - * Create a CiStatsReporter by inspecting the ENV for the necessary config - */ - static fromEnv(log) { - return new CiStatsReporter((0, _ciStatsCore.parseConfig)(log), log); - } - - constructor(config, log) { - this.config = config; - this.log = log; - } - /** - * Determine if CI_STATS is explicitly disabled by the environment. To determine - * if the CiStatsReporter has enough information in the environment to send metrics - * for builds use #hasBuildConfig(). - */ - - - isEnabled() { - return process.env.CI_STATS_DISABLED !== 'true'; - } - /** - * Determines if the CiStatsReporter is disabled by the environment, or properly - * configured and able to send stats - */ - - - hasBuildConfig() { - var _this$config, _this$config2; - - return this.isEnabled() && !!((_this$config = this.config) !== null && _this$config !== void 0 && _this$config.apiToken) && !!((_this$config2 = this.config) !== null && _this$config2 !== void 0 && _this$config2.buildId); - } - /** - * Report timings data to the ci-stats service. If running in CI then the reporter - * will include the buildId in the report with the access token, otherwise the timings - * data will be recorded as anonymous timing data. - */ - - - async timings(options) { - var _this$config3, _options$upstreamBran, _Os$cpus, _Os$cpus$, _Os$cpus$2; - - if (!this.isEnabled()) { - return; - } - - const buildId = (_this$config3 = this.config) === null || _this$config3 === void 0 ? void 0 : _this$config3.buildId; - const timings = options.timings.map(timing => timing.meta ? { ...timing, - meta: limitMetaStrings(timing.meta) - } : timing); - const upstreamBranch = (_options$upstreamBran = options.upstreamBranch) !== null && _options$upstreamBran !== void 0 ? _options$upstreamBran : this.getUpstreamBranch(); - const kibanaUuid = options.kibanaUuid === undefined ? this.getKibanaUuid() : options.kibanaUuid; - let email; - let branch; - - try { - const { - stdout - } = await (0, _execa.default)('git', ['config', 'user.email']); - email = stdout; - } catch (e) { - this.log.debug(e.message); - } - - try { - const { - stdout - } = await (0, _execa.default)('git', ['rev-parse', '--abbrev-ref', 'HEAD']); - branch = stdout; - } catch (e) { - this.log.debug(e.message); - } - - const memUsage = process.memoryUsage(); - const isElasticCommitter = email && email.endsWith('@elastic.co') ? true : false; - const defaultMeta = { - kibanaUuid, - isElasticCommitter, - committerHash: email ? _crypto.default.createHash('sha256').update(email).digest('hex').substring(0, 20) : undefined, - email: isElasticCommitter ? email : undefined, - branch: isElasticCommitter ? branch : undefined, - cpuCount: (_Os$cpus = _os.default.cpus()) === null || _Os$cpus === void 0 ? void 0 : _Os$cpus.length, - cpuModel: (_Os$cpus$ = _os.default.cpus()[0]) === null || _Os$cpus$ === void 0 ? void 0 : _Os$cpus$.model, - cpuSpeed: (_Os$cpus$2 = _os.default.cpus()[0]) === null || _Os$cpus$2 === void 0 ? void 0 : _Os$cpus$2.speed, - freeMem: _os.default.freemem(), - memoryUsageRss: memUsage.rss, - memoryUsageHeapTotal: memUsage.heapTotal, - memoryUsageHeapUsed: memUsage.heapUsed, - memoryUsageExternal: memUsage.external, - memoryUsageArrayBuffers: memUsage.arrayBuffers, - nestedTiming: process.env.CI_STATS_NESTED_TIMING ? true : false, - osArch: _os.default.arch(), - osPlatform: _os.default.platform(), - osRelease: _os.default.release(), - totalMem: _os.default.totalmem() - }; - this.log.debug('CIStatsReporter committerHash: %s', defaultMeta.committerHash); - return !!(await this.req({ - auth: !!buildId, - path: '/v1/timings', - body: { - buildId, - upstreamBranch, - defaultMeta, - timings - }, - bodyDesc: timings.length === 1 ? `${timings.length} timing` : `${timings.length} timings` - })); - } - /** - * Report metrics data to the ci-stats service. If running outside of CI this method - * does nothing as metrics can only be reported when associated with a specific CI build. - */ - - - async metrics(metrics, options) { - var _this$config4; - - if (!this.hasBuildConfig()) { - return; - } - - const buildId = (_this$config4 = this.config) === null || _this$config4 === void 0 ? void 0 : _this$config4.buildId; - - if (!buildId) { - throw new Error(`metrics can't be reported without a buildId`); - } - - return !!(await this.req({ - auth: true, - path: '/v1/metrics', - body: { - buildId, - defaultMeta: options === null || options === void 0 ? void 0 : options.defaultMeta, - metrics - }, - bodyDesc: `metrics: ${metrics.map(({ - group, - id, - value - }) => `[${group}/${id}=${value}]`).join(' ')}` - })); - } - /** - * Send test reports to ci-stats - */ - - - async reportTests({ - group, - testRuns - }) { - var _this$config5, _this$config6, _this$config7; - - if (!((_this$config5 = this.config) !== null && _this$config5 !== void 0 && _this$config5.buildId) || !((_this$config6 = this.config) !== null && _this$config6 !== void 0 && _this$config6.apiToken)) { - throw new Error('unable to report tests unless buildId is configured and auth config available'); - } - - const groupResp = await this.req({ - auth: true, - path: '/v2/test_group', - query: { - buildId: (_this$config7 = this.config) === null || _this$config7 === void 0 ? void 0 : _this$config7.buildId - }, - bodyDesc: `[${group.name}/${group.type}] test group`, - body: group - }); - - if (!groupResp) { - return; - } - - let bufferBytes = 0; - const buffer = []; - - const flushBuffer = async () => { - var _this$config8; - - await this.req({ - auth: true, - path: '/v2/test_runs', - query: { - buildId: (_this$config8 = this.config) === null || _this$config8 === void 0 ? void 0 : _this$config8.buildId, - groupId: groupResp.groupId, - groupType: group.type - }, - bodyDesc: `[${group.name}/${group.type}] Chunk of ${bufferBytes} bytes`, - body: buffer.join('\n'), - timeout: 5 * MINUTE - }); - buffer.length = 0; - bufferBytes = 0; - }; // send test runs in chunks of ~500kb - - - for (const testRun of testRuns) { - const json = JSON.stringify(testRun); - bufferBytes += json.length; - buffer.push(json); - - if (bufferBytes >= 450000) { - await flushBuffer(); - } - } - - if (bufferBytes) { - await flushBuffer(); - } - } - - async reportPerformanceMetrics(metrics) { - var _this$config9; - - if (!this.hasBuildConfig()) { - return; - } - - const buildId = (_this$config9 = this.config) === null || _this$config9 === void 0 ? void 0 : _this$config9.buildId; - - if (!buildId) { - throw new Error(`Performance metrics can't be reported without a buildId`); - } - - return !!(await this.req({ - auth: true, - path: `/v1/performance_metrics_report?buildId=${buildId}`, - body: { - metrics - }, - bodyDesc: `performance metrics: ${metrics}` - })); - } - /** - * In order to allow this code to run before @kbn/utils is built, @kbn/pm will pass - * in the upstreamBranch when calling the timings() method. Outside of @kbn/pm - * we rely on @kbn/utils to find the package.json file. - */ - - - getUpstreamBranch() { - // specify the module id in a way that will keep webpack from bundling extra code into @kbn/pm - const hideFromWebpack = ['@', 'kbn/utils']; // eslint-disable-next-line @typescript-eslint/no-var-requires - - const { - kibanaPackageJson - } = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node sync recursive")(hideFromWebpack.join('')); - - return kibanaPackageJson.branch; - } - /** - * In order to allow this code to run before @kbn/utils is built, @kbn/pm will pass - * in the kibanaUuid when calling the timings() method. Outside of @kbn/pm - * we rely on @kbn/utils to find the repo root. - */ - - - getKibanaUuid() { - // specify the module id in a way that will keep webpack from bundling extra code into @kbn/pm - const hideFromWebpack = ['@', 'kbn/utils']; // eslint-disable-next-line @typescript-eslint/no-var-requires - - const { - REPO_ROOT - } = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node sync recursive")(hideFromWebpack.join('')); - - try { - return _fs.default.readFileSync(_path.default.resolve(REPO_ROOT, 'data/uuid'), 'utf-8').trim(); - } catch (error) { - if (error.code === 'ENOENT') { - return undefined; - } - - throw error; - } - } - - async req({ - auth, - body, - bodyDesc, - path, - query, - timeout = 60 * SECOND - }) { - let attempt = 0; - const maxAttempts = 5; - let headers; - - if (auth && this.config) { - headers = { - Authorization: `token ${this.config.apiToken}` - }; - } else if (auth) { - throw new Error('this.req() shouldnt be called with auth=true if this.config is not defined'); - } - - while (true) { - attempt += 1; - - try { - const resp = await _axios.default.request({ - method: 'POST', - url: path, - baseURL: BASE_URL, - headers, - data: body, - params: query, - adapter: _http.default, - // if it can be serialized into a string, send it - maxBodyLength: Infinity, - maxContentLength: Infinity, - timeout - }); - return resp.data; - } catch (error) { - var _error$response; - - if (!(error !== null && error !== void 0 && error.request)) { - // not an axios error, must be a usage error that we should notify user about - throw error; - } - - if (error !== null && error !== void 0 && error.response && error.response.status < 500) { - // error response from service was received so warn the user and move on - this.log.warning(`error reporting ${bodyDesc} [status=${error.response.status}] [resp=${(0, _util.inspect)(error.response.data)}]`); - return; - } - - if (attempt === maxAttempts) { - this.log.warning(`unable to report ${bodyDesc}, failed to reach ci-stats service too many times`); - return; - } // we failed to reach the backend and we have remaining attempts, lets retry after a short delay - - - const reason = error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && _error$response.status ? `${error.response.status} response` : 'no response'; - const seconds = attempt * 10; - this.log.warning(`failed to reach ci-stats service, retrying in ${seconds} seconds, [reason=${reason}], [error=${error.message}]`); - await new Promise(resolve => setTimeout(resolve, seconds * 1000)); - } - } - } - -} - -exports.CiStatsReporter = CiStatsReporter; - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-reporter/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "CiStatsReporter", { - enumerable: true, - get: function () { - return _ci_stats_reporter.CiStatsReporter; - } -}); -Object.defineProperty(exports, "getTimeReporter", { - enumerable: true, - get: function () { - return _report_time.getTimeReporter; - } -}); - -var _ci_stats_reporter = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node/ci_stats_reporter.js"); - -var _report_time = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node/report_time.js"); - -/***/ }), - -/***/ "../../node_modules/@kbn/ci-stats-reporter/target_node/report_time.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getTimeReporter = void 0; - -var _ci_stats_reporter = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node/ci_stats_reporter.js"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -const getTimeReporter = (log, group) => { - const reporter = _ci_stats_reporter.CiStatsReporter.fromEnv(log); - - return async (startTime, id, meta) => { - await reporter.timings({ - timings: [{ - group, - id, - ms: Date.now() - startTime, - meta - }] - }); - }; -}; - -exports.getTimeReporter = getTimeReporter; - -/***/ }), - -/***/ "../../node_modules/@kbn/plugin-discovery/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _parse_kibana_platform_plugin = __webpack_require__("../../node_modules/@kbn/plugin-discovery/target_node/parse_kibana_platform_plugin.js"); - -Object.keys(_parse_kibana_platform_plugin).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _parse_kibana_platform_plugin[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _parse_kibana_platform_plugin[key]; - } - }); -}); - -var _plugin_search_paths = __webpack_require__("../../node_modules/@kbn/plugin-discovery/target_node/plugin_search_paths.js"); - -Object.keys(_plugin_search_paths).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _plugin_search_paths[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _plugin_search_paths[key]; - } - }); -}); - -var _simple_kibana_platform_plugin_discovery = __webpack_require__("../../node_modules/@kbn/plugin-discovery/target_node/simple_kibana_platform_plugin_discovery.js"); - -Object.keys(_simple_kibana_platform_plugin_discovery).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _simple_kibana_platform_plugin_discovery[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _simple_kibana_platform_plugin_discovery[key]; - } - }); -}); - -/***/ }), - -/***/ "../../node_modules/@kbn/plugin-discovery/target_node/parse_kibana_platform_plugin.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parseKibanaPlatformPlugin = parseKibanaPlatformPlugin; - -var _path = _interopRequireDefault(__webpack_require__("path")); - -var _loadJsonFile = _interopRequireDefault(__webpack_require__("../../node_modules/load-json-file/index.js")); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -function isValidDepsDeclaration(input, type) { - if (typeof input === 'undefined') return []; - - if (Array.isArray(input) && input.every(i => typeof i === 'string')) { - return input; - } - - throw new TypeError(`The "${type}" in plugin manifest should be an array of strings.`); -} - -function parseKibanaPlatformPlugin(manifestPath) { - if (!_path.default.isAbsolute(manifestPath)) { - throw new TypeError('expected new platform manifest path to be absolute'); - } - - const manifest = _loadJsonFile.default.sync(manifestPath); - - if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) { - throw new TypeError('expected new platform plugin manifest to be a JSON encoded object'); - } - - if (typeof manifest.id !== 'string') { - throw new TypeError('expected new platform plugin manifest to have a string id'); - } - - if (typeof manifest.version !== 'string') { - throw new TypeError('expected new platform plugin manifest to have a string version'); - } - - if (!manifest.owner || typeof manifest.owner.name !== 'string') { - throw new TypeError(`Expected plugin ${manifest.id} manifest to have an owner with name specified (${manifestPath})`); - } - - return { - directory: _path.default.dirname(manifestPath), - manifestPath, - manifest: { ...manifest, - ui: !!manifest.ui, - server: !!manifest.server, - id: manifest.id, - version: manifest.version, - kibanaVersion: manifest.kibanaVersion || manifest.version, - serviceFolders: manifest.serviceFolders || [], - owner: manifest.owner, - description: manifest.description, - enabledOnAnonymousPages: Boolean(manifest.enabledOnAnonymousPages), - requiredPlugins: isValidDepsDeclaration(manifest.requiredPlugins, 'requiredPlugins'), - optionalPlugins: isValidDepsDeclaration(manifest.optionalPlugins, 'optionalPlugins'), - requiredBundles: isValidDepsDeclaration(manifest.requiredBundles, 'requiredBundles'), - extraPublicDirs: isValidDepsDeclaration(manifest.extraPublicDirs, 'extraPublicDirs') - } - }; -} - -/***/ }), - -/***/ "../../node_modules/@kbn/plugin-discovery/target_node/plugin_search_paths.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getPluginSearchPaths = getPluginSearchPaths; - -var _path = __webpack_require__("path"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -function getPluginSearchPaths({ - rootDir, - oss, - examples, - testPlugins -}) { - return [(0, _path.resolve)(rootDir, 'src', 'plugins'), ...(oss ? [] : [(0, _path.resolve)(rootDir, 'x-pack', 'plugins')]), (0, _path.resolve)(rootDir, 'plugins'), ...(examples ? [(0, _path.resolve)(rootDir, 'examples')] : []), ...(examples && !oss ? [(0, _path.resolve)(rootDir, 'x-pack', 'examples')] : []), (0, _path.resolve)(rootDir, '..', 'kibana-extra'), ...(testPlugins ? [(0, _path.resolve)(rootDir, 'test/analytics/fixtures/plugins'), (0, _path.resolve)(rootDir, 'test/plugin_functional/plugins'), (0, _path.resolve)(rootDir, 'test/interpreter_functional/plugins'), (0, _path.resolve)(rootDir, 'test/common/fixtures/plugins')] : []), ...(testPlugins && !oss ? [(0, _path.resolve)(rootDir, 'x-pack/test/plugin_functional/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/functional_with_es_ssl/fixtures/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/alerting_api_integration/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/plugin_api_integration/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/plugin_api_perf/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/licensing_plugin/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/usage_collection/plugins'), (0, _path.resolve)(rootDir, 'x-pack/test/security_functional/fixtures/common')] : [])]; -} - -/***/ }), - -/***/ "../../node_modules/@kbn/plugin-discovery/target_node/simple_kibana_platform_plugin_discovery.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.simpleKibanaPlatformPluginDiscovery = simpleKibanaPlatformPluginDiscovery; - -var _path = _interopRequireDefault(__webpack_require__("path")); - -var _globby = _interopRequireDefault(__webpack_require__("../../node_modules/globby/index.js")); - -var _normalizePath = _interopRequireDefault(__webpack_require__("../../node_modules/normalize-path/index.js")); - -var _parse_kibana_platform_plugin = __webpack_require__("../../node_modules/@kbn/plugin-discovery/target_node/parse_kibana_platform_plugin.js"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -/** - * Helper to find the new platform plugins. - */ -function simpleKibanaPlatformPluginDiscovery(scanDirs, pluginPaths) { - const patterns = Array.from(new Set([// find kibana.json files up to 5 levels within the scan dir - ...scanDirs.reduce((acc, dir) => [...acc, _path.default.resolve(dir, '*/kibana.json'), _path.default.resolve(dir, '*/*/kibana.json'), _path.default.resolve(dir, '*/*/*/kibana.json'), _path.default.resolve(dir, '*/*/*/*/kibana.json'), _path.default.resolve(dir, '*/*/*/*/*/kibana.json')], []), ...pluginPaths.map(path => _path.default.resolve(path, `kibana.json`))])).map(path => (0, _normalizePath.default)(path)); - - const manifestPaths = _globby.default.sync(patterns, { - absolute: true - }).map(path => // absolute paths returned from globby are using normalize or - // something so the path separators are `/` even on windows, - // Path.resolve solves this - _path.default.resolve(path)); - - return manifestPaths.map(_parse_kibana_platform_plugin.parseKibanaPlatformPlugin); -} - -/***/ }), - -/***/ "../../node_modules/@kbn/sort-package-json/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.sortPackageJson = sortPackageJson; - -var _sortPackageJson = _interopRequireDefault(__webpack_require__("../../node_modules/sort-package-json/index.js")); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -function sortPackageJson(json) { - return JSON.stringify((0, _sortPackageJson.default)(JSON.parse(json), { - // top level keys in the order they were written when this was implemented - sortOrder: ['name', 'description', 'keywords', 'private', 'version', 'branch', 'main', 'browser', 'types', 'tsdocMetadata', 'build', 'homepage', 'bugs', 'license', 'kibana', 'author', 'scripts', 'repository', 'engines', 'resolutions'] - }), null, 2) + '\n'; -} - -/***/ }), - -/***/ "../../node_modules/@kbn/stdio-dev-helpers/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "observeLines", { - enumerable: true, - get: function () { - return _observe_lines.observeLines; - } -}); -Object.defineProperty(exports, "observeReadable", { - enumerable: true, - get: function () { - return _observe_readable.observeReadable; - } -}); - -var _observe_lines = __webpack_require__("../../node_modules/@kbn/stdio-dev-helpers/target_node/observe_lines.js"); - -var _observe_readable = __webpack_require__("../../node_modules/@kbn/stdio-dev-helpers/target_node/observe_readable.js"); - -/***/ }), - -/***/ "../../node_modules/@kbn/stdio-dev-helpers/target_node/observe_lines.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.observeLines = observeLines; - -var Rx = _interopRequireWildcard(__webpack_require__("../../node_modules/rxjs/dist/esm5/index.js")); - -var _observe_readable = __webpack_require__("../../node_modules/@kbn/stdio-dev-helpers/target_node/observe_readable.js"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -const SEP = /\r?\n/; - -/** - * Creates an Observable from a Readable Stream that: - * - splits data from `readable` into lines - * - completes when `readable` emits "end" - * - fails if `readable` emits "errors" - * - * @param {ReadableStream} readable - * @return {Rx.Observable} - */ -function observeLines(readable) { - const done$ = (0, _observe_readable.observeReadable)(readable).pipe(Rx.share()); - const scan$ = Rx.fromEvent(readable, 'data').pipe(Rx.scan(({ - buffer - }, chunk) => { - buffer += chunk; - const lines = []; - - while (true) { - const match = buffer.match(SEP); - - if (!match || match.index === undefined) { - break; - } - - lines.push(buffer.slice(0, match.index)); - buffer = buffer.slice(match.index + match[0].length); - } - - return { - buffer, - lines - }; - }, { - buffer: '' - }), // stop if done completes or errors - Rx.takeUntil(done$.pipe(Rx.materialize())), Rx.share()); - return Rx.merge( // use done$ to provide completion/errors - done$, // merge in the "lines" from each step - scan$.pipe(Rx.mergeMap(({ - lines - }) => lines || [])), // inject the "unsplit" data at the end - scan$.pipe(Rx.takeLast(1), Rx.mergeMap(({ - buffer - }) => buffer ? [buffer] : []))); -} - -/***/ }), - -/***/ "../../node_modules/@kbn/stdio-dev-helpers/target_node/observe_readable.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.observeReadable = observeReadable; - -var Rx = _interopRequireWildcard(__webpack_require__("../../node_modules/rxjs/dist/esm5/index.js")); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -/** - * Produces an Observable from a ReadableSteam that: - * - completes on the first "end" event - * - fails on the first "error" event - */ -function observeReadable(readable) { - return Rx.race(Rx.fromEvent(readable, 'end').pipe(Rx.first(), Rx.ignoreElements()), Rx.fromEvent(readable, 'error').pipe(Rx.first(), Rx.map(err => { - throw err; - }))); -} - -/***/ }), - -/***/ "../../node_modules/@kbn/tooling-log/target_node/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "DEFAULT_LOG_LEVEL", { - enumerable: true, - get: function () { - return _log_levels.DEFAULT_LOG_LEVEL; - } -}); -Object.defineProperty(exports, "LOG_LEVEL_FLAGS", { - enumerable: true, - get: function () { - return _log_levels.LOG_LEVEL_FLAGS; - } -}); -Object.defineProperty(exports, "ToolingLog", { - enumerable: true, - get: function () { - return _tooling_log.ToolingLog; - } -}); -Object.defineProperty(exports, "ToolingLogCollectingWriter", { - enumerable: true, - get: function () { - return _tooling_log_collecting_writer.ToolingLogCollectingWriter; - } -}); -Object.defineProperty(exports, "ToolingLogTextWriter", { - enumerable: true, - get: function () { - return _tooling_log_text_writer.ToolingLogTextWriter; - } -}); -Object.defineProperty(exports, "getLogLevelFlagsHelp", { - enumerable: true, - get: function () { - return _log_levels.getLogLevelFlagsHelp; - } -}); -Object.defineProperty(exports, "parseLogLevel", { - enumerable: true, - get: function () { - return _log_levels.parseLogLevel; - } -}); -Object.defineProperty(exports, "pickLevelFromFlags", { - enumerable: true, - get: function () { - return _log_levels.pickLevelFromFlags; - } -}); - -var _tooling_log = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/tooling_log.js"); - -var _tooling_log_text_writer = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/tooling_log_text_writer.js"); - -var _log_levels = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/log_levels.js"); - -var _tooling_log_collecting_writer = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/tooling_log_collecting_writer.js"); - -/***/ }), - -/***/ "../../node_modules/@kbn/tooling-log/target_node/log_levels.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.LOG_LEVEL_FLAGS = exports.DEFAULT_LOG_LEVEL = void 0; -exports.getLogLevelFlagsHelp = getLogLevelFlagsHelp; -exports.parseLogLevel = parseLogLevel; -exports.pickLevelFromFlags = pickLevelFromFlags; - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -const LEVELS = ['silent', 'error', 'warning', 'success', 'info', 'debug', 'verbose']; -const DEFAULT_LOG_LEVEL = 'info'; -exports.DEFAULT_LOG_LEVEL = DEFAULT_LOG_LEVEL; - -function pickLevelFromFlags(flags, options = {}) { - if (flags.verbose) return 'verbose'; - if (flags.debug) return 'debug'; - if (flags.info) return 'info'; - if (flags.quiet) return 'error'; - if (flags.silent) return 'silent'; - return options.default || DEFAULT_LOG_LEVEL; -} - -const LOG_LEVEL_FLAGS = [{ - name: 'verbose', - help: '--verbose, -v Log verbosely' -}, { - name: 'info', - help: "--info Don't log debug messages" -}, { - name: 'debug', - help: '--debug Log debug messages (less than verbose)' -}, { - name: 'quiet', - help: '--quiet Only log errors' -}, { - name: 'silent', - help: "--silent Don't log anything" -}]; -exports.LOG_LEVEL_FLAGS = LOG_LEVEL_FLAGS; - -function getLogLevelFlagsHelp(defaultLogLevel = DEFAULT_LOG_LEVEL) { - return LOG_LEVEL_FLAGS.filter(({ - name - }) => name !== defaultLogLevel).map(({ - help - }) => help).join('\n'); -} - -function parseLogLevel(name) { - const i = LEVELS.indexOf(name); - - if (i === -1) { - const msg = `Invalid log level "${name}" ` + `(expected one of ${LEVELS.join(',')})`; - throw new Error(msg); - } - - const flags = {}; - LEVELS.forEach((level, levelI) => { - flags[level] = levelI <= i; - }); - return { - name, - flags: flags - }; -} - -/***/ }), - -/***/ "../../node_modules/@kbn/tooling-log/target_node/tooling_log.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ToolingLog = void 0; - -var _defineProperty2 = _interopRequireDefault(__webpack_require__("../../node_modules/@babel/runtime/helpers/defineProperty.js")); - -var Rx = _interopRequireWildcard(__webpack_require__("../../node_modules/rxjs/dist/esm5/index.js")); - -var _tooling_log_text_writer = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/tooling_log_text_writer.js"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -class ToolingLog { - constructor(writerConfig, options) { - (0, _defineProperty2.default)(this, "indentWidth$", void 0); - (0, _defineProperty2.default)(this, "writers$", void 0); - (0, _defineProperty2.default)(this, "written$", void 0); - (0, _defineProperty2.default)(this, "type", void 0); - this.indentWidth$ = options !== null && options !== void 0 && options.parent ? options.parent.indentWidth$ : new Rx.BehaviorSubject(0); - this.writers$ = options !== null && options !== void 0 && options.parent ? options.parent.writers$ : new Rx.BehaviorSubject([]); - - if (!(options !== null && options !== void 0 && options.parent) && writerConfig) { - this.writers$.next([new _tooling_log_text_writer.ToolingLogTextWriter(writerConfig)]); - } - - this.written$ = options !== null && options !== void 0 && options.parent ? options.parent.written$ : new Rx.Subject(); - this.type = options === null || options === void 0 ? void 0 : options.type; - } - /** - * Get the current indentation level of the ToolingLog - */ - - - getIndent() { - return this.indentWidth$.getValue(); - } - /** - * Indent the output of the ToolingLog by some character (4 is a good choice usually). - * - * If provided, the `block` function will be executed and once it's promise is resolved - * or rejected the indentation will be reset to its original state. - * - * @param delta the number of spaces to increase/decrease the indentation - * @param block a function to run and reset any indentation changes after - */ - - - indent(delta = 0, block) { - const originalWidth = this.indentWidth$.getValue(); - this.indentWidth$.next(Math.max(originalWidth + delta, 0)); - - if (!block) { - return; - } - - const maybePromise = block(); - - if (typeof maybePromise === 'object' && maybePromise && typeof maybePromise.then === 'function') { - return (async () => { - try { - return await maybePromise; - } finally { - this.indentWidth$.next(originalWidth); - } - })(); - } - - this.indentWidth$.next(originalWidth); - return maybePromise; - } - - verbose(...args) { - this.sendToWriters('verbose', args); - } - - debug(...args) { - this.sendToWriters('debug', args); - } - - info(...args) { - this.sendToWriters('info', args); - } - - success(...args) { - this.sendToWriters('success', args); - } - - warning(...args) { - this.sendToWriters('warning', args); - } - - error(error) { - this.sendToWriters('error', [error]); - } - - write(...args) { - this.sendToWriters('write', args); - } - - getWriters() { - return [...this.writers$.getValue()]; - } - - setWriters(writers) { - this.writers$.next([...writers]); - } - - getWritten$() { - return this.written$.asObservable(); - } - /** - * Create a new ToolingLog which sets a different "type", allowing messages to be filtered out by "source" - * @param type A string that will be passed along with messages from this logger which can be used to filter messages with `ignoreSources` - */ - - - withType(type) { - return new ToolingLog(undefined, { - type, - parent: this - }); - } - - sendToWriters(type, args) { - const indent = this.indentWidth$.getValue(); - const writers = this.writers$.getValue(); - const msg = { - type, - indent, - source: this.type, - args - }; - let written = false; - - for (const writer of writers) { - if (writer.write(msg)) { - written = true; - } - } - - if (written) { - this.written$.next(msg); - } - } - -} - -exports.ToolingLog = ToolingLog; - -/***/ }), - -/***/ "../../node_modules/@kbn/tooling-log/target_node/tooling_log_collecting_writer.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ToolingLogCollectingWriter = void 0; - -var _defineProperty2 = _interopRequireDefault(__webpack_require__("../../node_modules/@babel/runtime/helpers/defineProperty.js")); - -var _tooling_log_text_writer = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/tooling_log_text_writer.js"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -class ToolingLogCollectingWriter extends _tooling_log_text_writer.ToolingLogTextWriter { - constructor(level = 'verbose') { - super({ - level, - writeTo: { - write: msg => { - // trim trailing new line - this.messages.push(msg.slice(0, -1)); - } - } - }); - (0, _defineProperty2.default)(this, "messages", []); - } - /** - * Called by ToolingLog, extends messages with the source if message includes one. - */ - - - write(msg) { - if (msg.source) { - return super.write({ ...msg, - args: [`source[${msg.source}]`, ...msg.args] - }); - } - - return super.write(msg); - } - -} - -exports.ToolingLogCollectingWriter = ToolingLogCollectingWriter; - -/***/ }), - -/***/ "../../node_modules/@kbn/tooling-log/target_node/tooling_log_text_writer.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ToolingLogTextWriter = void 0; - -var _defineProperty2 = _interopRequireDefault(__webpack_require__("../../node_modules/@babel/runtime/helpers/defineProperty.js")); - -var _util = __webpack_require__("util"); - -var _chalk = _interopRequireDefault(__webpack_require__("../../node_modules/chalk/source/index.js")); - -var _log_levels = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/log_levels.js"); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -const { - magentaBright, - yellow, - red, - blue, - green, - dim -} = _chalk.default; -const PREFIX_INDENT = ' '.repeat(6); -const MSG_PREFIXES = { - verbose: ` ${magentaBright('sill')} `, - debug: ` ${dim('debg')} `, - info: ` ${blue('info')} `, - success: ` ${green('succ')} `, - warning: ` ${yellow('warn')} `, - error: `${red('ERROR')} ` -}; - -const has = (obj, key) => obj.hasOwnProperty(key); - -function shouldWriteType(level, type) { - if (type === 'write') { - return level.name !== 'silent'; - } - - return Boolean(level.flags[type === 'success' ? 'info' : type]); -} - -function stringifyError(error) { - if (typeof error !== 'string' && !(error instanceof Error)) { - error = new Error(`"${error}" thrown`); - } - - if (typeof error === 'string') { - return error; - } - - return error.stack || error.message || error; -} - -class ToolingLogTextWriter { - constructor(config) { - (0, _defineProperty2.default)(this, "level", void 0); - (0, _defineProperty2.default)(this, "writeTo", void 0); - (0, _defineProperty2.default)(this, "ignoreSources", void 0); - this.level = (0, _log_levels.parseLogLevel)(config.level); - this.writeTo = config.writeTo; - this.ignoreSources = config.ignoreSources; - - if (!this.writeTo || typeof this.writeTo.write !== 'function') { - throw new Error('ToolingLogTextWriter requires the `writeTo` option be set to a stream (like process.stdout)'); - } - } - - write(msg) { - if (!shouldWriteType(this.level, msg.type)) { - return false; - } - - if (this.ignoreSources && msg.source && this.ignoreSources.includes(msg.source)) { - if (msg.type === 'write') { - const txt = (0, _util.format)(msg.args[0], ...msg.args.slice(1)); // Ensure that Elasticsearch deprecation log messages from Kibana aren't ignored - - if (!/elasticsearch\.deprecation/.test(txt)) { - return false; - } - } else { - return false; - } - } - - const prefix = has(MSG_PREFIXES, msg.type) ? MSG_PREFIXES[msg.type] : ''; - ToolingLogTextWriter.write(this.writeTo, prefix, msg); - return true; - } - - static write(writeTo, prefix, msg) { - const txt = msg.type === 'error' ? stringifyError(msg.args[0]) : (0, _util.format)(msg.args[0], ...msg.args.slice(1)); - (prefix + txt).split('\n').forEach((line, i) => { - let lineIndent = ''; - - if (msg.indent > 0) { - // if we are indenting write some spaces followed by a symbol - lineIndent += ' '.repeat(msg.indent - 1); - lineIndent += line.startsWith('-') ? '└' : '│'; - } - - if (line && prefix && i > 0) { - // apply additional indentation to lines after - // the first if this message gets a prefix - lineIndent += PREFIX_INDENT; - } - - writeTo.write(`${lineIndent}${line}\n`); - }); - } - -} - -exports.ToolingLogTextWriter = ToolingLogTextWriter; - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/adapters/fs.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__("fs"); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/constants.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); -const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); -const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); -const SUPPORTED_MAJOR_VERSION = 10; -const SUPPORTED_MINOR_VERSION = 10; -const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; -const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; -/** - * IS `true` for Node.js 10.10 and greater. - */ -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/providers/async.js"); -const sync = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/providers/sync.js"); -const settings_1 = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/settings.js"); -exports.Settings = settings_1.default; -function scandir(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - return async.read(path, getSettings(), optionsOrSettingsOrCallback); - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.scandir = scandir; -function scandirSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.scandirSync = scandirSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/providers/async.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const rpl = __webpack_require__("../../node_modules/run-parallel/index.js"); -const constants_1 = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/constants.js"); -const utils = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/utils/index.js"); -function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings, callback); - } - return readdir(directory, settings, callback); -} -exports.read = read; -function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - return callFailureCallback(callback, readdirError); - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: `${directory}${settings.pathSegmentSeparator}${dirent.name}` - })); - if (!settings.followSymbolicLinks) { - return callSuccessCallback(callback, entries); - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - return callFailureCallback(callback, rplError); - } - callSuccessCallback(callback, rplEntries); - }); - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - return done(null, entry); - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - return done(statError); - } - return done(null, entry); - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - return done(null, entry); - }); - }; -} -function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - return callFailureCallback(callback, readdirError); - } - const filepaths = names.map((name) => `${directory}${settings.pathSegmentSeparator}${name}`); - const tasks = filepaths.map((filepath) => { - return (done) => fsStat.stat(filepath, settings.fsStatSettings, done); - }); - rpl(tasks, (rplError, results) => { - if (rplError !== null) { - return callFailureCallback(callback, rplError); - } - const entries = []; - names.forEach((name, index) => { - const stats = results[index]; - const entry = { - name, - path: filepaths[index], - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - entries.push(entry); - }); - callSuccessCallback(callback, entries); - }); - }); -} -exports.readdir = readdir; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/providers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const constants_1 = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/constants.js"); -const utils = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/utils/index.js"); -function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); -} -exports.read = read; -function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: `${directory}${settings.pathSegmentSeparator}${dirent.name}` - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } - catch (error) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error; - } - } - } - return entry; - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = `${directory}${settings.pathSegmentSeparator}${name}`; - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); -} -exports.readdir = readdir; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/settings.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__("path"); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const fs = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/adapters/fs.js"); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option === undefined ? value : option; - } -} -exports.default = Settings; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/utils/fs.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.scandir/out/utils/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/utils/fs.js"); -exports.fs = fs; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.stat/out/adapters/fs.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__("fs"); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.stat/out/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/providers/async.js"); -const sync = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/providers/sync.js"); -const settings_1 = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/settings.js"); -exports.Settings = settings_1.default; -function stat(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - return async.read(path, getSettings(), optionsOrSettingsOrCallback); - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.stat = stat; -function statSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.statSync = statSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.stat/out/providers/async.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -function read(path, settings, callback) { - settings.fs.lstat(path, (lstatError, lstat) => { - if (lstatError !== null) { - return callFailureCallback(callback, lstatError); - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return callSuccessCallback(callback, lstat); - } - settings.fs.stat(path, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - return callFailureCallback(callback, statError); - } - return callSuccessCallback(callback, lstat); - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); -} -exports.read = read; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.stat/out/providers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -function read(path, settings) { - const lstat = settings.fs.lstatSync(path); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } - catch (error) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error; - } -} -exports.read = read; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.stat/out/settings.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/adapters/fs.js"); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option === undefined ? value : option; - } -} -exports.default = Settings; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/providers/async.js"); -const stream_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/providers/stream.js"); -const sync_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/providers/sync.js"); -const settings_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/settings.js"); -exports.Settings = settings_1.default; -function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); -} -exports.walk = walk; -function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); -} -exports.walkSync = walkSync; -function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); -} -exports.walkStream = walkStream; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/providers/async.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/async.js"); -class AsyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = new Set(); - } - read(callback) { - this._reader.onError((error) => { - callFailureCallback(callback, error); - }); - this._reader.onEntry((entry) => { - this._storage.add(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, [...this._storage]); - }); - this._reader.read(); - } -} -exports.default = AsyncProvider; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, entries) { - callback(null, entries); -} - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/providers/stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__("stream"); -const async_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/async.js"); -class StreamProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { }, - destroy: this._reader.destroy.bind(this._reader) - }); - } - read() { - this._reader.onError((error) => { - this._stream.emit('error', error); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } -} -exports.default = StreamProvider; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/providers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/sync.js"); -class SyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } -} -exports.default = SyncProvider; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/readers/async.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const events_1 = __webpack_require__("events"); -const fsScandir = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/index.js"); -const fastq = __webpack_require__("../../node_modules/fastq/queue.js"); -const common = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/common.js"); -const reader_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/reader.js"); -class AsyncReader extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit('end'); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - destroy() { - if (this._isDestroyed) { - throw new Error('The reader is already destroyed'); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on('entry', callback); - } - onError(callback) { - this._emitter.once('error', callback); - } - onEnd(callback) { - this._emitter.once('end', callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error) => { - if (error !== null) { - this._handleError(error); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { - if (error !== null) { - return done(error, undefined); - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, undefined); - }); - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit('error', error); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit('entry', entry); - } -} -exports.default = AsyncReader; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/readers/common.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -function isFatalError(settings, error) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error); -} -exports.isFatalError = isFatalError; -function isAppliedFilter(filter, value) { - return filter === null || filter(value); -} -exports.isAppliedFilter = isAppliedFilter; -function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[\\/]/).join(separator); -} -exports.replacePathSegmentSeparator = replacePathSegmentSeparator; -function joinPathSegments(a, b, separator) { - if (a === '') { - return b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/readers/reader.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const common = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/common.js"); -class Reader { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } -} -exports.default = Reader; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/readers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsScandir = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/index.js"); -const common = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/common.js"); -const reader_1 = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/readers/reader.js"); -class SyncReader extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = new Set(); - this._queue = new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return [...this._storage]; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } - catch (error) { - this._handleError(error); - } - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - throw error; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, entry.path); - } - } - _pushToStorage(entry) { - this._storage.add(entry); - } -} -exports.default = SyncReader; - - -/***/ }), - -/***/ "../../node_modules/@nodelib/fs.walk/out/settings.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__("path"); -const fsScandir = __webpack_require__("../../node_modules/@nodelib/fs.scandir/out/index.js"); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, undefined); - this.concurrency = this._getValue(this._options.concurrency, Infinity); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option === undefined ? value : option; - } -} -exports.default = Settings; - - -/***/ }), - -/***/ "../../node_modules/@yarnpkg/lockfile/index.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 14); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("path"); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _promise = __webpack_require__(173); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("util"); - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("fs"); - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -class MessageError extends Error { - constructor(msg, code) { - super(msg); - this.code = code; - } - -} - -exports.MessageError = MessageError; -class ProcessSpawnError extends MessageError { - constructor(msg, code, process) { - super(msg, code); - this.process = process; - } - -} - -exports.ProcessSpawnError = ProcessSpawnError; -class SecurityError extends MessageError {} - -exports.SecurityError = SecurityError; -class ProcessTermError extends MessageError {} - -exports.ProcessTermError = ProcessTermError; -class ResponseError extends Error { - constructor(msg, responseCode) { - super(msg); - this.responseCode = responseCode; - } - -} -exports.ResponseError = ResponseError; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined; - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -let buildActionsForCopy = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { - - // - let build = (() => { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - const src = data.src, - dest = data.dest, - type = data.type; - - const onFresh = data.onFresh || noop; - const onDone = data.onDone || noop; - - // TODO https://github.com/yarnpkg/yarn/issues/3751 - // related to bundled dependencies handling - if (files.has(dest.toLowerCase())) { - reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`); - } else { - files.add(dest.toLowerCase()); - } - - if (type === 'symlink') { - yield mkdirp((_path || _load_path()).default.dirname(dest)); - onFresh(); - actions.symlink.push({ - dest, - linkname: src - }); - onDone(); - return; - } - - if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { - // ignored file - return; - } - - const srcStat = yield lstat(src); - let srcFiles; - - if (srcStat.isDirectory()) { - srcFiles = yield readdir(src); - } - - let destStat; - try { - // try accessing the destination - destStat = yield lstat(dest); - } catch (e) { - // proceed if destination doesn't exist, otherwise error - if (e.code !== 'ENOENT') { - throw e; - } - } - - // if destination exists - if (destStat) { - const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); - const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); - const bothFiles = srcStat.isFile() && destStat.isFile(); - - // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving - // us modes that aren't valid. investigate this, it's generally safe to proceed. - - /* if (srcStat.mode !== destStat.mode) { - try { - await access(dest, srcStat.mode); - } catch (err) {} - } */ - - if (bothFiles && artifactFiles.has(dest)) { - // this file gets changed during build, likely by a custom install script. Don't bother checking it. - onDone(); - reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); - return; - } - - if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) { - // we can safely assume this is the same file - onDone(); - reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.size, +srcStat.mtime)); - return; - } - - if (bothSymlinks) { - const srcReallink = yield readlink(src); - if (srcReallink === (yield readlink(dest))) { - // if both symlinks are the same then we can continue on - onDone(); - reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); - return; - } - } - - if (bothFolders) { - // mark files that aren't in this folder as possibly extraneous - const destFiles = yield readdir(dest); - invariant(srcFiles, 'src files not initialised'); - - for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { - var _ref6; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref6 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref6 = _i4.value; - } - - const file = _ref6; - - if (srcFiles.indexOf(file) < 0) { - const loc = (_path || _load_path()).default.join(dest, file); - possibleExtraneous.add(loc); - - if ((yield lstat(loc)).isDirectory()) { - for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { - var _ref7; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref7 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref7 = _i5.value; - } - - const file = _ref7; - - possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); - } - } - } - } - } - } - - if (destStat && destStat.isSymbolicLink()) { - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); - destStat = null; - } - - if (srcStat.isSymbolicLink()) { - onFresh(); - const linkname = yield readlink(src); - actions.symlink.push({ - dest, - linkname - }); - onDone(); - } else if (srcStat.isDirectory()) { - if (!destStat) { - reporter.verbose(reporter.lang('verboseFileFolder', dest)); - yield mkdirp(dest); - } - - const destParts = dest.split((_path || _load_path()).default.sep); - while (destParts.length) { - files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); - destParts.pop(); - } - - // push all files to queue - invariant(srcFiles, 'src files not initialised'); - let remaining = srcFiles.length; - if (!remaining) { - onDone(); - } - for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { - var _ref8; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref8 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref8 = _i6.value; - } - - const file = _ref8; - - queue.push({ - dest: (_path || _load_path()).default.join(dest, file), - onFresh, - onDone: function (_onDone) { - function onDone() { - return _onDone.apply(this, arguments); - } - - onDone.toString = function () { - return _onDone.toString(); - }; - - return onDone; - }(function () { - if (--remaining === 0) { - onDone(); - } - }), - src: (_path || _load_path()).default.join(src, file) - }); - } - } else if (srcStat.isFile()) { - onFresh(); - actions.file.push({ - src, - dest, - atime: srcStat.atime, - mtime: srcStat.mtime, - mode: srcStat.mode - }); - onDone(); - } else { - throw new Error(`unsure how to copy this: ${src}`); - } - }); - - return function build(_x5) { - return _ref5.apply(this, arguments); - }; - })(); - - const artifactFiles = new Set(events.artifactFiles || []); - const files = new Set(); - - // initialise events - for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - const item = _ref2; - - const onDone = item.onDone; - item.onDone = function () { - events.onProgress(item.dest); - if (onDone) { - onDone(); - } - }; - } - events.onStart(queue.length); - - // start building actions - const actions = { - file: [], - symlink: [], - link: [] - }; - - // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items - // at a time due to the requirement to push items onto the queue - while (queue.length) { - const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); - yield Promise.all(items.map(build)); - } - - // simulate the existence of some files to prevent considering them extraneous - for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - const file = _ref3; - - if (possibleExtraneous.has(file)) { - reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); - possibleExtraneous.delete(file); - } - } - - for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - const loc = _ref4; - - if (files.has(loc.toLowerCase())) { - possibleExtraneous.delete(loc); - } - } - - return actions; - }); - - return function buildActionsForCopy(_x, _x2, _x3, _x4) { - return _ref.apply(this, arguments); - }; -})(); - -let buildActionsForHardlink = (() => { - var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { - - // - let build = (() => { - var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - const src = data.src, - dest = data.dest; - - const onFresh = data.onFresh || noop; - const onDone = data.onDone || noop; - if (files.has(dest.toLowerCase())) { - // Fixes issue https://github.com/yarnpkg/yarn/issues/2734 - // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1, - // package-linker passes that modules A1 and B1 need to be hardlinked, - // the recursive linking algorithm of A1 ends up scheduling files in B1 to be linked twice which will case - // an exception. - onDone(); - return; - } - files.add(dest.toLowerCase()); - - if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { - // ignored file - return; - } - - const srcStat = yield lstat(src); - let srcFiles; - - if (srcStat.isDirectory()) { - srcFiles = yield readdir(src); - } - - const destExists = yield exists(dest); - if (destExists) { - const destStat = yield lstat(dest); - - const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); - const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); - const bothFiles = srcStat.isFile() && destStat.isFile(); - - if (srcStat.mode !== destStat.mode) { - try { - yield access(dest, srcStat.mode); - } catch (err) { - // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving - // us modes that aren't valid. investigate this, it's generally safe to proceed. - reporter.verbose(err); - } - } - - if (bothFiles && artifactFiles.has(dest)) { - // this file gets changed during build, likely by a custom install script. Don't bother checking it. - onDone(); - reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); - return; - } - - // correct hardlink - if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) { - onDone(); - reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.ino)); - return; - } - - if (bothSymlinks) { - const srcReallink = yield readlink(src); - if (srcReallink === (yield readlink(dest))) { - // if both symlinks are the same then we can continue on - onDone(); - reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); - return; - } - } - - if (bothFolders) { - // mark files that aren't in this folder as possibly extraneous - const destFiles = yield readdir(dest); - invariant(srcFiles, 'src files not initialised'); - - for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { - var _ref14; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref14 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref14 = _i10.value; - } - - const file = _ref14; - - if (srcFiles.indexOf(file) < 0) { - const loc = (_path || _load_path()).default.join(dest, file); - possibleExtraneous.add(loc); - - if ((yield lstat(loc)).isDirectory()) { - for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { - var _ref15; - - if (_isArray11) { - if (_i11 >= _iterator11.length) break; - _ref15 = _iterator11[_i11++]; - } else { - _i11 = _iterator11.next(); - if (_i11.done) break; - _ref15 = _i11.value; - } - - const file = _ref15; - - possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); - } - } - } - } - } - } - - if (srcStat.isSymbolicLink()) { - onFresh(); - const linkname = yield readlink(src); - actions.symlink.push({ - dest, - linkname - }); - onDone(); - } else if (srcStat.isDirectory()) { - reporter.verbose(reporter.lang('verboseFileFolder', dest)); - yield mkdirp(dest); - - const destParts = dest.split((_path || _load_path()).default.sep); - while (destParts.length) { - files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); - destParts.pop(); - } - - // push all files to queue - invariant(srcFiles, 'src files not initialised'); - let remaining = srcFiles.length; - if (!remaining) { - onDone(); - } - for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { - var _ref16; - - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref16 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref16 = _i12.value; - } - - const file = _ref16; - - queue.push({ - onFresh, - src: (_path || _load_path()).default.join(src, file), - dest: (_path || _load_path()).default.join(dest, file), - onDone: function (_onDone2) { - function onDone() { - return _onDone2.apply(this, arguments); - } - - onDone.toString = function () { - return _onDone2.toString(); - }; - - return onDone; - }(function () { - if (--remaining === 0) { - onDone(); - } - }) - }); - } - } else if (srcStat.isFile()) { - onFresh(); - actions.link.push({ - src, - dest, - removeDest: destExists - }); - onDone(); - } else { - throw new Error(`unsure how to copy this: ${src}`); - } - }); - - return function build(_x10) { - return _ref13.apply(this, arguments); - }; - })(); - - const artifactFiles = new Set(events.artifactFiles || []); - const files = new Set(); - - // initialise events - for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { - var _ref10; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref10 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref10 = _i7.value; - } - - const item = _ref10; - - const onDone = item.onDone || noop; - item.onDone = function () { - events.onProgress(item.dest); - onDone(); - }; - } - events.onStart(queue.length); - - // start building actions - const actions = { - file: [], - symlink: [], - link: [] - }; - - // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items - // at a time due to the requirement to push items onto the queue - while (queue.length) { - const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); - yield Promise.all(items.map(build)); - } - - // simulate the existence of some files to prevent considering them extraneous - for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { - var _ref11; - - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref11 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref11 = _i8.value; - } - - const file = _ref11; - - if (possibleExtraneous.has(file)) { - reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); - possibleExtraneous.delete(file); - } - } - - for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { - var _ref12; - - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref12 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref12 = _i9.value; - } - - const loc = _ref12; - - if (files.has(loc.toLowerCase())) { - possibleExtraneous.delete(loc); - } - } - - return actions; - }); - - return function buildActionsForHardlink(_x6, _x7, _x8, _x9) { - return _ref9.apply(this, arguments); - }; -})(); - -let copyBulk = exports.copyBulk = (() => { - var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { - const events = { - onStart: _events && _events.onStart || noop, - onProgress: _events && _events.onProgress || noop, - possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), - ignoreBasenames: _events && _events.ignoreBasenames || [], - artifactFiles: _events && _events.artifactFiles || [] - }; - - const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); - events.onStart(actions.file.length + actions.symlink.length + actions.link.length); - - const fileActions = actions.file; - - const currentlyWriting = new Map(); - - yield (_promise || _load_promise()).queue(fileActions, (() => { - var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - let writePromise; - while (writePromise = currentlyWriting.get(data.dest)) { - yield writePromise; - } - - reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest)); - const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () { - return currentlyWriting.delete(data.dest); - }); - currentlyWriting.set(data.dest, copier); - events.onProgress(data.dest); - return copier; - }); - - return function (_x14) { - return _ref18.apply(this, arguments); - }; - })(), CONCURRENT_QUEUE_ITEMS); - - // we need to copy symlinks last as they could reference files we were copying - const symlinkActions = actions.symlink; - yield (_promise || _load_promise()).queue(symlinkActions, function (data) { - const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); - reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); - return symlink(linkname, data.dest); - }); - }); - - return function copyBulk(_x11, _x12, _x13) { - return _ref17.apply(this, arguments); - }; -})(); - -let hardlinkBulk = exports.hardlinkBulk = (() => { - var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { - const events = { - onStart: _events && _events.onStart || noop, - onProgress: _events && _events.onProgress || noop, - possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), - artifactFiles: _events && _events.artifactFiles || [], - ignoreBasenames: [] - }; - - const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); - events.onStart(actions.file.length + actions.symlink.length + actions.link.length); - - const fileActions = actions.link; - - yield (_promise || _load_promise()).queue(fileActions, (() => { - var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest)); - if (data.removeDest) { - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest); - } - yield link(data.src, data.dest); - }); - - return function (_x18) { - return _ref20.apply(this, arguments); - }; - })(), CONCURRENT_QUEUE_ITEMS); - - // we need to copy symlinks last as they could reference files we were copying - const symlinkActions = actions.symlink; - yield (_promise || _load_promise()).queue(symlinkActions, function (data) { - const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); - reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); - return symlink(linkname, data.dest); - }); - }); - - return function hardlinkBulk(_x15, _x16, _x17) { - return _ref19.apply(this, arguments); - }; -})(); - -let readFileAny = exports.readFileAny = (() => { - var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { - for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { - var _ref22; - - if (_isArray13) { - if (_i13 >= _iterator13.length) break; - _ref22 = _iterator13[_i13++]; - } else { - _i13 = _iterator13.next(); - if (_i13.done) break; - _ref22 = _i13.value; - } - - const file = _ref22; - - if (yield exists(file)) { - return readFile(file); - } - } - return null; - }); - - return function readFileAny(_x19) { - return _ref21.apply(this, arguments); - }; -})(); - -let readJson = exports.readJson = (() => { - var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { - return (yield readJsonAndFile(loc)).object; - }); - - return function readJson(_x20) { - return _ref23.apply(this, arguments); - }; -})(); - -let readJsonAndFile = exports.readJsonAndFile = (() => { - var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { - const file = yield readFile(loc); - try { - return { - object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), - content: file - }; - } catch (err) { - err.message = `${loc}: ${err.message}`; - throw err; - } - }); - - return function readJsonAndFile(_x21) { - return _ref24.apply(this, arguments); - }; -})(); - -let find = exports.find = (() => { - var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { - const parts = dir.split((_path || _load_path()).default.sep); - - while (parts.length) { - const loc = parts.concat(filename).join((_path || _load_path()).default.sep); - - if (yield exists(loc)) { - return loc; - } else { - parts.pop(); - } - } - - return false; - }); - - return function find(_x22, _x23) { - return _ref25.apply(this, arguments); - }; -})(); - -let symlink = exports.symlink = (() => { - var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { - try { - const stats = yield lstat(dest); - if (stats.isSymbolicLink()) { - const resolved = yield realpath(dest); - if (resolved === src) { - return; - } - } - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - } - // We use rimraf for unlink which never throws an ENOENT on missing target - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); - - if (process.platform === 'win32') { - // use directory junctions if possible on win32, this requires absolute paths - yield fsSymlink(src, dest, 'junction'); - } else { - // use relative paths otherwise which will be retained if the directory is moved - let relative; - try { - relative = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - relative = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); - } - // When path.relative returns an empty string for the current directory, we should instead use - // '.', which is a valid fs.symlink target. - yield fsSymlink(relative || '.', dest); - } - }); - - return function symlink(_x24, _x25) { - return _ref26.apply(this, arguments); - }; -})(); - -let walk = exports.walk = (() => { - var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { - let files = []; - - let filenames = yield readdir(dir); - if (ignoreBasenames.size) { - filenames = filenames.filter(function (name) { - return !ignoreBasenames.has(name); - }); - } - - for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { - var _ref28; - - if (_isArray14) { - if (_i14 >= _iterator14.length) break; - _ref28 = _iterator14[_i14++]; - } else { - _i14 = _iterator14.next(); - if (_i14.done) break; - _ref28 = _i14.value; - } - - const name = _ref28; - - const relative = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; - const loc = (_path || _load_path()).default.join(dir, name); - const stat = yield lstat(loc); - - files.push({ - relative, - basename: name, - absolute: loc, - mtime: +stat.mtime - }); - - if (stat.isDirectory()) { - files = files.concat((yield walk(loc, relative, ignoreBasenames))); - } - } - - return files; - }); - - return function walk(_x26, _x27) { - return _ref27.apply(this, arguments); - }; -})(); - -let getFileSizeOnDisk = exports.getFileSizeOnDisk = (() => { - var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { - const stat = yield lstat(loc); - const size = stat.size, - blockSize = stat.blksize; - - - return Math.ceil(size / blockSize) * blockSize; - }); - - return function getFileSizeOnDisk(_x28) { - return _ref29.apply(this, arguments); - }; -})(); - -let getEolFromFile = (() => { - var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { - if (!(yield exists(path))) { - return undefined; - } - - const buffer = yield readFileBuffer(path); - - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] === cr) { - return '\r\n'; - } - if (buffer[i] === lf) { - return '\n'; - } - } - return undefined; - }); - - return function getEolFromFile(_x29) { - return _ref30.apply(this, arguments); - }; -})(); - -let writeFilePreservingEol = exports.writeFilePreservingEol = (() => { - var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { - const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; - if (eol !== '\n') { - data = data.replace(/\n/g, eol); - } - yield writeFile(path, data); - }); - - return function writeFilePreservingEol(_x30, _x31) { - return _ref31.apply(this, arguments); - }; -})(); - -let hardlinksWork = exports.hardlinksWork = (() => { - var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { - const filename = 'test-file' + Math.random(); - const file = (_path || _load_path()).default.join(dir, filename); - const fileLink = (_path || _load_path()).default.join(dir, filename + '-link'); - try { - yield writeFile(file, 'test'); - yield link(file, fileLink); - } catch (err) { - return false; - } finally { - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file); - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink); - } - return true; - }); - - return function hardlinksWork(_x32) { - return _ref32.apply(this, arguments); - }; -})(); - -// not a strict polyfill for Node's fs.mkdtemp - - -let makeTempDir = exports.makeTempDir = (() => { - var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { - const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); - yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); - yield mkdirp(dir); - return dir; - }); - - return function makeTempDir(_x33) { - return _ref33.apply(this, arguments); - }; -})(); - -let readFirstAvailableStream = exports.readFirstAvailableStream = (() => { - var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { - for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { - var _ref35; - - if (_isArray15) { - if (_i15 >= _iterator15.length) break; - _ref35 = _iterator15[_i15++]; - } else { - _i15 = _iterator15.next(); - if (_i15.done) break; - _ref35 = _i15.value; - } - - const path = _ref35; - - try { - const fd = yield open(path, 'r'); - return (_fs || _load_fs()).default.createReadStream(path, { fd }); - } catch (err) { - // Try the next one - } - } - return null; - }); - - return function readFirstAvailableStream(_x34) { - return _ref34.apply(this, arguments); - }; -})(); - -let getFirstSuitableFolder = exports.getFirstSuitableFolder = (() => { - var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { - const result = { - skipped: [], - folder: null - }; - - for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { - var _ref37; - - if (_isArray16) { - if (_i16 >= _iterator16.length) break; - _ref37 = _iterator16[_i16++]; - } else { - _i16 = _iterator16.next(); - if (_i16.done) break; - _ref37 = _i16.value; - } - - const folder = _ref37; - - try { - yield mkdirp(folder); - yield access(folder, mode); - - result.folder = folder; - - return result; - } catch (error) { - result.skipped.push({ - error, - folder - }); - } - } - return result; - }); - - return function getFirstSuitableFolder(_x35) { - return _ref36.apply(this, arguments); - }; -})(); - -exports.copy = copy; -exports.readFile = readFile; -exports.readFileRaw = readFileRaw; -exports.normalizeOS = normalizeOS; - -var _fs; - -function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(3)); -} - -var _glob; - -function _load_glob() { - return _glob = _interopRequireDefault(__webpack_require__(75)); -} - -var _os; - -function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(36)); -} - -var _path; - -function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); -} - -var _blockingQueue; - -function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(84)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireWildcard(__webpack_require__(40)); -} - -var _promise2; - -function _load_promise2() { - return _promise2 = __webpack_require__(40); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(20)); -} - -var _fsNormalized; - -function _load_fsNormalized() { - return _fsNormalized = __webpack_require__(164); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : { - R_OK: (_fs || _load_fs()).default.R_OK, - W_OK: (_fs || _load_fs()).default.W_OK, - X_OK: (_fs || _load_fs()).default.X_OK -}; - -const lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock'); - -const readFileBuffer = exports.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); -const open = exports.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); -const writeFile = exports.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); -const readlink = exports.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); -const realpath = exports.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); -const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); -const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); -const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); -const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); -const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(116)); -const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); -const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); -const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); -const link = exports.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); -const glob = exports.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); -exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink; - -// fs.copyFile uses the native file copying instructions on the system, performing much better -// than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the -// concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD. - -const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; - -const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); -const invariant = __webpack_require__(7); -const stripBOM = __webpack_require__(122); - -const noop = () => {}; - -function copy(src, dest, reporter) { - return copyBulk([{ src, dest }], reporter); -} - -function _readFile(loc, encoding) { - return new Promise((resolve, reject) => { - (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) { - if (err) { - reject(err); - } else { - resolve(content); - } - }); - }); -} - -function readFile(loc) { - return _readFile(loc, 'utf8').then(normalizeOS); -} - -function readFileRaw(loc) { - return _readFile(loc, 'binary'); -} - -function normalizeOS(body) { - return body.replace(/\r\n/g, '\n'); -} - -const cr = '\r'.charCodeAt(0); -const lf = '\n'.charCodeAt(0); - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getPathKey = getPathKey; -const os = __webpack_require__(36); -const path = __webpack_require__(0); -const userHome = __webpack_require__(45).default; - -var _require = __webpack_require__(171); - -const getCacheDir = _require.getCacheDir, - getConfigDir = _require.getConfigDir, - getDataDir = _require.getDataDir; - -const isWebpackBundle = __webpack_require__(227); - -const DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; -const RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; -const MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; - -const SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; - -const YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; - -const YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; -const YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; -const YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; - -const SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; - -// cache version, bump whenever we make backwards incompatible changes -const CACHE_VERSION = exports.CACHE_VERSION = 2; - -// lockfile version, bump whenever we make backwards incompatible changes -const LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; - -// max amount of network requests to perform concurrently -const NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; - -// HTTP timeout used when downloading packages -const NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds - -// max amount of child processes to execute concurrently -const CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; - -const REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; - -function getPreferredCacheDirectories() { - const preferredCacheDirectories = [getCacheDir()]; - - if (process.getuid) { - // $FlowFixMe: process.getuid exists, dammit - preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); - } - - preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); - - return preferredCacheDirectories; -} - -const PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); -const CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); -const DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); -const LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); -const GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); - -const NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; -const YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); - -// Webpack needs to be configured with node.__dirname/__filename = false -function getYarnBinPath() { - if (isWebpackBundle) { - return __filename; - } else { - return path.join(__dirname, '..', 'bin', 'yarn.js'); - } -} - -const NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; -const NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; - -const POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; -const FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); - -const META_FOLDER = exports.META_FOLDER = '.yarn-meta'; -const INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; -const LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; -const METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; -const TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; -const CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; - -const NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; -const NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; - -const DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; -const SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; -const SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; - -const ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); - -function getPathKey(platform, env) { - let pathKey = 'PATH'; - - // windows calls its path "Path" usually, but this is not guaranteed. - if (platform === 'win32') { - pathKey = 'Path'; - - for (const key in env) { - if (key.toLowerCase() === 'path') { - pathKey = key; - } - } - } - - return pathKey; -} - -const VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { - major: 'red', - premajor: 'red', - minor: 'yellow', - preminor: 'yellow', - patch: 'green', - prepatch: 'green', - prerelease: 'red', - unchanged: 'white', - unknown: 'red' -}; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var NODE_ENV = "production"; - -var invariant = function(condition, format, a, b, c, d, e, f) { - if (NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; - -module.exports = invariant; - - -/***/ }), -/* 8 */, -/* 9 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("crypto"); - -/***/ }), -/* 10 */, -/* 11 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.sortAlpha = sortAlpha; -exports.entries = entries; -exports.removePrefix = removePrefix; -exports.removeSuffix = removeSuffix; -exports.addSuffix = addSuffix; -exports.hyphenate = hyphenate; -exports.camelCase = camelCase; -exports.compareSortedArrays = compareSortedArrays; -exports.sleep = sleep; -const _camelCase = __webpack_require__(176); - -function sortAlpha(a, b) { - // sort alphabetically in a deterministic way - const shortLen = Math.min(a.length, b.length); - for (let i = 0; i < shortLen; i++) { - const aChar = a.charCodeAt(i); - const bChar = b.charCodeAt(i); - if (aChar !== bChar) { - return aChar - bChar; - } - } - return a.length - b.length; -} - -function entries(obj) { - const entries = []; - if (obj) { - for (const key in obj) { - entries.push([key, obj[key]]); - } - } - return entries; -} - -function removePrefix(pattern, prefix) { - if (pattern.startsWith(prefix)) { - pattern = pattern.slice(prefix.length); - } - - return pattern; -} - -function removeSuffix(pattern, suffix) { - if (pattern.endsWith(suffix)) { - return pattern.slice(0, -suffix.length); - } - - return pattern; -} - -function addSuffix(pattern, suffix) { - if (!pattern.endsWith(suffix)) { - return pattern + suffix; - } - - return pattern; -} - -function hyphenate(str) { - return str.replace(/[A-Z]/g, match => { - return '-' + match.charAt(0).toLowerCase(); - }); -} - -function camelCase(str) { - if (/[A-Z]/.test(str)) { - return null; - } else { - return _camelCase(str); - } -} - -function compareSortedArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (let i = 0, len = array1.length; i < len; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; -} - -function sleep(ms) { - return new Promise(resolve => { - setTimeout(resolve, ms); - }); -} - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(107)('wks'); -var uid = __webpack_require__(111); -var Symbol = __webpack_require__(11).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.stringify = exports.parse = undefined; - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _parse; - -function _load_parse() { - return _parse = __webpack_require__(81); -} - -Object.defineProperty(exports, 'parse', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_parse || _load_parse()).default; - } -}); - -var _stringify; - -function _load_stringify() { - return _stringify = __webpack_require__(150); -} - -Object.defineProperty(exports, 'stringify', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_stringify || _load_stringify()).default; - } -}); -exports.implodeEntry = implodeEntry; -exports.explodeEntry = explodeEntry; - -var _misc; - -function _load_misc() { - return _misc = __webpack_require__(12); -} - -var _normalizePattern; - -function _load_normalizePattern() { - return _normalizePattern = __webpack_require__(29); -} - -var _parse2; - -function _load_parse2() { - return _parse2 = _interopRequireDefault(__webpack_require__(81)); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(6); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(5)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const invariant = __webpack_require__(7); - -const path = __webpack_require__(0); -const ssri = __webpack_require__(55); - -function getName(pattern) { - return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; -} - -function blankObjectUndefined(obj) { - return obj && Object.keys(obj).length ? obj : undefined; -} - -function keyForRemote(remote) { - return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); -} - -function serializeIntegrity(integrity) { - // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output - // See https://git.io/vx2Hy - return integrity.toString().split(' ').sort().join(' '); -} - -function implodeEntry(pattern, obj) { - const inferredName = getName(pattern); - const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ''; - const imploded = { - name: inferredName === obj.name ? undefined : obj.name, - version: obj.version, - uid: obj.uid === obj.version ? undefined : obj.uid, - resolved: obj.resolved, - registry: obj.registry === 'npm' ? undefined : obj.registry, - dependencies: blankObjectUndefined(obj.dependencies), - optionalDependencies: blankObjectUndefined(obj.optionalDependencies), - permissions: blankObjectUndefined(obj.permissions), - prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) - }; - if (integrity) { - imploded.integrity = integrity; - } - return imploded; -} - -function explodeEntry(pattern, obj) { - obj.optionalDependencies = obj.optionalDependencies || {}; - obj.dependencies = obj.dependencies || {}; - obj.uid = obj.uid || obj.version; - obj.permissions = obj.permissions || {}; - obj.registry = obj.registry || 'npm'; - obj.name = obj.name || getName(pattern); - const integrity = obj.integrity; - if (integrity && integrity.isIntegrity) { - obj.integrity = ssri.parse(integrity); - } - return obj; -} - -class Lockfile { - constructor({ cache, source, parseResultType } = {}) { - this.source = source || ''; - this.cache = cache; - this.parseResultType = parseResultType; - } - - // source string if the `cache` was parsed - - - // if true, we're parsing an old yarn file and need to update integrity fields - hasEntriesExistWithoutIntegrity() { - if (!this.cache) { - return false; - } - - for (const key in this.cache) { - // $FlowFixMe - `this.cache` is clearly defined at this point - if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { - return true; - } - } - - return false; - } - - static fromDirectory(dir, reporter) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - // read the manifest in this directory - const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); - - let lockfile; - let rawLockfile = ''; - let parseResult; - - if (yield (_fs || _load_fs()).exists(lockfileLoc)) { - rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); - parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); - - if (reporter) { - if (parseResult.type === 'merge') { - reporter.info(reporter.lang('lockfileMerged')); - } else if (parseResult.type === 'conflict') { - reporter.warn(reporter.lang('lockfileConflict')); - } - } - - lockfile = parseResult.object; - } else if (reporter) { - reporter.info(reporter.lang('noLockfileFound')); - } - - return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); - })(); - } - - getLocked(pattern) { - const cache = this.cache; - if (!cache) { - return undefined; - } - - const shrunk = pattern in cache && cache[pattern]; - - if (typeof shrunk === 'string') { - return this.getLocked(shrunk); - } else if (shrunk) { - explodeEntry(pattern, shrunk); - return shrunk; - } - - return undefined; - } - - removePattern(pattern) { - const cache = this.cache; - if (!cache) { - return; - } - delete cache[pattern]; - } - - getLockfile(patterns) { - const lockfile = {}; - const seen = new Map(); - - // order by name so that lockfile manifest is assigned to the first dependency with this manifest - // the others that have the same remoteKey will just refer to the first - // ordering allows for consistency in lockfile when it is serialized - const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); - - for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - const pattern = _ref; - - const pkg = patterns[pattern]; - const remote = pkg._remote, - ref = pkg._reference; - - invariant(ref, 'Package is missing a reference'); - invariant(remote, 'Package is missing a remote'); - - const remoteKey = keyForRemote(remote); - const seenPattern = remoteKey && seen.get(remoteKey); - if (seenPattern) { - // no point in duplicating it - lockfile[pattern] = seenPattern; - - // if we're relying on our name being inferred and two of the patterns have - // different inferred names then we need to set it - if (!seenPattern.name && getName(pattern) !== pkg.name) { - seenPattern.name = pkg.name; - } - continue; - } - const obj = implodeEntry(pattern, { - name: pkg.name, - version: pkg.version, - uid: pkg._uid, - resolved: remote.resolved, - integrity: remote.integrity, - registry: remote.registry, - dependencies: pkg.dependencies, - peerDependencies: pkg.peerDependencies, - optionalDependencies: pkg.optionalDependencies, - permissions: ref.permissions, - prebuiltVariants: pkg.prebuiltVariants - }); - - lockfile[pattern] = obj; - - if (remoteKey) { - seen.set(remoteKey, obj); - } - } - - return lockfile; - } -} -exports.default = Lockfile; - -/***/ }), -/* 15 */, -/* 16 */, -/* 17 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("stream"); - -/***/ }), -/* 18 */, -/* 19 */, -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = nullify; -function nullify(obj = {}) { - if (Array.isArray(obj)) { - for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - const item = _ref; - - nullify(item); - } - } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') { - Object.setPrototypeOf(obj, null); - - // for..in can only be applied to 'object', not 'function' - if (typeof obj === 'object') { - for (const key in obj) { - nullify(obj[key]); - } - } - } - - return obj; -} - -/***/ }), -/* 21 */, -/* 22 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("assert"); - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.7' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 24 */, -/* 25 */, -/* 26 */, -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(34); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), -/* 28 */, -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.normalizePattern = normalizePattern; - -/** - * Explode and normalize a pattern into its name and range. - */ - -function normalizePattern(pattern) { - let hasVersion = false; - let range = 'latest'; - let name = pattern; - - // if we're a scope then remove the @ and add it back later - let isScoped = false; - if (name[0] === '@') { - isScoped = true; - name = name.slice(1); - } - - // take first part as the name - const parts = name.split('@'); - if (parts.length > 1) { - name = parts.shift(); - range = parts.join('@'); - - if (range) { - hasVersion = true; - } else { - range = '*'; - } - } - - // add back @ scope suffix - if (isScoped) { - name = `@${name}`; - } - - return { name, range, hasVersion }; -} - -/***/ }), -/* 30 */, -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(50); -var createDesc = __webpack_require__(106); -module.exports = __webpack_require__(33) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -/* eslint-disable node/no-deprecated-api */ -var buffer = __webpack_require__(63) -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(85)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 34 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("os"); - -/***/ }), -/* 37 */, -/* 38 */, -/* 39 */, -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.wait = wait; -exports.promisify = promisify; -exports.queue = queue; -function wait(delay) { - return new Promise(resolve => { - setTimeout(resolve, delay); - }); -} - -function promisify(fn, firstData) { - return function (...args) { - return new Promise(function (resolve, reject) { - args.push(function (err, ...result) { - let res = result; - - if (result.length <= 1) { - res = result[0]; - } - - if (firstData) { - res = err; - err = null; - } - - if (err) { - reject(err); - } else { - resolve(res); - } - }); - - fn.apply(null, args); - }); - }; -} - -function queue(arr, promiseProducer, concurrency = Infinity) { - concurrency = Math.min(concurrency, arr.length); - - // clone - arr = arr.slice(); - - const results = []; - let total = arr.length; - if (!total) { - return Promise.resolve(results); - } - - return new Promise((resolve, reject) => { - for (let i = 0; i < concurrency; i++) { - next(); - } - - function next() { - const item = arr.shift(); - const promise = promiseProducer(item); - - promise.then(function (result) { - results.push(result); - - total--; - if (total === 0) { - resolve(results); - } else { - if (arr.length) { - next(); - } - } - }, reject); - } - }); -} - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(11); -var core = __webpack_require__(23); -var ctx = __webpack_require__(48); -var hide = __webpack_require__(31); -var has = __webpack_require__(49); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -try { - var util = __webpack_require__(2); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = __webpack_require__(224); -} - - -/***/ }), -/* 43 */, -/* 44 */, -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.home = undefined; - -var _rootUser; - -function _load_rootUser() { - return _rootUser = _interopRequireDefault(__webpack_require__(169)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const path = __webpack_require__(0); - -const home = exports.home = __webpack_require__(36).homedir(); - -const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; - -exports.default = userHomeDir; - -/***/ }), -/* 46 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(46); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(27); -var IE8_DOM_DEFINE = __webpack_require__(184); -var toPrimitive = __webpack_require__(201); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(33) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), -/* 51 */, -/* 52 */, -/* 53 */, -/* 54 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("events"); - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const Buffer = __webpack_require__(32).Buffer - -const crypto = __webpack_require__(9) -const Transform = __webpack_require__(17).Transform - -const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] - -const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i -const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ -const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ -const VCHAR_REGEX = /^[\x21-\x7E]+$/ - -class Hash { - get isHash () { return true } - constructor (hash, opts) { - const strict = !!(opts && opts.strict) - this.source = hash.trim() - // 3.1. Integrity metadata (called "Hash" by ssri) - // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description - const match = this.source.match( - strict - ? STRICT_SRI_REGEX - : SRI_REGEX - ) - if (!match) { return } - if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return } - this.algorithm = match[1] - this.digest = match[2] - - const rawOpts = match[3] - this.options = rawOpts ? rawOpts.slice(1).split('?') : [] - } - hexDigest () { - return this.digest && Buffer.from(this.digest, 'base64').toString('hex') - } - toJSON () { - return this.toString() - } - toString (opts) { - if (opts && opts.strict) { - // Strict mode enforces the standard as close to the foot of the - // letter as it can. - if (!( - // The spec has very restricted productions for algorithms. - // https://www.w3.org/TR/CSP2/#source-list-syntax - SPEC_ALGORITHMS.some(x => x === this.algorithm) && - // Usually, if someone insists on using a "different" base64, we - // leave it as-is, since there's multiple standards, and the - // specified is not a URL-safe variant. - // https://www.w3.org/TR/CSP2/#base64_value - this.digest.match(BASE64_REGEX) && - // Option syntax is strictly visual chars. - // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression - // https://tools.ietf.org/html/rfc5234#appendix-B.1 - (this.options || []).every(opt => opt.match(VCHAR_REGEX)) - )) { - return '' - } - } - const options = this.options && this.options.length - ? `?${this.options.join('?')}` - : '' - return `${this.algorithm}-${this.digest}${options}` - } -} - -class Integrity { - get isIntegrity () { return true } - toJSON () { - return this.toString() - } - toString (opts) { - opts = opts || {} - let sep = opts.sep || ' ' - if (opts.strict) { - // Entries must be separated by whitespace, according to spec. - sep = sep.replace(/\S+/g, ' ') - } - return Object.keys(this).map(k => { - return this[k].map(hash => { - return Hash.prototype.toString.call(hash, opts) - }).filter(x => x.length).join(sep) - }).filter(x => x.length).join(sep) - } - concat (integrity, opts) { - const other = typeof integrity === 'string' - ? integrity - : stringify(integrity, opts) - return parse(`${this.toString(opts)} ${other}`, opts) - } - hexDigest () { - return parse(this, {single: true}).hexDigest() - } - match (integrity, opts) { - const other = parse(integrity, opts) - const algo = other.pickAlgorithm(opts) - return ( - this[algo] && - other[algo] && - this[algo].find(hash => - other[algo].find(otherhash => - hash.digest === otherhash.digest - ) - ) - ) || false - } - pickAlgorithm (opts) { - const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash - const keys = Object.keys(this) - if (!keys.length) { - throw new Error(`No algorithms available for ${ - JSON.stringify(this.toString()) - }`) - } - return keys.reduce((acc, algo) => { - return pickAlgorithm(acc, algo) || acc - }) - } -} - -module.exports.parse = parse -function parse (sri, opts) { - opts = opts || {} - if (typeof sri === 'string') { - return _parse(sri, opts) - } else if (sri.algorithm && sri.digest) { - const fullSri = new Integrity() - fullSri[sri.algorithm] = [sri] - return _parse(stringify(fullSri, opts), opts) - } else { - return _parse(stringify(sri, opts), opts) - } -} - -function _parse (integrity, opts) { - // 3.4.3. Parse metadata - // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - if (opts.single) { - return new Hash(integrity, opts) - } - return integrity.trim().split(/\s+/).reduce((acc, string) => { - const hash = new Hash(string, opts) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) -} - -module.exports.stringify = stringify -function stringify (obj, opts) { - if (obj.algorithm && obj.digest) { - return Hash.prototype.toString.call(obj, opts) - } else if (typeof obj === 'string') { - return stringify(parse(obj, opts), opts) - } else { - return Integrity.prototype.toString.call(obj, opts) - } -} - -module.exports.fromHex = fromHex -function fromHex (hexDigest, algorithm, opts) { - const optString = (opts && opts.options && opts.options.length) - ? `?${opts.options.join('?')}` - : '' - return parse( - `${algorithm}-${ - Buffer.from(hexDigest, 'hex').toString('base64') - }${optString}`, opts - ) -} - -module.exports.fromData = fromData -function fromData (data, opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] - const optString = opts.options && opts.options.length - ? `?${opts.options.join('?')}` - : '' - return algorithms.reduce((acc, algo) => { - const digest = crypto.createHash(algo).update(data).digest('base64') - const hash = new Hash( - `${algo}-${digest}${optString}`, - opts - ) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) -} - -module.exports.fromStream = fromStream -function fromStream (stream, opts) { - opts = opts || {} - const P = opts.Promise || Promise - const istream = integrityStream(opts) - return new P((resolve, reject) => { - stream.pipe(istream) - stream.on('error', reject) - istream.on('error', reject) - let sri - istream.on('integrity', s => { sri = s }) - istream.on('end', () => resolve(sri)) - istream.on('data', () => {}) - }) -} - -module.exports.checkData = checkData -function checkData (data, sri, opts) { - opts = opts || {} - sri = parse(sri, opts) - if (!Object.keys(sri).length) { - if (opts.error) { - throw Object.assign( - new Error('No valid integrity hashes to check against'), { - code: 'EINTEGRITY' - } - ) - } else { - return false - } - } - const algorithm = sri.pickAlgorithm(opts) - const digest = crypto.createHash(algorithm).update(data).digest('base64') - const newSri = parse({algorithm, digest}) - const match = newSri.match(sri, opts) - if (match || !opts.error) { - return match - } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { - const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) - err.code = 'EBADSIZE' - err.found = data.length - err.expected = opts.size - err.sri = sri - throw err - } else { - const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) - err.code = 'EINTEGRITY' - err.found = newSri - err.expected = sri - err.algorithm = algorithm - err.sri = sri - throw err - } -} - -module.exports.checkStream = checkStream -function checkStream (stream, sri, opts) { - opts = opts || {} - const P = opts.Promise || Promise - const checker = integrityStream(Object.assign({}, opts, { - integrity: sri - })) - return new P((resolve, reject) => { - stream.pipe(checker) - stream.on('error', reject) - checker.on('error', reject) - let sri - checker.on('verified', s => { sri = s }) - checker.on('end', () => resolve(sri)) - checker.on('data', () => {}) - }) -} - -module.exports.integrityStream = integrityStream -function integrityStream (opts) { - opts = opts || {} - // For verification - const sri = opts.integrity && parse(opts.integrity, opts) - const goodSri = sri && Object.keys(sri).length - const algorithm = goodSri && sri.pickAlgorithm(opts) - const digests = goodSri && sri[algorithm] - // Calculating stream - const algorithms = Array.from( - new Set( - (opts.algorithms || ['sha512']) - .concat(algorithm ? [algorithm] : []) - ) - ) - const hashes = algorithms.map(crypto.createHash) - let streamSize = 0 - const stream = new Transform({ - transform (chunk, enc, cb) { - streamSize += chunk.length - hashes.forEach(h => h.update(chunk, enc)) - cb(null, chunk, enc) - } - }).on('end', () => { - const optString = (opts.options && opts.options.length) - ? `?${opts.options.join('?')}` - : '' - const newSri = parse(hashes.map((h, i) => { - return `${algorithms[i]}-${h.digest('base64')}${optString}` - }).join(' '), opts) - // Integrity verification mode - const match = goodSri && newSri.match(sri, opts) - if (typeof opts.size === 'number' && streamSize !== opts.size) { - const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`) - err.code = 'EBADSIZE' - err.found = streamSize - err.expected = opts.size - err.sri = sri - stream.emit('error', err) - } else if (opts.integrity && !match) { - const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`) - err.code = 'EINTEGRITY' - err.found = newSri - err.expected = digests - err.algorithm = algorithm - err.sri = sri - stream.emit('error', err) - } else { - stream.emit('size', streamSize) - stream.emit('integrity', newSri) - match && stream.emit('verified', match) - } - }) - return stream -} - -module.exports.create = createIntegrity -function createIntegrity (opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] - const optString = opts.options && opts.options.length - ? `?${opts.options.join('?')}` - : '' - - const hashes = algorithms.map(crypto.createHash) - - return { - update: function (chunk, enc) { - hashes.forEach(h => h.update(chunk, enc)) - return this - }, - digest: function (enc) { - const integrity = algorithms.reduce((acc, algo) => { - const digest = hashes.shift().digest('base64') - const hash = new Hash( - `${algo}-${digest}${optString}`, - opts - ) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) - - return integrity - } - } -} - -const NODE_HASHES = new Set(crypto.getHashes()) - -// This is a Best Effort™ at a reasonable priority for hash algos -const DEFAULT_PRIORITY = [ - 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', - // TODO - it's unclear _which_ of these Node will actually use as its name - // for the algorithm, so we guesswork it based on the OpenSSL names. - 'sha3', - 'sha3-256', 'sha3-384', 'sha3-512', - 'sha3_256', 'sha3_384', 'sha3_512' -].filter(algo => NODE_HASHES.has(algo)) - -function getPrioritizedHash (algo1, algo2) { - return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) - ? algo1 - : algo2 -} - - -/***/ }), -/* 56 */, -/* 57 */, -/* 58 */, -/* 59 */, -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = __webpack_require__(0) -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(175) - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -var wrappy = __webpack_require__(123) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }), -/* 62 */, -/* 63 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("buffer"); - -/***/ }), -/* 64 */, -/* 65 */, -/* 66 */, -/* 67 */ -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(34); -var document = __webpack_require__(11).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), -/* 69 */ -/***/ (function(module, exports) { - -module.exports = true; - - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(46); - -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} - -module.exports.f = function (C) { - return new PromiseCapability(C); -}; - - -/***/ }), -/* 71 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(50).f; -var has = __webpack_require__(49); -var TAG = __webpack_require__(13)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__(107)('keys'); -var uid = __webpack_require__(111); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - - -/***/ }), -/* 73 */ -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(131); -var defined = __webpack_require__(67); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = __webpack_require__(3) -var rp = __webpack_require__(114) -var minimatch = __webpack_require__(60) -var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(42) -var EE = __webpack_require__(54).EventEmitter -var path = __webpack_require__(0) -var assert = __webpack_require__(22) -var isAbsolute = __webpack_require__(76) -var globSync = __webpack_require__(218) -var common = __webpack_require__(115) -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = __webpack_require__(223) -var util = __webpack_require__(2) -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = __webpack_require__(61) - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} - - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; - - -/***/ }), -/* 77 */, -/* 78 */, -/* 79 */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__("tty"); - -/***/ }), -/* 80 */, -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (str, fileLoc = 'lockfile') { - str = (0, (_stripBom || _load_stripBom()).default)(str); - return hasMergeConflicts(str) ? parseWithConflict(str, fileLoc) : { type: 'success', object: parse(str, fileLoc) }; -}; - -var _util; - -function _load_util() { - return _util = _interopRequireDefault(__webpack_require__(2)); -} - -var _invariant; - -function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(7)); -} - -var _stripBom; - -function _load_stripBom() { - return _stripBom = _interopRequireDefault(__webpack_require__(122)); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(6); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(4); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(20)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/* eslint quotes: 0 */ - -const VERSION_REGEX = /^yarn lockfile v(\d+)$/; - -const TOKEN_TYPES = { - boolean: 'BOOLEAN', - string: 'STRING', - identifier: 'IDENTIFIER', - eof: 'EOF', - colon: 'COLON', - newline: 'NEWLINE', - comment: 'COMMENT', - indent: 'INDENT', - invalid: 'INVALID', - number: 'NUMBER', - comma: 'COMMA' -}; - -const VALID_PROP_VALUE_TOKENS = [TOKEN_TYPES.boolean, TOKEN_TYPES.string, TOKEN_TYPES.number]; - -function isValidPropValueToken(token) { - return VALID_PROP_VALUE_TOKENS.indexOf(token.type) >= 0; -} - -function* tokenise(input) { - let lastNewline = false; - let line = 1; - let col = 0; - - function buildToken(type, value) { - return { line, col, type, value }; - } - - while (input.length) { - let chop = 0; - - if (input[0] === '\n' || input[0] === '\r') { - chop++; - // If this is a \r\n line, ignore both chars but only add one new line - if (input[1] === '\n') { - chop++; - } - line++; - col = 0; - yield buildToken(TOKEN_TYPES.newline); - } else if (input[0] === '#') { - chop++; - - let val = ''; - while (input[chop] !== '\n') { - val += input[chop]; - chop++; - } - yield buildToken(TOKEN_TYPES.comment, val); - } else if (input[0] === ' ') { - if (lastNewline) { - let indent = ''; - for (let i = 0; input[i] === ' '; i++) { - indent += input[i]; - } - - if (indent.length % 2) { - throw new TypeError('Invalid number of spaces'); - } else { - chop = indent.length; - yield buildToken(TOKEN_TYPES.indent, indent.length / 2); - } - } else { - chop++; - } - } else if (input[0] === '"') { - let val = ''; - - for (let i = 0;; i++) { - const currentChar = input[i]; - val += currentChar; - - if (i > 0 && currentChar === '"') { - const isEscaped = input[i - 1] === '\\' && input[i - 2] !== '\\'; - if (!isEscaped) { - break; - } - } - } - - chop = val.length; - - try { - yield buildToken(TOKEN_TYPES.string, JSON.parse(val)); - } catch (err) { - if (err instanceof SyntaxError) { - yield buildToken(TOKEN_TYPES.invalid); - } else { - throw err; - } - } - } else if (/^[0-9]/.test(input)) { - let val = ''; - for (let i = 0; /^[0-9]$/.test(input[i]); i++) { - val += input[i]; - } - chop = val.length; - - yield buildToken(TOKEN_TYPES.number, +val); - } else if (/^true/.test(input)) { - yield buildToken(TOKEN_TYPES.boolean, true); - chop = 4; - } else if (/^false/.test(input)) { - yield buildToken(TOKEN_TYPES.boolean, false); - chop = 5; - } else if (input[0] === ':') { - yield buildToken(TOKEN_TYPES.colon); - chop++; - } else if (input[0] === ',') { - yield buildToken(TOKEN_TYPES.comma); - chop++; - } else if (/^[a-zA-Z\/-]/g.test(input)) { - let name = ''; - for (let i = 0; i < input.length; i++) { - const char = input[i]; - if (char === ':' || char === ' ' || char === '\n' || char === '\r' || char === ',') { - break; - } else { - name += char; - } - } - chop = name.length; - - yield buildToken(TOKEN_TYPES.string, name); - } else { - yield buildToken(TOKEN_TYPES.invalid); - } - - if (!chop) { - // will trigger infinite recursion - yield buildToken(TOKEN_TYPES.invalid); - } - - col += chop; - lastNewline = input[0] === '\n' || input[0] === '\r' && input[1] === '\n'; - input = input.slice(chop); - } - - yield buildToken(TOKEN_TYPES.eof); -} - -class Parser { - constructor(input, fileLoc = 'lockfile') { - this.comments = []; - this.tokens = tokenise(input); - this.fileLoc = fileLoc; - } - - onComment(token) { - const value = token.value; - (0, (_invariant || _load_invariant()).default)(typeof value === 'string', 'expected token value to be a string'); - - const comment = value.trim(); - - const versionMatch = comment.match(VERSION_REGEX); - if (versionMatch) { - const version = +versionMatch[1]; - if (version > (_constants || _load_constants()).LOCKFILE_VERSION) { - throw new (_errors || _load_errors()).MessageError(`Can't install from a lockfile of version ${version} as you're on an old yarn version that only supports ` + `versions up to ${(_constants || _load_constants()).LOCKFILE_VERSION}. Run \`$ yarn self-update\` to upgrade to the latest version.`); - } - } - - this.comments.push(comment); - } - - next() { - const item = this.tokens.next(); - (0, (_invariant || _load_invariant()).default)(item, 'expected a token'); - - const done = item.done, - value = item.value; - - if (done || !value) { - throw new Error('No more tokens'); - } else if (value.type === TOKEN_TYPES.comment) { - this.onComment(value); - return this.next(); - } else { - return this.token = value; - } - } - - unexpected(msg = 'Unexpected token') { - throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`); - } - - expect(tokType) { - if (this.token.type === tokType) { - this.next(); - } else { - this.unexpected(); - } - } - - eat(tokType) { - if (this.token.type === tokType) { - this.next(); - return true; - } else { - return false; - } - } - - parse(indent = 0) { - const obj = (0, (_map || _load_map()).default)(); - - while (true) { - const propToken = this.token; - - if (propToken.type === TOKEN_TYPES.newline) { - const nextToken = this.next(); - if (!indent) { - // if we have 0 indentation then the next token doesn't matter - continue; - } - - if (nextToken.type !== TOKEN_TYPES.indent) { - // if we have no indentation after a newline then we've gone down a level - break; - } - - if (nextToken.value === indent) { - // all is good, the indent is on our level - this.next(); - } else { - // the indentation is less than our level - break; - } - } else if (propToken.type === TOKEN_TYPES.indent) { - if (propToken.value === indent) { - this.next(); - } else { - break; - } - } else if (propToken.type === TOKEN_TYPES.eof) { - break; - } else if (propToken.type === TOKEN_TYPES.string) { - // property key - const key = propToken.value; - (0, (_invariant || _load_invariant()).default)(key, 'Expected a key'); - - const keys = [key]; - this.next(); - - // support multiple keys - while (this.token.type === TOKEN_TYPES.comma) { - this.next(); // skip comma - - const keyToken = this.token; - if (keyToken.type !== TOKEN_TYPES.string) { - this.unexpected('Expected string'); - } - - const key = keyToken.value; - (0, (_invariant || _load_invariant()).default)(key, 'Expected a key'); - keys.push(key); - this.next(); - } - - const valToken = this.token; - - if (valToken.type === TOKEN_TYPES.colon) { - // object - this.next(); - - // parse object - const val = this.parse(indent + 1); - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - const key = _ref; - - obj[key] = val; - } - - if (indent && this.token.type !== TOKEN_TYPES.indent) { - break; - } - } else if (isValidPropValueToken(valToken)) { - // plain value - for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - const key = _ref2; - - obj[key] = valToken.value; - } - - this.next(); - } else { - this.unexpected('Invalid value type'); - } - } else { - this.unexpected(`Unknown token: ${(_util || _load_util()).default.inspect(propToken)}`); - } - } - - return obj; - } -} - -const MERGE_CONFLICT_ANCESTOR = '|||||||'; -const MERGE_CONFLICT_END = '>>>>>>>'; -const MERGE_CONFLICT_SEP = '======='; -const MERGE_CONFLICT_START = '<<<<<<<'; - -/** - * Extract the two versions of the lockfile from a merge conflict. - */ -function extractConflictVariants(str) { - const variants = [[], []]; - const lines = str.split(/\r?\n/g); - let skip = false; - - while (lines.length) { - const line = lines.shift(); - if (line.startsWith(MERGE_CONFLICT_START)) { - // get the first variant - while (lines.length) { - const conflictLine = lines.shift(); - if (conflictLine === MERGE_CONFLICT_SEP) { - skip = false; - break; - } else if (skip || conflictLine.startsWith(MERGE_CONFLICT_ANCESTOR)) { - skip = true; - continue; - } else { - variants[0].push(conflictLine); - } - } - - // get the second variant - while (lines.length) { - const conflictLine = lines.shift(); - if (conflictLine.startsWith(MERGE_CONFLICT_END)) { - break; - } else { - variants[1].push(conflictLine); - } - } - } else { - variants[0].push(line); - variants[1].push(line); - } - } - - return [variants[0].join('\n'), variants[1].join('\n')]; -} - -/** - * Check if a lockfile has merge conflicts. - */ -function hasMergeConflicts(str) { - return str.includes(MERGE_CONFLICT_START) && str.includes(MERGE_CONFLICT_SEP) && str.includes(MERGE_CONFLICT_END); -} - -/** - * Parse the lockfile. - */ -function parse(str, fileLoc) { - const parser = new Parser(str, fileLoc); - parser.next(); - return parser.parse(); -} - -/** - * Parse and merge the two variants in a conflicted lockfile. - */ -function parseWithConflict(str, fileLoc) { - const variants = extractConflictVariants(str); - try { - return { type: 'merge', object: Object.assign({}, parse(variants[0], fileLoc), parse(variants[1], fileLoc)) }; - } catch (err) { - if (err instanceof SyntaxError) { - return { type: 'conflict', object: {} }; - } else { - throw err; - } - } -} - -/***/ }), -/* 82 */, -/* 83 */, -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(20)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const debug = __webpack_require__(212)('yarn'); - -class BlockingQueue { - constructor(alias, maxConcurrency = Infinity) { - this.concurrencyQueue = []; - this.maxConcurrency = maxConcurrency; - this.runningCount = 0; - this.warnedStuck = false; - this.alias = alias; - this.first = true; - - this.running = (0, (_map || _load_map()).default)(); - this.queue = (0, (_map || _load_map()).default)(); - - this.stuckTick = this.stuckTick.bind(this); - } - - stillActive() { - if (this.stuckTimer) { - clearTimeout(this.stuckTimer); - } - - this.stuckTimer = setTimeout(this.stuckTick, 5000); - - // We need to check the existence of unref because of https://github.com/facebook/jest/issues/4559 - // $FlowFixMe: Node's setInterval returns a Timeout, not a Number - this.stuckTimer.unref && this.stuckTimer.unref(); - } - - stuckTick() { - if (this.runningCount === 1) { - this.warnedStuck = true; - debug(`The ${JSON.stringify(this.alias)} blocking queue may be stuck. 5 seconds ` + `without any activity with 1 worker: ${Object.keys(this.running)[0]}`); - } - } - - push(key, factory) { - if (this.first) { - this.first = false; - } else { - this.stillActive(); - } - - return new Promise((resolve, reject) => { - // we're already running so push ourselves to the queue - const queue = this.queue[key] = this.queue[key] || []; - queue.push({ factory, resolve, reject }); - - if (!this.running[key]) { - this.shift(key); - } - }); - } - - shift(key) { - if (this.running[key]) { - delete this.running[key]; - this.runningCount--; - - if (this.stuckTimer) { - clearTimeout(this.stuckTimer); - this.stuckTimer = null; - } - - if (this.warnedStuck) { - this.warnedStuck = false; - debug(`${JSON.stringify(this.alias)} blocking queue finally resolved. Nothing to worry about.`); - } - } - - const queue = this.queue[key]; - if (!queue) { - return; - } - - var _queue$shift = queue.shift(); - - const resolve = _queue$shift.resolve, - reject = _queue$shift.reject, - factory = _queue$shift.factory; - - if (!queue.length) { - delete this.queue[key]; - } - - const next = () => { - this.shift(key); - this.shiftConcurrencyQueue(); - }; - - const run = () => { - this.running[key] = true; - this.runningCount++; - - factory().then(function (val) { - resolve(val); - next(); - return null; - }).catch(function (err) { - reject(err); - next(); - }); - }; - - this.maybePushConcurrencyQueue(run); - } - - maybePushConcurrencyQueue(run) { - if (this.runningCount < this.maxConcurrency) { - run(); - } else { - this.concurrencyQueue.push(run); - } - } - - shiftConcurrencyQueue() { - if (this.runningCount < this.maxConcurrency) { - const fn = this.concurrencyQueue.shift(); - if (fn) { - fn(); - } - } - } -} -exports.default = BlockingQueue; - -/***/ }), -/* 85 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), -/* 86 */, -/* 87 */, -/* 88 */, -/* 89 */, -/* 90 */, -/* 91 */, -/* 92 */, -/* 93 */, -/* 94 */, -/* 95 */, -/* 96 */, -/* 97 */, -/* 98 */, -/* 99 */, -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(47); -var TAG = __webpack_require__(13)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - - -/***/ }), -/* 101 */ -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - -var document = __webpack_require__(11).document; -module.exports = document && document.documentElement; - - -/***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__(69); -var $export = __webpack_require__(41); -var redefine = __webpack_require__(197); -var hide = __webpack_require__(31); -var Iterators = __webpack_require__(35); -var $iterCreate = __webpack_require__(188); -var setToStringTag = __webpack_require__(71); -var getPrototypeOf = __webpack_require__(194); -var ITERATOR = __webpack_require__(13)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - -/***/ }), -/* 104 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - - -/***/ }), -/* 105 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(27); -var isObject = __webpack_require__(34); -var newPromiseCapability = __webpack_require__(70); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - - -/***/ }), -/* 106 */ -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), -/* 107 */ -/***/ (function(module, exports, __webpack_require__) { - -var core = __webpack_require__(23); -var global = __webpack_require__(11); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__(69) ? 'pure' : 'global', - copyright: '© 2018 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), -/* 108 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(27); -var aFunction = __webpack_require__(46); -var SPECIES = __webpack_require__(13)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - - -/***/ }), -/* 109 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(48); -var invoke = __webpack_require__(185); -var html = __webpack_require__(102); -var cel = __webpack_require__(68); -var global = __webpack_require__(11); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(47)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; - - -/***/ }), -/* 110 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(73); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), -/* 111 */ -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = __webpack_require__(229); - -/** - * Active `debug` instances. - */ -exports.instances = []; - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - var prevTime; - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - exports.instances.push(debug); - - return debug; -} - -function destroy () { - var index = exports.instances.indexOf(this); - if (index !== -1) { - exports.instances.splice(index, 1); - return true; - } else { - return false; - } -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < exports.instances.length; i++) { - var instance = exports.instances[i]; - instance.enabled = exports.enabled(instance.namespace); - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - - -/***/ }), -/* 113 */, -/* 114 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = __webpack_require__(3) -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(217) - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} - - -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = __webpack_require__(0) -var minimatch = __webpack_require__(60) -var isAbsolute = __webpack_require__(76) -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - - -/***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { - -var path = __webpack_require__(0); -var fs = __webpack_require__(3); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; - - -/***/ }), -/* 117 */, -/* 118 */, -/* 119 */, -/* 120 */, -/* 121 */, -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = x => { - if (typeof x !== 'string') { - throw new TypeError('Expected a string, got ' + typeof x); - } - - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (x.charCodeAt(0) === 0xFEFF) { - return x.slice(1); - } - - return x; -}; - - -/***/ }), -/* 123 */ -/***/ (function(module, exports) { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} - - -/***/ }), -/* 124 */, -/* 125 */, -/* 126 */, -/* 127 */, -/* 128 */, -/* 129 */, -/* 130 */, -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(47); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(195); -var enumBugKeys = __webpack_require__(101); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(67); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), -/* 134 */, -/* 135 */, -/* 136 */, -/* 137 */, -/* 138 */, -/* 139 */, -/* 140 */, -/* 141 */, -/* 142 */, -/* 143 */, -/* 144 */, -/* 145 */ -/***/ (function(module, exports) { - -module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.10.0-0","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^2.2.4","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^3.0.1","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.3","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.24","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.10.0","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^3.9.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","gulp-util":"^3.0.7","gulp-watch":"^5.0.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} - -/***/ }), -/* 146 */, -/* 147 */, -/* 148 */, -/* 149 */, -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = stringify; - -var _misc; - -function _load_misc() { - return _misc = __webpack_require__(12); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(6); -} - -var _package; - -function _load_package() { - return _package = __webpack_require__(145); -} - -const NODE_VERSION = process.version; - -function shouldWrapKey(str) { - return str.indexOf('true') === 0 || str.indexOf('false') === 0 || /[:\s\n\\",\[\]]/g.test(str) || /^[0-9]/g.test(str) || !/^[a-zA-Z]/g.test(str); -} - -function maybeWrap(str) { - if (typeof str === 'boolean' || typeof str === 'number' || shouldWrapKey(str)) { - return JSON.stringify(str); - } else { - return str; - } -} - -const priorities = { - name: 1, - version: 2, - uid: 3, - resolved: 4, - integrity: 5, - registry: 6, - dependencies: 7 -}; - -function priorityThenAlphaSort(a, b) { - if (priorities[a] || priorities[b]) { - return (priorities[a] || 100) > (priorities[b] || 100) ? 1 : -1; - } else { - return (0, (_misc || _load_misc()).sortAlpha)(a, b); - } -} - -function _stringify(obj, options) { - if (typeof obj !== 'object') { - throw new TypeError(); - } - - const indent = options.indent; - const lines = []; - - // Sorting order needs to be consistent between runs, we run native sort by name because there are no - // problems with it being unstable because there are no to keys the same - // However priorities can be duplicated and native sort can shuffle things from run to run - const keys = Object.keys(obj).sort(priorityThenAlphaSort); - - let addedKeys = []; - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = obj[key]; - if (val == null || addedKeys.indexOf(key) >= 0) { - continue; - } - - const valKeys = [key]; - - // get all keys that have the same value equality, we only want this for objects - if (typeof val === 'object') { - for (let j = i + 1; j < keys.length; j++) { - const key = keys[j]; - if (val === obj[key]) { - valKeys.push(key); - } - } - } - - const keyLine = valKeys.sort((_misc || _load_misc()).sortAlpha).map(maybeWrap).join(', '); - - if (typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number') { - lines.push(`${keyLine} ${maybeWrap(val)}`); - } else if (typeof val === 'object') { - lines.push(`${keyLine}:\n${_stringify(val, { indent: indent + ' ' })}` + (options.topLevel ? '\n' : '')); - } else { - throw new TypeError(); - } - - addedKeys = addedKeys.concat(valKeys); - } - - return indent + lines.join(`\n${indent}`); -} - -function stringify(obj, noHeader, enableVersions) { - const val = _stringify(obj, { - indent: '', - topLevel: true - }); - if (noHeader) { - return val; - } - - const lines = []; - lines.push('# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.'); - lines.push(`# yarn lockfile v${(_constants || _load_constants()).LOCKFILE_VERSION}`); - if (enableVersions) { - lines.push(`# yarn v${(_package || _load_package()).version}`); - lines.push(`# node ${NODE_VERSION}`); - } - lines.push('\n'); - lines.push(val); - - return lines.join('\n'); -} - -/***/ }), -/* 151 */, -/* 152 */, -/* 153 */, -/* 154 */, -/* 155 */, -/* 156 */, -/* 157 */, -/* 158 */, -/* 159 */, -/* 160 */, -/* 161 */, -/* 162 */, -/* 163 */, -/* 164 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.fileDatesEqual = exports.copyFile = exports.unlink = undefined; - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -// We want to preserve file timestamps when copying a file, since yarn uses them to decide if a file has -// changed compared to the cache. -// There are some OS specific cases here: -// * On linux, fs.copyFile does not preserve timestamps, but does on OSX and Win. -// * On windows, you must open a file with write permissions to call `fs.futimes`. -// * On OSX you can open with read permissions and still call `fs.futimes`. -let fixTimes = (() => { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (fd, dest, data) { - const doOpen = fd === undefined; - let openfd = fd ? fd : -1; - - if (disableTimestampCorrection === undefined) { - // if timestamps match already, no correction is needed. - // the need to correct timestamps varies based on OS and node versions. - const destStat = yield lstat(dest); - disableTimestampCorrection = fileDatesEqual(destStat.mtime, data.mtime); - } - - if (disableTimestampCorrection) { - return; - } - - if (doOpen) { - try { - openfd = yield open(dest, 'a', data.mode); - } catch (er) { - // file is likely read-only - try { - openfd = yield open(dest, 'r', data.mode); - } catch (err) { - // We can't even open this file for reading. - return; - } - } - } - - try { - if (openfd) { - yield futimes(openfd, data.atime, data.mtime); - } - } catch (er) { - // If `futimes` throws an exception, we probably have a case of a read-only file on Windows. - // In this case we can just return. The incorrect timestamp will just cause that file to be recopied - // on subsequent installs, which will effect yarn performance but not break anything. - } finally { - if (doOpen && openfd) { - yield close(openfd); - } - } - }); - - return function fixTimes(_x7, _x8, _x9) { - return _ref3.apply(this, arguments); - }; -})(); - -// Compare file timestamps. -// Some versions of Node on windows zero the milliseconds when utime is used. - - -var _fs; - -function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(3)); -} - -var _promise; - -function _load_promise() { - return _promise = __webpack_require__(40); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// This module serves as a wrapper for file operations that are inconsistant across node and OS versions. - -let disableTimestampCorrection = undefined; // OS dependent. will be detected on first file copy. - -const readFileBuffer = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.readFile); -const close = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.close); -const lstat = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.lstat); -const open = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.open); -const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.futimes); - -const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); - -const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(233)); - -/** - * Unlinks the destination to force a recreation. This is needed on case-insensitive file systems - * to force the correct naming when the filename has changed only in character-casing. (Jest -> jest). - */ -const copyFile = exports.copyFile = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data, cleanup) { - try { - yield unlink(data.dest); - yield copyFilePoly(data.src, data.dest, 0, data); - } finally { - if (cleanup) { - cleanup(); - } - } - }); - - return function copyFile(_x, _x2) { - return _ref.apply(this, arguments); - }; -})(); - -// Node 8.5.0 introduced `fs.copyFile` which is much faster, so use that when available. -// Otherwise we fall back to reading and writing files as buffers. -const copyFilePoly = (src, dest, flags, data) => { - if ((_fs || _load_fs()).default.copyFile) { - return new Promise((resolve, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, err => { - if (err) { - reject(err); - } else { - fixTimes(undefined, dest, data).then(() => resolve()).catch(ex => reject(ex)); - } - })); - } else { - return copyWithBuffer(src, dest, flags, data); - } -}; - -const copyWithBuffer = (() => { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest, flags, data) { - // Use open -> write -> futimes -> close sequence to avoid opening the file twice: - // one with writeFile and one with utimes - const fd = yield open(dest, 'w', data.mode); - try { - const buffer = yield readFileBuffer(src); - yield write(fd, buffer, 0, buffer.length); - yield fixTimes(fd, dest, data); - } finally { - yield close(fd); - } - }); - - return function copyWithBuffer(_x3, _x4, _x5, _x6) { - return _ref2.apply(this, arguments); - }; -})();const fileDatesEqual = exports.fileDatesEqual = (a, b) => { - const aTime = a.getTime(); - const bTime = b.getTime(); - - if (process.platform !== 'win32') { - return aTime === bTime; - } - - // See https://github.com/nodejs/node/pull/12607 - // Submillisecond times from stat and utimes are truncated on Windows, - // causing a file with mtime 8.0079998 and 8.0081144 to become 8.007 and 8.008 - // and making it impossible to update these files to their correct timestamps. - if (Math.abs(aTime - bTime) <= 1) { - return true; - } - - const aTimeSec = Math.floor(aTime / 1000); - const bTimeSec = Math.floor(bTime / 1000); - - // See https://github.com/nodejs/node/issues/2069 - // Some versions of Node on windows zero the milliseconds when utime is used - // So if any of the time has a milliseconds part of zero we suspect that the - // bug is present and compare only seconds. - if (aTime - aTimeSec * 1000 === 0 || bTime - bTimeSec * 1000 === 0) { - return aTimeSec === bTimeSec; - } - - return aTime === bTime; -}; - -/***/ }), -/* 165 */, -/* 166 */, -/* 167 */, -/* 168 */, -/* 169 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isFakeRoot = isFakeRoot; -exports.isRootUser = isRootUser; -function getUid() { - if (process.platform !== 'win32' && process.getuid) { - return process.getuid(); - } - return null; -} - -exports.default = isRootUser(getUid()) && !isFakeRoot(); -function isFakeRoot() { - return Boolean(process.env.FAKEROOTKEY); -} - -function isRootUser(uid) { - return uid === 0; -} - -/***/ }), -/* 170 */, -/* 171 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getDataDir = getDataDir; -exports.getCacheDir = getCacheDir; -exports.getConfigDir = getConfigDir; -const path = __webpack_require__(0); -const userHome = __webpack_require__(45).default; - -const FALLBACK_CONFIG_DIR = path.join(userHome, '.config', 'yarn'); -const FALLBACK_CACHE_DIR = path.join(userHome, '.cache', 'yarn'); - -function getDataDir() { - if (process.platform === 'win32') { - const WIN32_APPDATA_DIR = getLocalAppDataDir(); - return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, 'Data'); - } else if (process.env.XDG_DATA_HOME) { - return path.join(process.env.XDG_DATA_HOME, 'yarn'); - } else { - // This could arguably be ~/Library/Application Support/Yarn on Macs, - // but that feels unintuitive for a cli tool - - // Instead, use our prior fallback. Some day this could be - // path.join(userHome, '.local', 'share', 'yarn') - // or return path.join(WIN32_APPDATA_DIR, 'Data') on win32 - return FALLBACK_CONFIG_DIR; - } -} - -function getCacheDir() { - if (process.platform === 'win32') { - // process.env.TEMP also exists, but most apps put caches here - return path.join(getLocalAppDataDir() || path.join(userHome, 'AppData', 'Local', 'Yarn'), 'Cache'); - } else if (process.env.XDG_CACHE_HOME) { - return path.join(process.env.XDG_CACHE_HOME, 'yarn'); - } else if (process.platform === 'darwin') { - return path.join(userHome, 'Library', 'Caches', 'Yarn'); - } else { - return FALLBACK_CACHE_DIR; - } -} - -function getConfigDir() { - if (process.platform === 'win32') { - // Use our prior fallback. Some day this could be - // return path.join(WIN32_APPDATA_DIR, 'Config') - const WIN32_APPDATA_DIR = getLocalAppDataDir(); - return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, 'Config'); - } else if (process.env.XDG_CONFIG_HOME) { - return path.join(process.env.XDG_CONFIG_HOME, 'yarn'); - } else { - return FALLBACK_CONFIG_DIR; - } -} - -function getLocalAppDataDir() { - return process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, 'Yarn') : null; -} - -/***/ }), -/* 172 */, -/* 173 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(179), __esModule: true }; - -/***/ }), -/* 174 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} - - -/***/ }), -/* 175 */ -/***/ (function(module, exports, __webpack_require__) { - -var concatMap = __webpack_require__(178); -var balanced = __webpack_require__(174); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - - - -/***/ }), -/* 176 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function preserveCamelCase(str) { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < str.length; i++) { - const c = str[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { - str = str.substr(0, i) + '-' + str.substr(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { - str = str.substr(0, i - 1) + '-' + str.substr(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = c.toLowerCase() === c; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = c.toUpperCase() === c; - } - } - - return str; -} - -module.exports = function (str) { - if (arguments.length > 1) { - str = Array.from(arguments) - .map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - str = str.trim(); - } - - if (str.length === 0) { - return ''; - } - - if (str.length === 1) { - return str.toLowerCase(); - } - - if (/^[a-z0-9]+$/.test(str)) { - return str; - } - - const hasUpperCase = str !== str.toLowerCase(); - - if (hasUpperCase) { - str = preserveCamelCase(str); - } - - return str - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); -}; - - -/***/ }), -/* 177 */, -/* 178 */ -/***/ (function(module, exports) { - -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - - -/***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(205); -__webpack_require__(207); -__webpack_require__(210); -__webpack_require__(206); -__webpack_require__(208); -__webpack_require__(209); -module.exports = __webpack_require__(23).Promise; - - -/***/ }), -/* 180 */ -/***/ (function(module, exports) { - -module.exports = function () { /* empty */ }; - - -/***/ }), -/* 181 */ -/***/ (function(module, exports) { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; - - -/***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(74); -var toLength = __webpack_require__(110); -var toAbsoluteIndex = __webpack_require__(200); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - - -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(48); -var call = __webpack_require__(187); -var isArrayIter = __webpack_require__(186); -var anObject = __webpack_require__(27); -var toLength = __webpack_require__(110); -var getIterFn = __webpack_require__(203); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - - -/***/ }), -/* 184 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__(33) && !__webpack_require__(85)(function () { - return Object.defineProperty(__webpack_require__(68)('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 185 */ -/***/ (function(module, exports) { - -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); -}; - - -/***/ }), -/* 186 */ -/***/ (function(module, exports, __webpack_require__) { - -// check on default Array iterator -var Iterators = __webpack_require__(35); -var ITERATOR = __webpack_require__(13)('iterator'); -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - - -/***/ }), -/* 187 */ -/***/ (function(module, exports, __webpack_require__) { - -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(27); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - - -/***/ }), -/* 188 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var create = __webpack_require__(192); -var descriptor = __webpack_require__(106); -var setToStringTag = __webpack_require__(71); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(31)(IteratorPrototype, __webpack_require__(13)('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - - -/***/ }), -/* 189 */ -/***/ (function(module, exports, __webpack_require__) { - -var ITERATOR = __webpack_require__(13)('iterator'); -var SAFE_CLOSING = false; - -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } - -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; - - -/***/ }), -/* 190 */ -/***/ (function(module, exports) { - -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; - - -/***/ }), -/* 191 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(11); -var macrotask = __webpack_require__(109).set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __webpack_require__(47)(process) == 'process'; - -module.exports = function () { - var head, last, notify; - - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify(); - else last = undefined; - throw e; - } - } last = undefined; - if (parent) parent.enter(); - }; - - // Node.js - if (isNode) { - notify = function () { - process.nextTick(flush); - }; - // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 - } else if (Observer && !(global.navigator && global.navigator.standalone)) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { - node.data = toggle = !toggle; - }; - // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { - // Promise.resolve without an argument throws an error in LG WebOS 2 - var promise = Promise.resolve(undefined); - notify = function () { - promise.then(flush); - }; - // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } - - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } last = task; - }; -}; - - -/***/ }), -/* 192 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(27); -var dPs = __webpack_require__(193); -var enumBugKeys = __webpack_require__(101); -var IE_PROTO = __webpack_require__(72)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(68)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(102).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - -/***/ }), -/* 193 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(50); -var anObject = __webpack_require__(27); -var getKeys = __webpack_require__(132); - -module.exports = __webpack_require__(33) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; - - -/***/ }), -/* 194 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(49); -var toObject = __webpack_require__(133); -var IE_PROTO = __webpack_require__(72)('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - -/***/ }), -/* 195 */ -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__(49); -var toIObject = __webpack_require__(74); -var arrayIndexOf = __webpack_require__(182)(false); -var IE_PROTO = __webpack_require__(72)('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - -/***/ }), -/* 196 */ -/***/ (function(module, exports, __webpack_require__) { - -var hide = __webpack_require__(31); -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key]; - else hide(target, key, src[key]); - } return target; -}; - - -/***/ }), -/* 197 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(31); - - -/***/ }), -/* 198 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(11); -var core = __webpack_require__(23); -var dP = __webpack_require__(50); -var DESCRIPTORS = __webpack_require__(33); -var SPECIES = __webpack_require__(13)('species'); - -module.exports = function (KEY) { - var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; - - -/***/ }), -/* 199 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(73); -var defined = __webpack_require__(67); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; - - -/***/ }), -/* 200 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(73); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), -/* 201 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(34); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(11); -var navigator = global.navigator; - -module.exports = navigator && navigator.userAgent || ''; - - -/***/ }), -/* 203 */ -/***/ (function(module, exports, __webpack_require__) { - -var classof = __webpack_require__(100); -var ITERATOR = __webpack_require__(13)('iterator'); -var Iterators = __webpack_require__(35); -module.exports = __webpack_require__(23).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var addToUnscopables = __webpack_require__(180); -var step = __webpack_require__(190); -var Iterators = __webpack_require__(35); -var toIObject = __webpack_require__(74); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(103)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - - -/***/ }), -/* 205 */ -/***/ (function(module, exports) { - - - -/***/ }), -/* 206 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__(69); -var global = __webpack_require__(11); -var ctx = __webpack_require__(48); -var classof = __webpack_require__(100); -var $export = __webpack_require__(41); -var isObject = __webpack_require__(34); -var aFunction = __webpack_require__(46); -var anInstance = __webpack_require__(181); -var forOf = __webpack_require__(183); -var speciesConstructor = __webpack_require__(108); -var task = __webpack_require__(109).set; -var microtask = __webpack_require__(191)(); -var newPromiseCapabilityModule = __webpack_require__(70); -var perform = __webpack_require__(104); -var userAgent = __webpack_require__(202); -var promiseResolve = __webpack_require__(105); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8 || ''; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function () { /* empty */ }; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; - -var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(13)('species')] = function (exec) { - exec(empty, empty); - }; - // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - return (isNode || typeof PromiseRejectionEvent == 'function') - && promise.then(empty) instanceof FakePromise - // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables - // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 - // we can't detect it synchronously, so just check versions - && v8.indexOf('6.6') !== 0 - && userAgent.indexOf('Chrome/66') === -1; - } catch (e) { /* empty */ } -}(); - -// helpers -var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; -var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then, exited; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - if (handler === true) result = value; - else { - if (domain) domain.enter(); - result = handler(value); // may throw - if (domain) { - domain.exit(); - exited = true; - } - } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - if (domain && !exited) domain.exit(); - reject(e); - } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); - // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; -var isUnhandled = function (promise) { - return promise._h !== 1 && (promise._a || promise._c).length === 0; -}; -var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); - } - }); -}; -var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap - } -}; - -// constructor polyfill -if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - this._a = undefined; // <- checked in isUnhandled reactions - this._s = 0; // <- state - this._d = false; // <- done - this._v = undefined; // <- value - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - this._n = false; // <- notify - }; - Internal.prototype = __webpack_require__(196)($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return C === $Promise || C === Wrapper - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__webpack_require__(71)($Promise, PROMISE); -__webpack_require__(198)(PROMISE); -Wrapper = __webpack_require__(23)[PROMISE]; - -// statics -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(189)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); - - -/***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var $at = __webpack_require__(199)(true); - -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(103)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); - - -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// https://github.com/tc39/proposal-promise-finally - -var $export = __webpack_require__(41); -var core = __webpack_require__(23); -var global = __webpack_require__(11); -var speciesConstructor = __webpack_require__(108); -var promiseResolve = __webpack_require__(105); - -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); - - -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// https://github.com/tc39/proposal-promise-try -var $export = __webpack_require__(41); -var newPromiseCapability = __webpack_require__(70); -var perform = __webpack_require__(104); - -$export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; -} }); - - -/***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(204); -var global = __webpack_require__(11); -var hide = __webpack_require__(31); -var Iterators = __webpack_require__(35); -var TO_STRING_TAG = __webpack_require__(13)('toStringTag'); - -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); - -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = __webpack_require__(112); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', - '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', - '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', - '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', - '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', - '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', - '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', - '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', - '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', - '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', - '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} - - -/***/ }), -/* 212 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = __webpack_require__(211); -} else { - module.exports = __webpack_require__(213); -} - - -/***/ }), -/* 213 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Module dependencies. - */ - -var tty = __webpack_require__(79); -var util = __webpack_require__(2); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = __webpack_require__(112); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [ 6, 2, 3, 4, 5, 1 ]; - -try { - var supportsColor = __webpack_require__(239); - if (supportsColor && supportsColor.level >= 2) { - exports.colors = [ - 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, - 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, - 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 214, 215, 220, 221 - ]; - } -} catch (err) { - // swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(process.stderr.fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c); - var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } else { - return new Date().toISOString() + ' '; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log() { - return process.stderr.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); - - -/***/ }), -/* 214 */, -/* 215 */, -/* 216 */, -/* 217 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = __webpack_require__(0); -var isWindows = process.platform === 'win32'; -var fs = __webpack_require__(3); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - -/***/ }), -/* 218 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = __webpack_require__(3) -var rp = __webpack_require__(114) -var minimatch = __webpack_require__(60) -var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(75).Glob -var util = __webpack_require__(2) -var path = __webpack_require__(0) -var assert = __webpack_require__(22) -var isAbsolute = __webpack_require__(76) -var common = __webpack_require__(115) -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - - -/***/ }), -/* 219 */, -/* 220 */, -/* 221 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function (flag, argv) { - argv = argv || process.argv; - - var terminatorPos = argv.indexOf('--'); - var prefix = /^--/.test(flag) ? '' : '--'; - var pos = argv.indexOf(prefix + flag); - - return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true); -}; - - -/***/ }), -/* 222 */, -/* 223 */ -/***/ (function(module, exports, __webpack_require__) { - -var wrappy = __webpack_require__(123) -var reqs = Object.create(null) -var once = __webpack_require__(61) - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} - - -/***/ }), -/* 224 */ -/***/ (function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - - -/***/ }), -/* 225 */, -/* 226 */, -/* 227 */ -/***/ (function(module, exports, __webpack_require__) { - -// @flow - -/*:: -declare var __webpack_require__: mixed; -*/ - -module.exports = typeof __webpack_require__ !== "undefined"; - - -/***/ }), -/* 228 */, -/* 229 */ -/***/ (function(module, exports) { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} - - -/***/ }), -/* 230 */, -/* 231 */, -/* 232 */, -/* 233 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = rimraf -rimraf.sync = rimrafSync - -var assert = __webpack_require__(22) -var path = __webpack_require__(0) -var fs = __webpack_require__(3) -var glob = __webpack_require__(75) -var _0666 = parseInt('666', 8) - -var defaultGlobOpts = { - nosort: true, - silent: true -} - -// for EMFILE handling -var timeout = 0 - -var isWindows = (process.platform === "win32") - -function defaults (options) { - var methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(function(m) { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 - options.emfileWait = options.emfileWait || 1000 - if (options.glob === false) { - options.disableGlob = true - } - options.disableGlob = options.disableGlob || false - options.glob = options.glob || defaultGlobOpts -} - -function rimraf (p, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - var busyTries = 0 - var errState = null - var n = 0 - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) - - options.lstat(p, function (er, stat) { - if (!er) - return afterGlob(null, [p]) - - glob(p, options.glob, afterGlob) - }) - - function next (er) { - errState = errState || er - if (--n === 0) - cb(errState) - } - - function afterGlob (er, results) { - if (er) - return cb(er) - - n = results.length - if (n === 0) - return cb() - - results.forEach(function (p) { - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && - busyTries < options.maxBusyTries) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, options, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(function () { - rimraf_(p, options, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - next(er) - }) - }) - } -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, function (er, st) { - if (er && er.code === "ENOENT") - return cb(null) - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb) - - if (st && st.isDirectory()) - return rmdir(p, options, er, cb) - - options.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - if (er.code === "EISDIR") - return rmdir(p, options, er, cb) - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) - assert(er instanceof Error) - - options.chmod(p, _0666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - options.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, options, er, cb) - else - options.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, options, er) { - assert(p) - assert(options) - if (er) - assert(er instanceof Error) - - try { - options.chmodSync(p, _0666) - } catch (er2) { - if (er2.code === "ENOENT") - return - else - throw er - } - - try { - var stats = options.statSync(p) - } catch (er3) { - if (er3.code === "ENOENT") - return - else - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, options, er) - else - options.unlinkSync(p) -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return options.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), options, function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - options.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - var results - - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p] - } else { - try { - options.lstatSync(p) - results = [p] - } catch (er) { - results = glob.sync(p, options.glob) - } - } - - if (!results.length) - return - - for (var i = 0; i < results.length; i++) { - var p = results[i] - - try { - var st = options.lstatSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - - // Windows can EPERM on stat. Life is suffering. - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p, options, er) - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) - rmdirSync(p, options, null) - else - options.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - if (er.code !== "EISDIR") - throw er - - rmdirSync(p, options, er) - } - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options) - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f), options) - }) - - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - var retries = isWindows ? 100 : 1 - var i = 0 - do { - var threw = true - try { - var ret = options.rmdirSync(p, options) - threw = false - return ret - } finally { - if (++i < retries && threw) - continue - } - } while (true) -} - - -/***/ }), -/* 234 */, -/* 235 */, -/* 236 */, -/* 237 */, -/* 238 */, -/* 239 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var hasFlag = __webpack_require__(221); - -var support = function (level) { - if (level === 0) { - return false; - } - - return { - level: level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -}; - -var supportLevel = (function () { - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - return 1; - } - - if (process.stdout && !process.stdout.isTTY) { - return 0; - } - - if (process.platform === 'win32') { - return 1; - } - - if ('CI' in process.env) { - if ('TRAVIS' in process.env || process.env.CI === 'Travis') { - return 1; - } - - return 0; - } - - if ('TEAMCITY_VERSION' in process.env) { - return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1; - } - - if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return 1; - } - - if ('COLORTERM' in process.env) { - return 1; - } - - if (process.env.TERM === 'dumb') { - return 0; - } - - return 0; -})(); - -if (supportLevel === 0 && 'FORCE_COLOR' in process.env) { - supportLevel = 1; -} - -module.exports = process && support(supportLevel); - - -/***/ }) -/******/ ]); - -/***/ }), - -/***/ "../../node_modules/ansi-regex/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; - - -/***/ }), - -/***/ "../../node_modules/ansi-styles/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = __webpack_require__("../../node_modules/ansi-styles/node_modules/color-convert/index.js"); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("../../node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "../../node_modules/ansi-styles/node_modules/color-convert/conversions.js": -/***/ (function(module, exports, __webpack_require__) { - -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = __webpack_require__("../../node_modules/color-name/index.js"); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; - - -/***/ }), - -/***/ "../../node_modules/ansi-styles/node_modules/color-convert/index.js": -/***/ (function(module, exports, __webpack_require__) { - -const conversions = __webpack_require__("../../node_modules/ansi-styles/node_modules/color-convert/conversions.js"); -const route = __webpack_require__("../../node_modules/ansi-styles/node_modules/color-convert/route.js"); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; - - -/***/ }), - -/***/ "../../node_modules/ansi-styles/node_modules/color-convert/route.js": -/***/ (function(module, exports, __webpack_require__) { - -const conversions = __webpack_require__("../../node_modules/ansi-styles/node_modules/color-convert/conversions.js"); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - - - -/***/ }), - -/***/ "../../node_modules/array-differ/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const arrayDiffer = (array, ...values) => { - const rest = new Set([].concat(...values)); - return array.filter(element => !rest.has(element)); -}; - -module.exports = arrayDiffer; - - -/***/ }), - -/***/ "../../node_modules/array-union/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; -}; - - -/***/ }), - -/***/ "../../node_modules/arrify/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const arrify = value => { - if (value === null || value === undefined) { - return []; - } - - if (Array.isArray(value)) { - return value; - } - - if (typeof value === 'string') { - return [value]; - } - - if (typeof value[Symbol.iterator] === 'function') { - return [...value]; - } - - return [value]; -}; - -module.exports = arrify; - - -/***/ }), - -/***/ "../../node_modules/asynckit/index.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = -{ - parallel : __webpack_require__("../../node_modules/asynckit/parallel.js"), - serial : __webpack_require__("../../node_modules/asynckit/serial.js"), - serialOrdered : __webpack_require__("../../node_modules/asynckit/serialOrdered.js") -}; - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/abort.js": -/***/ (function(module, exports) { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/async.js": -/***/ (function(module, exports, __webpack_require__) { - -var defer = __webpack_require__("../../node_modules/asynckit/lib/defer.js"); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/defer.js": -/***/ (function(module, exports) { - -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/iterate.js": -/***/ (function(module, exports, __webpack_require__) { - -var async = __webpack_require__("../../node_modules/asynckit/lib/async.js") - , abort = __webpack_require__("../../node_modules/asynckit/lib/abort.js") - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/state.js": -/***/ (function(module, exports) { - -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/lib/terminator.js": -/***/ (function(module, exports, __webpack_require__) { - -var abort = __webpack_require__("../../node_modules/asynckit/lib/abort.js") - , async = __webpack_require__("../../node_modules/asynckit/lib/async.js") - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/parallel.js": -/***/ (function(module, exports, __webpack_require__) { - -var iterate = __webpack_require__("../../node_modules/asynckit/lib/iterate.js") - , initState = __webpack_require__("../../node_modules/asynckit/lib/state.js") - , terminator = __webpack_require__("../../node_modules/asynckit/lib/terminator.js") - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/serial.js": -/***/ (function(module, exports, __webpack_require__) { - -var serialOrdered = __webpack_require__("../../node_modules/asynckit/serialOrdered.js"); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} - - -/***/ }), - -/***/ "../../node_modules/asynckit/serialOrdered.js": -/***/ (function(module, exports, __webpack_require__) { - -var iterate = __webpack_require__("../../node_modules/asynckit/lib/iterate.js") - , initState = __webpack_require__("../../node_modules/asynckit/lib/state.js") - , terminator = __webpack_require__("../../node_modules/asynckit/lib/terminator.js") - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ "../../node_modules/axios/index.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("../../node_modules/axios/lib/axios.js"); - -/***/ }), - -/***/ "../../node_modules/axios/lib/adapters/http.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var settle = __webpack_require__("../../node_modules/axios/lib/core/settle.js"); -var buildFullPath = __webpack_require__("../../node_modules/axios/lib/core/buildFullPath.js"); -var buildURL = __webpack_require__("../../node_modules/axios/lib/helpers/buildURL.js"); -var http = __webpack_require__("http"); -var https = __webpack_require__("https"); -var httpFollow = __webpack_require__("../../node_modules/follow-redirects/index.js").http; -var httpsFollow = __webpack_require__("../../node_modules/follow-redirects/index.js").https; -var url = __webpack_require__("url"); -var zlib = __webpack_require__("zlib"); -var VERSION = __webpack_require__("../../node_modules/axios/lib/env/data.js").version; -var transitionalDefaults = __webpack_require__("../../node_modules/axios/lib/defaults/transitional.js"); -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); -var CanceledError = __webpack_require__("../../node_modules/axios/lib/cancel/CanceledError.js"); - -var isHttps = /https:?/; - -var supportedProtocols = [ 'http:', 'https:', 'file:' ]; - -/** - * - * @param {http.ClientRequestArgs} options - * @param {AxiosProxyConfig} proxy - * @param {string} location - */ -function setProxy(options, proxy, location) { - options.hostname = proxy.host; - options.host = proxy.host; - options.port = proxy.port; - options.path = location; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - - // If a proxy is used, any redirects must also pass through the proxy - options.beforeRedirect = function beforeRedirect(redirection) { - redirection.headers.host = redirection.host; - setProxy(redirection, proxy, redirection.href); - }; -} - -/*eslint consistent-return:0*/ -module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var onCanceled; - function done() { - if (config.cancelToken) { - config.cancelToken.unsubscribe(onCanceled); - } - - if (config.signal) { - config.signal.removeEventListener('abort', onCanceled); - } - } - var resolve = function resolve(value) { - done(); - resolvePromise(value); - }; - var rejected = false; - var reject = function reject(value) { - done(); - rejected = true; - rejectPromise(value); - }; - var data = config.data; - var headers = config.headers; - var headerNames = {}; - - Object.keys(headers).forEach(function storeLowerName(name) { - headerNames[name.toLowerCase()] = name; - }); - - // Set User-Agent (required by some servers) - // See https://github.com/axios/axios/issues/69 - if ('user-agent' in headerNames) { - // User-Agent is specified; handle case where no UA header is desired - if (!headers[headerNames['user-agent']]) { - delete headers[headerNames['user-agent']]; - } - // Otherwise, use specified value - } else { - // Only set header if it hasn't been set in config - headers['User-Agent'] = 'axios/' + VERSION; - } - - // support for https://www.npmjs.com/package/form-data api - if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) { - Object.assign(headers, data.getHeaders()); - } else if (data && !utils.isStream(data)) { - if (Buffer.isBuffer(data)) { - // Nothing to do... - } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(new AxiosError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - - if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { - return reject(new AxiosError( - 'Request body larger than maxBodyLength limit', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - - // Add Content-Length header if data exists - if (!headerNames['content-length']) { - headers['Content-Length'] = data.length; - } - } - - // HTTP basic authentication - var auth = undefined; - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - auth = username + ':' + password; - } - - // Parse url - var fullPath = buildFullPath(config.baseURL, config.url); - var parsed = url.parse(fullPath); - var protocol = parsed.protocol || supportedProtocols[0]; - - if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError( - 'Unsupported protocol ' + protocol, - AxiosError.ERR_BAD_REQUEST, - config - )); - } - - if (!auth && parsed.auth) { - var urlAuth = parsed.auth.split(':'); - var urlUsername = urlAuth[0] || ''; - var urlPassword = urlAuth[1] || ''; - auth = urlUsername + ':' + urlPassword; - } - - if (auth && headerNames.authorization) { - delete headers[headerNames.authorization]; - } - - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - - try { - buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''); - } catch (err) { - var customErr = new Error(err.message); - customErr.config = config; - customErr.url = config.url; - customErr.exists = true; - reject(customErr); - } - - var options = { - path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), - headers: headers, - agent: agent, - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth: auth - }; - - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - } - - var proxy = config.proxy; - if (!proxy && proxy !== false) { - var proxyEnv = protocol.slice(0, -1) + '_proxy'; - var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; - if (proxyUrl) { - var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; - - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); - - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { - return true; - } - - return parsed.hostname === proxyElement; - }); - } - - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port, - protocol: parsedProxyUrl.protocol - }; - - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } - } - } - } - - if (proxy) { - options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); - } - - var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; - } - if (config.beforeRedirect) { - options.beforeRedirect = config.beforeRedirect; - } - transport = isHttpsProxy ? httpsFollow : httpFollow; - } - - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } - - if (config.insecureHTTPParser) { - options.insecureHTTPParser = config.insecureHTTPParser; - } - - // Create the request - var req = transport.request(options, function handleResponse(res) { - if (req.aborted) return; - - // uncompress the response body transparently if required - var stream = res; - - // return the last request in case of redirects - var lastRequest = res.req || req; - - - // if no content, is HEAD request or decompress disabled we should not decompress - if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) { - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } - } - - var response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: res.headers, - config: config, - request: lastRequest - }; - - if (config.responseType === 'stream') { - response.data = stream; - settle(resolve, reject, response); - } else { - var responseBuffer = []; - var totalResponseBytes = 0; - stream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { - // stream.destoy() emit aborted event before calling reject() on Node.js v16 - rejected = true; - stream.destroy(); - reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); - } - }); - - stream.on('aborted', function handlerStreamAborted() { - if (rejected) { - return; - } - stream.destroy(); - reject(new AxiosError( - 'maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, - config, - lastRequest - )); - }); - - stream.on('error', function handleStreamError(err) { - if (req.aborted) return; - reject(AxiosError.from(err, null, config, lastRequest)); - }); - - stream.on('end', function handleStreamEnd() { - try { - var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); - if (!config.responseEncoding || config.responseEncoding === 'utf8') { - responseData = utils.stripBOM(responseData); - } - } - response.data = responseData; - } catch (err) { - reject(AxiosError.from(err, null, config, response.request, response)); - } - settle(resolve, reject, response); - }); - } - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - // @todo remove - // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; - reject(AxiosError.from(err, null, config, req)); - }); - - // set tcp keep alive to prevent drop connection by peer - req.on('socket', function handleRequestSocket(socket) { - // default interval of sending ack packet is 1 minute - socket.setKeepAlive(true, 1000 * 60); - }); - - // Handle request timeout - if (config.timeout) { - // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. - var timeout = parseInt(config.timeout, 10); - - if (isNaN(timeout)) { - reject(new AxiosError( - 'error trying to parse `config.timeout` to int', - AxiosError.ERR_BAD_OPTION_VALUE, - config, - req - )); - - return; - } - - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devoring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(timeout, function handleRequestTimeout() { - req.abort(); - var transitional = config.transitional || transitionalDefaults; - reject(new AxiosError( - 'timeout of ' + timeout + 'ms exceeded', - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - req - )); - }); - } - - if (config.cancelToken || config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = function(cancel) { - if (req.aborted) return; - - req.abort(); - reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel); - }; - - config.cancelToken && config.cancelToken.subscribe(onCanceled); - if (config.signal) { - config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); - } - } - - - // Send the request - if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(AxiosError.from(err, config, null, req)); - }).pipe(req); - } else { - req.end(data); - } - }); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/adapters/xhr.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var settle = __webpack_require__("../../node_modules/axios/lib/core/settle.js"); -var cookies = __webpack_require__("../../node_modules/axios/lib/helpers/cookies.js"); -var buildURL = __webpack_require__("../../node_modules/axios/lib/helpers/buildURL.js"); -var buildFullPath = __webpack_require__("../../node_modules/axios/lib/core/buildFullPath.js"); -var parseHeaders = __webpack_require__("../../node_modules/axios/lib/helpers/parseHeaders.js"); -var isURLSameOrigin = __webpack_require__("../../node_modules/axios/lib/helpers/isURLSameOrigin.js"); -var transitionalDefaults = __webpack_require__("../../node_modules/axios/lib/defaults/transitional.js"); -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); -var CanceledError = __webpack_require__("../../node_modules/axios/lib/cancel/CanceledError.js"); -var parseProtocol = __webpack_require__("../../node_modules/axios/lib/helpers/parseProtocol.js"); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - var responseType = config.responseType; - var onCanceled; - function done() { - if (config.cancelToken) { - config.cancelToken.unsubscribe(onCanceled); - } - - if (config.signal) { - config.signal.removeEventListener('abort', onCanceled); - } - } - - if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - var transitional = config.transitional || transitionalDefaults; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = config.responseType; - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken || config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = function(cancel) { - if (!request) { - return; - } - reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel); - request.abort(); - request = null; - }; - - config.cancelToken && config.cancelToken.subscribe(onCanceled); - if (config.signal) { - config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); - } - } - - if (!requestData) { - requestData = null; - } - - var protocol = parseProtocol(fullPath); - - if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData); - }); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/axios.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var bind = __webpack_require__("../../node_modules/axios/lib/helpers/bind.js"); -var Axios = __webpack_require__("../../node_modules/axios/lib/core/Axios.js"); -var mergeConfig = __webpack_require__("../../node_modules/axios/lib/core/mergeConfig.js"); -var defaults = __webpack_require__("../../node_modules/axios/lib/defaults/index.js"); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -var axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Expose Cancel & CancelToken -axios.CanceledError = __webpack_require__("../../node_modules/axios/lib/cancel/CanceledError.js"); -axios.CancelToken = __webpack_require__("../../node_modules/axios/lib/cancel/CancelToken.js"); -axios.isCancel = __webpack_require__("../../node_modules/axios/lib/cancel/isCancel.js"); -axios.VERSION = __webpack_require__("../../node_modules/axios/lib/env/data.js").version; -axios.toFormData = __webpack_require__("../../node_modules/axios/lib/helpers/toFormData.js"); - -// Expose AxiosError class -axios.AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = __webpack_require__("../../node_modules/axios/lib/helpers/spread.js"); - -// Expose isAxiosError -axios.isAxiosError = __webpack_require__("../../node_modules/axios/lib/helpers/isAxiosError.js"); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports.default = axios; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/cancel/CancelToken.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var CanceledError = __webpack_require__("../../node_modules/axios/lib/cancel/CanceledError.js"); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - - // eslint-disable-next-line func-names - this.promise.then(function(cancel) { - if (!token._listeners) return; - - var i; - var l = token._listeners.length; - - for (i = 0; i < l; i++) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = function(onfulfilled) { - var _resolve; - // eslint-disable-next-line func-names - var promise = new Promise(function(resolve) { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new CanceledError(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `CanceledError` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Subscribe to the cancel signal - */ - -CancelToken.prototype.subscribe = function subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } -}; - -/** - * Unsubscribe from the cancel signal - */ - -CancelToken.prototype.unsubscribe = function unsubscribe(listener) { - if (!this._listeners) { - return; - } - var index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/cancel/CanceledError.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function CanceledError(message) { - // eslint-disable-next-line no-eq-null,eqeqeq - AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED); - this.name = 'CanceledError'; -} - -utils.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); - -module.exports = CanceledError; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/cancel/isCancel.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/Axios.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var buildURL = __webpack_require__("../../node_modules/axios/lib/helpers/buildURL.js"); -var InterceptorManager = __webpack_require__("../../node_modules/axios/lib/core/InterceptorManager.js"); -var dispatchRequest = __webpack_require__("../../node_modules/axios/lib/core/dispatchRequest.js"); -var mergeConfig = __webpack_require__("../../node_modules/axios/lib/core/mergeConfig.js"); -var buildFullPath = __webpack_require__("../../node_modules/axios/lib/core/buildFullPath.js"); -var validator = __webpack_require__("../../node_modules/axios/lib/helpers/validator.js"); - -var validators = validator.validators; -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - var transitional = config.transitional; - - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - // filter out skipped interceptors - var requestInterceptorChain = []; - var synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - var responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - var promise; - - if (!synchronousRequestInterceptors) { - var chain = [dispatchRequest, undefined]; - - Array.prototype.unshift.apply(chain, requestInterceptorChain); - chain = chain.concat(responseInterceptorChain); - - promise = Promise.resolve(config); - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; - } - - - var newConfig = config; - while (requestInterceptorChain.length) { - var onFulfilled = requestInterceptorChain.shift(); - var onRejected = requestInterceptorChain.shift(); - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected(error); - break; - } - } - - try { - promise = dispatchRequest(newConfig); - } catch (error) { - return Promise.reject(error); - } - - while (responseInterceptorChain.length) { - promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - var fullPath = buildFullPath(config.baseURL, config.url); - return buildURL(fullPath, config.params, config.paramsSerializer); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url: url, - data: data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -module.exports = Axios; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/AxiosError.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - response && (this.response = response); -} - -utils.inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code, - status: this.response && this.response.status ? this.response.status : null - }; - } -}); - -var prototype = AxiosError.prototype; -var descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED' -// eslint-disable-next-line func-names -].forEach(function(code) { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = function(error, code, config, request, response, customProps) { - var axiosError = Object.create(prototype); - - utils.toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -module.exports = AxiosError; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/InterceptorManager.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/buildFullPath.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isAbsoluteURL = __webpack_require__("../../node_modules/axios/lib/helpers/isAbsoluteURL.js"); -var combineURLs = __webpack_require__("../../node_modules/axios/lib/helpers/combineURLs.js"); - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/dispatchRequest.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var transformData = __webpack_require__("../../node_modules/axios/lib/core/transformData.js"); -var isCancel = __webpack_require__("../../node_modules/axios/lib/cancel/isCancel.js"); -var defaults = __webpack_require__("../../node_modules/axios/lib/defaults/index.js"); -var CanceledError = __webpack_require__("../../node_modules/axios/lib/cancel/CanceledError.js"); - -/** - * Throws a `CanceledError` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new CanceledError(); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData.call( - config, - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData.call( - config, - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/mergeConfig.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(prop) { - if (prop in config2) { - return getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - return getMergedValue(undefined, config1[prop]); - } - } - - var mergeMap = { - 'url': valueFromConfig2, - 'method': valueFromConfig2, - 'data': valueFromConfig2, - 'baseURL': defaultToConfig2, - 'transformRequest': defaultToConfig2, - 'transformResponse': defaultToConfig2, - 'paramsSerializer': defaultToConfig2, - 'timeout': defaultToConfig2, - 'timeoutMessage': defaultToConfig2, - 'withCredentials': defaultToConfig2, - 'adapter': defaultToConfig2, - 'responseType': defaultToConfig2, - 'xsrfCookieName': defaultToConfig2, - 'xsrfHeaderName': defaultToConfig2, - 'onUploadProgress': defaultToConfig2, - 'onDownloadProgress': defaultToConfig2, - 'decompress': defaultToConfig2, - 'maxContentLength': defaultToConfig2, - 'maxBodyLength': defaultToConfig2, - 'beforeRedirect': defaultToConfig2, - 'transport': defaultToConfig2, - 'httpAgent': defaultToConfig2, - 'httpsAgent': defaultToConfig2, - 'cancelToken': defaultToConfig2, - 'socketPath': defaultToConfig2, - 'responseEncoding': defaultToConfig2, - 'validateStatus': mergeDirectKeys - }; - - utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { - var merge = mergeMap[prop] || mergeDeepProperties; - var configValue = merge(prop); - (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/settle.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new AxiosError( - 'Request failed with status code ' + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/core/transformData.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var defaults = __webpack_require__("../../node_modules/axios/lib/defaults/index.js"); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - var context = this || defaults; - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn.call(context, data, headers); - }); - - return data; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/defaults/env/FormData.js": -/***/ (function(module, exports, __webpack_require__) { - -// eslint-disable-next-line strict -module.exports = __webpack_require__("../../node_modules/form-data/lib/form_data.js"); - - -/***/ }), - -/***/ "../../node_modules/axios/lib/defaults/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); -var normalizeHeaderName = __webpack_require__("../../node_modules/axios/lib/helpers/normalizeHeaderName.js"); -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); -var transitionalDefaults = __webpack_require__("../../node_modules/axios/lib/defaults/transitional.js"); -var toFormData = __webpack_require__("../../node_modules/axios/lib/helpers/toFormData.js"); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__("../../node_modules/axios/lib/adapters/xhr.js"); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__("../../node_modules/axios/lib/adapters/http.js"); - } - return adapter; -} - -function stringifySafely(rawValue, parser, encoder) { - if (utils.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -var defaults = { - - transitional: transitionalDefaults, - - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - - var isObjectPayload = utils.isObject(data); - var contentType = headers && headers['Content-Type']; - - var isFileList; - - if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) { - var _FormData = this.env && this.env.FormData; - return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData()); - } else if (isObjectPayload || contentType === 'application/json') { - setContentTypeIfUnset(headers, 'application/json'); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - var transitional = this.transitional || defaults.transitional; - var silentJSONParsing = transitional && transitional.silentJSONParsing; - var forcedJSONParsing = transitional && transitional.forcedJSONParsing; - var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; - - if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: __webpack_require__("../../node_modules/axios/lib/defaults/env/FormData.js") - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*' - } - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/defaults/transitional.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/env/data.js": -/***/ (function(module, exports) { - -module.exports = { - "version": "0.27.2" -}; - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/bind.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/buildURL.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/combineURLs.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/cookies.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/isAbsoluteURL.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/isAxiosError.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -module.exports = function isAxiosError(payload) { - return utils.isObject(payload) && (payload.isAxiosError === true); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/isURLSameOrigin.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/normalizeHeaderName.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/parseHeaders.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/parseProtocol.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function parseProtocol(url) { - var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/spread.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/toFormData.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__("../../node_modules/axios/lib/utils.js"); - -/** - * Convert a data object to FormData - * @param {Object} obj - * @param {?Object} [formData] - * @returns {Object} - **/ - -function toFormData(obj, formData) { - // eslint-disable-next-line no-param-reassign - formData = formData || new FormData(); - - var stack = []; - - function convertValue(value) { - if (value === null) return ''; - - if (utils.isDate(value)) { - return value.toISOString(); - } - - if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) { - return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - function build(data, parentKey) { - if (utils.isPlainObject(data) || utils.isArray(data)) { - if (stack.indexOf(data) !== -1) { - throw Error('Circular reference detected in ' + parentKey); - } - - stack.push(data); - - utils.forEach(data, function each(value, key) { - if (utils.isUndefined(value)) return; - var fullKey = parentKey ? parentKey + '.' + key : key; - var arr; - - if (value && !parentKey && typeof value === 'object') { - if (utils.endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) { - // eslint-disable-next-line func-names - arr.forEach(function(el) { - !utils.isUndefined(el) && formData.append(fullKey, convertValue(el)); - }); - return; - } - } - - build(value, fullKey); - }); - - stack.pop(); - } else { - formData.append(parentKey, convertValue(data)); - } - } - - build(obj); - - return formData; -} - -module.exports = toFormData; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/helpers/validator.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var VERSION = __webpack_require__("../../node_modules/axios/lib/env/data.js").version; -var AxiosError = __webpack_require__("../../node_modules/axios/lib/core/AxiosError.js"); - -var validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -var deprecatedWarnings = {}; - -/** - * Transitional option validator - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return function(value, opt, opts) { - if (validator === false) { - throw new AxiosError( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - AxiosError.ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); - } - var keys = Object.keys(options); - var i = keys.length; - while (i-- > 0) { - var opt = keys[i]; - var validator = schema[opt]; - if (validator) { - var value = options[opt]; - var result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); - } - } -} - -module.exports = { - assertOptions: assertOptions, - validators: validators -}; - - -/***/ }), - -/***/ "../../node_modules/axios/lib/utils.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__("../../node_modules/axios/lib/helpers/bind.js"); - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -// eslint-disable-next-line func-names -var kindOf = (function(cache) { - // eslint-disable-next-line func-names - return function(thing) { - var str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); - }; -})(Object.create(null)); - -function kindOfTest(type) { - type = type.toLowerCase(); - return function isKindOf(thing) { - return kindOf(thing) === type; - }; -} - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return Array.isArray(val); -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -var isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (kindOf(val) !== 'object') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -var isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -var isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -var isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -var isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a FormData - * - * @param {Object} thing The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(thing) { - var pattern = '[object FormData]'; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || - toString.call(thing) === pattern || - (isFunction(thing.toString) && thing.toString() === pattern) - ); -} - -/** - * Determine if a value is a URLSearchParams object - * @function - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -var isURLSearchParams = kindOfTest('URLSearchParams'); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - */ - -function inherits(constructor, superConstructor, props, descriptors) { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function} [filter] - * @returns {Object} - */ - -function toFlatObject(sourceObj, destObj, filter) { - var props; - var i; - var prop; - var merged = {}; - - destObj = destObj || {}; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if (!merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = Object.getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/* - * determines whether a string ends with the characters of a specified string - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * @returns {boolean} - */ -function endsWith(str, searchString, position) { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - var lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object - * @param {*} [thing] - * @returns {Array} - */ -function toArray(thing) { - if (!thing) return null; - var i = thing.length; - if (isUndefined(i)) return null; - var arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -// eslint-disable-next-line func-names -var isTypedArray = (function(TypedArray) { - // eslint-disable-next-line func-names - return function(thing) { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array)); - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM, - inherits: inherits, - toFlatObject: toFlatObject, - kindOf: kindOf, - kindOfTest: kindOfTest, - endsWith: endsWith, - toArray: toArray, - isTypedArray: isTypedArray, - isFileList: isFileList -}; - - -/***/ }), - -/***/ "../../node_modules/balanced-match/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} - - -/***/ }), - -/***/ "../../node_modules/brace-expansion/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var concatMap = __webpack_require__("../../node_modules/concat-map/index.js"); -var balanced = __webpack_require__("../../node_modules/balanced-match/index.js"); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - - - -/***/ }), - -/***/ "../../node_modules/braces/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const stringify = __webpack_require__("../../node_modules/braces/lib/stringify.js"); -const compile = __webpack_require__("../../node_modules/braces/lib/compile.js"); -const expand = __webpack_require__("../../node_modules/braces/lib/expand.js"); -const parse = __webpack_require__("../../node_modules/braces/lib/parse.js"); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (let pattern of input) { - let result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; - - -/***/ }), - -/***/ "../../node_modules/braces/lib/compile.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fill = __webpack_require__("../../node_modules/fill-range/index.js"); -const utils = __webpack_require__("../../node_modules/braces/lib/utils.js"); - -const compile = (ast, options = {}) => { - let walk = (node, parent = {}) => { - let invalidBlock = utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let invalid = invalidBlock === true || invalidNode === true; - let prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? (prefix + node.value) : '('; - } - - if (node.type === 'close') { - return invalid ? (prefix + node.value) : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - let range = fill(...args, { ...options, wrap: false, toRegex: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (let child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - - return walk(ast); -}; - -module.exports = compile; - - -/***/ }), - -/***/ "../../node_modules/braces/lib/constants.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - MAX_LENGTH: 1024 * 64, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; - - -/***/ }), - -/***/ "../../node_modules/braces/lib/expand.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fill = __webpack_require__("../../node_modules/fill-range/index.js"); -const stringify = __webpack_require__("../../node_modules/braces/lib/stringify.js"); -const utils = __webpack_require__("../../node_modules/braces/lib/utils.js"); - -const append = (queue = '', stash = '', enclose = false) => { - let result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (let item of queue) { - if (Array.isArray(item)) { - for (let value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; - - let walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - let enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; - - -/***/ }), - -/***/ "../../node_modules/braces/lib/parse.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const stringify = __webpack_require__("../../node_modules/braces/lib/stringify.js"); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __webpack_require__("../../node_modules/braces/lib/constants.js"); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - let opts = options || {}; - let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - let ast = { type: 'root', input, nodes: [] }; - let stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - let length = input.length; - let index = 0; - let depth = 0; - let value; - let memo = {}; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let closed = true; - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - let open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - let brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - let type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - let open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - let siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - let before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - let parent = stack[stack.length - 1]; - let index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; - - -/***/ }), - -/***/ "../../node_modules/braces/lib/stringify.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const utils = __webpack_require__("../../node_modules/braces/lib/utils.js"); - -module.exports = (ast, options = {}) => { - let stringify = (node, parent = {}) => { - let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (let child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - - - -/***/ }), - -/***/ "../../node_modules/braces/lib/utils.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - let node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - let ele = arr[i]; - Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); - } - return result; - }; - flat(args); - return result; -}; - - -/***/ }), - -/***/ "../../node_modules/chalk/source/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const ansiStyles = __webpack_require__("../../node_modules/ansi-styles/index.js"); -const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__("../../node_modules/supports-color/index.js"); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = __webpack_require__("../../node_modules/chalk/source/util.js"); - -const {isArray} = Array; - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!isArray(firstString) || !isArray(firstString.raw)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = __webpack_require__("../../node_modules/chalk/source/templates.js"); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -module.exports = chalk; - - -/***/ }), - -/***/ "../../node_modules/chalk/source/templates.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMessage); - } - - return chunks.join(''); -}; - - -/***/ }), - -/***/ "../../node_modules/chalk/source/util.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; - - -/***/ }), - -/***/ "../../node_modules/clean-stack/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__("os"); - -const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; -const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; -const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); - -module.exports = (stack, options) => { - options = Object.assign({pretty: false}, options); - - return stack.replace(/\\/g, '/') - .split('\n') - .filter(line => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - - const match = pathMatches[1]; - - // Electron - if ( - match.includes('.app/Contents/Resources/electron.asar') || - match.includes('.app/Contents/Resources/default_app.asar') - ) { - return false; - } - - return !pathRegex.test(match); - }) - .filter(line => line.trim() !== '') - .map(line => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); - } - - return line; - }) - .join('\n'); -}; - - -/***/ }), - -/***/ "../../node_modules/cli-cursor/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const restoreCursor = __webpack_require__("../../node_modules/restore-cursor/index.js"); - -let isHidden = false; - -exports.show = (writableStream = process.stderr) => { - if (!writableStream.isTTY) { - return; - } - - isHidden = false; - writableStream.write('\u001B[?25h'); -}; - -exports.hide = (writableStream = process.stderr) => { - if (!writableStream.isTTY) { - return; - } - - restoreCursor(); - isHidden = true; - writableStream.write('\u001B[?25l'); -}; - -exports.toggle = (force, writableStream) => { - if (force !== undefined) { - isHidden = force; - } - - if (isHidden) { - exports.show(writableStream); - } else { - exports.hide(writableStream); - } -}; - - -/***/ }), - -/***/ "../../node_modules/cli-spinners/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const spinners = Object.assign({}, __webpack_require__("../../node_modules/cli-spinners/spinners.json")); - -const spinnersList = Object.keys(spinners); - -Object.defineProperty(spinners, 'random', { - get() { - const randomIndex = Math.floor(Math.random() * spinnersList.length); - const spinnerName = spinnersList[randomIndex]; - return spinners[spinnerName]; - } -}); - -module.exports = spinners; -// TODO: Remove this for the next major release -module.exports.default = spinners; - - -/***/ }), - -/***/ "../../node_modules/cli-spinners/spinners.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"dots8Bit\":{\"interval\":80,\"frames\":[\"⠀\",\"⠁\",\"⠂\",\"⠃\",\"⠄\",\"⠅\",\"⠆\",\"⠇\",\"⡀\",\"⡁\",\"⡂\",\"⡃\",\"⡄\",\"⡅\",\"⡆\",\"⡇\",\"⠈\",\"⠉\",\"⠊\",\"⠋\",\"⠌\",\"⠍\",\"⠎\",\"⠏\",\"⡈\",\"⡉\",\"⡊\",\"⡋\",\"⡌\",\"⡍\",\"⡎\",\"⡏\",\"⠐\",\"⠑\",\"⠒\",\"⠓\",\"⠔\",\"⠕\",\"⠖\",\"⠗\",\"⡐\",\"⡑\",\"⡒\",\"⡓\",\"⡔\",\"⡕\",\"⡖\",\"⡗\",\"⠘\",\"⠙\",\"⠚\",\"⠛\",\"⠜\",\"⠝\",\"⠞\",\"⠟\",\"⡘\",\"⡙\",\"⡚\",\"⡛\",\"⡜\",\"⡝\",\"⡞\",\"⡟\",\"⠠\",\"⠡\",\"⠢\",\"⠣\",\"⠤\",\"⠥\",\"⠦\",\"⠧\",\"⡠\",\"⡡\",\"⡢\",\"⡣\",\"⡤\",\"⡥\",\"⡦\",\"⡧\",\"⠨\",\"⠩\",\"⠪\",\"⠫\",\"⠬\",\"⠭\",\"⠮\",\"⠯\",\"⡨\",\"⡩\",\"⡪\",\"⡫\",\"⡬\",\"⡭\",\"⡮\",\"⡯\",\"⠰\",\"⠱\",\"⠲\",\"⠳\",\"⠴\",\"⠵\",\"⠶\",\"⠷\",\"⡰\",\"⡱\",\"⡲\",\"⡳\",\"⡴\",\"⡵\",\"⡶\",\"⡷\",\"⠸\",\"⠹\",\"⠺\",\"⠻\",\"⠼\",\"⠽\",\"⠾\",\"⠿\",\"⡸\",\"⡹\",\"⡺\",\"⡻\",\"⡼\",\"⡽\",\"⡾\",\"⡿\",\"⢀\",\"⢁\",\"⢂\",\"⢃\",\"⢄\",\"⢅\",\"⢆\",\"⢇\",\"⣀\",\"⣁\",\"⣂\",\"⣃\",\"⣄\",\"⣅\",\"⣆\",\"⣇\",\"⢈\",\"⢉\",\"⢊\",\"⢋\",\"⢌\",\"⢍\",\"⢎\",\"⢏\",\"⣈\",\"⣉\",\"⣊\",\"⣋\",\"⣌\",\"⣍\",\"⣎\",\"⣏\",\"⢐\",\"⢑\",\"⢒\",\"⢓\",\"⢔\",\"⢕\",\"⢖\",\"⢗\",\"⣐\",\"⣑\",\"⣒\",\"⣓\",\"⣔\",\"⣕\",\"⣖\",\"⣗\",\"⢘\",\"⢙\",\"⢚\",\"⢛\",\"⢜\",\"⢝\",\"⢞\",\"⢟\",\"⣘\",\"⣙\",\"⣚\",\"⣛\",\"⣜\",\"⣝\",\"⣞\",\"⣟\",\"⢠\",\"⢡\",\"⢢\",\"⢣\",\"⢤\",\"⢥\",\"⢦\",\"⢧\",\"⣠\",\"⣡\",\"⣢\",\"⣣\",\"⣤\",\"⣥\",\"⣦\",\"⣧\",\"⢨\",\"⢩\",\"⢪\",\"⢫\",\"⢬\",\"⢭\",\"⢮\",\"⢯\",\"⣨\",\"⣩\",\"⣪\",\"⣫\",\"⣬\",\"⣭\",\"⣮\",\"⣯\",\"⢰\",\"⢱\",\"⢲\",\"⢳\",\"⢴\",\"⢵\",\"⢶\",\"⢷\",\"⣰\",\"⣱\",\"⣲\",\"⣳\",\"⣴\",\"⣵\",\"⣶\",\"⣷\",\"⢸\",\"⢹\",\"⢺\",\"⢻\",\"⢼\",\"⢽\",\"⢾\",\"⢿\",\"⣸\",\"⣹\",\"⣺\",\"⣻\",\"⣼\",\"⣽\",\"⣾\",\"⣿\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕛 \",\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"material\":{\"interval\":17,\"frames\":[\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███████▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"██████████▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"█████████████▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁██████████████▁▁▁▁\",\"▁▁▁██████████████▁▁▁\",\"▁▁▁▁█████████████▁▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁▁█████████████▁▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁▁███████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁▁█████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]},\"grenade\":{\"interval\":80,\"frames\":[\"، \",\"′ \",\" ´ \",\" ‾ \",\" ⸌\",\" ⸊\",\" |\",\" ⁎\",\" ⁕\",\" ෴ \",\" ⁓\",\" \",\" \",\" \"]},\"point\":{\"interval\":125,\"frames\":[\"∙∙∙\",\"●∙∙\",\"∙●∙\",\"∙∙●\",\"∙∙∙\"]},\"layer\":{\"interval\":150,\"frames\":[\"-\",\"=\",\"≡\"]},\"betaWave\":{\"interval\":80,\"frames\":[\"ρββββββ\",\"βρβββββ\",\"ββρββββ\",\"βββρβββ\",\"ββββρββ\",\"βββββρβ\",\"ββββββρ\"]},\"aesthetic\":{\"interval\":80,\"frames\":[\"▰▱▱▱▱▱▱\",\"▰▰▱▱▱▱▱\",\"▰▰▰▱▱▱▱\",\"▰▰▰▰▱▱▱\",\"▰▰▰▰▰▱▱\",\"▰▰▰▰▰▰▱\",\"▰▰▰▰▰▰▰\",\"▰▱▱▱▱▱▱\"]}}"); - -/***/ }), - -/***/ "../../node_modules/clone/clone.js": -/***/ (function(module, exports, __webpack_require__) { - -var clone = (function() { -'use strict'; - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). -*/ -function clone(parent, circular, depth, prototype) { - var filter; - if (typeof circular === 'object') { - depth = circular.depth; - prototype = circular.prototype; - filter = circular.filter; - circular = circular.circular - } - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth == 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (clone.__isArray(parent)) { - child = []; - } else if (clone.__isRegExp(parent)) { - child = new RegExp(parent.source, __getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (clone.__isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - if (Buffer.allocUnsafe) { - // Node.js >= 4.5.0 - child = Buffer.allocUnsafe(parent.length); - } else { - // Older Node.js versions - child = new Buffer(parent.length); - } - parent.copy(child); - return child; - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - return child; - } - - return _clone(parent, depth); -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; - -// private utility functions - -function __objToStr(o) { - return Object.prototype.toString.call(o); -}; -clone.__objToStr = __objToStr; - -function __isDate(o) { - return typeof o === 'object' && __objToStr(o) === '[object Date]'; -}; -clone.__isDate = __isDate; - -function __isArray(o) { - return typeof o === 'object' && __objToStr(o) === '[object Array]'; -}; -clone.__isArray = __isArray; - -function __isRegExp(o) { - return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; -}; -clone.__isRegExp = __isRegExp; - -function __getRegExpFlags(re) { - var flags = ''; - if (re.global) flags += 'g'; - if (re.ignoreCase) flags += 'i'; - if (re.multiline) flags += 'm'; - return flags; -}; -clone.__getRegExpFlags = __getRegExpFlags; - -return clone; -})(); - -if ( true && module.exports) { - module.exports = clone; -} - - -/***/ }), - -/***/ "../../node_modules/cmd-shim/index.js": -/***/ (function(module, exports, __webpack_require__) { - -// On windows, create a .cmd file. -// Read the #! in the file to see what it uses. The vast majority -// of the time, this will be either: -// "#!/usr/bin/env " -// or: -// "#! " -// -// Write a binroot/pkg.bin + ".cmd" file that has this line in it: -// @ %~dp0 %* - -module.exports = cmdShim -cmdShim.ifExists = cmdShimIfExists - -var fs = __webpack_require__("../../node_modules/graceful-fs/graceful-fs.js") - -var mkdir = __webpack_require__("../../node_modules/mkdirp/index.js") - , path = __webpack_require__("path") - , toBatchSyntax = __webpack_require__("../../node_modules/cmd-shim/lib/to-batch-syntax.js") - , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+=[^ \t]+\s+)*\s*([^ \t]+)(.*)$/ - -function cmdShimIfExists (from, to, cb) { - fs.stat(from, function (er) { - if (er) return cb() - cmdShim(from, to, cb) - }) -} - -// Try to unlink, but ignore errors. -// Any problems will surface later. -function rm (path, cb) { - fs.unlink(path, function(er) { - cb() - }) -} - -function cmdShim (from, to, cb) { - fs.stat(from, function (er, stat) { - if (er) - return cb(er) - - cmdShim_(from, to, cb) - }) -} - -function cmdShim_ (from, to, cb) { - var then = times(2, next, cb) - rm(to, then) - rm(to + ".cmd", then) - - function next(er) { - writeShim(from, to, cb) - } -} - -function writeShim (from, to, cb) { - // make a cmd file and a sh script - // First, check if the bin is a #! of some sort. - // If not, then assume it's something that'll be compiled, or some other - // sort of script, and just call it directly. - mkdir(path.dirname(to), function (er) { - if (er) - return cb(er) - fs.readFile(from, "utf8", function (er, data) { - if (er) return writeShim_(from, to, null, null, cb) - var firstLine = data.trim().split(/\r*\n/)[0] - , shebang = firstLine.match(shebangExpr) - if (!shebang) return writeShim_(from, to, null, null, null, cb) - var vars = shebang[1] || "" - , prog = shebang[2] - , args = shebang[3] || "" - return writeShim_(from, to, prog, args, vars, cb) - }) - }) -} - - -function writeShim_ (from, to, prog, args, variables, cb) { - var shTarget = path.relative(path.dirname(to), from) - , target = shTarget.split("/").join("\\") - , longProg - , shProg = prog && prog.split("\\").join("/") - , shLongProg - , pwshProg = shProg && "\"" + shProg + "$exe\"" - , pwshLongProg - shTarget = shTarget.split("\\").join("/") - args = args || "" - variables = variables || "" - if (!prog) { - prog = "\"%~dp0\\" + target + "\"" - shProg = "\"$basedir/" + shTarget + "\"" - pwshProg = shProg - args = "" - target = "" - shTarget = "" - } else { - longProg = "\"%~dp0\\" + prog + ".exe\"" - shLongProg = "\"$basedir/" + prog + "\"" - pwshLongProg = "\"$basedir/" + prog + "$exe\"" - target = "\"%~dp0\\" + target + "\"" - shTarget = "\"$basedir/" + shTarget + "\"" - } - - // @SETLOCAL - // - // @IF EXIST "%~dp0\node.exe" ( - // @SET "_prog=%~dp0\node.exe" - // ) ELSE ( - // @SET "_prog=node" - // @SET PATHEXT=%PATHEXT:;.JS;=;% - // ) - // - // "%_prog%" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // @ENDLOCAL - var cmd - if (longProg) { - shLongProg = shLongProg.trim(); - args = args.trim(); - var variableDeclarationsAsBatch = toBatchSyntax.convertToSetCommands(variables) - cmd = "@SETLOCAL\r\n" - + variableDeclarationsAsBatch - + "\r\n" - + "@IF EXIST " + longProg + " (\r\n" - + " @SET \"_prog=" + longProg.replace(/(^")|("$)/g, '') + "\"\r\n" - + ") ELSE (\r\n" - + " @SET \"_prog=" + prog.replace(/(^")|("$)/g, '') + "\"\r\n" - + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" - + ")\r\n" - + "\r\n" - + "\"%_prog%\" " + args + " " + target + " %*\r\n" - + '@ENDLOCAL\r\n' - } else { - cmd = "@" + prog + " " + args + " " + target + " %*\r\n" - } - - // #!/bin/sh - // basedir=`dirname "$0"` - // - // case `uname` in - // *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; - // esac - // - // if [ -x "$basedir/node.exe" ]; then - // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // else - // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // fi - // exit $ret - - var sh = "#!/bin/sh\n" - - sh = sh - + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" - + "\n" - + "case `uname` in\n" - + " *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;\n" - + "esac\n" - + "\n" - - if (shLongProg) { - sh = sh - + "if [ -x "+shLongProg+" ]; then\n" - + " " + variables + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "else \n" - + " " + variables + shProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "fi\n" - + "exit $ret\n" - } else { - sh = sh - + shProg + " " + args + " " + shTarget + " \"$@\"\n" - + "exit $?\n" - } - - // #!/usr/bin/env pwsh - // $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - // - // $ret=0 - // $exe = "" - // if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - // # Fix case when both the Windows and Linux builds of Node - // # are installed in the same directory - // $exe = ".exe" - // } - // if (Test-Path "$basedir/node") { - // & "$basedir/node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // $ret=$LASTEXITCODE - // } else { - // & "node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // $ret=$LASTEXITCODE - // } - // exit $ret - var pwsh = "#!/usr/bin/env pwsh\n" - + "$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n" - + "\n" - + "$exe=\"\"\n" - + "if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n" - + " # Fix case when both the Windows and Linux builds of Node\n" - + " # are installed in the same directory\n" - + " $exe=\".exe\"\n" - + "}\n" - if (shLongProg) { - pwsh = pwsh - + "$ret=0\n" - + "if (Test-Path " + pwshLongProg + ") {\n" - + " & " + pwshLongProg + " " + args + " " + shTarget + " $args\n" - + " $ret=$LASTEXITCODE\n" - + "} else {\n" - + " & " + pwshProg + " " + args + " " + shTarget + " $args\n" - + " $ret=$LASTEXITCODE\n" - + "}\n" - + "exit $ret\n" - } else { - pwsh = pwsh - + "& " + pwshProg + " " + args + " " + shTarget + " $args\n" - + "exit $LASTEXITCODE\n" - } - - var then = times(3, next, cb) - fs.writeFile(to + ".ps1", pwsh, "utf8", then) - fs.writeFile(to + ".cmd", cmd, "utf8", then) - fs.writeFile(to, sh, "utf8", then) - function next () { - chmodShim(to, cb) - } -} - -function chmodShim (to, cb) { - var then = times(2, cb, cb) - fs.chmod(to, "0755", then) - fs.chmod(to + ".cmd", "0755", then) - fs.chmod(to + ".ps1", "0755", then) -} - -function times(n, ok, cb) { - var errState = null - return function(er) { - if (!errState) { - if (er) - cb(errState = er) - else if (--n === 0) - ok() - } - } -} - - -/***/ }), - -/***/ "../../node_modules/cmd-shim/lib/to-batch-syntax.js": -/***/ (function(module, exports) { - -exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair -exports.convertToSetCommand = convertToSetCommand -exports.convertToSetCommands = convertToSetCommands - -function convertToSetCommand(key, value) { - var line = "" - key = key || "" - key = key.trim() - value = value || "" - value = value.trim() - if(key && value && value.length > 0) { - line = "@SET " + key + "=" + replaceDollarWithPercentPair(value) + "\r\n" - } - return line -} - -function extractVariableValuePairs(declarations) { - var pairs = {} - declarations.map(function(declaration) { - var split = declaration.split("=") - pairs[split[0]]=split[1] - }) - return pairs -} - -function convertToSetCommands(variableString) { - var variableValuePairs = extractVariableValuePairs(variableString.split(" ")) - var variableDeclarationsAsBatch = "" - Object.keys(variableValuePairs).forEach(function (key) { - variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key]) - }) - return variableDeclarationsAsBatch -} - -function replaceDollarWithPercentPair(value) { - var dollarExpressions = /\$\{?([^\$@#\?\- \t{}:]+)\}?/g - var result = "" - var startIndex = 0 - value = value || "" - do { - var match = dollarExpressions.exec(value) - if(match) { - var betweenMatches = value.substring(startIndex, match.index) || "" - result += betweenMatches + "%" + match[1] + "%" - startIndex = dollarExpressions.lastIndex - } - } while (dollarExpressions.lastIndex > 0) - result += value.substr(startIndex) - return result -} - - - - -/***/ }), - -/***/ "../../node_modules/color-convert/conversions.js": -/***/ (function(module, exports, __webpack_require__) { - -/* MIT license */ -var cssKeywords = __webpack_require__("../../node_modules/color-convert/node_modules/color-name/index.js"); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -var reverseKeywords = {}; -for (var key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } -} - -var convert = module.exports = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -// hide .channels and .labels properties -for (var model in convert) { - if (convert.hasOwnProperty(model)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - var channels = convert[model].channels; - var labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); - } -} - -convert.rgb.hsl = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -/** - * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - * */ -function comparativeDistance(x, y) { - return ( - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2) - ); -} - -convert.rgb.keyword = function (rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - var currentClosestDistance = Infinity; - var currentClosestKeyword; - - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - - // Compute comparative distance - var distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - (s * f)); - var t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // assume sRGB - r = r > 0.0031308 - ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - var ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - - // we use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - var ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - var color = args % 10; - - // handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - var mult = (~~(args > 50) + 1) * 0.5; - var r = ((color & 1) * mult) * 255; - var g = (((color >> 1) & 1) * mult) * 255; - var b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // handle greyscale - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - var integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - var colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(function (char) { - return char + char; - }).join(''); - } - - var integer = parseInt(colorString, 16); - var r = (integer >> 16) & 0xFF; - var g = (integer >> 8) & 0xFF; - var b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - - var c = s * v; - var f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - var pure = [0, 0, 0]; - var hi = (h % 1) * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var v = c + g * (1.0 - c); - var f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = convert.gray.hsv = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - var val = Math.round(gray[0] / 100 * 255) & 0xFF; - var integer = (val << 16) + (val << 8) + val; - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; - - -/***/ }), - -/***/ "../../node_modules/color-convert/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var conversions = __webpack_require__("../../node_modules/color-convert/conversions.js"); -var route = __webpack_require__("../../node_modules/color-convert/route.js"); - -var convert = {}; - -var models = Object.keys(conversions); - -function wrapRaw(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - return fn(args); - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - var result = fn(args); - - // we're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(function (fromModel) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - var routes = route(fromModel); - var routeModels = Object.keys(routes); - - routeModels.forEach(function (toModel) { - var fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; - - -/***/ }), - -/***/ "../../node_modules/color-convert/node_modules/color-name/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; - - -/***/ }), - -/***/ "../../node_modules/color-convert/route.js": -/***/ (function(module, exports, __webpack_require__) { - -var conversions = __webpack_require__("../../node_modules/color-convert/conversions.js"); - -/* - this function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - var graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - var models = Object.keys(conversions); - - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; // unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - - if (node.parent === null) { - // no possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - - - -/***/ }), - -/***/ "../../node_modules/color-name/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; - - -/***/ }), - -/***/ "../../node_modules/combined-stream/lib/combined_stream.js": -/***/ (function(module, exports, __webpack_require__) { - -var util = __webpack_require__("util"); -var Stream = __webpack_require__("stream").Stream; -var DelayedStream = __webpack_require__("../../node_modules/delayed-stream/lib/delayed_stream.js"); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; - - -/***/ }), - -/***/ "../../node_modules/concat-map/index.js": -/***/ (function(module, exports) { - -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const cp = __webpack_require__("child_process"); -const parse = __webpack_require__("../../node_modules/cross-spawn/lib/parse.js"); -const enoent = __webpack_require__("../../node_modules/cross-spawn/lib/enoent.js"); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/lib/enoent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed, 'spawn'); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/lib/parse.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__("path"); -const resolveCommand = __webpack_require__("../../node_modules/cross-spawn/lib/util/resolveCommand.js"); -const escape = __webpack_require__("../../node_modules/cross-spawn/lib/util/escape.js"); -const readShebang = __webpack_require__("../../node_modules/cross-spawn/lib/util/readShebang.js"); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parsed : parseNonShell(parsed); -} - -module.exports = parse; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/lib/util/escape.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/lib/util/readShebang.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__("fs"); -const shebangCommand = __webpack_require__("../../node_modules/shebang-command/index.js"); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - const buffer = Buffer.alloc(size); - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/lib/util/resolveCommand.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__("path"); -const which = __webpack_require__("../../node_modules/which/which.js"); -const getPathKey = __webpack_require__("../../node_modules/cross-spawn/node_modules/path-key/index.js"); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - // Worker threads do not have process.chdir() - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; - - -/***/ }), - -/***/ "../../node_modules/cross-spawn/node_modules/path-key/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports.default = pathKey; - - -/***/ }), - -/***/ "../../node_modules/debug/node_modules/ms/index.js": -/***/ (function(module, exports) { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} - - -/***/ }), - -/***/ "../../node_modules/debug/src/browser.js": -/***/ (function(module, exports, __webpack_require__) { - -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = __webpack_require__("../../node_modules/debug/src/debug.js"); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} - - -/***/ }), - -/***/ "../../node_modules/debug/src/debug.js": -/***/ (function(module, exports, __webpack_require__) { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = __webpack_require__("../../node_modules/debug/node_modules/ms/index.js"); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - - -/***/ }), - -/***/ "../../node_modules/debug/src/index.js": -/***/ (function(module, exports, __webpack_require__) { - -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__("../../node_modules/debug/src/browser.js"); -} else { - module.exports = __webpack_require__("../../node_modules/debug/src/node.js"); -} - - -/***/ }), - -/***/ "../../node_modules/debug/src/node.js": -/***/ (function(module, exports, __webpack_require__) { - -/** - * Module dependencies. - */ - -var tty = __webpack_require__("tty"); -var util = __webpack_require__("util"); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = __webpack_require__("../../node_modules/debug/src/debug.js"); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - -if (1 !== fd && 2 !== fd) { - util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() -} - -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to `stream`. - */ - -function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = __webpack_require__("fs"); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = __webpack_require__("net"); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); - - -/***/ }), - -/***/ "../../node_modules/dedent/dist/dedent.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function dedent(strings) { - - var raw = void 0; - if (typeof strings === "string") { - // dedent can be used as a plain function - raw = [strings]; - } else { - raw = strings.raw; - } - - // first, perform interpolation - var result = ""; - for (var i = 0; i < raw.length; i++) { - result += raw[i]. - // join lines when there is a suppressed newline - replace(/\\\n[ \t]*/g, ""). - - // handle escaped backticks - replace(/\\`/g, "`"); - - if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { - result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; - } - } - - // now strip indentation - var lines = result.split("\n"); - var mindent = null; - lines.forEach(function (l) { - var m = l.match(/^(\s+)\S+/); - if (m) { - var indent = m[1].length; - if (!mindent) { - // this is the first indented line - mindent = indent; - } else { - mindent = Math.min(mindent, indent); - } - } - }); - - if (mindent !== null) { - result = lines.map(function (l) { - return l[0] === " " ? l.slice(mindent) : l; - }).join("\n"); - } - - // dedent eats leading and trailing whitespace too - result = result.trim(); - - // handle escaped newlines at the end to ensure they don't get stripped too - return result.replace(/\\n/g, "\n"); -} - -if (true) { - module.exports = dedent; -} - - -/***/ }), - -/***/ "../../node_modules/defaults/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var clone = __webpack_require__("../../node_modules/clone/clone.js"); - -module.exports = function(options, defaults) { - options = options || {}; - - Object.keys(defaults).forEach(function(key) { - if (typeof options[key] === 'undefined') { - options[key] = clone(defaults[key]); - } - }); - - return options; -}; - -/***/ }), - -/***/ "../../node_modules/del/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {promisify} = __webpack_require__("util"); -const path = __webpack_require__("path"); -const globby = __webpack_require__("../../node_modules/del/node_modules/globby/index.js"); -const isGlob = __webpack_require__("../../node_modules/is-glob/index.js"); -const slash = __webpack_require__("../../node_modules/slash/index.js"); -const gracefulFs = __webpack_require__("../../node_modules/graceful-fs/graceful-fs.js"); -const isPathCwd = __webpack_require__("../../node_modules/is-path-cwd/index.js"); -const isPathInside = __webpack_require__("../../node_modules/is-path-inside/index.js"); -const rimraf = __webpack_require__("../../node_modules/rimraf/rimraf.js"); -const pMap = __webpack_require__("../../node_modules/del/node_modules/p-map/index.js"); - -const rimrafP = promisify(rimraf); - -const rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync -}; - -function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error('Cannot delete the current working directory. Can be overridden with the `force` option.'); - } - - if (!isPathInside(file, cwd)) { - throw new Error('Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option.'); - } -} - -function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - - patterns = patterns.map(pattern => { - if (process.platform === 'win32' && isGlob(pattern) === false) { - return slash(pattern); - } - - return pattern; - }); - - return patterns; -} - -module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - - patterns = normalizePatterns(patterns); - - const files = (await globby(patterns, options)) - .sort((a, b) => b.localeCompare(a)); - - const mapper = async file => { - file = path.resolve(cwd, file); - - if (!force) { - safeCheck(file, cwd); - } - - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - - return file; - }; - - const removedFiles = await pMap(files, mapper, options); - - removedFiles.sort((a, b) => a.localeCompare(b)); - - return removedFiles; -}; - -module.exports.sync = (patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - - patterns = normalizePatterns(patterns); - - const files = globby.sync(patterns, options) - .sort((a, b) => b.localeCompare(a)); - - const removedFiles = files.map(file => { - file = path.resolve(cwd, file); - - if (!force) { - safeCheck(file, cwd); - } - - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - - return file; - }); - - removedFiles.sort((a, b) => a.localeCompare(b)); - - return removedFiles; -}; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/aggregate-error/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const indentString = __webpack_require__("../../node_modules/del/node_modules/indent-string/index.js"); -const cleanStack = __webpack_require__("../../node_modules/clean-stack/index.js"); - -const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); - -class AggregateError extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - - errors = [...errors].map(error => { - if (error instanceof Error) { - return error; - } - - if (error !== null && typeof error === 'object') { - // Handle plain error objects with message property and/or possibly other metadata - return Object.assign(new Error(error.message), error); - } - - return new Error(error); - }); - - let message = errors - .map(error => { - // The `stack` property is not standardized, so we can't assume it exists - return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); - }) - .join('\n'); - message = '\n' + indentString(message, 4); - super(message); - - this.name = 'AggregateError'; - - Object.defineProperty(this, '_errors', {value: errors}); - } - - * [Symbol.iterator]() { - for (const error of this._errors) { - yield error; - } - } -} - -module.exports = AggregateError; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/globby/gitignore.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {promisify} = __webpack_require__("util"); -const fs = __webpack_require__("fs"); -const path = __webpack_require__("path"); -const fastGlob = __webpack_require__("../../node_modules/fast-glob/out/index.js"); -const gitIgnore = __webpack_require__("../../node_modules/ignore/index.js"); -const slash = __webpack_require__("../../node_modules/slash/index.js"); - -const DEFAULT_IGNORE = [ - '**/node_modules/**', - '**/flow-typed/**', - '**/coverage/**', - '**/.git' -]; - -const readFileP = promisify(fs.readFile); - -const mapGitIgnorePatternTo = base => ignore => { - if (ignore.startsWith('!')) { - return '!' + path.posix.join(base, ignore.slice(1)); - } - - return path.posix.join(base, ignore); -}; - -const parseGitIgnore = (content, options) => { - const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); - - return content - .split(/\r?\n/) - .filter(Boolean) - .filter(line => !line.startsWith('#')) - .map(mapGitIgnorePatternTo(base)); -}; - -const reduceIgnore = files => { - return files.reduce((ignores, file) => { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - return ignores; - }, gitIgnore()); -}; - -const ensureAbsolutePathForCwd = (cwd, p) => { - if (path.isAbsolute(p)) { - if (p.startsWith(cwd)) { - return p; - } - - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - - return path.join(cwd, p); -}; - -const getIsIgnoredPredecate = (ignores, cwd) => { - return p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p)))); -}; - -const getFile = async (file, cwd) => { - const filePath = path.join(cwd, file); - const content = await readFileP(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const getFileSync = (file, cwd) => { - const filePath = path.join(cwd, file); - const content = fs.readFileSync(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) -} = {}) => { - return {ignore, cwd}; -}; - -module.exports = async options => { - options = normalizeOptions(options); - - const paths = await fastGlob('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = await Promise.all(paths.map(file => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - -module.exports.sync = options => { - options = normalizeOptions(options); - - const paths = fastGlob.sync('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = paths.map(file => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/globby/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__("fs"); -const arrayUnion = __webpack_require__("../../node_modules/array-union/index.js"); -const merge2 = __webpack_require__("../../node_modules/merge2/index.js"); -const glob = __webpack_require__("../../node_modules/glob/glob.js"); -const fastGlob = __webpack_require__("../../node_modules/fast-glob/out/index.js"); -const dirGlob = __webpack_require__("../../node_modules/dir-glob/index.js"); -const gitignore = __webpack_require__("../../node_modules/del/node_modules/globby/gitignore.js"); -const {FilterStream, UniqueStream} = __webpack_require__("../../node_modules/del/node_modules/globby/stream-utils.js"); - -const DEFAULT_FILTER = () => false; - -const isNegative = pattern => pattern[0] === '!'; - -const assertPatternsInput = patterns => { - if (!patterns.every(pattern => typeof pattern === 'string')) { - throw new TypeError('Patterns must be a string or an array of strings'); - } -}; - -const checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - - let stat; - try { - stat = fs.statSync(options.cwd); - } catch (_) { - return; - } - - if (!stat.isDirectory()) { - throw new Error('The `cwd` option must be a path to a directory'); - } -}; - -const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; - -const generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - - const globTasks = []; - - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - - const ignore = patterns - .slice(index) - .filter(isNegative) - .map(pattern => pattern.slice(1)); - - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - - globTasks.push({pattern, options}); - } - - return globTasks; -}; - -const globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === 'object') { - options = { - ...options, - ...task.options.expandDirectories - }; - } - - return fn(task.pattern, options); -}; - -const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - -const getFilterSync = options => { - return options && options.gitignore ? - gitignore.sync({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; -}; - -const globToTask = task => glob => { - const {options} = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - - return { - pattern: glob, - options - }; -}; - -module.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const getFilter = async () => { - return options && options.gitignore ? - gitignore({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; - }; - - const getTasks = async () => { - const tasks = await Promise.all(globTasks.map(async task => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - - return arrayUnion(...tasks); - }; - - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options))); - - return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_))); -}; - -module.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = globTasks.reduce((tasks, task) => { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - return tasks.concat(newTask); - }, []); - - const filter = getFilterSync(options); - - return tasks.reduce( - (matches, task) => arrayUnion(matches, fastGlob.sync(task.pattern, task.options)), - [] - ).filter(path_ => !filter(path_)); -}; - -module.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = globTasks.reduce((tasks, task) => { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - return tasks.concat(newTask); - }, []); - - const filter = getFilterSync(options); - const filterStream = new FilterStream(p => !filter(p)); - const uniqueStream = new UniqueStream(); - - return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options))) - .pipe(filterStream) - .pipe(uniqueStream); -}; - -module.exports.generateGlobTasks = generateGlobTasks; - -module.exports.hasMagic = (patterns, options) => [] - .concat(patterns) - .some(pattern => glob.hasMagic(pattern, options)); - -module.exports.gitignore = gitignore; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/globby/stream-utils.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {Transform} = __webpack_require__("stream"); - -class ObjectTransform extends Transform { - constructor() { - super({ - objectMode: true - }); - } -} - -class FilterStream extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - - callback(); - } -} - -class UniqueStream extends ObjectTransform { - constructor() { - super(); - this._pushed = new Set(); - } - - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - - callback(); - } -} - -module.exports = { - FilterStream, - UniqueStream -}; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/indent-string/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = (string, count = 1, options) => { - options = { - indent: ' ', - includeEmptyLines: false, - ...options - }; - - if (typeof string !== 'string') { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - - if (typeof count !== 'number') { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - - if (typeof options.indent !== 'string') { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - - if (count === 0) { - return string; - } - - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - - return string.replace(regex, options.indent.repeat(count)); -}; - - -/***/ }), - -/***/ "../../node_modules/del/node_modules/p-map/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const AggregateError = __webpack_require__("../../node_modules/del/node_modules/aggregate-error/index.js"); - -module.exports = async ( - iterable, - mapper, - { - concurrency = Infinity, - stopOnError = true - } = {} -) => { - return new Promise((resolve, reject) => { - if (typeof mapper !== 'function') { - throw new TypeError('Mapper function is required'); - } - - if (!(typeof concurrency === 'number' && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); - } - - const ret = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - - const next = () => { - if (isRejected) { - return; - } - - const nextItem = iterator.next(); - const i = currentIndex; - currentIndex++; - - if (nextItem.done) { - isIterableDone = true; - - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve(ret); - } - } - - return; - } - - resolvingCount++; - - (async () => { - try { - const element = await nextItem.value; - ret[i] = await mapper(element, i); - resolvingCount--; - next(); - } catch (error) { - if (stopOnError) { - isRejected = true; - reject(error); - } else { - errors.push(error); - resolvingCount--; - next(); - } - } - })(); - }; - - for (let i = 0; i < concurrency; i++) { - next(); - - if (isIterableDone) { - break; - } - } - }); -}; - - -/***/ }), - -/***/ "../../node_modules/delayed-stream/lib/delayed_stream.js": -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__("stream").Stream; -var util = __webpack_require__("util"); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); - -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; - - -/***/ }), - -/***/ "../../node_modules/detect-indent/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// Detect either spaces or tabs but not both to properly handle tabs for indentation and spaces for alignment -const INDENT_REGEX = /^(?:( )+|\t+)/; - -const INDENT_TYPE_SPACE = 'space'; -const INDENT_TYPE_TAB = 'tab'; - -// Make a Map that counts how many indents/unindents have occurred for a given size and how many lines follow a given indentation. -// The key is a concatenation of the indentation type (s = space and t = tab) and the size of the indents/unindents. -// -// indents = { -// t3: [1, 0], -// t4: [1, 5], -// s5: [1, 0], -// s12: [1, 0], -// } -function makeIndentsMap(string, ignoreSingleSpaces) { - const indents = new Map(); - - // Remember the size of previous line's indentation - let previousSize = 0; - let previousIndentType; - - // Indents key (ident type + size of the indents/unindents) - let key; - - for (const line of string.split(/\n/g)) { - if (!line) { - // Ignore empty lines - continue; - } - - let indent; - let indentType; - let weight; - let entry; - const matches = line.match(INDENT_REGEX); - - if (matches === null) { - previousSize = 0; - previousIndentType = ''; - } else { - indent = matches[0].length; - - if (matches[1]) { - indentType = INDENT_TYPE_SPACE; - } else { - indentType = INDENT_TYPE_TAB; - } - - // Ignore single space unless it's the only indent detected to prevent common false positives - if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) { - continue; - } - - if (indentType !== previousIndentType) { - previousSize = 0; - } - - previousIndentType = indentType; - - weight = 0; - - const indentDifference = indent - previousSize; - previousSize = indent; - - // Previous line have same indent? - if (indentDifference === 0) { - weight++; - // We use the key from previous loop - } else { - const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference; - key = encodeIndentsKey(indentType, absoluteIndentDifference); - } - - // Update the stats - entry = indents.get(key); - - if (entry === undefined) { - entry = [1, 0]; // Init - } else { - entry = [++entry[0], entry[1] + weight]; - } - - indents.set(key, entry); - } - } - - return indents; -} - -// Encode the indent type and amount as a string (e.g. 's4') for use as a compound key in the indents Map. -function encodeIndentsKey(indentType, indentAmount) { - const typeCharacter = indentType === INDENT_TYPE_SPACE ? 's' : 't'; - return typeCharacter + String(indentAmount); -} - -// Extract the indent type and amount from a key of the indents Map. -function decodeIndentsKey(indentsKey) { - const keyHasTypeSpace = indentsKey[0] === 's'; - const type = keyHasTypeSpace ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB; - - const amount = Number(indentsKey.slice(1)); - - return {type, amount}; -} - -// Return the key (e.g. 's4') from the indents Map that represents the most common indent, -// or return undefined if there are no indents. -function getMostUsedKey(indents) { - let result; - let maxUsed = 0; - let maxWeight = 0; - - for (const [key, [usedCount, weight]] of indents) { - if (usedCount > maxUsed || (usedCount === maxUsed && weight > maxWeight)) { - maxUsed = usedCount; - maxWeight = weight; - result = key; - } - } - - return result; -} - -function makeIndentString(type, amount) { - const indentCharacter = type === INDENT_TYPE_SPACE ? ' ' : '\t'; - return indentCharacter.repeat(amount); -} - -module.exports = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } - - // Identify indents while skipping single space indents to avoid common edge cases (e.g. code comments) - // If no indents are identified, run again and include all indents for comprehensive detection - let indents = makeIndentsMap(string, true); - if (indents.size === 0) { - indents = makeIndentsMap(string, false); - } - - const keyOfMostUsedIndent = getMostUsedKey(indents); - - let type; - let amount = 0; - let indent = ''; - - if (keyOfMostUsedIndent !== undefined) { - ({type, amount} = decodeIndentsKey(keyOfMostUsedIndent)); - indent = makeIndentString(type, amount); - } - - return { - amount, - type, - indent - }; -}; - - -/***/ }), - -/***/ "../../node_modules/detect-newline/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const detectNewline = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } - - const newlines = string.match(/(?:\r?\n)/g) || []; - - if (newlines.length === 0) { - return; - } - - const crlf = newlines.filter(newline => newline === '\r\n').length; - const lf = newlines.length - crlf; - - return crlf > lf ? '\r\n' : '\n'; -}; - -module.exports = detectNewline; -module.exports.graceful = string => (typeof string === 'string' && detectNewline(string)) || '\n'; - - -/***/ }), - -/***/ "../../node_modules/dir-glob/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const pathType = __webpack_require__("../../node_modules/path-type/index.js"); - -const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; - -const getPath = (filepath, cwd) => { - const pth = filepath[0] === '!' ? filepath.slice(1) : filepath; - return path.isAbsolute(pth) ? pth : path.join(cwd, pth); -}; - -const addExtensions = (file, extensions) => { - if (path.extname(file)) { - return `**/${file}`; - } - - return `**/${file}.${getExtensions(extensions)}`; -}; - -const getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - - if (options.files && options.extensions) { - return options.files.map(x => path.posix.join(directory, addExtensions(x, options.extensions))); - } - - if (options.files) { - return options.files.map(x => path.posix.join(directory, `**/${x}`)); - } - - if (options.extensions) { - return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - - return [path.posix.join(directory, '**')]; -}; - -module.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - - if (typeof options.cwd !== 'string') { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - - const globs = await Promise.all([].concat(input).map(async x => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - - return [].concat.apply([], globs); // eslint-disable-line prefer-spread -}; - -module.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - - if (typeof options.cwd !== 'string') { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - - const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - - return [].concat.apply([], globs); // eslint-disable-line prefer-spread -}; - - -/***/ }), - -/***/ "../../node_modules/duplexer/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__("stream") -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice - -module.exports = duplex - -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } - - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } -} - -function duplex(writer, reader) { - var stream = new Stream() - var ended = false - - forEach(writeMethods, proxyWriter) - - forEach(readMethods, proxyReader) - - forEach(readEvents, proxyStream) - - reader.on("end", handleEnd) - - writer.on("drain", function() { - stream.emit("drain") - }) - - writer.on("error", reemit) - reader.on("error", reemit) - - stream.writable = writer.writable - stream.readable = reader.readable - - return stream - - function proxyWriter(methodName) { - stream[methodName] = method - - function method() { - return writer[methodName].apply(writer, arguments) - } - } - - function proxyReader(methodName) { - stream[methodName] = method - - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) - - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } - - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } - - function reemit(err) { - stream.emit("error", err) - } -} - - -/***/ }), - -/***/ "../../node_modules/end-of-stream/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var once = __webpack_require__("../../node_modules/once/once.js"); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - process.nextTick(onclosenexttick); - }; - - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; - - -/***/ }), - -/***/ "../../node_modules/error-ex/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var util = __webpack_require__("util"); -var isArrayish = __webpack_require__("../../node_modules/is-arrayish/index.js"); - -var errorEx = function errorEx(name, properties) { - if (!name || name.constructor !== String) { - properties = name || {}; - name = Error.name; - } - - var errorExError = function ErrorEXError(message) { - if (!this) { - return new ErrorEXError(message); - } - - message = message instanceof Error - ? message.message - : (message || this.message); - - Error.call(this, message); - Error.captureStackTrace(this, errorExError); - - this.name = name; - - Object.defineProperty(this, 'message', { - configurable: true, - enumerable: false, - get: function () { - var newMessage = message.split(/\r?\n/g); - - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('message' in modifier) { - newMessage = modifier.message(this[key], newMessage) || newMessage; - if (!isArrayish(newMessage)) { - newMessage = [newMessage]; - } - } - } - - return newMessage.join('\n'); - }, - set: function (v) { - message = v; - } - }); - - var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); - var stackGetter = stackDescriptor.get; - var stackValue = stackDescriptor.value; - delete stackDescriptor.value; - delete stackDescriptor.writable; - - stackDescriptor.get = function () { - var stack = (stackGetter) - ? stackGetter.call(this).split(/\r?\n+/g) - : stackValue.split(/\r?\n+/g); - - // starting in Node 7, the stack builder caches the message. - // just replace it. - stack[0] = this.name + ': ' + this.message; - - var lineCount = 1; - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('line' in modifier) { - var line = modifier.line(this[key]); - if (line) { - stack.splice(lineCount++, 0, ' ' + line); - } - } - - if ('stack' in modifier) { - modifier.stack(this[key], stack); - } - } - - return stack.join('\n'); - }; - - Object.defineProperty(this, 'stack', stackDescriptor); - }; - - if (Object.setPrototypeOf) { - Object.setPrototypeOf(errorExError.prototype, Error.prototype); - Object.setPrototypeOf(errorExError, Error); - } else { - util.inherits(errorExError, Error); - } - - return errorExError; -}; - -errorEx.append = function (str, def) { - return { - message: function (v, message) { - v = v || def; - - if (v) { - message[0] += ' ' + str.replace('%s', v.toString()); - } - - return message; - } - }; -}; - -errorEx.line = function (str, def) { - return { - line: function (v) { - v = v || def; - - if (v) { - return str.replace('%s', v.toString()); - } - - return null; - } - }; -}; - -module.exports = errorEx; - - -/***/ }), - -/***/ "../../node_modules/escape-string-regexp/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - - -/***/ }), - -/***/ "../../node_modules/execa/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const childProcess = __webpack_require__("child_process"); -const crossSpawn = __webpack_require__("../../node_modules/cross-spawn/index.js"); -const stripFinalNewline = __webpack_require__("../../node_modules/strip-final-newline/index.js"); -const npmRunPath = __webpack_require__("../../node_modules/npm-run-path/index.js"); -const onetime = __webpack_require__("../../node_modules/onetime/index.js"); -const makeError = __webpack_require__("../../node_modules/execa/lib/error.js"); -const normalizeStdio = __webpack_require__("../../node_modules/execa/lib/stdio.js"); -const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__("../../node_modules/execa/lib/kill.js"); -const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__("../../node_modules/execa/lib/stream.js"); -const {mergePromise, getSpawnedPromise} = __webpack_require__("../../node_modules/execa/lib/promise.js"); -const {joinCommand, parseCommand} = __webpack_require__("../../node_modules/execa/lib/command.js"); - -const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100; - -const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => { - const env = extendEnv ? {...process.env, ...envOption} : envOption; - - if (preferLocal) { - return npmRunPath.env({env, cwd: localDir, execPath}); - } - - return env; -}; - -const handleArguments = (file, args, options = {}) => { - const parsed = crossSpawn._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || process.cwd(), - execPath: process.execPath, - encoding: 'utf8', - reject: true, - cleanup: true, - all: false, - windowsHide: true, - ...options - }; - - options.env = getEnv(options); - - options.stdio = normalizeStdio(options); - - if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') { - // #116 - args.unshift('/q'); - } - - return {file, args, options, parsed}; -}; - -const handleOutput = (options, value, error) => { - if (typeof value !== 'string' && !Buffer.isBuffer(value)) { - // When `execa.sync()` errors, we normalize it to '' to mimic `execa()` - return error === undefined ? undefined : ''; - } - - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - - return value; -}; - -const execa = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - - let spawned; - try { - spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); - } catch (error) { - // Ensure the returned error is always both a promise and a child process - const dummySpawned = new childProcess.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - return mergePromise(dummySpawned, errorPromise); - } - - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - - const context = {isCanceled: false}; - - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context); - - const handlePromise = async () => { - const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all = handleOutput(parsed.options, allResult); - - if (error || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error, - exitCode, - signal, - stdout, - stderr, - all, - command, - parsed, - timedOut, - isCanceled: context.isCanceled, - killed: spawned.killed - }); - - if (!parsed.options.reject) { - return returnedError; - } - - throw returnedError; - } - - return { - command, - exitCode: 0, - stdout, - stderr, - all, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - - const handlePromiseOnce = onetime(handlePromise); - - crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); - - handleInput(spawned, parsed.options.input); - - spawned.all = makeAllStream(spawned, parsed.options); - - return mergePromise(spawned, handlePromiseOnce); -}; - -module.exports = execa; - -module.exports.sync = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - - validateInputSync(parsed.options); - - let result; - try { - result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); - } catch (error) { - throw makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command, - parsed, - timedOut: result.error && result.error.code === 'ETIMEDOUT', - isCanceled: false, - killed: result.signal !== null - }); - - if (!parsed.options.reject) { - return error; - } - - throw error; - } - - return { - command, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -}; - -module.exports.command = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa(file, args, options); -}; - -module.exports.commandSync = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa.sync(file, args, options); -}; - -module.exports.node = (scriptPath, args, options = {}) => { - if (args && !Array.isArray(args) && typeof args === 'object') { - options = args; - args = []; - } - - const stdio = normalizeStdio.node(options); - - const {nodePath = process.execPath, nodeOptions = process.execArgv} = options; - - return execa( - nodePath, - [ - ...nodeOptions, - scriptPath, - ...(Array.isArray(args) ? args : []) - ], - { - ...options, - stdin: undefined, - stdout: undefined, - stderr: undefined, - stdio, - shell: false - } - ); -}; - - -/***/ }), - -/***/ "../../node_modules/execa/lib/command.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const SPACES_REGEXP = / +/g; - -const joinCommand = (file, args = []) => { - if (!Array.isArray(args)) { - return file; - } - - return [file, ...args].join(' '); -}; - -// Allow spaces to be escaped by a backslash if not meant as a delimiter -const handleEscaping = (tokens, token, index) => { - if (index === 0) { - return [token]; - } - - const previousToken = tokens[tokens.length - 1]; - - if (previousToken.endsWith('\\')) { - return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`]; - } - - return [...tokens, token]; -}; - -// Handle `execa.command()` -const parseCommand = command => { - return command - .trim() - .split(SPACES_REGEXP) - .reduce(handleEscaping, []); -}; - -module.exports = { - joinCommand, - parseCommand -}; - - -/***/ }), - -/***/ "../../node_modules/execa/lib/error.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {signalsByName} = __webpack_require__("../../node_modules/human-signals/build/src/main.js"); - -const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - - if (isCanceled) { - return 'was canceled'; - } - - if (errorCode !== undefined) { - return `failed with ${errorCode}`; - } - - if (signal !== undefined) { - return `was killed with ${signal} (${signalDescription})`; - } - - if (exitCode !== undefined) { - return `failed with exit code ${exitCode}`; - } - - return 'failed'; -}; - -const makeError = ({ - stdout, - stderr, - all, - error, - signal, - exitCode, - command, - timedOut, - isCanceled, - killed, - parsed: {options: {timeout}} -}) => { - // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`. - // We normalize them to `undefined` - exitCode = exitCode === null ? undefined : exitCode; - signal = signal === null ? undefined : signal; - const signalDescription = signal === undefined ? undefined : signalsByName[signal].description; - - const errorCode = error && error.code; - - const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}); - const execaMessage = `Command ${prefix}: ${command}`; - const isError = Object.prototype.toString.call(error) === '[object Error]'; - const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n'); - - if (isError) { - error.originalMessage = error.message; - error.message = message; - } else { - error = new Error(message); - } - - error.shortMessage = shortMessage; - error.command = command; - error.exitCode = exitCode; - error.signal = signal; - error.signalDescription = signalDescription; - error.stdout = stdout; - error.stderr = stderr; - - if (all !== undefined) { - error.all = all; - } - - if ('bufferedData' in error) { - delete error.bufferedData; - } - - error.failed = true; - error.timedOut = Boolean(timedOut); - error.isCanceled = isCanceled; - error.killed = killed && !timedOut; - - return error; -}; - -module.exports = makeError; - - -/***/ }), - -/***/ "../../node_modules/execa/lib/kill.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__("os"); -const onExit = __webpack_require__("../../node_modules/signal-exit/index.js"); - -const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5; - -// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior -const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; -}; - -const setKillTimeout = (kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - - const timeout = getForceKillAfterTimeout(options); - const t = setTimeout(() => { - kill('SIGKILL'); - }, timeout); - - // Guarded because there's no `.unref()` when `execa` is used in the renderer - // process in Electron. This cannot be tested since we don't run tests in - // Electron. - // istanbul ignore else - if (t.unref) { - t.unref(); - } -}; - -const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => { - return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; -}; - -const isSigterm = signal => { - return signal === os.constants.signals.SIGTERM || - (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM'); -}; - -const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - - return forceKillAfterTimeout; -}; - -// `childProcess.cancel()` -const spawnedCancel = (spawned, context) => { - const killResult = spawned.kill(); - - if (killResult) { - context.isCanceled = true; - } -}; - -const timeoutKill = (spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error('Timed out'), {timedOut: true, signal})); -}; - -// `timeout` option handling -const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => { - if (timeout === 0 || timeout === undefined) { - return spawnedPromise; - } - - if (!Number.isFinite(timeout) || timeout < 0) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } - - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - - return Promise.race([timeoutPromise, safeSpawnedPromise]); -}; - -// `cleanup` option handling -const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - - const removeExitHandler = onExit(() => { - spawned.kill(); - }); - - return timedPromise.finally(() => { - removeExitHandler(); - }); -}; - -module.exports = { - spawnedKill, - spawnedCancel, - setupTimeout, - setExitHandler -}; - - -/***/ }), - -/***/ "../../node_modules/execa/lib/promise.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const nativePromisePrototype = (async () => {})().constructor.prototype; -const descriptors = ['then', 'catch', 'finally'].map(property => [ - property, - Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) -]); - -// The return value is a mixin of `childProcess` and `Promise` -const mergePromise = (spawned, promise) => { - for (const [property, descriptor] of descriptors) { - // Starting the main `promise` is deferred to avoid consuming streams - const value = typeof promise === 'function' ? - (...args) => Reflect.apply(descriptor.value, promise(), args) : - descriptor.value.bind(promise); - - Reflect.defineProperty(spawned, property, {...descriptor, value}); - } - - return spawned; -}; - -// Use promises instead of `child_process` events -const getSpawnedPromise = spawned => { - return new Promise((resolve, reject) => { - spawned.on('exit', (exitCode, signal) => { - resolve({exitCode, signal}); - }); - - spawned.on('error', error => { - reject(error); - }); - - if (spawned.stdin) { - spawned.stdin.on('error', error => { - reject(error); - }); - } - }); -}; - -module.exports = { - mergePromise, - getSpawnedPromise -}; - - - -/***/ }), - -/***/ "../../node_modules/execa/lib/stdio.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const aliases = ['stdin', 'stdout', 'stderr']; - -const hasAlias = opts => aliases.some(alias => opts[alias] !== undefined); - -const normalizeStdio = opts => { - if (!opts) { - return; - } - - const {stdio} = opts; - - if (stdio === undefined) { - return aliases.map(alias => opts[alias]); - } - - if (hasAlias(opts)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`); - } - - if (typeof stdio === 'string') { - return stdio; - } - - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - - const length = Math.max(stdio.length, aliases.length); - return Array.from({length}, (value, index) => stdio[index]); -}; - -module.exports = normalizeStdio; - -// `ipc` is pushed unless it is already present -module.exports.node = opts => { - const stdio = normalizeStdio(opts); - - if (stdio === 'ipc') { - return 'ipc'; - } - - if (stdio === undefined || typeof stdio === 'string') { - return [stdio, stdio, stdio, 'ipc']; - } - - if (stdio.includes('ipc')) { - return stdio; - } - - return [...stdio, 'ipc']; -}; - - -/***/ }), - -/***/ "../../node_modules/execa/lib/stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const isStream = __webpack_require__("../../node_modules/is-stream/index.js"); -const getStream = __webpack_require__("../../node_modules/get-stream/index.js"); -const mergeStream = __webpack_require__("../../node_modules/merge-stream/index.js"); - -// `input` option -const handleInput = (spawned, input) => { - // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852 - // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0 - if (input === undefined || spawned.stdin === undefined) { - return; - } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -}; - -// `all` interleaves `stdout` and `stderr` -const makeAllStream = (spawned, {all}) => { - if (!all || (!spawned.stdout && !spawned.stderr)) { - return; - } - - const mixed = mergeStream(); - - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - - return mixed; -}; - -// On failure, `result.stdout|stderr|all` should contain the currently buffered stream -const getBufferedData = async (stream, streamPromise) => { - if (!stream) { - return; - } - - stream.destroy(); - - try { - return await streamPromise; - } catch (error) { - return error.bufferedData; - } -}; - -const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => { - if (!stream || !buffer) { - return; - } - - if (encoding) { - return getStream(stream, {encoding, maxBuffer}); - } - - return getStream.buffer(stream, {maxBuffer}); -}; - -// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all) -const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => { - const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer}); - const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer}); - const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2}); - - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error) { - return Promise.all([ - {error, signal: error.signal, timedOut: error.timedOut}, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all, allPromise) - ]); - } -}; - -const validateInputSync = ({input}) => { - if (isStream(input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } -}; - -module.exports = { - handleInput, - makeAllStream, - getSpawnedResult, - validateInputSync -}; - - - -/***/ }), - -/***/ "../../node_modules/fast-glob/node_modules/micromatch/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const util = __webpack_require__("util"); -const braces = __webpack_require__("../../node_modules/braces/index.js"); -const picomatch = __webpack_require__("../../node_modules/picomatch/index.js"); -const utils = __webpack_require__("../../node_modules/picomatch/lib/utils.js"); -const isEmptyString = val => val === '' || val === './'; - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} `list` List of strings to match. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `[options]` See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = micromatch(list, patterns, { ...options, onResult }); - - for (let item of items) { - if (!matches.includes(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any of the patterns matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -module.exports = micromatch; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const taskManager = __webpack_require__("../../node_modules/fast-glob/out/managers/tasks.js"); -const async_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/async.js"); -const stream_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/stream.js"); -const sync_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/sync.js"); -const settings_1 = __webpack_require__("../../node_modules/fast-glob/out/settings.js"); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); -} -// https://github.com/typescript-eslint/typescript-eslint/issues/60 -// eslint-disable-next-line no-redeclare -(function (FastGlob) { - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - /** - * The stream returned by the provider cannot work with an asynchronous iterator. - * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. - * This affects performance (+25%). I don't see best solution right now. - */ - return utils.stream.merge(works); - } - FastGlob.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob.escapePath = escapePath; -})(FastGlob || (FastGlob = {})); -function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); -} -function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError('Patterns must be a string (non empty) or an array of strings'); - } -} -module.exports = FastGlob; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/managers/tasks.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -function generate(patterns, settings) { - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); - const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); - return staticTasks.concat(dynamicTasks); -} -exports.generate = generate; -/** - * Returns tasks grouped by basic pattern directories. - * - * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. - * This is necessary because directory traversal starts at the base directory and goes deeper. - */ -function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - /* - * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory - * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. - */ - if ('.' in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); - } - else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; -} -exports.convertPatternsToTasks = convertPatternsToTasks; -function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); -} -exports.getPositivePatterns = getPositivePatterns; -function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; -} -exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; -function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } - else { - collection[base] = [pattern]; - } - return collection; - }, group); -} -exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; -function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); -} -exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; -function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; -} -exports.convertPatternGroupToTask = convertPatternGroupToTask; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/async.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__("../../node_modules/fast-glob/out/readers/stream.js"); -const provider_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/provider.js"); -class ProviderAsync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = []; - return new Promise((resolve, reject) => { - const stream = this.api(root, task, options); - stream.once('error', reject); - stream.on('data', (entry) => entries.push(options.transform(entry))); - stream.once('end', () => resolve(entries)); - }); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports.default = ProviderAsync; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/filters/deep.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -const partial_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/matchers/partial.js"); -class DeepFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - /** - * Avoid unnecessary depth calculations when it doesn't matter. - */ - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split('/').length; - if (basePath === '') { - return entryPathDepth; - } - const basePathDepth = basePath.split('/').length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } -} -exports.default = DeepFilter; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/filters/entry.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -class EntryFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = new Map(); - } - getFilter(positive, negative) { - const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); - const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); - return (entry) => this._filter(entry, positiveRe, negativeRe); - } - _filter(entry, positiveRe, negativeRe) { - if (this._settings.unique && this._isDuplicateEntry(entry)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { - return false; - } - const filepath = this._settings.baseNameMatch ? entry.name : entry.path; - const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); - if (this._settings.unique && isMatched) { - this._createIndexRecord(entry); - } - return isMatched; - } - _isDuplicateEntry(entry) { - return this.index.has(entry.path); - } - _createIndexRecord(entry) { - this.index.set(entry.path, undefined); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { - if (!this._settings.absolute) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); - return utils.pattern.matchAny(fullpath, patternsRe); - } - _isMatchToPatterns(entryPath, patternsRe) { - const filepath = utils.path.removeLeadingDotSegment(entryPath); - return utils.pattern.matchAny(filepath, patternsRe); - } -} -exports.default = EntryFilter; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/filters/error.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -class ErrorFilter { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error) => this._isNonFatalError(error); - } - _isNonFatalError(error) { - return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; - } -} -exports.default = ErrorFilter; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/matchers/matcher.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -class Matcher { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - /** - * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). - * So, before expand patterns with brace expansion into separated patterns. - */ - const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); - for (const pattern of patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } -} -exports.default = Matcher; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/matchers/partial.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const matcher_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/matchers/matcher.js"); -class PartialMatcher extends matcher_1.default { - match(filepath) { - const parts = filepath.split('/'); - const levels = parts.length; - const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - /** - * In this case, the pattern has a globstar and we must read all directories unconditionally, - * but only if the level has reached the end of the first group. - * - * fixtures/{a,b}/** - * ^ true/false ^ always true - */ - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } -} -exports.default = PartialMatcher; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/provider.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__("path"); -const deep_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/filters/deep.js"); -const entry_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/filters/entry.js"); -const error_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/filters/error.js"); -const entry_2 = __webpack_require__("../../node_modules/fast-glob/out/providers/transformers/entry.js"); -class Provider { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === '.' ? '' : task.base; - return { - basePath, - pathSegmentSeparator: '/', - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } -} -exports.default = Provider; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__("stream"); -const stream_2 = __webpack_require__("../../node_modules/fast-glob/out/readers/stream.js"); -const provider_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/provider.js"); -class ProviderStream extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); - source - .once('error', (error) => destination.emit('error', error)) - .on('data', (entry) => destination.emit('data', options.transform(entry))) - .once('end', () => destination.emit('end')); - destination - .once('close', () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports.default = ProviderStream; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__("../../node_modules/fast-glob/out/readers/sync.js"); -const provider_1 = __webpack_require__("../../node_modules/fast-glob/out/providers/provider.js"); -class ProviderSync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports.default = ProviderSync; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/providers/transformers/entry.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -class EntryTransformer { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += '/'; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } -} -exports.default = EntryTransformer; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/readers/reader.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__("path"); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const utils = __webpack_require__("../../node_modules/fast-glob/out/utils/index.js"); -class Reader { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error) { - return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; - } -} -exports.default = Reader; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/readers/stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__("stream"); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const fsWalk = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/index.js"); -const reader_1 = __webpack_require__("../../node_modules/fast-glob/out/readers/reader.js"); -class ReaderStream extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options) - .then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }) - .catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath) - .then((stats) => this._makeEntry(stats, pattern)) - .catch((error) => { - if (options.errorFilter(error)) { - return null; - } - throw error; - }); - } - _getStat(filepath) { - return new Promise((resolve, reject) => { - this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve(stats) : reject(error); - }); - }); - } -} -exports.default = ReaderStream; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/readers/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__("../../node_modules/@nodelib/fs.stat/out/index.js"); -const fsWalk = __webpack_require__("../../node_modules/@nodelib/fs.walk/out/index.js"); -const reader_1 = __webpack_require__("../../node_modules/fast-glob/out/readers/reader.js"); -class ReaderSync extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } - catch (error) { - if (options.errorFilter(error)) { - return null; - } - throw error; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } -} -exports.default = ReaderSync; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/settings.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __webpack_require__("fs"); -const os = __webpack_require__("os"); -/** - * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. - * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 - */ -const CPU_COUNT = Math.max(os.cpus().length, 1); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - lstatSync: fs.lstatSync, - stat: fs.stat, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -class Settings { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - } - _getValue(option, value) { - return option === undefined ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } -} -exports.default = Settings; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/array.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.splitWhen = exports.flatten = void 0; -function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); -} -exports.flatten = flatten; -function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } - else { - result[groupIndex].push(item); - } - } - return result; -} -exports.splitWhen = splitWhen; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/errno.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isEnoentCodeError = void 0; -function isEnoentCodeError(error) { - return error.code === 'ENOENT'; -} -exports.isEnoentCodeError = isEnoentCodeError; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/fs.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; -const array = __webpack_require__("../../node_modules/fast-glob/out/utils/array.js"); -exports.array = array; -const errno = __webpack_require__("../../node_modules/fast-glob/out/utils/errno.js"); -exports.errno = errno; -const fs = __webpack_require__("../../node_modules/fast-glob/out/utils/fs.js"); -exports.fs = fs; -const path = __webpack_require__("../../node_modules/fast-glob/out/utils/path.js"); -exports.path = path; -const pattern = __webpack_require__("../../node_modules/fast-glob/out/utils/pattern.js"); -exports.pattern = pattern; -const stream = __webpack_require__("../../node_modules/fast-glob/out/utils/stream.js"); -exports.stream = stream; -const string = __webpack_require__("../../node_modules/fast-glob/out/utils/string.js"); -exports.string = string; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/path.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; -const path = __webpack_require__("path"); -const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ -const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; -/** - * Designed to work only with simple paths: `dir\\file`. - */ -function unixify(filepath) { - return filepath.replace(/\\/g, '/'); -} -exports.unixify = unixify; -function makeAbsolute(cwd, filepath) { - return path.resolve(cwd, filepath); -} -exports.makeAbsolute = makeAbsolute; -function escape(pattern) { - return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escape = escape; -function removeLeadingDotSegment(entry) { - // We do not use `startsWith` because this is 10x slower than current implementation for some cases. - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with - if (entry.charAt(0) === '.') { - const secondCharactery = entry.charAt(1); - if (secondCharactery === '/' || secondCharactery === '\\') { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; -} -exports.removeLeadingDotSegment = removeLeadingDotSegment; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/pattern.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __webpack_require__("path"); -const globParent = __webpack_require__("../../node_modules/glob-parent/index.js"); -const micromatch = __webpack_require__("../../node_modules/fast-glob/node_modules/micromatch/index.js"); -const GLOBSTAR = '**'; -const ESCAPE_SYMBOL = '\\'; -const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; -const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; -const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; -const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; -const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; -function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); -} -exports.isStaticPattern = isStaticPattern; -function isDynamicPattern(pattern, options = {}) { - /** - * A special case with an empty string is necessary for matching patterns that start with a forward slash. - * An empty string cannot be a dynamic pattern. - * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. - */ - if (pattern === '') { - return false; - } - /** - * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check - * filepath directly (without read directory). - */ - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { - return true; - } - return false; -} -exports.isDynamicPattern = isDynamicPattern; -function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; -} -exports.convertToPositivePattern = convertToPositivePattern; -function convertToNegativePattern(pattern) { - return '!' + pattern; -} -exports.convertToNegativePattern = convertToNegativePattern; -function isNegativePattern(pattern) { - return pattern.startsWith('!') && pattern[1] !== '('; -} -exports.isNegativePattern = isNegativePattern; -function isPositivePattern(pattern) { - return !isNegativePattern(pattern); -} -exports.isPositivePattern = isPositivePattern; -function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); -} -exports.getNegativePatterns = getNegativePatterns; -function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); -} -exports.getPositivePatterns = getPositivePatterns; -/** - * Returns patterns that can be applied inside the current directory. - * - * @example - * // ['./*', '*', 'a/*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); -} -exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; -/** - * Returns patterns to be expanded relative to (outside) the current directory. - * - * @example - * // ['../*', './../*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); -} -exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; -function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith('..') || pattern.startsWith('./..'); -} -exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; -function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); -} -exports.getBaseDirectory = getBaseDirectory; -function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); -} -exports.hasGlobStar = hasGlobStar; -function endsWithSlashGlobStar(pattern) { - return pattern.endsWith('/' + GLOBSTAR); -} -exports.endsWithSlashGlobStar = endsWithSlashGlobStar; -function isAffectDepthOfReadingPattern(pattern) { - const basename = path.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); -} -exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; -function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); -} -exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; -function expandBraceExpansion(pattern) { - return micromatch.braces(pattern, { - expand: true, - nodupes: true - }); -} -exports.expandBraceExpansion = expandBraceExpansion; -function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - /** - * The scan method returns an empty array in some cases. - * See micromatch/picomatch#58 for more details. - */ - if (parts.length === 0) { - parts = [pattern]; - } - /** - * The scan method does not return an empty part for the pattern with a forward slash. - * This is another part of micromatch/picomatch#58. - */ - if (parts[0].startsWith('/')) { - parts[0] = parts[0].slice(1); - parts.unshift(''); - } - return parts; -} -exports.getPatternParts = getPatternParts; -function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); -} -exports.makeRe = makeRe; -function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); -} -exports.convertPatternsToRe = convertPatternsToRe; -function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); -} -exports.matchAny = matchAny; - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = void 0; -const merge2 = __webpack_require__("../../node_modules/merge2/index.js"); -function merge(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once('error', (error) => mergedStream.emit('error', error)); - }); - mergedStream.once('close', () => propagateCloseEventToSources(streams)); - mergedStream.once('end', () => propagateCloseEventToSources(streams)); - return mergedStream; -} -exports.merge = merge; -function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit('close')); -} - - -/***/ }), - -/***/ "../../node_modules/fast-glob/out/utils/string.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isEmpty = exports.isString = void 0; -function isString(input) { - return typeof input === 'string'; -} -exports.isString = isString; -function isEmpty(input) { - return input === ''; -} -exports.isEmpty = isEmpty; - - -/***/ }), - -/***/ "../../node_modules/fastq/queue.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var reusify = __webpack_require__("../../node_modules/reusify/reusify.js") - -function fastqueue (context, worker, concurrency) { - if (typeof context === 'function') { - concurrency = worker - worker = context - context = null - } - - var cache = reusify(Task) - var queueHead = null - var queueTail = null - var _running = 0 - - var self = { - push: push, - drain: noop, - saturated: noop, - pause: pause, - paused: false, - concurrency: concurrency, - running: running, - resume: resume, - idle: idle, - length: length, - unshift: unshift, - empty: noop, - kill: kill, - killAndDrain: killAndDrain - } - - return self - - function running () { - return _running - } - - function pause () { - self.paused = true - } - - function length () { - var current = queueHead - var counter = 0 - - while (current) { - current = current.next - counter++ - } - - return counter - } - - function resume () { - if (!self.paused) return - self.paused = false - for (var i = 0; i < self.concurrency; i++) { - _running++ - release() - } - } - - function idle () { - return _running === 0 && self.length() === 0 - } - - function push (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - - if (_running === self.concurrency || self.paused) { - if (queueTail) { - queueTail.next = current - queueTail = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function unshift (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - - if (_running === self.concurrency || self.paused) { - if (queueHead) { - current.next = queueHead - queueHead = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function release (holder) { - if (holder) { - cache.release(holder) - } - var next = queueHead - if (next) { - if (!self.paused) { - if (queueTail === queueHead) { - queueTail = null - } - queueHead = next.next - next.next = null - worker.call(context, next.value, next.worked) - if (queueTail === null) { - self.empty() - } - } else { - _running-- - } - } else if (--_running === 0) { - self.drain() - } - } - - function kill () { - queueHead = null - queueTail = null - self.drain = noop - } - - function killAndDrain () { - queueHead = null - queueTail = null - self.drain() - self.drain = noop - } -} - -function noop () {} - -function Task () { - this.value = null - this.callback = noop - this.next = null - this.release = noop - this.context = null - - var self = this - - this.worked = function worked (err, result) { - var callback = self.callback - self.value = null - self.callback = noop - callback.call(self.context, err, result) - self.release(self) - } -} - -module.exports = fastqueue - - -/***/ }), - -/***/ "../../node_modules/fill-range/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -const util = __webpack_require__("util"); -const toRegexRange = __webpack_require__("../../node_modules/to-regex-range/index.js"); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; - - -/***/ }), - -/***/ "../../node_modules/follow-redirects/debug.js": -/***/ (function(module, exports, __webpack_require__) { - -var debug; - -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __webpack_require__("../../node_modules/debug/src/index.js")("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } - } - debug.apply(null, arguments); -}; - - -/***/ }), - -/***/ "../../node_modules/follow-redirects/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var url = __webpack_require__("url"); -var URL = url.URL; -var http = __webpack_require__("http"); -var https = __webpack_require__("https"); -var Writable = __webpack_require__("stream").Writable; -var assert = __webpack_require__("assert"); -var debug = __webpack_require__("../../node_modules/follow-redirects/debug.js"); - -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - self._processResponse(response); - }; - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -RedirectableRequest.prototype.abort = function () { - abortRequest(this._currentRequest); - this.emit("abort"); -}; - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (typeof data === "function") { - callback = data; - data = encoding = null; - } - else if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } - - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } - - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } - - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } - - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); - } - - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - - return this; -}; - -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - this._currentUrl = url.format(this._options); - - // Set up event handlers - request._redirectable = this; - for (var e = 0; e < events.length; e++) { - request.on(events[e], eventHandlers[events[e]]); - } - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end. - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - return; - } - - // The response is a redirect, so abort the current request - abortRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; - } - - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = url.parse(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); - - // Determine the URL of the redirection - var redirectUrl; - try { - redirectUrl = url.resolve(currentUrl, location); - } - catch (cause) { - this.emit("error", new RedirectionError(cause)); - return; - } - - // Create the redirected request - debug("redirecting to", redirectUrl); - this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); - - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrlParts.protocol !== currentUrlParts.protocol && - redirectUrlParts.protocol !== "https:" || - redirectUrlParts.host !== currentHost && - !isSubdomain(redirectUrlParts.host, currentHost)) { - removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (typeof beforeRedirect === "function") { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - try { - beforeRedirect(this._options, responseDetails, requestDetails); - } - catch (err) { - this.emit("error", err); - return; - } - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - this.emit("error", new RedirectionError(cause)); - } -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters - if (typeof input === "string") { - var urlStr = input; - try { - input = urlToOptions(new URL(urlStr)); - } - catch (err) { - /* istanbul ignore next */ - input = url.parse(urlStr); - } - } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); - } - else { - callback = options; - options = input; - input = { protocol: protocol }; - } - if (typeof options === "function") { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -/* istanbul ignore next */ -function noop() { /* empty */ } - -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); - } - return options; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, defaultMessage) { - function CustomError(cause) { - Error.captureStackTrace(this, this.constructor); - if (!cause) { - this.message = defaultMessage; - } - else { - this.message = defaultMessage + ": " + cause.message; - this.cause = cause; - } - } - CustomError.prototype = new Error(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; - CustomError.prototype.code = code; - return CustomError; -} - -function abortRequest(request) { - for (var e = 0; e < events.length; e++) { - request.removeListener(events[e], eventHandlers[events[e]]); - } - request.on("error", noop); - request.abort(); -} - -function isSubdomain(subdomain, domain) { - const dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; - - -/***/ }), - -/***/ "../../node_modules/form-data/lib/form_data.js": -/***/ (function(module, exports, __webpack_require__) { - -var CombinedStream = __webpack_require__("../../node_modules/combined-stream/lib/combined_stream.js"); -var util = __webpack_require__("util"); -var path = __webpack_require__("path"); -var http = __webpack_require__("http"); -var https = __webpack_require__("https"); -var parseUrl = __webpack_require__("url").parse; -var fs = __webpack_require__("fs"); -var Stream = __webpack_require__("stream").Stream; -var mime = __webpack_require__("../../node_modules/mime-types/index.js"); -var asynckit = __webpack_require__("../../node_modules/asynckit/index.js"); -var populate = __webpack_require__("../../node_modules/form-data/lib/populate.js"); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; - - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - - if (err) { - callback(err); - return; - } - - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); - } -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } - - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } - - return contentDisposition; -}; - -FormData.prototype._getContentType = function(value, options) { - - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); - - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { - - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } - - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } - } - } - - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - - // use custom params - } else { - - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } - - // add content length - if (length) { - request.setHeader('Content-Length', length); - } - - this.pipe(request); - if (cb) { - var onResponse; - - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - - return cb.call(this, error, responce); - }; - - onResponse = callback.bind(this, null); - - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; - - -/***/ }), - -/***/ "../../node_modules/form-data/lib/populate.js": -/***/ (function(module, exports) { - -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); - - return dst; -}; - - -/***/ }), - -/***/ "../../node_modules/fs.realpath/index.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = __webpack_require__("fs") -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__("../../node_modules/fs.realpath/old.js") - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} - - -/***/ }), - -/***/ "../../node_modules/fs.realpath/old.js": -/***/ (function(module, exports, __webpack_require__) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = __webpack_require__("path"); -var isWindows = process.platform === 'win32'; -var fs = __webpack_require__("fs"); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - -/***/ }), - -/***/ "../../node_modules/function-bind/implementation.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), - -/***/ "../../node_modules/function-bind/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__("../../node_modules/function-bind/implementation.js"); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ "../../node_modules/get-stream/buffer-stream.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {PassThrough: PassThroughStream} = __webpack_require__("stream"); - -module.exports = options => { - options = {...options}; - - const {array} = options; - let {encoding} = options; - const isBuffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || 'utf8'; - } - - if (isBuffer) { - encoding = null; - } - - const stream = new PassThroughStream({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - let length = 0; - const chunks = []; - - stream.on('data', chunk => { - chunks.push(chunk); - - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return chunks; - } - - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); - }; - - stream.getBufferedLength = () => length; - - return stream; -}; - - -/***/ }), - -/***/ "../../node_modules/get-stream/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const pump = __webpack_require__("../../node_modules/pump/index.js"); -const bufferStream = __webpack_require__("../../node_modules/get-stream/buffer-stream.js"); - -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} - -async function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } - - options = { - maxBuffer: Infinity, - ...options - }; - - const {maxBuffer} = options; - - let stream; - await new Promise((resolve, reject) => { - const rejectPromise = error => { - if (error) { // A null check - error.bufferedData = stream.getBufferedValue(); - } - - reject(error); - }; - - stream = pump(inputStream, bufferStream(options), error => { - if (error) { - rejectPromise(error); - return; - } - - resolve(); - }); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }); - - return stream.getBufferedValue(); -} - -module.exports = getStream; -// TODO: Remove this for the next major release -module.exports.default = getStream; -module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); -module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); -module.exports.MaxBufferError = MaxBufferError; - - -/***/ }), - -/***/ "../../node_modules/getopts/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const EMPTYARR = [] -const SHORTSPLIT = /$|[!-@[-`{-~][\s\S]*/g -const isArray = Array.isArray - -const parseValue = function(any) { - if (any === "") return "" - if (any === "false") return false - const maybe = Number(any) - return maybe * 0 === 0 ? maybe : any -} - -const parseAlias = function(aliases) { - let out = {}, - key, - alias, - prev, - len, - any, - i, - k - - for (key in aliases) { - any = aliases[key] - alias = out[key] = isArray(any) ? any : [any] - - for (i = 0, len = alias.length; i < len; i++) { - prev = out[alias[i]] = [key] - - for (k = 0; k < len; k++) { - if (i !== k) prev.push(alias[k]) - } - } - } - - return out -} - -const parseDefault = function(aliases, defaults) { - let out = {}, - key, - alias, - value, - len, - i - - for (key in defaults) { - value = defaults[key] - alias = aliases[key] - - out[key] = value - - if (alias === undefined) { - aliases[key] = EMPTYARR - } else { - for (i = 0, len = alias.length; i < len; i++) { - out[alias[i]] = value - } - } - } - - return out -} - -const parseOptions = function(aliases, options, value) { - let out = {}, - key, - alias, - len, - end, - i, - k - - if (options !== undefined) { - for (i = 0, len = options.length; i < len; i++) { - key = options[i] - alias = aliases[key] - - out[key] = value - - if (alias === undefined) { - aliases[key] = EMPTYARR - } else { - for (k = 0, end = alias.length; k < end; k++) { - out[alias[k]] = value - } - } - } - } - - return out -} - -const write = function(out, key, value, aliases, unknown) { - let i, - prev, - alias = aliases[key], - len = alias === undefined ? -1 : alias.length - - if (len >= 0 || unknown === undefined || unknown(key)) { - prev = out[key] - - if (prev === undefined) { - out[key] = value - } else { - if (isArray(prev)) { - prev.push(value) - } else { - out[key] = [prev, value] - } - } - - for (i = 0; i < len; i++) { - out[alias[i]] = out[key] - } - } -} - -const getopts = function(argv, opts) { - let unknown = (opts = opts || {}).unknown, - aliases = parseAlias(opts.alias), - strings = parseOptions(aliases, opts.string, ""), - values = parseDefault(aliases, opts.default), - bools = parseOptions(aliases, opts.boolean, false), - stopEarly = opts.stopEarly, - _ = [], - out = { _ }, - i = 0, - k = 0, - len = argv.length, - key, - arg, - end, - match, - value - - for (; i < len; i++) { - arg = argv[i] - - if (arg[0] !== "-" || arg === "-") { - if (stopEarly) while (i < len) _.push(argv[i++]) - else _.push(arg) - } else if (arg === "--") { - while (++i < len) _.push(argv[i]) - } else if (arg[1] === "-") { - end = arg.indexOf("=", 2) - if (arg[2] === "n" && arg[3] === "o" && arg[4] === "-") { - key = arg.slice(5, end >= 0 ? end : undefined) - value = false - } else if (end >= 0) { - key = arg.slice(2, end) - value = - bools[key] !== undefined || - (strings[key] === undefined - ? parseValue(arg.slice(end + 1)) - : arg.slice(end + 1)) - } else { - key = arg.slice(2) - value = - bools[key] !== undefined || - (len === i + 1 || argv[i + 1][0] === "-" - ? strings[key] === undefined - ? true - : "" - : strings[key] === undefined - ? parseValue(argv[++i]) - : argv[++i]) - } - write(out, key, value, aliases, unknown) - } else { - SHORTSPLIT.lastIndex = 2 - match = SHORTSPLIT.exec(arg) - end = match.index - value = match[0] - - for (k = 1; k < end; k++) { - write( - out, - (key = arg[k]), - k + 1 < end - ? strings[key] === undefined || - arg.substring(k + 1, (k = end)) + value - : value === "" - ? len === i + 1 || argv[i + 1][0] === "-" - ? strings[key] === undefined || "" - : bools[key] !== undefined || - (strings[key] === undefined ? parseValue(argv[++i]) : argv[++i]) - : bools[key] !== undefined || - (strings[key] === undefined ? parseValue(value) : value), - aliases, - unknown - ) - } - } - } - - for (key in values) if (out[key] === undefined) out[key] = values[key] - for (key in bools) if (out[key] === undefined) out[key] = false - for (key in strings) if (out[key] === undefined) out[key] = "" - - return out -} - -module.exports = getopts - - -/***/ }), - -/***/ "../../node_modules/git-hooks-list/index.json": -/***/ (function(module) { - -module.exports = JSON.parse("[\"applypatch-msg\",\"pre-applypatch\",\"post-applypatch\",\"pre-commit\",\"pre-merge-commit\",\"prepare-commit-msg\",\"commit-msg\",\"post-commit\",\"pre-rebase\",\"post-checkout\",\"post-merge\",\"pre-push\",\"pre-receive\",\"update\",\"post-receive\",\"post-update\",\"push-to-checkout\",\"pre-auto-gc\",\"post-rewrite\",\"sendemail-validate\",\"fsmonitor-watchman\",\"p4-pre-submit\",\"post-index-change\"]"); - -/***/ }), - -/***/ "../../node_modules/glob-parent/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isGlob = __webpack_require__("../../node_modules/is-glob/index.js"); -var pathPosixDirname = __webpack_require__("path").posix.dirname; -var isWin32 = __webpack_require__("os").platform() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; - - -/***/ }), - -/***/ "../../node_modules/glob/common.js": -/***/ (function(module, exports, __webpack_require__) { - -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = __webpack_require__("fs") -var path = __webpack_require__("path") -var minimatch = __webpack_require__("../../node_modules/minimatch/minimatch.js") -var isAbsolute = __webpack_require__("../../node_modules/path-is-absolute/index.js") -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - - -/***/ }), - -/***/ "../../node_modules/glob/glob.js": -/***/ (function(module, exports, __webpack_require__) { - -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = __webpack_require__("../../node_modules/fs.realpath/index.js") -var minimatch = __webpack_require__("../../node_modules/minimatch/minimatch.js") -var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__("../../node_modules/inherits/inherits.js") -var EE = __webpack_require__("events").EventEmitter -var path = __webpack_require__("path") -var assert = __webpack_require__("assert") -var isAbsolute = __webpack_require__("../../node_modules/path-is-absolute/index.js") -var globSync = __webpack_require__("../../node_modules/glob/sync.js") -var common = __webpack_require__("../../node_modules/glob/common.js") -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = __webpack_require__("../../node_modules/inflight/inflight.js") -var util = __webpack_require__("util") -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = __webpack_require__("../../node_modules/once/once.js") - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} - - -/***/ }), - -/***/ "../../node_modules/glob/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = __webpack_require__("../../node_modules/fs.realpath/index.js") -var minimatch = __webpack_require__("../../node_modules/minimatch/minimatch.js") -var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__("../../node_modules/glob/glob.js").Glob -var util = __webpack_require__("util") -var path = __webpack_require__("path") -var assert = __webpack_require__("assert") -var isAbsolute = __webpack_require__("../../node_modules/path-is-absolute/index.js") -var common = __webpack_require__("../../node_modules/glob/common.js") -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - - -/***/ }), - -/***/ "../../node_modules/globby/gitignore.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {promisify} = __webpack_require__("util"); -const fs = __webpack_require__("fs"); -const path = __webpack_require__("path"); -const fastGlob = __webpack_require__("../../node_modules/fast-glob/out/index.js"); -const gitIgnore = __webpack_require__("../../node_modules/ignore/index.js"); -const slash = __webpack_require__("../../node_modules/slash/index.js"); - -const DEFAULT_IGNORE = [ - '**/node_modules/**', - '**/flow-typed/**', - '**/coverage/**', - '**/.git' -]; - -const readFileP = promisify(fs.readFile); - -const mapGitIgnorePatternTo = base => ignore => { - if (ignore.startsWith('!')) { - return '!' + path.posix.join(base, ignore.slice(1)); - } - - return path.posix.join(base, ignore); -}; - -const parseGitIgnore = (content, options) => { - const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); - - return content - .split(/\r?\n/) - .filter(Boolean) - .filter(line => !line.startsWith('#')) - .map(mapGitIgnorePatternTo(base)); -}; - -const reduceIgnore = files => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - - return ignores; -}; - -const ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - - return path.join(cwd, p); -}; - -const getIsIgnoredPredecate = (ignores, cwd) => { - return p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); -}; - -const getFile = async (file, cwd) => { - const filePath = path.join(cwd, file); - const content = await readFileP(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const getFileSync = (file, cwd) => { - const filePath = path.join(cwd, file); - const content = fs.readFileSync(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) -} = {}) => { - return {ignore, cwd}; -}; - -module.exports = async options => { - options = normalizeOptions(options); - - const paths = await fastGlob('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = await Promise.all(paths.map(file => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - -module.exports.sync = options => { - options = normalizeOptions(options); - - const paths = fastGlob.sync('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = paths.map(file => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - - -/***/ }), - -/***/ "../../node_modules/globby/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__("fs"); -const arrayUnion = __webpack_require__("../../node_modules/array-union/index.js"); -const merge2 = __webpack_require__("../../node_modules/merge2/index.js"); -const fastGlob = __webpack_require__("../../node_modules/fast-glob/out/index.js"); -const dirGlob = __webpack_require__("../../node_modules/dir-glob/index.js"); -const gitignore = __webpack_require__("../../node_modules/globby/gitignore.js"); -const {FilterStream, UniqueStream} = __webpack_require__("../../node_modules/globby/stream-utils.js"); - -const DEFAULT_FILTER = () => false; - -const isNegative = pattern => pattern[0] === '!'; - -const assertPatternsInput = patterns => { - if (!patterns.every(pattern => typeof pattern === 'string')) { - throw new TypeError('Patterns must be a string or an array of strings'); - } -}; - -const checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - - let stat; - try { - stat = fs.statSync(options.cwd); - } catch { - return; - } - - if (!stat.isDirectory()) { - throw new Error('The `cwd` option must be a path to a directory'); - } -}; - -const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; - -const generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - - const globTasks = []; - - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - - const ignore = patterns - .slice(index) - .filter(pattern => isNegative(pattern)) - .map(pattern => pattern.slice(1)); - - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - - globTasks.push({pattern, options}); - } - - return globTasks; -}; - -const globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === 'object') { - options = { - ...options, - ...task.options.expandDirectories - }; - } - - return fn(task.pattern, options); -}; - -const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - -const getFilterSync = options => { - return options && options.gitignore ? - gitignore.sync({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; -}; - -const globToTask = task => glob => { - const {options} = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - - return { - pattern: glob, - options - }; -}; - -module.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const getFilter = async () => { - return options && options.gitignore ? - gitignore({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; - }; - - const getTasks = async () => { - const tasks = await Promise.all(globTasks.map(async task => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - - return arrayUnion(...tasks); - }; - - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options))); - - return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_))); -}; - -module.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - - const filter = getFilterSync(options); - - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - - return matches.filter(path_ => !filter(path_)); -}; - -module.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - - const filter = getFilterSync(options); - const filterStream = new FilterStream(p => !filter(p)); - const uniqueStream = new UniqueStream(); - - return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options))) - .pipe(filterStream) - .pipe(uniqueStream); -}; - -module.exports.generateGlobTasks = generateGlobTasks; - -module.exports.hasMagic = (patterns, options) => [] - .concat(patterns) - .some(pattern => fastGlob.isDynamicPattern(pattern, options)); - -module.exports.gitignore = gitignore; - - -/***/ }), - -/***/ "../../node_modules/globby/stream-utils.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {Transform} = __webpack_require__("stream"); - -class ObjectTransform extends Transform { - constructor() { - super({ - objectMode: true - }); - } -} - -class FilterStream extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - - callback(); - } -} - -class UniqueStream extends ObjectTransform { - constructor() { - super(); - this._pushed = new Set(); - } - - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - - callback(); - } -} - -module.exports = { - FilterStream, - UniqueStream -}; - - -/***/ }), - -/***/ "../../node_modules/graceful-fs/clone.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = clone - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: obj.__proto__ } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), - -/***/ "../../node_modules/graceful-fs/graceful-fs.js": -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__("fs") -var polyfills = __webpack_require__("../../node_modules/graceful-fs/polyfills.js") -var legacy = __webpack_require__("../../node_modules/graceful-fs/legacy-streams.js") -var clone = __webpack_require__("../../node_modules/graceful-fs/clone.js") - -var util = __webpack_require__("util") - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - retry() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - retry() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __webpack_require__("assert").equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - var args = [path] - if (typeof options !== 'function') { - args.push(options) - } else { - cb = options - } - args.push(go$readdir$cb) - - return go$readdir(args) - - function go$readdir$cb (err, files) { - if (files && files.sort) - files.sort() - - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [args]]) - - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - } - } - - function go$readdir (args) { - return fs$readdir.apply(fs, args) - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) -} - -function retry () { - var elem = fs[gracefulQueue].shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) - } -} - - -/***/ }), - -/***/ "../../node_modules/graceful-fs/legacy-streams.js": -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__("stream").Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), - -/***/ "../../node_modules/graceful-fs/polyfills.js": -/***/ (function(module, exports, __webpack_require__) { - -var constants = __webpack_require__("constants") - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - }})(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - read.__proto__ = fs$read - return read - })(fs.read) - - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} - - -/***/ }), - -/***/ "../../node_modules/has-flag/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; - - -/***/ }), - -/***/ "../../node_modules/has/src/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__("../../node_modules/function-bind/index.js"); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); - - -/***/ }), - -/***/ "../../node_modules/hosted-git-info/git-host-info.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var gitHosts = module.exports = { - github: { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'github.com', - 'treepath': 'tree', - 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', - 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}' - }, - bitbucket: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'bitbucket.org', - 'treepath': 'src', - 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' - }, - gitlab: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gitlab.com', - 'treepath': 'tree', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', - 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ - }, - gist: { - 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gist.github.com', - 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/, - 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', - 'bugstemplate': 'https://{domain}/{project}', - 'gittemplate': 'git://{domain}/{project}.git{#committish}', - 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{project}{/committish}', - 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', - 'docstemplate': 'https://{domain}/{project}{/committish}', - 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', - 'shortcuttemplate': '{type}:{project}{#committish}', - 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', - 'hashformat': function (fragment) { - return 'file-' + formatHashFragment(fragment) - } - } -} - -var gitHostDefaults = { - 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', - 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', - 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', - 'shortcuttemplate': '{type}:{user}/{project}{#committish}', - 'pathtemplate': '{user}/{project}{#committish}', - 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/, - 'hashformat': formatHashFragment -} - -Object.keys(gitHosts).forEach(function (name) { - Object.keys(gitHostDefaults).forEach(function (key) { - if (gitHosts[name][key]) return - gitHosts[name][key] = gitHostDefaults[key] - }) - gitHosts[name].protocols_re = RegExp('^(' + - gitHosts[name].protocols.map(function (protocol) { - return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') - }).join('|') + '):$') -}) - -function formatHashFragment (fragment) { - return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') -} - - -/***/ }), - -/***/ "../../node_modules/hosted-git-info/git-host.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var gitHosts = __webpack_require__("../../node_modules/hosted-git-info/git-host-info.js") -/* eslint-disable node/no-deprecated-api */ - -// copy-pasta util._extend from node's source, to avoid pulling -// the whole util module into peoples' webpack bundles. -/* istanbul ignore next */ -var extend = Object.assign || function _extend (target, source) { - // Don't do anything if source isn't an object - if (source === null || typeof source !== 'object') return target - - var keys = Object.keys(source) - var i = keys.length - while (i--) { - target[keys[i]] = source[keys[i]] - } - return target -} - -module.exports = GitHost -function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) { - var gitHostInfo = this - gitHostInfo.type = type - Object.keys(gitHosts[type]).forEach(function (key) { - gitHostInfo[key] = gitHosts[type][key] - }) - gitHostInfo.user = user - gitHostInfo.auth = auth - gitHostInfo.project = project - gitHostInfo.committish = committish - gitHostInfo.default = defaultRepresentation - gitHostInfo.opts = opts || {} -} - -GitHost.prototype.hash = function () { - return this.committish ? '#' + this.committish : '' -} - -GitHost.prototype._fill = function (template, opts) { - if (!template) return - var vars = extend({}, opts) - vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' - opts = extend(extend({}, this.opts), opts) - var self = this - Object.keys(this).forEach(function (key) { - if (self[key] != null && vars[key] == null) vars[key] = self[key] - }) - var rawAuth = vars.auth - var rawcommittish = vars.committish - var rawFragment = vars.fragment - var rawPath = vars.path - var rawProject = vars.project - Object.keys(vars).forEach(function (key) { - var value = vars[key] - if ((key === 'path' || key === 'project') && typeof value === 'string') { - vars[key] = value.split('/').map(function (pathComponent) { - return encodeURIComponent(pathComponent) - }).join('/') - } else { - vars[key] = encodeURIComponent(value) - } - }) - vars['auth@'] = rawAuth ? rawAuth + '@' : '' - vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' - vars.fragment = vars.fragment ? vars.fragment : '' - vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' - vars['/path'] = vars.path ? '/' + vars.path : '' - vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/') - if (opts.noCommittish) { - vars['#committish'] = '' - vars['/tree/committish'] = '' - vars['/committish'] = '' - vars.committish = '' - } else { - vars['#committish'] = rawcommittish ? '#' + rawcommittish : '' - vars['/tree/committish'] = vars.committish - ? '/' + vars.treepath + '/' + vars.committish - : '' - vars['/committish'] = vars.committish ? '/' + vars.committish : '' - vars.committish = vars.committish || 'master' - } - var res = template - Object.keys(vars).forEach(function (key) { - res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) - }) - if (opts.noGitPlus) { - return res.replace(/^git[+]/, '') - } else { - return res - } -} - -GitHost.prototype.ssh = function (opts) { - return this._fill(this.sshtemplate, opts) -} - -GitHost.prototype.sshurl = function (opts) { - return this._fill(this.sshurltemplate, opts) -} - -GitHost.prototype.browse = function (P, F, opts) { - if (typeof P === 'string') { - if (typeof F !== 'string') { - opts = F - F = null - } - return this._fill(this.browsefiletemplate, extend({ - fragment: F, - path: P - }, opts)) - } else { - return this._fill(this.browsetemplate, P) - } -} - -GitHost.prototype.docs = function (opts) { - return this._fill(this.docstemplate, opts) -} - -GitHost.prototype.bugs = function (opts) { - return this._fill(this.bugstemplate, opts) -} - -GitHost.prototype.https = function (opts) { - return this._fill(this.httpstemplate, opts) -} - -GitHost.prototype.git = function (opts) { - return this._fill(this.gittemplate, opts) -} - -GitHost.prototype.shortcut = function (opts) { - return this._fill(this.shortcuttemplate, opts) -} - -GitHost.prototype.path = function (opts) { - return this._fill(this.pathtemplate, opts) -} - -GitHost.prototype.tarball = function (opts_) { - var opts = extend({}, opts_, { noCommittish: false }) - return this._fill(this.tarballtemplate, opts) -} - -GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, extend({ path: P }, opts)) -} - -GitHost.prototype.getDefaultRepresentation = function () { - return this.default -} - -GitHost.prototype.toString = function (opts) { - if (this.default && typeof this[this.default] === 'function') return this[this.default](opts) - return this.sshurl(opts) -} - - -/***/ }), - -/***/ "../../node_modules/hosted-git-info/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var url = __webpack_require__("url") -var gitHosts = __webpack_require__("../../node_modules/hosted-git-info/git-host-info.js") -var GitHost = module.exports = __webpack_require__("../../node_modules/hosted-git-info/git-host.js") - -var protocolToRepresentationMap = { - 'git+ssh:': 'sshurl', - 'git+https:': 'https', - 'ssh:': 'sshurl', - 'git:': 'git' -} - -function protocolToRepresentation (protocol) { - return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) -} - -var authProtocols = { - 'git:': true, - 'https:': true, - 'git+https:': true, - 'http:': true, - 'git+http:': true -} - -var cache = {} - -module.exports.fromUrl = function (giturl, opts) { - if (typeof giturl !== 'string') return - var key = giturl + JSON.stringify(opts || {}) - - if (!(key in cache)) { - cache[key] = fromUrl(giturl, opts) - } - - return cache[key] -} - -function fromUrl (giturl, opts) { - if (giturl == null || giturl === '') return - var url = fixupUnqualifiedGist( - isGitHubShorthand(giturl) ? 'github:' + giturl : giturl - ) - var parsed = parseGitUrl(url) - var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) - var matches = Object.keys(gitHosts).map(function (gitHostName) { - try { - var gitHostInfo = gitHosts[gitHostName] - var auth = null - if (parsed.auth && authProtocols[parsed.protocol]) { - auth = parsed.auth - } - var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null - var user = null - var project = null - var defaultRepresentation = null - if (shortcutMatch && shortcutMatch[1] === gitHostName) { - user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) - project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, '')) - defaultRepresentation = 'shortcut' - } else { - if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return - if (!gitHostInfo.protocols_re.test(parsed.protocol)) return - if (!parsed.path) return - var pathmatch = gitHostInfo.pathmatch - var matched = parsed.path.match(pathmatch) - if (!matched) return - /* istanbul ignore else */ - if (matched[1] !== null && matched[1] !== undefined) { - user = decodeURIComponent(matched[1].replace(/^:/, '')) - } - project = decodeURIComponent(matched[2]) - defaultRepresentation = protocolToRepresentation(parsed.protocol) - } - return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) - } catch (ex) { - /* istanbul ignore else */ - if (ex instanceof URIError) { - } else throw ex - } - }).filter(function (gitHostInfo) { return gitHostInfo }) - if (matches.length !== 1) return - return matches[0] -} - -function isGitHubShorthand (arg) { - // Note: This does not fully test the git ref format. - // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html - // - // The only way to do this properly would be to shell out to - // git-check-ref-format, and as this is a fast sync function, - // we don't want to do that. Just let git fail if it turns - // out that the commit-ish is invalid. - // GH usernames cannot start with . or - - return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) -} - -function fixupUnqualifiedGist (giturl) { - // necessary for round-tripping gists - var parsed = url.parse(giturl) - if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { - return parsed.protocol + '/' + parsed.host - } else { - return giturl - } -} - -function parseGitUrl (giturl) { - var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) { - var legacy = url.parse(giturl) - // If we don't have url.URL, then sorry, this is just not fixable. - // This affects Node <= 6.12. - if (legacy.auth && typeof url.URL === 'function') { - // git urls can be in the form of scp-style/ssh-connect strings, like - // git+ssh://user@host.com:some/path, which the legacy url parser - // supports, but WhatWG url.URL class does not. However, the legacy - // parser de-urlencodes the username and password, so something like - // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes - // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. - // Pull off just the auth and host, so we dont' get the confusing - // scp-style URL, then pass that to the WhatWG parser to get the - // auth properly escaped. - var authmatch = giturl.match(/[^@]+@[^:/]+/) - /* istanbul ignore else - this should be impossible */ - if (authmatch) { - var whatwg = new url.URL(authmatch[0]) - legacy.auth = whatwg.username || '' - if (whatwg.password) legacy.auth += ':' + whatwg.password - } - } - return legacy - } - return { - protocol: 'git+ssh:', - slashes: true, - auth: matched[1], - host: matched[2], - port: null, - hostname: matched[2], - hash: matched[4], - search: null, - query: null, - pathname: '/' + matched[3], - path: '/' + matched[3], - href: 'git+ssh://' + matched[1] + '@' + matched[2] + - '/' + matched[3] + (matched[4] || '') - } -} - - -/***/ }), - -/***/ "../../node_modules/human-signals/build/src/core.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -Object.defineProperty(exports,"__esModule",{value:true});exports.SIGNALS=void 0; - -const SIGNALS=[ -{ -name:"SIGHUP", -number:1, -action:"terminate", -description:"Terminal closed", -standard:"posix"}, - -{ -name:"SIGINT", -number:2, -action:"terminate", -description:"User interruption with CTRL-C", -standard:"ansi"}, - -{ -name:"SIGQUIT", -number:3, -action:"core", -description:"User interruption with CTRL-\\", -standard:"posix"}, - -{ -name:"SIGILL", -number:4, -action:"core", -description:"Invalid machine instruction", -standard:"ansi"}, - -{ -name:"SIGTRAP", -number:5, -action:"core", -description:"Debugger breakpoint", -standard:"posix"}, - -{ -name:"SIGABRT", -number:6, -action:"core", -description:"Aborted", -standard:"ansi"}, - -{ -name:"SIGIOT", -number:6, -action:"core", -description:"Aborted", -standard:"bsd"}, - -{ -name:"SIGBUS", -number:7, -action:"core", -description: -"Bus error due to misaligned, non-existing address or paging error", -standard:"bsd"}, - -{ -name:"SIGEMT", -number:7, -action:"terminate", -description:"Command should be emulated but is not implemented", -standard:"other"}, - -{ -name:"SIGFPE", -number:8, -action:"core", -description:"Floating point arithmetic error", -standard:"ansi"}, - -{ -name:"SIGKILL", -number:9, -action:"terminate", -description:"Forced termination", -standard:"posix", -forced:true}, - -{ -name:"SIGUSR1", -number:10, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGSEGV", -number:11, -action:"core", -description:"Segmentation fault", -standard:"ansi"}, - -{ -name:"SIGUSR2", -number:12, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGPIPE", -number:13, -action:"terminate", -description:"Broken pipe or socket", -standard:"posix"}, - -{ -name:"SIGALRM", -number:14, -action:"terminate", -description:"Timeout or timer", -standard:"posix"}, - -{ -name:"SIGTERM", -number:15, -action:"terminate", -description:"Termination", -standard:"ansi"}, - -{ -name:"SIGSTKFLT", -number:16, -action:"terminate", -description:"Stack is empty or overflowed", -standard:"other"}, - -{ -name:"SIGCHLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"posix"}, - -{ -name:"SIGCLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"other"}, - -{ -name:"SIGCONT", -number:18, -action:"unpause", -description:"Unpaused", -standard:"posix", -forced:true}, - -{ -name:"SIGSTOP", -number:19, -action:"pause", -description:"Paused", -standard:"posix", -forced:true}, - -{ -name:"SIGTSTP", -number:20, -action:"pause", -description:"Paused using CTRL-Z or \"suspend\"", -standard:"posix"}, - -{ -name:"SIGTTIN", -number:21, -action:"pause", -description:"Background process cannot read terminal input", -standard:"posix"}, - -{ -name:"SIGBREAK", -number:21, -action:"terminate", -description:"User interruption with CTRL-BREAK", -standard:"other"}, - -{ -name:"SIGTTOU", -number:22, -action:"pause", -description:"Background process cannot write to terminal output", -standard:"posix"}, - -{ -name:"SIGURG", -number:23, -action:"ignore", -description:"Socket received out-of-band data", -standard:"bsd"}, - -{ -name:"SIGXCPU", -number:24, -action:"core", -description:"Process timed out", -standard:"bsd"}, - -{ -name:"SIGXFSZ", -number:25, -action:"core", -description:"File too big", -standard:"bsd"}, - -{ -name:"SIGVTALRM", -number:26, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGPROF", -number:27, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGWINCH", -number:28, -action:"ignore", -description:"Terminal window size changed", -standard:"bsd"}, - -{ -name:"SIGIO", -number:29, -action:"terminate", -description:"I/O is available", -standard:"other"}, - -{ -name:"SIGPOLL", -number:29, -action:"terminate", -description:"Watched event", -standard:"other"}, - -{ -name:"SIGINFO", -number:29, -action:"ignore", -description:"Request for process information", -standard:"other"}, - -{ -name:"SIGPWR", -number:30, -action:"terminate", -description:"Device running out of power", -standard:"systemv"}, - -{ -name:"SIGSYS", -number:31, -action:"core", -description:"Invalid system call", -standard:"other"}, - -{ -name:"SIGUNUSED", -number:31, -action:"terminate", -description:"Invalid system call", -standard:"other"}];exports.SIGNALS=SIGNALS; -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ "../../node_modules/human-signals/build/src/main.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -Object.defineProperty(exports,"__esModule",{value:true});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__webpack_require__("os"); - -var _signals=__webpack_require__("../../node_modules/human-signals/build/src/signals.js"); -var _realtime=__webpack_require__("../../node_modules/human-signals/build/src/realtime.js"); - - - -const getSignalsByName=function(){ -const signals=(0,_signals.getSignals)(); -return signals.reduce(getSignalByName,{}); -}; - -const getSignalByName=function( -signalByNameMemo, -{name,number,description,supported,action,forced,standard}) -{ -return{ -...signalByNameMemo, -[name]:{name,number,description,supported,action,forced,standard}}; - -}; - -const signalsByName=getSignalsByName();exports.signalsByName=signalsByName; - - - - -const getSignalsByNumber=function(){ -const signals=(0,_signals.getSignals)(); -const length=_realtime.SIGRTMAX+1; -const signalsA=Array.from({length},(value,number)=> -getSignalByNumber(number,signals)); - -return Object.assign({},...signalsA); -}; - -const getSignalByNumber=function(number,signals){ -const signal=findSignalByNumber(number,signals); - -if(signal===undefined){ -return{}; -} - -const{name,description,supported,action,forced,standard}=signal; -return{ -[number]:{ -name, -number, -description, -supported, -action, -forced, -standard}}; - - -}; - - - -const findSignalByNumber=function(number,signals){ -const signal=signals.find(({name})=>_os.constants.signals[name]===number); - -if(signal!==undefined){ -return signal; -} - -return signals.find(signalA=>signalA.number===number); -}; - -const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber; -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ "../../node_modules/human-signals/build/src/realtime.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -Object.defineProperty(exports,"__esModule",{value:true});exports.SIGRTMAX=exports.getRealtimeSignals=void 0; -const getRealtimeSignals=function(){ -const length=SIGRTMAX-SIGRTMIN+1; -return Array.from({length},getRealtimeSignal); -};exports.getRealtimeSignals=getRealtimeSignals; - -const getRealtimeSignal=function(value,index){ -return{ -name:`SIGRT${index+1}`, -number:SIGRTMIN+index, -action:"terminate", -description:"Application-specific signal (realtime)", -standard:"posix"}; - -}; - -const SIGRTMIN=34; -const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX; -//# sourceMappingURL=realtime.js.map - -/***/ }), - -/***/ "../../node_modules/human-signals/build/src/signals.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=__webpack_require__("os"); - -var _core=__webpack_require__("../../node_modules/human-signals/build/src/core.js"); -var _realtime=__webpack_require__("../../node_modules/human-signals/build/src/realtime.js"); - - - -const getSignals=function(){ -const realtimeSignals=(0,_realtime.getRealtimeSignals)(); -const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal); -return signals; -};exports.getSignals=getSignals; - - - - - - - -const normalizeSignal=function({ -name, -number:defaultNumber, -description, -action, -forced=false, -standard}) -{ -const{ -signals:{[name]:constantSignal}}= -_os.constants; -const supported=constantSignal!==undefined; -const number=supported?constantSignal:defaultNumber; -return{name,number,description,supported,action,forced,standard}; -}; -//# sourceMappingURL=signals.js.map - -/***/ }), - -/***/ "../../node_modules/ignore/index.js": -/***/ (function(module, exports) { - -// A simple implementation of make-array -function makeArray (subject) { - return Array.isArray(subject) - ? subject - : [subject] -} - -const EMPTY = '' -const SPACE = ' ' -const ESCAPE = '\\' -const REGEX_TEST_BLANK_LINE = /^\s+$/ -const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ -const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ -const REGEX_SPLITALL_CRLF = /\r?\n/g -// /foo, -// ./foo, -// ../foo, -// . -// .. -const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ - -const SLASH = '/' -const KEY_IGNORE = typeof Symbol !== 'undefined' - ? Symbol.for('node-ignore') - /* istanbul ignore next */ - : 'node-ignore' - -const define = (object, key, value) => - Object.defineProperty(object, key, {value}) - -const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g - -// Sanitize the range of a regular expression -// The cases are complicated, see test cases for details -const sanitizeRange = range => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) - ? match - // Invalid range (out of order) which is ok for gitignore rules but - // fatal for JavaScript regular expression, so eliminate it. - : EMPTY -) - -// See fixtures #59 -const cleanRangeBackSlash = slashes => { - const {length} = slashes - return slashes.slice(0, length - length % 2) -} - -// > If the pattern ends with a slash, -// > it is removed for the purpose of the following description, -// > but it would only find a match with a directory. -// > In other words, foo/ will match a directory foo and paths underneath it, -// > but will not match a regular file or a symbolic link foo -// > (this is consistent with the way how pathspec works in general in Git). -// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' -// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call -// you could use option `mark: true` with `glob` - -// '`foo/`' should not continue with the '`..`' -const REPLACERS = [ - - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - match => match.indexOf('\\') === 0 - ? SPACE - : EMPTY - ], - - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - - // Escape metacharacters - // which is written down by users but means special for regular expressions. - - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - match => `\\${match}` - ], - - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => '[^/]' - ], - - // leading slash - [ - - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => '^' - ], - - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => '\\/' - ], - - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - - // '**/foo' <-> 'foo' - () => '^(?:.*\\/)?' - ], - - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer () { - // If has a slash `/` at the beginning or middle - return !/\/(?!$)/.test(this) - // > Prior to 2.22.1 - // > If the pattern does not contain a slash /, - // > Git treats it as a shell glob pattern - // Actually, if there is only a trailing slash, - // git also treats it as a shell glob pattern - - // After 2.22.1 (compatible but clearer) - // > If there is a separator at the beginning or middle (or both) - // > of the pattern, then the pattern is relative to the directory - // > level of the particular .gitignore file itself. - // > Otherwise the pattern may also match at any level below - // > the .gitignore level. - ? '(?:^|\\/)' - - // > Otherwise, Git treats the pattern as a shell glob suitable for - // > consumption by fnmatch(3) - : '^' - } - ], - - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - - // Check if it is not the last `'/**'` - (_, index, str) => index + 6 < str.length - - // case: /**/ - // > A slash followed by two consecutive asterisks then a slash matches - // > zero or more directories. - // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. - // '/**/' - ? '(?:\\/[^\\/]+)*' - - // case: /** - // > A trailing `"/**"` matches everything inside. - - // #21: everything inside but it should not include the current folder - : '\\/.+' - ], - - // intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - - // 'abc.*/' -> go - // 'abc.*' -> skip this rule - /(^|[^\\]+)\\\*(?=.+)/g, - - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1) => `${p1}[^\\/]*` - ], - - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE - // '\\[bar]' -> '\\\\[bar\\]' - ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` - : close === ']' - ? endEscape.length % 2 === 0 - // A normal case, and it is a range notation - // '[bar]' - // '[bar\\\\]' - ? `[${sanitizeRange(range)}${endEscape}]` - // Invalid range notaton - // '[bar\\]' -> '[bar\\\\]' - : '[]' - : '[]' - ], - - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - match => /\/$/.test(match) - // foo/ will not match 'foo' - ? `${match}$` - // foo matches 'foo' and 'foo/' - : `${match}(?=$|\\/$)` - ], - - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 - // '\^': - // '/*' does not match EMPTY - // '/*' does not match everything - - // '\\\/': - // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*' - - return `${prefix}(?=$|\\/$)` - } - ], -] - -// A simple cache, because an ignore rule only has only one certain meaning -const regexCache = Object.create(null) - -// @param {pattern} -const makeRegex = (pattern, negative, ignorecase) => { - const r = regexCache[pattern] - if (r) { - return r - } - - // const replacers = negative - // ? NEGATIVE_REPLACERS - // : POSITIVE_REPLACERS - - const source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ) - - return regexCache[pattern] = ignorecase - ? new RegExp(source, 'i') - : new RegExp(source) -} - -const isString = subject => typeof subject === 'string' - -// > A blank line matches no files, so it can serve as a separator for readability. -const checkPattern = pattern => pattern - && isString(pattern) - && !REGEX_TEST_BLANK_LINE.test(pattern) - - // > A line starting with # serves as a comment. - && pattern.indexOf('#') !== 0 - -const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) - -class IgnoreRule { - constructor ( - origin, - pattern, - negative, - regex - ) { - this.origin = origin - this.pattern = pattern - this.negative = negative - this.regex = regex - } -} - -const createRule = (pattern, ignorecase) => { - const origin = pattern - let negative = false - - // > An optional prefix "!" which negates the pattern; - if (pattern.indexOf('!') === 0) { - negative = true - pattern = pattern.substr(1) - } - - pattern = pattern - // > Put a backslash ("\") in front of the first "!" for patterns that - // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') - // > Put a backslash ("\") in front of the first hash for patterns that - // > begin with a hash. - .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') - - const regex = makeRegex(pattern, negative, ignorecase) - - return new IgnoreRule( - origin, - pattern, - negative, - regex - ) -} - -const throwError = (message, Ctor) => { - throw new Ctor(message) -} - -const checkPath = (path, originalPath, doThrow) => { - if (!isString(path)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ) - } - - // We don't know if we should ignore EMPTY, so throw - if (!path) { - return doThrow(`path must not be empty`, TypeError) - } - - // Check if it is a relative path - if (checkPath.isNotRelative(path)) { - const r = '`path.relative()`d' - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ) - } - - return true -} - -const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) - -checkPath.isNotRelative = isNotRelative -checkPath.convert = p => p - -class Ignore { - constructor ({ - ignorecase = true - } = {}) { - this._rules = [] - this._ignorecase = ignorecase - define(this, KEY_IGNORE, true) - this._initCache() - } - - _initCache () { - this._ignoreCache = Object.create(null) - this._testCache = Object.create(null) - } - - _addPattern (pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules) - this._added = true - return - } - - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignorecase) - this._added = true - this._rules.push(rule) - } - } - - // @param {Array | string | Ignore} pattern - add (pattern) { - this._added = false - - makeArray( - isString(pattern) - ? splitPattern(pattern) - : pattern - ).forEach(this._addPattern, this) - - // Some rules have just added to the ignore, - // making the behavior changed. - if (this._added) { - this._initCache() - } - - return this - } - - // legacy - addPattern (pattern) { - return this.add(pattern) - } - - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - - // @returns {TestResult} true if a file is ignored - _testOne (path, checkUnignored) { - let ignored = false - let unignored = false - - this._rules.forEach(rule => { - const {negative} = rule - if ( - unignored === negative && ignored !== unignored - || negative && !ignored && !unignored && !checkUnignored - ) { - return - } - - const matched = rule.regex.test(path) - - if (matched) { - ignored = !negative - unignored = negative - } - }) - - return { - ignored, - unignored - } - } - - // @returns {TestResult} - _test (originalPath, cache, checkUnignored, slices) { - const path = originalPath - // Supports nullable path - && checkPath.convert(originalPath) - - checkPath(path, originalPath, throwError) - - return this._t(path, cache, checkUnignored, slices) - } - - _t (path, cache, checkUnignored, slices) { - if (path in cache) { - return cache[path] - } - - if (!slices) { - // path/to/a.js - // ['path', 'to', 'a.js'] - slices = path.split(SLASH) - } - - slices.pop() - - // If the path has no parent directory, just test it - if (!slices.length) { - return cache[path] = this._testOne(path, checkUnignored) - } - - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ) - - // If the path contains a parent directory, check the parent first - return cache[path] = parent.ignored - // > It is not possible to re-include a file if a parent directory of - // > that file is excluded. - ? parent - : this._testOne(path, checkUnignored) - } - - ignores (path) { - return this._test(path, this._ignoreCache, false).ignored - } - - createFilter () { - return path => !this.ignores(path) - } - - filter (paths) { - return makeArray(paths).filter(this.createFilter()) - } - - // @returns {TestResult} - test (path) { - return this._test(path, this._testCache, true) - } -} - -const factory = options => new Ignore(options) - -const returnFalse = () => false - -const isPathValid = path => - checkPath(path && checkPath.convert(path), path, returnFalse) - -factory.isPathValid = isPathValid - -// Fixes typescript -factory.default = factory - -module.exports = factory - -// Windows -// -------------------------------------------------------------- -/* istanbul ignore if */ -if ( - // Detect `process` so that it can run in browsers. - typeof process !== 'undefined' - && ( - process.env && process.env.IGNORE_TEST_WIN32 - || process.platform === 'win32' - ) -) { - /* eslint no-control-regex: "off" */ - const makePosix = str => /^\\\\\?\\/.test(str) - || /["<>|\u0000-\u001F]+/u.test(str) - ? str - : str.replace(/\\/g, '/') - - checkPath.convert = makePosix - - // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' - // 'd:\\foo' - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i - checkPath.isNotRelative = path => - REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) - || isNotRelative(path) -} - - -/***/ }), - -/***/ "../../node_modules/imurmurhash/imurmurhash.js": -/***/ (function(module, exports, __webpack_require__) { - -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -(function(){ - var cache; - - // Call this function without `new` to use the cached object (good for - // single-threaded environments), or with `new` to create a new object. - // - // @param {string} key A UTF-16 or ASCII string - // @param {number} seed An optional positive integer - // @return {object} A MurmurHash3 object for incremental hashing - function MurmurHash3(key, seed) { - var m = this instanceof MurmurHash3 ? this : cache; - m.reset(seed) - if (typeof key === 'string' && key.length > 0) { - m.hash(key); - } - - if (m !== this) { - return m; - } - }; - - // Incrementally add a string to this hash - // - // @param {string} key A UTF-16 or ASCII string - // @return {object} this - MurmurHash3.prototype.hash = function(key) { - var h1, k1, i, top, len; - - len = key.length; - this.len += len; - - k1 = this.k1; - i = 0; - switch (this.rem) { - case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; - case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; - case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; - case 3: - k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; - k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; - } - - this.rem = (len + this.rem) & 3; // & 3 is same as % 4 - len -= this.rem; - if (len > 0) { - h1 = this.h1; - while (1) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - - h1 ^= k1; - h1 = (h1 << 13) | (h1 >>> 19); - h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; - - if (i >= len) { - break; - } - - k1 = ((key.charCodeAt(i++) & 0xffff)) ^ - ((key.charCodeAt(i++) & 0xffff) << 8) ^ - ((key.charCodeAt(i++) & 0xffff) << 16); - top = key.charCodeAt(i++); - k1 ^= ((top & 0xff) << 24) ^ - ((top & 0xff00) >> 8); - } - - k1 = 0; - switch (this.rem) { - case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; - case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; - case 1: k1 ^= (key.charCodeAt(i) & 0xffff); - } - - this.h1 = h1; - } - - this.k1 = k1; - return this; - }; - - // Get the result of this hash - // - // @return {number} The 32-bit hash - MurmurHash3.prototype.result = function() { - var k1, h1; - - k1 = this.k1; - h1 = this.h1; - - if (k1 > 0) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - h1 ^= k1; - } - - h1 ^= this.len; - - h1 ^= h1 >>> 16; - h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; - h1 ^= h1 >>> 13; - h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; - h1 ^= h1 >>> 16; - - return h1 >>> 0; - }; - - // Reset the hash object for reuse - // - // @param {number} seed An optional positive integer - MurmurHash3.prototype.reset = function(seed) { - this.h1 = typeof seed === 'number' ? seed : 0; - this.rem = this.k1 = this.len = 0; - return this; - }; - - // A cached object to use. This can be safely used if you're in a single- - // threaded environment, otherwise you need to create new hashes to use. - cache = new MurmurHash3(); - - if (true) { - module.exports = MurmurHash3; - } else {} -}()); - - -/***/ }), - -/***/ "../../node_modules/inflight/inflight.js": -/***/ (function(module, exports, __webpack_require__) { - -var wrappy = __webpack_require__("../../node_modules/wrappy/wrappy.js") -var reqs = Object.create(null) -var once = __webpack_require__("../../node_modules/once/once.js") - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} - - -/***/ }), - -/***/ "../../node_modules/inherits/inherits.js": -/***/ (function(module, exports, __webpack_require__) { - -try { - var util = __webpack_require__("util"); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __webpack_require__("../../node_modules/inherits/inherits_browser.js"); -} - - -/***/ }), - -/***/ "../../node_modules/inherits/inherits_browser.js": -/***/ (function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} - - -/***/ }), - -/***/ "../../node_modules/is-arrayish/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function isArrayish(obj) { - if (!obj) { - return false; - } - - return obj instanceof Array || Array.isArray(obj) || - (obj.length >= 0 && obj.splice instanceof Function); -}; - - -/***/ }), - -/***/ "../../node_modules/is-core-module/core.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"assert\":true,\"node:assert\":[\">= 14.18 && < 15\",\">= 16\"],\"assert/strict\":\">= 15\",\"node:assert/strict\":\">= 16\",\"async_hooks\":\">= 8\",\"node:async_hooks\":[\">= 14.18 && < 15\",\">= 16\"],\"buffer_ieee754\":\">= 0.5 && < 0.9.7\",\"buffer\":true,\"node:buffer\":[\">= 14.18 && < 15\",\">= 16\"],\"child_process\":true,\"node:child_process\":[\">= 14.18 && < 15\",\">= 16\"],\"cluster\":\">= 0.5\",\"node:cluster\":[\">= 14.18 && < 15\",\">= 16\"],\"console\":true,\"node:console\":[\">= 14.18 && < 15\",\">= 16\"],\"constants\":true,\"node:constants\":[\">= 14.18 && < 15\",\">= 16\"],\"crypto\":true,\"node:crypto\":[\">= 14.18 && < 15\",\">= 16\"],\"_debug_agent\":\">= 1 && < 8\",\"_debugger\":\"< 8\",\"dgram\":true,\"node:dgram\":[\">= 14.18 && < 15\",\">= 16\"],\"diagnostics_channel\":[\">= 14.17 && < 15\",\">= 15.1\"],\"node:diagnostics_channel\":[\">= 14.18 && < 15\",\">= 16\"],\"dns\":true,\"node:dns\":[\">= 14.18 && < 15\",\">= 16\"],\"dns/promises\":\">= 15\",\"node:dns/promises\":\">= 16\",\"domain\":\">= 0.7.12\",\"node:domain\":[\">= 14.18 && < 15\",\">= 16\"],\"events\":true,\"node:events\":[\">= 14.18 && < 15\",\">= 16\"],\"freelist\":\"< 6\",\"fs\":true,\"node:fs\":[\">= 14.18 && < 15\",\">= 16\"],\"fs/promises\":[\">= 10 && < 10.1\",\">= 14\"],\"node:fs/promises\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_agent\":\">= 0.11.1\",\"node:_http_agent\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_client\":\">= 0.11.1\",\"node:_http_client\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_common\":\">= 0.11.1\",\"node:_http_common\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_incoming\":\">= 0.11.1\",\"node:_http_incoming\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_outgoing\":\">= 0.11.1\",\"node:_http_outgoing\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_server\":\">= 0.11.1\",\"node:_http_server\":[\">= 14.18 && < 15\",\">= 16\"],\"http\":true,\"node:http\":[\">= 14.18 && < 15\",\">= 16\"],\"http2\":\">= 8.8\",\"node:http2\":[\">= 14.18 && < 15\",\">= 16\"],\"https\":true,\"node:https\":[\">= 14.18 && < 15\",\">= 16\"],\"inspector\":\">= 8\",\"node:inspector\":[\">= 14.18 && < 15\",\">= 16\"],\"_linklist\":\"< 8\",\"module\":true,\"node:module\":[\">= 14.18 && < 15\",\">= 16\"],\"net\":true,\"node:net\":[\">= 14.18 && < 15\",\">= 16\"],\"node-inspect/lib/_inspect\":\">= 7.6 && < 12\",\"node-inspect/lib/internal/inspect_client\":\">= 7.6 && < 12\",\"node-inspect/lib/internal/inspect_repl\":\">= 7.6 && < 12\",\"os\":true,\"node:os\":[\">= 14.18 && < 15\",\">= 16\"],\"path\":true,\"node:path\":[\">= 14.18 && < 15\",\">= 16\"],\"path/posix\":\">= 15.3\",\"node:path/posix\":\">= 16\",\"path/win32\":\">= 15.3\",\"node:path/win32\":\">= 16\",\"perf_hooks\":\">= 8.5\",\"node:perf_hooks\":[\">= 14.18 && < 15\",\">= 16\"],\"process\":\">= 1\",\"node:process\":[\">= 14.18 && < 15\",\">= 16\"],\"punycode\":\">= 0.5\",\"node:punycode\":[\">= 14.18 && < 15\",\">= 16\"],\"querystring\":true,\"node:querystring\":[\">= 14.18 && < 15\",\">= 16\"],\"readline\":true,\"node:readline\":[\">= 14.18 && < 15\",\">= 16\"],\"readline/promises\":\">= 17\",\"node:readline/promises\":\">= 17\",\"repl\":true,\"node:repl\":[\">= 14.18 && < 15\",\">= 16\"],\"smalloc\":\">= 0.11.5 && < 3\",\"_stream_duplex\":\">= 0.9.4\",\"node:_stream_duplex\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_transform\":\">= 0.9.4\",\"node:_stream_transform\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_wrap\":\">= 1.4.1\",\"node:_stream_wrap\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_passthrough\":\">= 0.9.4\",\"node:_stream_passthrough\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_readable\":\">= 0.9.4\",\"node:_stream_readable\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_writable\":\">= 0.9.4\",\"node:_stream_writable\":[\">= 14.18 && < 15\",\">= 16\"],\"stream\":true,\"node:stream\":[\">= 14.18 && < 15\",\">= 16\"],\"stream/consumers\":\">= 16.7\",\"node:stream/consumers\":\">= 16.7\",\"stream/promises\":\">= 15\",\"node:stream/promises\":\">= 16\",\"stream/web\":\">= 16.5\",\"node:stream/web\":\">= 16.5\",\"string_decoder\":true,\"node:string_decoder\":[\">= 14.18 && < 15\",\">= 16\"],\"sys\":[\">= 0.4 && < 0.7\",\">= 0.8\"],\"node:sys\":[\">= 14.18 && < 15\",\">= 16\"],\"timers\":true,\"node:timers\":[\">= 14.18 && < 15\",\">= 16\"],\"timers/promises\":\">= 15\",\"node:timers/promises\":\">= 16\",\"_tls_common\":\">= 0.11.13\",\"node:_tls_common\":[\">= 14.18 && < 15\",\">= 16\"],\"_tls_legacy\":\">= 0.11.3 && < 10\",\"_tls_wrap\":\">= 0.11.3\",\"node:_tls_wrap\":[\">= 14.18 && < 15\",\">= 16\"],\"tls\":true,\"node:tls\":[\">= 14.18 && < 15\",\">= 16\"],\"trace_events\":\">= 10\",\"node:trace_events\":[\">= 14.18 && < 15\",\">= 16\"],\"tty\":true,\"node:tty\":[\">= 14.18 && < 15\",\">= 16\"],\"url\":true,\"node:url\":[\">= 14.18 && < 15\",\">= 16\"],\"util\":true,\"node:util\":[\">= 14.18 && < 15\",\">= 16\"],\"util/types\":\">= 15.3\",\"node:util/types\":\">= 16\",\"v8/tools/arguments\":\">= 10 && < 12\",\"v8/tools/codemap\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/consarray\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/csvparser\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/logreader\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/profile_view\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/splaytree\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8\":\">= 1\",\"node:v8\":[\">= 14.18 && < 15\",\">= 16\"],\"vm\":true,\"node:vm\":[\">= 14.18 && < 15\",\">= 16\"],\"wasi\":\">= 13.4 && < 13.5\",\"worker_threads\":\">= 11.7\",\"node:worker_threads\":[\">= 14.18 && < 15\",\">= 16\"],\"zlib\":\">= 0.5\",\"node:zlib\":[\">= 14.18 && < 15\",\">= 16\"]}"); - -/***/ }), - -/***/ "../../node_modules/is-core-module/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__("../../node_modules/has/src/index.js"); - -function specifierIncluded(current, specifier) { - var nodeParts = current.split('.'); - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = parseInt(nodeParts[i] || 0, 10); - var ver = parseInt(versionParts[i] || 0, 10); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } - if (op === '>=') { - return cur >= ver; - } - return false; - } - return op === '>='; -} - -function matchesRange(current, range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { - return false; - } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(current, specifiers[i])) { - return false; - } - } - return true; -} - -function versionIncluded(nodeVersion, specifierValue) { - if (typeof specifierValue === 'boolean') { - return specifierValue; - } - - var current = typeof nodeVersion === 'undefined' - ? process.versions && process.versions.node - : nodeVersion; - - if (typeof current !== 'string') { - throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); - } - - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(current, specifierValue[i])) { - return true; - } - } - return false; - } - return matchesRange(current, specifierValue); -} - -var data = __webpack_require__("../../node_modules/is-core-module/core.json"); - -module.exports = function isCore(x, nodeVersion) { - return has(data, x) && versionIncluded(nodeVersion, data[x]); -}; - - -/***/ }), - -/***/ "../../node_modules/is-extglob/index.js": -/***/ (function(module, exports) { - -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; - - -/***/ }), - -/***/ "../../node_modules/is-glob/index.js": -/***/ (function(module, exports, __webpack_require__) { - -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = __webpack_require__("../../node_modules/is-extglob/index.js"); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; - - -/***/ }), - -/***/ "../../node_modules/is-interactive/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = ({stream = process.stdout} = {}) => { - return Boolean( - stream && stream.isTTY && - process.env.TERM !== 'dumb' && - !('CI' in process.env) - ); -}; - - -/***/ }), - -/***/ "../../node_modules/is-path-cwd/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); - -module.exports = path_ => { - let cwd = process.cwd(); - - path_ = path.resolve(path_); - - if (process.platform === 'win32') { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - - return path_ === cwd; -}; - - -/***/ }), - -/***/ "../../node_modules/is-path-inside/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); - -module.exports = (childPath, parentPath) => { - childPath = path.resolve(childPath); - parentPath = path.resolve(parentPath); - - if (process.platform === 'win32') { - childPath = childPath.toLowerCase(); - parentPath = parentPath.toLowerCase(); - } - - if (childPath === parentPath) { - return false; - } - - childPath += path.sep; - parentPath += path.sep; - - return childPath.startsWith(parentPath); -}; - - -/***/ }), - -/***/ "../../node_modules/is-plain-obj/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = value => { - if (Object.prototype.toString.call(value) !== '[object Object]') { - return false; - } - - const prototype = Object.getPrototypeOf(value); - return prototype === null || prototype === Object.prototype; -}; - - -/***/ }), - -/***/ "../../node_modules/is-stream/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; - -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; - -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); - -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function' && - typeof stream._transformState === 'object'; - -module.exports = isStream; - - -/***/ }), - -/***/ "../../node_modules/isexe/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__("fs") -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __webpack_require__("../../node_modules/isexe/windows.js") -} else { - core = __webpack_require__("../../node_modules/isexe/mode.js") -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} - - -/***/ }), - -/***/ "../../node_modules/isexe/mode.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = isexe -isexe.sync = sync - -var fs = __webpack_require__("fs") - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} - - -/***/ }), - -/***/ "../../node_modules/isexe/windows.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = isexe -isexe.sync = sync - -var fs = __webpack_require__("fs") - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} - - -/***/ }), - -/***/ "../../node_modules/json-parse-better-errors/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = parseJson -function parseJson (txt, reviver, context) { - context = context || 20 - try { - return JSON.parse(txt, reviver) - } catch (e) { - if (typeof txt !== 'string') { - const isEmptyArray = Array.isArray(txt) && txt.length === 0 - const errorMessage = 'Cannot parse ' + - (isEmptyArray ? 'an empty array' : String(txt)) - throw new TypeError(errorMessage) - } - const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) - const errIdx = syntaxErr - ? +syntaxErr[1] - : e.message.match(/^Unexpected end of JSON.*/i) - ? txt.length - 1 - : null - if (errIdx != null) { - const start = errIdx <= context - ? 0 - : errIdx - context - const end = errIdx + context >= txt.length - ? txt.length - : errIdx + context - e.message += ` while parsing near '${ - start === 0 ? '' : '...' - }${txt.slice(start, end)}${ - end === txt.length ? '' : '...' - }'` - } else { - e.message += ` while parsing '${txt.slice(0, context * 2)}'` - } - throw e - } -} - - -/***/ }), - -/***/ "../../node_modules/lines-and-columns/dist/index.mjs": -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var LF = '\n'; -var CR = '\r'; -var LinesAndColumns = (function () { - function LinesAndColumns(string) { - this.string = string; - var offsets = [0]; - for (var offset = 0; offset < string.length;) { - switch (string[offset]) { - case LF: - offset += LF.length; - offsets.push(offset); - break; - case CR: - offset += CR.length; - if (string[offset] === LF) { - offset += LF.length; - } - offsets.push(offset); - break; - default: - offset++; - break; - } - } - this.offsets = offsets; - } - LinesAndColumns.prototype.locationForIndex = function (index) { - if (index < 0 || index > this.string.length) { - return null; - } - var line = 0; - var offsets = this.offsets; - while (offsets[line + 1] <= index) { - line++; - } - var column = index - offsets[line]; - return { line: line, column: column }; - }; - LinesAndColumns.prototype.indexForLocation = function (location) { - var line = location.line, column = location.column; - if (line < 0 || line >= this.offsets.length) { - return null; - } - if (column < 0 || column > this.lengthOfLine(line)) { - return null; - } - return this.offsets[line] + column; - }; - LinesAndColumns.prototype.lengthOfLine = function (line) { - var offset = this.offsets[line]; - var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]; - return nextOffset - offset; - }; - return LinesAndColumns; -}()); -/* harmony default export */ __webpack_exports__["default"] = (LinesAndColumns); - - -/***/ }), - -/***/ "../../node_modules/load-json-file/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const {promisify} = __webpack_require__("util"); -const fs = __webpack_require__("../../node_modules/graceful-fs/graceful-fs.js"); -const stripBom = __webpack_require__("../../node_modules/strip-bom/index.js"); -const parseJson = __webpack_require__("../../node_modules/parse-json/index.js"); - -const parse = (data, filePath, options = {}) => { - data = stripBom(data); - - if (typeof options.beforeParse === 'function') { - data = options.beforeParse(data); - } - - return parseJson(data, options.reviver, path.relative(process.cwd(), filePath)); -}; - -module.exports = async (filePath, options) => parse(await promisify(fs.readFile)(filePath, 'utf8'), filePath, options); -module.exports.sync = (filePath, options) => parse(fs.readFileSync(filePath, 'utf8'), filePath, options); - - -/***/ }), - -/***/ "../../node_modules/merge-stream/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const { PassThrough } = __webpack_require__("stream"); - -module.exports = function (/*streams...*/) { - var sources = [] - var output = new PassThrough({objectMode: true}) - - output.setMaxListeners(0) - - output.add = add - output.isEmpty = isEmpty - - output.on('unpipe', remove) - - Array.prototype.slice.call(arguments).forEach(add) - - return output - - function add (source) { - if (Array.isArray(source)) { - source.forEach(add) - return this - } - - sources.push(source); - source.once('end', remove.bind(null, source)) - source.once('error', output.emit.bind(output, 'error')) - source.pipe(output, {end: false}) - return this - } - - function isEmpty () { - return sources.length == 0; - } - - function remove (source) { - sources = sources.filter(function (it) { return it !== source }) - if (!sources.length && output.readable) { output.end() } - } -} - - -/***/ }), - -/***/ "../../node_modules/merge2/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* - * merge2 - * https://github.com/teambition/merge2 - * - * Copyright (c) 2014-2020 Teambition - * Licensed under the MIT license. - */ -const Stream = __webpack_require__("stream") -const PassThrough = Stream.PassThrough -const slice = Array.prototype.slice - -module.exports = merge2 - -function merge2 () { - const streamsQueue = [] - const args = slice.call(arguments) - let merging = false - let options = args[args.length - 1] - - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop() - } else { - options = {} - } - - const doEnd = options.end !== false - const doPipeError = options.pipeError === true - if (options.objectMode == null) { - options.objectMode = true - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024 - } - const mergedStream = PassThrough(options) - - function addStream () { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)) - } - mergeStream() - return this - } - - function mergeStream () { - if (merging) { - return - } - merging = true - - let streams = streamsQueue.shift() - if (!streams) { - process.nextTick(endStream) - return - } - if (!Array.isArray(streams)) { - streams = [streams] - } - - let pipesCount = streams.length + 1 - - function next () { - if (--pipesCount > 0) { - return - } - merging = false - mergeStream() - } - - function pipe (stream) { - function onend () { - stream.removeListener('merge2UnpipeEnd', onend) - stream.removeListener('end', onend) - if (doPipeError) { - stream.removeListener('error', onerror) - } - next() - } - function onerror (err) { - mergedStream.emit('error', err) - } - // skip ended stream - if (stream._readableState.endEmitted) { - return next() - } - - stream.on('merge2UnpipeEnd', onend) - stream.on('end', onend) - - if (doPipeError) { - stream.on('error', onerror) - } - - stream.pipe(mergedStream, { end: false }) - // compatible for old stream - stream.resume() - } - - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]) - } - - next() - } - - function endStream () { - merging = false - // emit 'queueDrain' when all streams merged. - mergedStream.emit('queueDrain') - if (doEnd) { - mergedStream.end() - } - } - - mergedStream.setMaxListeners(0) - mergedStream.add = addStream - mergedStream.on('unpipe', function (stream) { - stream.emit('merge2UnpipeEnd') - }) - - if (args.length) { - addStream.apply(null, args) - } - return mergedStream -} - -// check and pause streams for pipe. -function pauseStreams (streams, options) { - if (!Array.isArray(streams)) { - // Backwards-compat with old-style streams - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)) - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error('Only readable stream can be merged.') - } - streams.pause() - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options) - } - } - return streams -} - - -/***/ }), - -/***/ "../../node_modules/mime-db/db.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"application/3gpdash-qoe-report+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/3gpp-ims+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/a2l\":{\"source\":\"iana\"},\"application/activemessage\":{\"source\":\"iana\"},\"application/activity+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-directory+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcost+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcostparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointprop+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointpropparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-error+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamcontrol+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/aml\":{\"source\":\"iana\"},\"application/andrew-inset\":{\"source\":\"iana\",\"extensions\":[\"ez\"]},\"application/applefile\":{\"source\":\"iana\"},\"application/applixware\":{\"source\":\"apache\",\"extensions\":[\"aw\"]},\"application/atf\":{\"source\":\"iana\"},\"application/atfx\":{\"source\":\"iana\"},\"application/atom+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atom\"]},\"application/atomcat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomcat\"]},\"application/atomdeleted+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomdeleted\"]},\"application/atomicmail\":{\"source\":\"iana\"},\"application/atomsvc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomsvc\"]},\"application/atsc-dwd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dwd\"]},\"application/atsc-dynamic-event-message\":{\"source\":\"iana\"},\"application/atsc-held+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"held\"]},\"application/atsc-rdt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/atsc-rsat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsat\"]},\"application/atxml\":{\"source\":\"iana\"},\"application/auth-policy+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/bacnet-xdd+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/batch-smtp\":{\"source\":\"iana\"},\"application/bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/beep+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/calendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/calendar+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xcs\"]},\"application/call-completion\":{\"source\":\"iana\"},\"application/cals-1840\":{\"source\":\"iana\"},\"application/cap+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/cbor\":{\"source\":\"iana\"},\"application/cbor-seq\":{\"source\":\"iana\"},\"application/cccex\":{\"source\":\"iana\"},\"application/ccmp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ccxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ccxml\"]},\"application/cdfx+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdfx\"]},\"application/cdmi-capability\":{\"source\":\"iana\",\"extensions\":[\"cdmia\"]},\"application/cdmi-container\":{\"source\":\"iana\",\"extensions\":[\"cdmic\"]},\"application/cdmi-domain\":{\"source\":\"iana\",\"extensions\":[\"cdmid\"]},\"application/cdmi-object\":{\"source\":\"iana\",\"extensions\":[\"cdmio\"]},\"application/cdmi-queue\":{\"source\":\"iana\",\"extensions\":[\"cdmiq\"]},\"application/cdni\":{\"source\":\"iana\"},\"application/cea\":{\"source\":\"iana\"},\"application/cea-2018+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cellml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cfw\":{\"source\":\"iana\"},\"application/clue+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/clue_info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cms\":{\"source\":\"iana\"},\"application/cnrp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-group+json\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-payload\":{\"source\":\"iana\"},\"application/commonground\":{\"source\":\"iana\"},\"application/conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cose\":{\"source\":\"iana\"},\"application/cose-key\":{\"source\":\"iana\"},\"application/cose-key-set\":{\"source\":\"iana\"},\"application/cpl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csrattrs\":{\"source\":\"iana\"},\"application/csta+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cstadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csvm+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cu-seeme\":{\"source\":\"apache\",\"extensions\":[\"cu\"]},\"application/cwt\":{\"source\":\"iana\"},\"application/cybercash\":{\"source\":\"iana\"},\"application/dart\":{\"compressible\":true},\"application/dash+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpd\"]},\"application/dashdelta\":{\"source\":\"iana\"},\"application/davmount+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"davmount\"]},\"application/dca-rft\":{\"source\":\"iana\"},\"application/dcd\":{\"source\":\"iana\"},\"application/dec-dx\":{\"source\":\"iana\"},\"application/dialog-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom\":{\"source\":\"iana\"},\"application/dicom+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dii\":{\"source\":\"iana\"},\"application/dit\":{\"source\":\"iana\"},\"application/dns\":{\"source\":\"iana\"},\"application/dns+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dns-message\":{\"source\":\"iana\"},\"application/docbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dbk\"]},\"application/dots+cbor\":{\"source\":\"iana\"},\"application/dskpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dssc+der\":{\"source\":\"iana\",\"extensions\":[\"dssc\"]},\"application/dssc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdssc\"]},\"application/dvcs\":{\"source\":\"iana\"},\"application/ecmascript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ecma\",\"es\"]},\"application/edi-consent\":{\"source\":\"iana\"},\"application/edi-x12\":{\"source\":\"iana\",\"compressible\":false},\"application/edifact\":{\"source\":\"iana\",\"compressible\":false},\"application/efi\":{\"source\":\"iana\"},\"application/emergencycalldata.comment+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.deviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.ecall.msd\":{\"source\":\"iana\"},\"application/emergencycalldata.providerinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.serviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.subscriberinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.veds+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emma+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emma\"]},\"application/emotionml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emotionml\"]},\"application/encaprtp\":{\"source\":\"iana\"},\"application/epp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/epub+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"epub\"]},\"application/eshop\":{\"source\":\"iana\"},\"application/exi\":{\"source\":\"iana\",\"extensions\":[\"exi\"]},\"application/expect-ct-report+json\":{\"source\":\"iana\",\"compressible\":true},\"application/fastinfoset\":{\"source\":\"iana\"},\"application/fastsoap\":{\"source\":\"iana\"},\"application/fdt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fdt\"]},\"application/fhir+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fhir+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fido.trusted-apps+json\":{\"compressible\":true},\"application/fits\":{\"source\":\"iana\"},\"application/flexfec\":{\"source\":\"iana\"},\"application/font-sfnt\":{\"source\":\"iana\"},\"application/font-tdpfr\":{\"source\":\"iana\",\"extensions\":[\"pfr\"]},\"application/font-woff\":{\"source\":\"iana\",\"compressible\":false},\"application/framework-attributes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/geo+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"geojson\"]},\"application/geo+json-seq\":{\"source\":\"iana\"},\"application/geopackage+sqlite3\":{\"source\":\"iana\"},\"application/geoxacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/gltf-buffer\":{\"source\":\"iana\"},\"application/gml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gml\"]},\"application/gpx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"gpx\"]},\"application/gxf\":{\"source\":\"apache\",\"extensions\":[\"gxf\"]},\"application/gzip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gz\"]},\"application/h224\":{\"source\":\"iana\"},\"application/held+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/hjson\":{\"extensions\":[\"hjson\"]},\"application/http\":{\"source\":\"iana\"},\"application/hyperstudio\":{\"source\":\"iana\",\"extensions\":[\"stk\"]},\"application/ibe-key-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pkg-reply+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pp-data\":{\"source\":\"iana\"},\"application/iges\":{\"source\":\"iana\"},\"application/im-iscomposing+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/index\":{\"source\":\"iana\"},\"application/index.cmd\":{\"source\":\"iana\"},\"application/index.obj\":{\"source\":\"iana\"},\"application/index.response\":{\"source\":\"iana\"},\"application/index.vnd\":{\"source\":\"iana\"},\"application/inkml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ink\",\"inkml\"]},\"application/iotp\":{\"source\":\"iana\"},\"application/ipfix\":{\"source\":\"iana\",\"extensions\":[\"ipfix\"]},\"application/ipp\":{\"source\":\"iana\"},\"application/isup\":{\"source\":\"iana\"},\"application/its+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"its\"]},\"application/java-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jar\",\"war\",\"ear\"]},\"application/java-serialized-object\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"ser\"]},\"application/java-vm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"class\"]},\"application/javascript\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"js\",\"mjs\"]},\"application/jf2feed+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jose\":{\"source\":\"iana\"},\"application/jose+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jrd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"json\",\"map\"]},\"application/json-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json-seq\":{\"source\":\"iana\"},\"application/json5\":{\"extensions\":[\"json5\"]},\"application/jsonml+json\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"jsonml\"]},\"application/jwk+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwk-set+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwt\":{\"source\":\"iana\"},\"application/kpml-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/kpml-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ld+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"jsonld\"]},\"application/lgr+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lgr\"]},\"application/link-format\":{\"source\":\"iana\"},\"application/load-control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lost+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lostxml\"]},\"application/lostsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lpf+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/lxf\":{\"source\":\"iana\"},\"application/mac-binhex40\":{\"source\":\"iana\",\"extensions\":[\"hqx\"]},\"application/mac-compactpro\":{\"source\":\"apache\",\"extensions\":[\"cpt\"]},\"application/macwriteii\":{\"source\":\"iana\"},\"application/mads+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mads\"]},\"application/manifest+json\":{\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"webmanifest\"]},\"application/marc\":{\"source\":\"iana\",\"extensions\":[\"mrc\"]},\"application/marcxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mrcx\"]},\"application/mathematica\":{\"source\":\"iana\",\"extensions\":[\"ma\",\"nb\",\"mb\"]},\"application/mathml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mathml\"]},\"application/mathml-content+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mathml-presentation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-associated-procedure-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-deregister+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-envelope+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-protection-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-reception-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-schedule+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-user-service-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbox\":{\"source\":\"iana\",\"extensions\":[\"mbox\"]},\"application/media-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/media_control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mediaservercontrol+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mscml\"]},\"application/merge-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/metalink+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"metalink\"]},\"application/metalink4+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"meta4\"]},\"application/mets+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mets\"]},\"application/mf4\":{\"source\":\"iana\"},\"application/mikey\":{\"source\":\"iana\"},\"application/mipc\":{\"source\":\"iana\"},\"application/mmt-aei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"maei\"]},\"application/mmt-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musd\"]},\"application/mods+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mods\"]},\"application/moss-keys\":{\"source\":\"iana\"},\"application/moss-signature\":{\"source\":\"iana\"},\"application/mosskey-data\":{\"source\":\"iana\"},\"application/mosskey-request\":{\"source\":\"iana\"},\"application/mp21\":{\"source\":\"iana\",\"extensions\":[\"m21\",\"mp21\"]},\"application/mp4\":{\"source\":\"iana\",\"extensions\":[\"mp4s\",\"m4p\"]},\"application/mpeg4-generic\":{\"source\":\"iana\"},\"application/mpeg4-iod\":{\"source\":\"iana\"},\"application/mpeg4-iod-xmt\":{\"source\":\"iana\"},\"application/mrb-consumer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/mrb-publish+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/msc-ivr+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msc-mixer+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msword\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"doc\",\"dot\"]},\"application/mud+json\":{\"source\":\"iana\",\"compressible\":true},\"application/multipart-core\":{\"source\":\"iana\"},\"application/mxf\":{\"source\":\"iana\",\"extensions\":[\"mxf\"]},\"application/n-quads\":{\"source\":\"iana\",\"extensions\":[\"nq\"]},\"application/n-triples\":{\"source\":\"iana\",\"extensions\":[\"nt\"]},\"application/nasdata\":{\"source\":\"iana\"},\"application/news-checkgroups\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-groupinfo\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-transmission\":{\"source\":\"iana\"},\"application/nlsml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/node\":{\"source\":\"iana\",\"extensions\":[\"cjs\"]},\"application/nss\":{\"source\":\"iana\"},\"application/ocsp-request\":{\"source\":\"iana\"},\"application/ocsp-response\":{\"source\":\"iana\"},\"application/octet-stream\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"]},\"application/oda\":{\"source\":\"iana\",\"extensions\":[\"oda\"]},\"application/odm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/odx\":{\"source\":\"iana\"},\"application/oebps-package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"opf\"]},\"application/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogx\"]},\"application/omdoc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"omdoc\"]},\"application/onenote\":{\"source\":\"apache\",\"extensions\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"]},\"application/oscore\":{\"source\":\"iana\"},\"application/oxps\":{\"source\":\"iana\",\"extensions\":[\"oxps\"]},\"application/p2p-overlay+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"relo\"]},\"application/parityfec\":{\"source\":\"iana\"},\"application/passport\":{\"source\":\"iana\"},\"application/patch-ops-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/pdf\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pdf\"]},\"application/pdx\":{\"source\":\"iana\"},\"application/pem-certificate-chain\":{\"source\":\"iana\"},\"application/pgp-encrypted\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pgp\"]},\"application/pgp-keys\":{\"source\":\"iana\"},\"application/pgp-signature\":{\"source\":\"iana\",\"extensions\":[\"asc\",\"sig\"]},\"application/pics-rules\":{\"source\":\"apache\",\"extensions\":[\"prf\"]},\"application/pidf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pidf-diff+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pkcs10\":{\"source\":\"iana\",\"extensions\":[\"p10\"]},\"application/pkcs12\":{\"source\":\"iana\"},\"application/pkcs7-mime\":{\"source\":\"iana\",\"extensions\":[\"p7m\",\"p7c\"]},\"application/pkcs7-signature\":{\"source\":\"iana\",\"extensions\":[\"p7s\"]},\"application/pkcs8\":{\"source\":\"iana\",\"extensions\":[\"p8\"]},\"application/pkcs8-encrypted\":{\"source\":\"iana\"},\"application/pkix-attr-cert\":{\"source\":\"iana\",\"extensions\":[\"ac\"]},\"application/pkix-cert\":{\"source\":\"iana\",\"extensions\":[\"cer\"]},\"application/pkix-crl\":{\"source\":\"iana\",\"extensions\":[\"crl\"]},\"application/pkix-pkipath\":{\"source\":\"iana\",\"extensions\":[\"pkipath\"]},\"application/pkixcmp\":{\"source\":\"iana\",\"extensions\":[\"pki\"]},\"application/pls+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pls\"]},\"application/poc-settings+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/postscript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ai\",\"eps\",\"ps\"]},\"application/ppsp-tracker+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/provenance+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"provx\"]},\"application/prs.alvestrand.titrax-sheet\":{\"source\":\"iana\"},\"application/prs.cww\":{\"source\":\"iana\",\"extensions\":[\"cww\"]},\"application/prs.hpub+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/prs.nprend\":{\"source\":\"iana\"},\"application/prs.plucker\":{\"source\":\"iana\"},\"application/prs.rdf-xml-crypt\":{\"source\":\"iana\"},\"application/prs.xsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/pskc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pskcxml\"]},\"application/pvd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/qsig\":{\"source\":\"iana\"},\"application/raml+yaml\":{\"compressible\":true,\"extensions\":[\"raml\"]},\"application/raptorfec\":{\"source\":\"iana\"},\"application/rdap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/rdf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rdf\",\"owl\"]},\"application/reginfo+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rif\"]},\"application/relax-ng-compact-syntax\":{\"source\":\"iana\",\"extensions\":[\"rnc\"]},\"application/remote-printing\":{\"source\":\"iana\"},\"application/reputon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/resource-lists+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rl\"]},\"application/resource-lists-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rld\"]},\"application/rfc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/riscos\":{\"source\":\"iana\"},\"application/rlmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/rls-services+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rs\"]},\"application/route-apd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rapd\"]},\"application/route-s-tsid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sls\"]},\"application/route-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rusd\"]},\"application/rpki-ghostbusters\":{\"source\":\"iana\",\"extensions\":[\"gbr\"]},\"application/rpki-manifest\":{\"source\":\"iana\",\"extensions\":[\"mft\"]},\"application/rpki-publication\":{\"source\":\"iana\"},\"application/rpki-roa\":{\"source\":\"iana\",\"extensions\":[\"roa\"]},\"application/rpki-updown\":{\"source\":\"iana\"},\"application/rsd+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rsd\"]},\"application/rss+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rss\"]},\"application/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"application/rtploopback\":{\"source\":\"iana\"},\"application/rtx\":{\"source\":\"iana\"},\"application/samlassertion+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/samlmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sbe\":{\"source\":\"iana\"},\"application/sbml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sbml\"]},\"application/scaip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/scim+json\":{\"source\":\"iana\",\"compressible\":true},\"application/scvp-cv-request\":{\"source\":\"iana\",\"extensions\":[\"scq\"]},\"application/scvp-cv-response\":{\"source\":\"iana\",\"extensions\":[\"scs\"]},\"application/scvp-vp-request\":{\"source\":\"iana\",\"extensions\":[\"spq\"]},\"application/scvp-vp-response\":{\"source\":\"iana\",\"extensions\":[\"spp\"]},\"application/sdp\":{\"source\":\"iana\",\"extensions\":[\"sdp\"]},\"application/secevent+jwt\":{\"source\":\"iana\"},\"application/senml+cbor\":{\"source\":\"iana\"},\"application/senml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"senmlx\"]},\"application/senml-etch+cbor\":{\"source\":\"iana\"},\"application/senml-etch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml-exi\":{\"source\":\"iana\"},\"application/sensml+cbor\":{\"source\":\"iana\"},\"application/sensml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sensml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sensmlx\"]},\"application/sensml-exi\":{\"source\":\"iana\"},\"application/sep+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sep-exi\":{\"source\":\"iana\"},\"application/session-info\":{\"source\":\"iana\"},\"application/set-payment\":{\"source\":\"iana\"},\"application/set-payment-initiation\":{\"source\":\"iana\",\"extensions\":[\"setpay\"]},\"application/set-registration\":{\"source\":\"iana\"},\"application/set-registration-initiation\":{\"source\":\"iana\",\"extensions\":[\"setreg\"]},\"application/sgml\":{\"source\":\"iana\"},\"application/sgml-open-catalog\":{\"source\":\"iana\"},\"application/shf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"shf\"]},\"application/sieve\":{\"source\":\"iana\",\"extensions\":[\"siv\",\"sieve\"]},\"application/simple-filter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/simple-message-summary\":{\"source\":\"iana\"},\"application/simplesymbolcontainer\":{\"source\":\"iana\"},\"application/sipc\":{\"source\":\"iana\"},\"application/slate\":{\"source\":\"iana\"},\"application/smil\":{\"source\":\"iana\"},\"application/smil+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"smi\",\"smil\"]},\"application/smpte336m\":{\"source\":\"iana\"},\"application/soap+fastinfoset\":{\"source\":\"iana\"},\"application/soap+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sparql-query\":{\"source\":\"iana\",\"extensions\":[\"rq\"]},\"application/sparql-results+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"srx\"]},\"application/spirits-event+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sql\":{\"source\":\"iana\"},\"application/srgs\":{\"source\":\"iana\",\"extensions\":[\"gram\"]},\"application/srgs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"grxml\"]},\"application/sru+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sru\"]},\"application/ssdl+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ssdl\"]},\"application/ssml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ssml\"]},\"application/stix+json\":{\"source\":\"iana\",\"compressible\":true},\"application/swid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"swidtag\"]},\"application/tamp-apex-update\":{\"source\":\"iana\"},\"application/tamp-apex-update-confirm\":{\"source\":\"iana\"},\"application/tamp-community-update\":{\"source\":\"iana\"},\"application/tamp-community-update-confirm\":{\"source\":\"iana\"},\"application/tamp-error\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust-confirm\":{\"source\":\"iana\"},\"application/tamp-status-query\":{\"source\":\"iana\"},\"application/tamp-status-response\":{\"source\":\"iana\"},\"application/tamp-update\":{\"source\":\"iana\"},\"application/tamp-update-confirm\":{\"source\":\"iana\"},\"application/tar\":{\"compressible\":true},\"application/taxii+json\":{\"source\":\"iana\",\"compressible\":true},\"application/td+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tei\",\"teicorpus\"]},\"application/tetra_isi\":{\"source\":\"iana\"},\"application/thraud+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tfi\"]},\"application/timestamp-query\":{\"source\":\"iana\"},\"application/timestamp-reply\":{\"source\":\"iana\"},\"application/timestamped-data\":{\"source\":\"iana\",\"extensions\":[\"tsd\"]},\"application/tlsrpt+gzip\":{\"source\":\"iana\"},\"application/tlsrpt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tnauthlist\":{\"source\":\"iana\"},\"application/toml\":{\"compressible\":true,\"extensions\":[\"toml\"]},\"application/trickle-ice-sdpfrag\":{\"source\":\"iana\"},\"application/trig\":{\"source\":\"iana\"},\"application/ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttml\"]},\"application/tve-trigger\":{\"source\":\"iana\"},\"application/tzif\":{\"source\":\"iana\"},\"application/tzif-leap\":{\"source\":\"iana\"},\"application/ulpfec\":{\"source\":\"iana\"},\"application/urc-grpsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-ressheet+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsheet\"]},\"application/urc-targetdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-uisocketdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vemmi\":{\"source\":\"iana\"},\"application/vividence.scriptfile\":{\"source\":\"apache\"},\"application/vnd.1000minds.decision-model+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"1km\"]},\"application/vnd.3gpp-prose+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-prose-pc3ch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-v2x-local-service-information\":{\"source\":\"iana\"},\"application/vnd.3gpp.access-transfer-events+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.bsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gmop+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mc-signalling-ear\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-payload\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-signalling\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-floor-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-signed+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-init-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-transmission-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mid-call+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.pic-bw-large\":{\"source\":\"iana\",\"extensions\":[\"plb\"]},\"application/vnd.3gpp.pic-bw-small\":{\"source\":\"iana\",\"extensions\":[\"psb\"]},\"application/vnd.3gpp.pic-bw-var\":{\"source\":\"iana\",\"extensions\":[\"pvb\"]},\"application/vnd.3gpp.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-ext+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.state-and-event-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ussd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.bcmcsinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp2.tcap\":{\"source\":\"iana\",\"extensions\":[\"tcap\"]},\"application/vnd.3lightssoftware.imagescal\":{\"source\":\"iana\"},\"application/vnd.3m.post-it-notes\":{\"source\":\"iana\",\"extensions\":[\"pwn\"]},\"application/vnd.accpac.simply.aso\":{\"source\":\"iana\",\"extensions\":[\"aso\"]},\"application/vnd.accpac.simply.imp\":{\"source\":\"iana\",\"extensions\":[\"imp\"]},\"application/vnd.acucobol\":{\"source\":\"iana\",\"extensions\":[\"acu\"]},\"application/vnd.acucorp\":{\"source\":\"iana\",\"extensions\":[\"atc\",\"acutc\"]},\"application/vnd.adobe.air-application-installer-package+zip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"air\"]},\"application/vnd.adobe.flash.movie\":{\"source\":\"iana\"},\"application/vnd.adobe.formscentral.fcdt\":{\"source\":\"iana\",\"extensions\":[\"fcdt\"]},\"application/vnd.adobe.fxp\":{\"source\":\"iana\",\"extensions\":[\"fxp\",\"fxpl\"]},\"application/vnd.adobe.partial-upload\":{\"source\":\"iana\"},\"application/vnd.adobe.xdp+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdp\"]},\"application/vnd.adobe.xfdf\":{\"source\":\"iana\",\"extensions\":[\"xfdf\"]},\"application/vnd.aether.imp\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata-pagedef\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-charset\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codedfont\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codepage\":{\"source\":\"iana\"},\"application/vnd.afpc.modca\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-formdef\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-mediummap\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-objectcontainer\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-overlay\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-pagesegment\":{\"source\":\"iana\"},\"application/vnd.ah-barcode\":{\"source\":\"iana\"},\"application/vnd.ahead.space\":{\"source\":\"iana\",\"extensions\":[\"ahead\"]},\"application/vnd.airzip.filesecure.azf\":{\"source\":\"iana\",\"extensions\":[\"azf\"]},\"application/vnd.airzip.filesecure.azs\":{\"source\":\"iana\",\"extensions\":[\"azs\"]},\"application/vnd.amadeus+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.amazon.ebook\":{\"source\":\"apache\",\"extensions\":[\"azw\"]},\"application/vnd.amazon.mobi8-ebook\":{\"source\":\"iana\"},\"application/vnd.americandynamics.acc\":{\"source\":\"iana\",\"extensions\":[\"acc\"]},\"application/vnd.amiga.ami\":{\"source\":\"iana\",\"extensions\":[\"ami\"]},\"application/vnd.amundsen.maze+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.android.ota\":{\"source\":\"iana\"},\"application/vnd.android.package-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"apk\"]},\"application/vnd.anki\":{\"source\":\"iana\"},\"application/vnd.anser-web-certificate-issue-initiation\":{\"source\":\"iana\",\"extensions\":[\"cii\"]},\"application/vnd.anser-web-funds-transfer-initiation\":{\"source\":\"apache\",\"extensions\":[\"fti\"]},\"application/vnd.antix.game-component\":{\"source\":\"iana\",\"extensions\":[\"atx\"]},\"application/vnd.apache.thrift.binary\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.compact\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.json\":{\"source\":\"iana\"},\"application/vnd.api+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.aplextor.warrp+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apothekende.reservation+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apple.installer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpkg\"]},\"application/vnd.apple.keynote\":{\"source\":\"iana\",\"extensions\":[\"keynote\"]},\"application/vnd.apple.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"m3u8\"]},\"application/vnd.apple.numbers\":{\"source\":\"iana\",\"extensions\":[\"numbers\"]},\"application/vnd.apple.pages\":{\"source\":\"iana\",\"extensions\":[\"pages\"]},\"application/vnd.apple.pkpass\":{\"compressible\":false,\"extensions\":[\"pkpass\"]},\"application/vnd.arastra.swi\":{\"source\":\"iana\"},\"application/vnd.aristanetworks.swi\":{\"source\":\"iana\",\"extensions\":[\"swi\"]},\"application/vnd.artisan+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.artsquare\":{\"source\":\"iana\"},\"application/vnd.astraea-software.iota\":{\"source\":\"iana\",\"extensions\":[\"iota\"]},\"application/vnd.audiograph\":{\"source\":\"iana\",\"extensions\":[\"aep\"]},\"application/vnd.autopackage\":{\"source\":\"iana\"},\"application/vnd.avalon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.avistar+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.balsamiq.bmml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmml\"]},\"application/vnd.balsamiq.bmpr\":{\"source\":\"iana\"},\"application/vnd.banana-accounting\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.error\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bekitzur-stech+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bint.med-content\":{\"source\":\"iana\"},\"application/vnd.biopax.rdf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.blink-idb-value-wrapper\":{\"source\":\"iana\"},\"application/vnd.blueice.multipass\":{\"source\":\"iana\",\"extensions\":[\"mpm\"]},\"application/vnd.bluetooth.ep.oob\":{\"source\":\"iana\"},\"application/vnd.bluetooth.le.oob\":{\"source\":\"iana\"},\"application/vnd.bmi\":{\"source\":\"iana\",\"extensions\":[\"bmi\"]},\"application/vnd.bpf\":{\"source\":\"iana\"},\"application/vnd.bpf3\":{\"source\":\"iana\"},\"application/vnd.businessobjects\":{\"source\":\"iana\",\"extensions\":[\"rep\"]},\"application/vnd.byu.uapi+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cab-jscript\":{\"source\":\"iana\"},\"application/vnd.canon-cpdl\":{\"source\":\"iana\"},\"application/vnd.canon-lips\":{\"source\":\"iana\"},\"application/vnd.capasystems-pg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cendio.thinlinc.clientconf\":{\"source\":\"iana\"},\"application/vnd.century-systems.tcp_stream\":{\"source\":\"iana\"},\"application/vnd.chemdraw+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdxml\"]},\"application/vnd.chess-pgn\":{\"source\":\"iana\"},\"application/vnd.chipnuts.karaoke-mmd\":{\"source\":\"iana\",\"extensions\":[\"mmd\"]},\"application/vnd.ciedi\":{\"source\":\"iana\"},\"application/vnd.cinderella\":{\"source\":\"iana\",\"extensions\":[\"cdy\"]},\"application/vnd.cirpack.isdn-ext\":{\"source\":\"iana\"},\"application/vnd.citationstyles.style+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csl\"]},\"application/vnd.claymore\":{\"source\":\"iana\",\"extensions\":[\"cla\"]},\"application/vnd.cloanto.rp9\":{\"source\":\"iana\",\"extensions\":[\"rp9\"]},\"application/vnd.clonk.c4group\":{\"source\":\"iana\",\"extensions\":[\"c4g\",\"c4d\",\"c4f\",\"c4p\",\"c4u\"]},\"application/vnd.cluetrust.cartomobile-config\":{\"source\":\"iana\",\"extensions\":[\"c11amc\"]},\"application/vnd.cluetrust.cartomobile-config-pkg\":{\"source\":\"iana\",\"extensions\":[\"c11amz\"]},\"application/vnd.coffeescript\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet-template\":{\"source\":\"iana\"},\"application/vnd.collection+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.doc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.next+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.comicbook+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.comicbook-rar\":{\"source\":\"iana\"},\"application/vnd.commerce-battelle\":{\"source\":\"iana\"},\"application/vnd.commonspace\":{\"source\":\"iana\",\"extensions\":[\"csp\"]},\"application/vnd.contact.cmsg\":{\"source\":\"iana\",\"extensions\":[\"cdbcmsg\"]},\"application/vnd.coreos.ignition+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cosmocaller\":{\"source\":\"iana\",\"extensions\":[\"cmc\"]},\"application/vnd.crick.clicker\":{\"source\":\"iana\",\"extensions\":[\"clkx\"]},\"application/vnd.crick.clicker.keyboard\":{\"source\":\"iana\",\"extensions\":[\"clkk\"]},\"application/vnd.crick.clicker.palette\":{\"source\":\"iana\",\"extensions\":[\"clkp\"]},\"application/vnd.crick.clicker.template\":{\"source\":\"iana\",\"extensions\":[\"clkt\"]},\"application/vnd.crick.clicker.wordbank\":{\"source\":\"iana\",\"extensions\":[\"clkw\"]},\"application/vnd.criticaltools.wbs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wbs\"]},\"application/vnd.cryptii.pipe+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.crypto-shade-file\":{\"source\":\"iana\"},\"application/vnd.ctc-posml\":{\"source\":\"iana\",\"extensions\":[\"pml\"]},\"application/vnd.ctct.ws+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cups-pdf\":{\"source\":\"iana\"},\"application/vnd.cups-postscript\":{\"source\":\"iana\"},\"application/vnd.cups-ppd\":{\"source\":\"iana\",\"extensions\":[\"ppd\"]},\"application/vnd.cups-raster\":{\"source\":\"iana\"},\"application/vnd.cups-raw\":{\"source\":\"iana\"},\"application/vnd.curl\":{\"source\":\"iana\"},\"application/vnd.curl.car\":{\"source\":\"apache\",\"extensions\":[\"car\"]},\"application/vnd.curl.pcurl\":{\"source\":\"apache\",\"extensions\":[\"pcurl\"]},\"application/vnd.cyan.dean.root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cybank\":{\"source\":\"iana\"},\"application/vnd.d2l.coursepackage1p0+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.dart\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dart\"]},\"application/vnd.data-vision.rdz\":{\"source\":\"iana\",\"extensions\":[\"rdz\"]},\"application/vnd.datapackage+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dataresource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dbf\":{\"source\":\"iana\"},\"application/vnd.debian.binary-package\":{\"source\":\"iana\"},\"application/vnd.dece.data\":{\"source\":\"iana\",\"extensions\":[\"uvf\",\"uvvf\",\"uvd\",\"uvvd\"]},\"application/vnd.dece.ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uvt\",\"uvvt\"]},\"application/vnd.dece.unspecified\":{\"source\":\"iana\",\"extensions\":[\"uvx\",\"uvvx\"]},\"application/vnd.dece.zip\":{\"source\":\"iana\",\"extensions\":[\"uvz\",\"uvvz\"]},\"application/vnd.denovo.fcselayout-link\":{\"source\":\"iana\",\"extensions\":[\"fe_launch\"]},\"application/vnd.desmume.movie\":{\"source\":\"iana\"},\"application/vnd.dir-bi.plate-dl-nosuffix\":{\"source\":\"iana\"},\"application/vnd.dm.delegation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dna\":{\"source\":\"iana\",\"extensions\":[\"dna\"]},\"application/vnd.document+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dolby.mlp\":{\"source\":\"apache\",\"extensions\":[\"mlp\"]},\"application/vnd.dolby.mobile.1\":{\"source\":\"iana\"},\"application/vnd.dolby.mobile.2\":{\"source\":\"iana\"},\"application/vnd.doremir.scorecloud-binary-document\":{\"source\":\"iana\"},\"application/vnd.dpgraph\":{\"source\":\"iana\",\"extensions\":[\"dpg\"]},\"application/vnd.dreamfactory\":{\"source\":\"iana\",\"extensions\":[\"dfac\"]},\"application/vnd.drive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ds-keypoint\":{\"source\":\"apache\",\"extensions\":[\"kpxx\"]},\"application/vnd.dtg.local\":{\"source\":\"iana\"},\"application/vnd.dtg.local.flash\":{\"source\":\"iana\"},\"application/vnd.dtg.local.html\":{\"source\":\"iana\"},\"application/vnd.dvb.ait\":{\"source\":\"iana\",\"extensions\":[\"ait\"]},\"application/vnd.dvb.dvbisl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.dvbj\":{\"source\":\"iana\"},\"application/vnd.dvb.esgcontainer\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcdftnotifaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess2\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgpdd\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcroaming\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-base\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-enhancement\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-aggregate-root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-container+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-generic+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-msglist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-init+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.pfr\":{\"source\":\"iana\"},\"application/vnd.dvb.service\":{\"source\":\"iana\",\"extensions\":[\"svc\"]},\"application/vnd.dxr\":{\"source\":\"iana\"},\"application/vnd.dynageo\":{\"source\":\"iana\",\"extensions\":[\"geo\"]},\"application/vnd.dzr\":{\"source\":\"iana\"},\"application/vnd.easykaraoke.cdgdownload\":{\"source\":\"iana\"},\"application/vnd.ecdis-update\":{\"source\":\"iana\"},\"application/vnd.ecip.rlp\":{\"source\":\"iana\"},\"application/vnd.ecowin.chart\":{\"source\":\"iana\",\"extensions\":[\"mag\"]},\"application/vnd.ecowin.filerequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.fileupdate\":{\"source\":\"iana\"},\"application/vnd.ecowin.series\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesrequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesupdate\":{\"source\":\"iana\"},\"application/vnd.efi.img\":{\"source\":\"iana\"},\"application/vnd.efi.iso\":{\"source\":\"iana\"},\"application/vnd.emclient.accessrequest+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.enliven\":{\"source\":\"iana\",\"extensions\":[\"nml\"]},\"application/vnd.enphase.envoy\":{\"source\":\"iana\"},\"application/vnd.eprints.data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.epson.esf\":{\"source\":\"iana\",\"extensions\":[\"esf\"]},\"application/vnd.epson.msf\":{\"source\":\"iana\",\"extensions\":[\"msf\"]},\"application/vnd.epson.quickanime\":{\"source\":\"iana\",\"extensions\":[\"qam\"]},\"application/vnd.epson.salt\":{\"source\":\"iana\",\"extensions\":[\"slt\"]},\"application/vnd.epson.ssf\":{\"source\":\"iana\",\"extensions\":[\"ssf\"]},\"application/vnd.ericsson.quickcall\":{\"source\":\"iana\"},\"application/vnd.espass-espass+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.eszigno3+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es3\",\"et3\"]},\"application/vnd.etsi.aoc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.asic-e+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.asic-s+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.cug+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvcommand+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-bc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-cod+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-npvr+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvservice+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mcid+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mheg5\":{\"source\":\"iana\"},\"application/vnd.etsi.overload-control-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.pstn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.sci+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.simservs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.timestamp-token\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.tsl.der\":{\"source\":\"iana\"},\"application/vnd.eudora.data\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.profile\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.settings\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.theme\":{\"source\":\"iana\"},\"application/vnd.exstream-empower+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.exstream-package\":{\"source\":\"iana\"},\"application/vnd.ezpix-album\":{\"source\":\"iana\",\"extensions\":[\"ez2\"]},\"application/vnd.ezpix-package\":{\"source\":\"iana\",\"extensions\":[\"ez3\"]},\"application/vnd.f-secure.mobile\":{\"source\":\"iana\"},\"application/vnd.fastcopy-disk-image\":{\"source\":\"iana\"},\"application/vnd.fdf\":{\"source\":\"iana\",\"extensions\":[\"fdf\"]},\"application/vnd.fdsn.mseed\":{\"source\":\"iana\",\"extensions\":[\"mseed\"]},\"application/vnd.fdsn.seed\":{\"source\":\"iana\",\"extensions\":[\"seed\",\"dataless\"]},\"application/vnd.ffsns\":{\"source\":\"iana\"},\"application/vnd.ficlab.flb+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.filmit.zfc\":{\"source\":\"iana\"},\"application/vnd.fints\":{\"source\":\"iana\"},\"application/vnd.firemonkeys.cloudcell\":{\"source\":\"iana\"},\"application/vnd.flographit\":{\"source\":\"iana\",\"extensions\":[\"gph\"]},\"application/vnd.fluxtime.clip\":{\"source\":\"iana\",\"extensions\":[\"ftc\"]},\"application/vnd.font-fontforge-sfd\":{\"source\":\"iana\"},\"application/vnd.framemaker\":{\"source\":\"iana\",\"extensions\":[\"fm\",\"frame\",\"maker\",\"book\"]},\"application/vnd.frogans.fnc\":{\"source\":\"iana\",\"extensions\":[\"fnc\"]},\"application/vnd.frogans.ltf\":{\"source\":\"iana\",\"extensions\":[\"ltf\"]},\"application/vnd.fsc.weblaunch\":{\"source\":\"iana\",\"extensions\":[\"fsc\"]},\"application/vnd.fujitsu.oasys\":{\"source\":\"iana\",\"extensions\":[\"oas\"]},\"application/vnd.fujitsu.oasys2\":{\"source\":\"iana\",\"extensions\":[\"oa2\"]},\"application/vnd.fujitsu.oasys3\":{\"source\":\"iana\",\"extensions\":[\"oa3\"]},\"application/vnd.fujitsu.oasysgp\":{\"source\":\"iana\",\"extensions\":[\"fg5\"]},\"application/vnd.fujitsu.oasysprs\":{\"source\":\"iana\",\"extensions\":[\"bh2\"]},\"application/vnd.fujixerox.art-ex\":{\"source\":\"iana\"},\"application/vnd.fujixerox.art4\":{\"source\":\"iana\"},\"application/vnd.fujixerox.ddd\":{\"source\":\"iana\",\"extensions\":[\"ddd\"]},\"application/vnd.fujixerox.docuworks\":{\"source\":\"iana\",\"extensions\":[\"xdw\"]},\"application/vnd.fujixerox.docuworks.binder\":{\"source\":\"iana\",\"extensions\":[\"xbd\"]},\"application/vnd.fujixerox.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujixerox.hbpl\":{\"source\":\"iana\"},\"application/vnd.fut-misnet\":{\"source\":\"iana\"},\"application/vnd.futoin+cbor\":{\"source\":\"iana\"},\"application/vnd.futoin+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fuzzysheet\":{\"source\":\"iana\",\"extensions\":[\"fzs\"]},\"application/vnd.genomatix.tuxedo\":{\"source\":\"iana\",\"extensions\":[\"txd\"]},\"application/vnd.gentics.grd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geo+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geocube+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geogebra.file\":{\"source\":\"iana\",\"extensions\":[\"ggb\"]},\"application/vnd.geogebra.tool\":{\"source\":\"iana\",\"extensions\":[\"ggt\"]},\"application/vnd.geometry-explorer\":{\"source\":\"iana\",\"extensions\":[\"gex\",\"gre\"]},\"application/vnd.geonext\":{\"source\":\"iana\",\"extensions\":[\"gxt\"]},\"application/vnd.geoplan\":{\"source\":\"iana\",\"extensions\":[\"g2w\"]},\"application/vnd.geospace\":{\"source\":\"iana\",\"extensions\":[\"g3w\"]},\"application/vnd.gerber\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt-response\":{\"source\":\"iana\"},\"application/vnd.gmx\":{\"source\":\"iana\",\"extensions\":[\"gmx\"]},\"application/vnd.google-apps.document\":{\"compressible\":false,\"extensions\":[\"gdoc\"]},\"application/vnd.google-apps.presentation\":{\"compressible\":false,\"extensions\":[\"gslides\"]},\"application/vnd.google-apps.spreadsheet\":{\"compressible\":false,\"extensions\":[\"gsheet\"]},\"application/vnd.google-earth.kml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"kml\"]},\"application/vnd.google-earth.kmz\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"kmz\"]},\"application/vnd.gov.sk.e-form+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.gov.sk.e-form+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.gov.sk.xmldatacontainer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.grafeq\":{\"source\":\"iana\",\"extensions\":[\"gqf\",\"gqs\"]},\"application/vnd.gridmp\":{\"source\":\"iana\"},\"application/vnd.groove-account\":{\"source\":\"iana\",\"extensions\":[\"gac\"]},\"application/vnd.groove-help\":{\"source\":\"iana\",\"extensions\":[\"ghf\"]},\"application/vnd.groove-identity-message\":{\"source\":\"iana\",\"extensions\":[\"gim\"]},\"application/vnd.groove-injector\":{\"source\":\"iana\",\"extensions\":[\"grv\"]},\"application/vnd.groove-tool-message\":{\"source\":\"iana\",\"extensions\":[\"gtm\"]},\"application/vnd.groove-tool-template\":{\"source\":\"iana\",\"extensions\":[\"tpl\"]},\"application/vnd.groove-vcard\":{\"source\":\"iana\",\"extensions\":[\"vcg\"]},\"application/vnd.hal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hal+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"hal\"]},\"application/vnd.handheld-entertainment+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zmm\"]},\"application/vnd.hbci\":{\"source\":\"iana\",\"extensions\":[\"hbci\"]},\"application/vnd.hc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hcl-bireports\":{\"source\":\"iana\"},\"application/vnd.hdt\":{\"source\":\"iana\"},\"application/vnd.heroku+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hhe.lesson-player\":{\"source\":\"iana\",\"extensions\":[\"les\"]},\"application/vnd.hp-hpgl\":{\"source\":\"iana\",\"extensions\":[\"hpgl\"]},\"application/vnd.hp-hpid\":{\"source\":\"iana\",\"extensions\":[\"hpid\"]},\"application/vnd.hp-hps\":{\"source\":\"iana\",\"extensions\":[\"hps\"]},\"application/vnd.hp-jlyt\":{\"source\":\"iana\",\"extensions\":[\"jlt\"]},\"application/vnd.hp-pcl\":{\"source\":\"iana\",\"extensions\":[\"pcl\"]},\"application/vnd.hp-pclxl\":{\"source\":\"iana\",\"extensions\":[\"pclxl\"]},\"application/vnd.httphone\":{\"source\":\"iana\"},\"application/vnd.hydrostatix.sof-data\":{\"source\":\"iana\",\"extensions\":[\"sfd-hdstx\"]},\"application/vnd.hyper+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyper-item+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyperdrive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hzn-3d-crossword\":{\"source\":\"iana\"},\"application/vnd.ibm.afplinedata\":{\"source\":\"iana\"},\"application/vnd.ibm.electronic-media\":{\"source\":\"iana\"},\"application/vnd.ibm.minipay\":{\"source\":\"iana\",\"extensions\":[\"mpy\"]},\"application/vnd.ibm.modcap\":{\"source\":\"iana\",\"extensions\":[\"afp\",\"listafp\",\"list3820\"]},\"application/vnd.ibm.rights-management\":{\"source\":\"iana\",\"extensions\":[\"irm\"]},\"application/vnd.ibm.secure-container\":{\"source\":\"iana\",\"extensions\":[\"sc\"]},\"application/vnd.iccprofile\":{\"source\":\"iana\",\"extensions\":[\"icc\",\"icm\"]},\"application/vnd.ieee.1905\":{\"source\":\"iana\"},\"application/vnd.igloader\":{\"source\":\"iana\",\"extensions\":[\"igl\"]},\"application/vnd.imagemeter.folder+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.imagemeter.image+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.immervision-ivp\":{\"source\":\"iana\",\"extensions\":[\"ivp\"]},\"application/vnd.immervision-ivu\":{\"source\":\"iana\",\"extensions\":[\"ivu\"]},\"application/vnd.ims.imsccv1p1\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p2\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p3\":{\"source\":\"iana\"},\"application/vnd.ims.lis.v2.result+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolconsumerprofile+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy.id+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings.simple+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informedcontrol.rms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informix-visionary\":{\"source\":\"iana\"},\"application/vnd.infotech.project\":{\"source\":\"iana\"},\"application/vnd.infotech.project+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.innopath.wamp.notification\":{\"source\":\"iana\"},\"application/vnd.insors.igm\":{\"source\":\"iana\",\"extensions\":[\"igm\"]},\"application/vnd.intercon.formnet\":{\"source\":\"iana\",\"extensions\":[\"xpw\",\"xpx\"]},\"application/vnd.intergeo\":{\"source\":\"iana\",\"extensions\":[\"i2g\"]},\"application/vnd.intertrust.digibox\":{\"source\":\"iana\"},\"application/vnd.intertrust.nncp\":{\"source\":\"iana\"},\"application/vnd.intu.qbo\":{\"source\":\"iana\",\"extensions\":[\"qbo\"]},\"application/vnd.intu.qfx\":{\"source\":\"iana\",\"extensions\":[\"qfx\"]},\"application/vnd.iptc.g2.catalogitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.conceptitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.knowledgeitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.packageitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.planningitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ipunplugged.rcprofile\":{\"source\":\"iana\",\"extensions\":[\"rcprofile\"]},\"application/vnd.irepository.package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"irp\"]},\"application/vnd.is-xpr\":{\"source\":\"iana\",\"extensions\":[\"xpr\"]},\"application/vnd.isac.fcs\":{\"source\":\"iana\",\"extensions\":[\"fcs\"]},\"application/vnd.iso11783-10+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.jam\":{\"source\":\"iana\",\"extensions\":[\"jam\"]},\"application/vnd.japannet-directory-service\":{\"source\":\"iana\"},\"application/vnd.japannet-jpnstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-payment-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-registration\":{\"source\":\"iana\"},\"application/vnd.japannet-registration-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-setstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-verification\":{\"source\":\"iana\"},\"application/vnd.japannet-verification-wakeup\":{\"source\":\"iana\"},\"application/vnd.jcp.javame.midlet-rms\":{\"source\":\"iana\",\"extensions\":[\"rms\"]},\"application/vnd.jisp\":{\"source\":\"iana\",\"extensions\":[\"jisp\"]},\"application/vnd.joost.joda-archive\":{\"source\":\"iana\",\"extensions\":[\"joda\"]},\"application/vnd.jsk.isdn-ngn\":{\"source\":\"iana\"},\"application/vnd.kahootz\":{\"source\":\"iana\",\"extensions\":[\"ktz\",\"ktr\"]},\"application/vnd.kde.karbon\":{\"source\":\"iana\",\"extensions\":[\"karbon\"]},\"application/vnd.kde.kchart\":{\"source\":\"iana\",\"extensions\":[\"chrt\"]},\"application/vnd.kde.kformula\":{\"source\":\"iana\",\"extensions\":[\"kfo\"]},\"application/vnd.kde.kivio\":{\"source\":\"iana\",\"extensions\":[\"flw\"]},\"application/vnd.kde.kontour\":{\"source\":\"iana\",\"extensions\":[\"kon\"]},\"application/vnd.kde.kpresenter\":{\"source\":\"iana\",\"extensions\":[\"kpr\",\"kpt\"]},\"application/vnd.kde.kspread\":{\"source\":\"iana\",\"extensions\":[\"ksp\"]},\"application/vnd.kde.kword\":{\"source\":\"iana\",\"extensions\":[\"kwd\",\"kwt\"]},\"application/vnd.kenameaapp\":{\"source\":\"iana\",\"extensions\":[\"htke\"]},\"application/vnd.kidspiration\":{\"source\":\"iana\",\"extensions\":[\"kia\"]},\"application/vnd.kinar\":{\"source\":\"iana\",\"extensions\":[\"kne\",\"knp\"]},\"application/vnd.koan\":{\"source\":\"iana\",\"extensions\":[\"skp\",\"skd\",\"skt\",\"skm\"]},\"application/vnd.kodak-descriptor\":{\"source\":\"iana\",\"extensions\":[\"sse\"]},\"application/vnd.las\":{\"source\":\"iana\"},\"application/vnd.las.las+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.las.las+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lasxml\"]},\"application/vnd.laszip\":{\"source\":\"iana\"},\"application/vnd.leap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.liberty-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.llamagraphics.life-balance.desktop\":{\"source\":\"iana\",\"extensions\":[\"lbd\"]},\"application/vnd.llamagraphics.life-balance.exchange+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lbe\"]},\"application/vnd.logipipe.circuit+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.loom\":{\"source\":\"iana\"},\"application/vnd.lotus-1-2-3\":{\"source\":\"iana\",\"extensions\":[\"123\"]},\"application/vnd.lotus-approach\":{\"source\":\"iana\",\"extensions\":[\"apr\"]},\"application/vnd.lotus-freelance\":{\"source\":\"iana\",\"extensions\":[\"pre\"]},\"application/vnd.lotus-notes\":{\"source\":\"iana\",\"extensions\":[\"nsf\"]},\"application/vnd.lotus-organizer\":{\"source\":\"iana\",\"extensions\":[\"org\"]},\"application/vnd.lotus-screencam\":{\"source\":\"iana\",\"extensions\":[\"scm\"]},\"application/vnd.lotus-wordpro\":{\"source\":\"iana\",\"extensions\":[\"lwp\"]},\"application/vnd.macports.portpkg\":{\"source\":\"iana\",\"extensions\":[\"portpkg\"]},\"application/vnd.mapbox-vector-tile\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.actiontoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.conftoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.license+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.mdcf\":{\"source\":\"iana\"},\"application/vnd.mason+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.maxmind.maxmind-db\":{\"source\":\"iana\"},\"application/vnd.mcd\":{\"source\":\"iana\",\"extensions\":[\"mcd\"]},\"application/vnd.medcalcdata\":{\"source\":\"iana\",\"extensions\":[\"mc1\"]},\"application/vnd.mediastation.cdkey\":{\"source\":\"iana\",\"extensions\":[\"cdkey\"]},\"application/vnd.meridian-slingshot\":{\"source\":\"iana\"},\"application/vnd.mfer\":{\"source\":\"iana\",\"extensions\":[\"mwf\"]},\"application/vnd.mfmp\":{\"source\":\"iana\",\"extensions\":[\"mfm\"]},\"application/vnd.micro+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.micrografx.flo\":{\"source\":\"iana\",\"extensions\":[\"flo\"]},\"application/vnd.micrografx.igx\":{\"source\":\"iana\",\"extensions\":[\"igx\"]},\"application/vnd.microsoft.portable-executable\":{\"source\":\"iana\"},\"application/vnd.microsoft.windows.thumbnail-cache\":{\"source\":\"iana\"},\"application/vnd.miele+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.mif\":{\"source\":\"iana\",\"extensions\":[\"mif\"]},\"application/vnd.minisoft-hp3000-save\":{\"source\":\"iana\"},\"application/vnd.mitsubishi.misty-guard.trustweb\":{\"source\":\"iana\"},\"application/vnd.mobius.daf\":{\"source\":\"iana\",\"extensions\":[\"daf\"]},\"application/vnd.mobius.dis\":{\"source\":\"iana\",\"extensions\":[\"dis\"]},\"application/vnd.mobius.mbk\":{\"source\":\"iana\",\"extensions\":[\"mbk\"]},\"application/vnd.mobius.mqy\":{\"source\":\"iana\",\"extensions\":[\"mqy\"]},\"application/vnd.mobius.msl\":{\"source\":\"iana\",\"extensions\":[\"msl\"]},\"application/vnd.mobius.plc\":{\"source\":\"iana\",\"extensions\":[\"plc\"]},\"application/vnd.mobius.txf\":{\"source\":\"iana\",\"extensions\":[\"txf\"]},\"application/vnd.mophun.application\":{\"source\":\"iana\",\"extensions\":[\"mpn\"]},\"application/vnd.mophun.certificate\":{\"source\":\"iana\",\"extensions\":[\"mpc\"]},\"application/vnd.motorola.flexsuite\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.adsi\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.fis\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.gotap\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.kmr\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.ttc\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.wem\":{\"source\":\"iana\"},\"application/vnd.motorola.iprm\":{\"source\":\"iana\"},\"application/vnd.mozilla.xul+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xul\"]},\"application/vnd.ms-3mfdocument\":{\"source\":\"iana\"},\"application/vnd.ms-artgalry\":{\"source\":\"iana\",\"extensions\":[\"cil\"]},\"application/vnd.ms-asf\":{\"source\":\"iana\"},\"application/vnd.ms-cab-compressed\":{\"source\":\"iana\",\"extensions\":[\"cab\"]},\"application/vnd.ms-color.iccprofile\":{\"source\":\"apache\"},\"application/vnd.ms-excel\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xls\",\"xlm\",\"xla\",\"xlc\",\"xlt\",\"xlw\"]},\"application/vnd.ms-excel.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlam\"]},\"application/vnd.ms-excel.sheet.binary.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsb\"]},\"application/vnd.ms-excel.sheet.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsm\"]},\"application/vnd.ms-excel.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xltm\"]},\"application/vnd.ms-fontobject\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eot\"]},\"application/vnd.ms-htmlhelp\":{\"source\":\"iana\",\"extensions\":[\"chm\"]},\"application/vnd.ms-ims\":{\"source\":\"iana\",\"extensions\":[\"ims\"]},\"application/vnd.ms-lrm\":{\"source\":\"iana\",\"extensions\":[\"lrm\"]},\"application/vnd.ms-office.activex+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-officetheme\":{\"source\":\"iana\",\"extensions\":[\"thmx\"]},\"application/vnd.ms-opentype\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-outlook\":{\"compressible\":false,\"extensions\":[\"msg\"]},\"application/vnd.ms-package.obfuscated-opentype\":{\"source\":\"apache\"},\"application/vnd.ms-pki.seccat\":{\"source\":\"apache\",\"extensions\":[\"cat\"]},\"application/vnd.ms-pki.stl\":{\"source\":\"apache\",\"extensions\":[\"stl\"]},\"application/vnd.ms-playready.initiator+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-powerpoint\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ppt\",\"pps\",\"pot\"]},\"application/vnd.ms-powerpoint.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppam\"]},\"application/vnd.ms-powerpoint.presentation.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"pptm\"]},\"application/vnd.ms-powerpoint.slide.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"sldm\"]},\"application/vnd.ms-powerpoint.slideshow.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppsm\"]},\"application/vnd.ms-powerpoint.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"potm\"]},\"application/vnd.ms-printdevicecapabilities+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-printing.printticket+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-printschematicket+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-project\":{\"source\":\"iana\",\"extensions\":[\"mpp\",\"mpt\"]},\"application/vnd.ms-tnef\":{\"source\":\"iana\"},\"application/vnd.ms-windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.nwprinting.oob\":{\"source\":\"iana\"},\"application/vnd.ms-windows.printerpairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.wsd.oob\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-resp\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-resp\":{\"source\":\"iana\"},\"application/vnd.ms-word.document.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"docm\"]},\"application/vnd.ms-word.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"dotm\"]},\"application/vnd.ms-works\":{\"source\":\"iana\",\"extensions\":[\"wps\",\"wks\",\"wcm\",\"wdb\"]},\"application/vnd.ms-wpl\":{\"source\":\"iana\",\"extensions\":[\"wpl\"]},\"application/vnd.ms-xpsdocument\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xps\"]},\"application/vnd.msa-disk-image\":{\"source\":\"iana\"},\"application/vnd.mseq\":{\"source\":\"iana\",\"extensions\":[\"mseq\"]},\"application/vnd.msign\":{\"source\":\"iana\"},\"application/vnd.multiad.creator\":{\"source\":\"iana\"},\"application/vnd.multiad.creator.cif\":{\"source\":\"iana\"},\"application/vnd.music-niff\":{\"source\":\"iana\"},\"application/vnd.musician\":{\"source\":\"iana\",\"extensions\":[\"mus\"]},\"application/vnd.muvee.style\":{\"source\":\"iana\",\"extensions\":[\"msty\"]},\"application/vnd.mynfc\":{\"source\":\"iana\",\"extensions\":[\"taglet\"]},\"application/vnd.ncd.control\":{\"source\":\"iana\"},\"application/vnd.ncd.reference\":{\"source\":\"iana\"},\"application/vnd.nearst.inv+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nervana\":{\"source\":\"iana\"},\"application/vnd.netfpx\":{\"source\":\"iana\"},\"application/vnd.neurolanguage.nlu\":{\"source\":\"iana\",\"extensions\":[\"nlu\"]},\"application/vnd.nimn\":{\"source\":\"iana\"},\"application/vnd.nintendo.nitro.rom\":{\"source\":\"iana\"},\"application/vnd.nintendo.snes.rom\":{\"source\":\"iana\"},\"application/vnd.nitf\":{\"source\":\"iana\",\"extensions\":[\"ntf\",\"nitf\"]},\"application/vnd.noblenet-directory\":{\"source\":\"iana\",\"extensions\":[\"nnd\"]},\"application/vnd.noblenet-sealer\":{\"source\":\"iana\",\"extensions\":[\"nns\"]},\"application/vnd.noblenet-web\":{\"source\":\"iana\",\"extensions\":[\"nnw\"]},\"application/vnd.nokia.catalogs\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.iptv.config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.isds-radio-presets\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.landmarkcollection+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.n-gage.ac+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ac\"]},\"application/vnd.nokia.n-gage.data\":{\"source\":\"iana\",\"extensions\":[\"ngdat\"]},\"application/vnd.nokia.n-gage.symbian.install\":{\"source\":\"iana\",\"extensions\":[\"n-gage\"]},\"application/vnd.nokia.ncd\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.radio-preset\":{\"source\":\"iana\",\"extensions\":[\"rpst\"]},\"application/vnd.nokia.radio-presets\":{\"source\":\"iana\",\"extensions\":[\"rpss\"]},\"application/vnd.novadigm.edm\":{\"source\":\"iana\",\"extensions\":[\"edm\"]},\"application/vnd.novadigm.edx\":{\"source\":\"iana\",\"extensions\":[\"edx\"]},\"application/vnd.novadigm.ext\":{\"source\":\"iana\",\"extensions\":[\"ext\"]},\"application/vnd.ntt-local.content-share\":{\"source\":\"iana\"},\"application/vnd.ntt-local.file-transfer\":{\"source\":\"iana\"},\"application/vnd.ntt-local.ogw_remote-access\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_remote\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_tcp_stream\":{\"source\":\"iana\"},\"application/vnd.oasis.opendocument.chart\":{\"source\":\"iana\",\"extensions\":[\"odc\"]},\"application/vnd.oasis.opendocument.chart-template\":{\"source\":\"iana\",\"extensions\":[\"otc\"]},\"application/vnd.oasis.opendocument.database\":{\"source\":\"iana\",\"extensions\":[\"odb\"]},\"application/vnd.oasis.opendocument.formula\":{\"source\":\"iana\",\"extensions\":[\"odf\"]},\"application/vnd.oasis.opendocument.formula-template\":{\"source\":\"iana\",\"extensions\":[\"odft\"]},\"application/vnd.oasis.opendocument.graphics\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odg\"]},\"application/vnd.oasis.opendocument.graphics-template\":{\"source\":\"iana\",\"extensions\":[\"otg\"]},\"application/vnd.oasis.opendocument.image\":{\"source\":\"iana\",\"extensions\":[\"odi\"]},\"application/vnd.oasis.opendocument.image-template\":{\"source\":\"iana\",\"extensions\":[\"oti\"]},\"application/vnd.oasis.opendocument.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odp\"]},\"application/vnd.oasis.opendocument.presentation-template\":{\"source\":\"iana\",\"extensions\":[\"otp\"]},\"application/vnd.oasis.opendocument.spreadsheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ods\"]},\"application/vnd.oasis.opendocument.spreadsheet-template\":{\"source\":\"iana\",\"extensions\":[\"ots\"]},\"application/vnd.oasis.opendocument.text\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odt\"]},\"application/vnd.oasis.opendocument.text-master\":{\"source\":\"iana\",\"extensions\":[\"odm\"]},\"application/vnd.oasis.opendocument.text-template\":{\"source\":\"iana\",\"extensions\":[\"ott\"]},\"application/vnd.oasis.opendocument.text-web\":{\"source\":\"iana\",\"extensions\":[\"oth\"]},\"application/vnd.obn\":{\"source\":\"iana\"},\"application/vnd.ocf+cbor\":{\"source\":\"iana\"},\"application/vnd.oci.image.manifest.v1+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oftn.l10n+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessdownload+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessstreaming+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.cspg-hexbinary\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.svg+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.dae.xhtml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.mippvcontrolmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.pae.gem\":{\"source\":\"iana\"},\"application/vnd.oipf.spdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.spdlist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.ueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.userprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.olpc-sugar\":{\"source\":\"iana\",\"extensions\":[\"xo\"]},\"application/vnd.oma-scws-config\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-request\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-response\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.associated-procedure-parameter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.drm-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.imd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.ltkm\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.notification+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.provisioningtrigger\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgboot\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sgdu\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.simple-symbol-container\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.smartcard-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sprov+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.stkm\":{\"source\":\"iana\"},\"application/vnd.oma.cab-address-book+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-feature-handler+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-pcc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-subs-invite+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-user-prefs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.dcd\":{\"source\":\"iana\"},\"application/vnd.oma.dcdc\":{\"source\":\"iana\"},\"application/vnd.oma.dd2+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dd2\"]},\"application/vnd.oma.drm.risd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.group-usage-list+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+tlv\":{\"source\":\"iana\"},\"application/vnd.oma.pal+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.detailed-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.final-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.groups+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.invocation-descriptor+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.optimized-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.push\":{\"source\":\"iana\"},\"application/vnd.oma.scidm.messages+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.xcap-directory+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.omads-email+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-file+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-folder+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omaloc-supl-init\":{\"source\":\"iana\"},\"application/vnd.onepager\":{\"source\":\"iana\"},\"application/vnd.onepagertamp\":{\"source\":\"iana\"},\"application/vnd.onepagertamx\":{\"source\":\"iana\"},\"application/vnd.onepagertat\":{\"source\":\"iana\"},\"application/vnd.onepagertatp\":{\"source\":\"iana\"},\"application/vnd.onepagertatx\":{\"source\":\"iana\"},\"application/vnd.openblox.game+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"obgx\"]},\"application/vnd.openblox.game-binary\":{\"source\":\"iana\"},\"application/vnd.openeye.oeb\":{\"source\":\"iana\"},\"application/vnd.openofficeorg.extension\":{\"source\":\"apache\",\"extensions\":[\"oxt\"]},\"application/vnd.openstreetmap.data+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osm\"]},\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.customxmlproperties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawing+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pptx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slide\":{\"source\":\"iana\",\"extensions\":[\"sldx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow\":{\"source\":\"iana\",\"extensions\":[\"ppsx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tags+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.template\":{\"source\":\"iana\",\"extensions\":[\"potx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xlsx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\":{\"source\":\"iana\",\"extensions\":[\"xltx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.theme+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.themeoverride+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.vmldrawing\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"docx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\":{\"source\":\"iana\",\"extensions\":[\"dotx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.core-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.relationships+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oracle.resource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.orange.indata\":{\"source\":\"iana\"},\"application/vnd.osa.netdeploy\":{\"source\":\"iana\"},\"application/vnd.osgeo.mapguide.package\":{\"source\":\"iana\",\"extensions\":[\"mgp\"]},\"application/vnd.osgi.bundle\":{\"source\":\"iana\"},\"application/vnd.osgi.dp\":{\"source\":\"iana\",\"extensions\":[\"dp\"]},\"application/vnd.osgi.subsystem\":{\"source\":\"iana\",\"extensions\":[\"esa\"]},\"application/vnd.otps.ct-kip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oxli.countgraph\":{\"source\":\"iana\"},\"application/vnd.pagerduty+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.palm\":{\"source\":\"iana\",\"extensions\":[\"pdb\",\"pqa\",\"oprc\"]},\"application/vnd.panoply\":{\"source\":\"iana\"},\"application/vnd.paos.xml\":{\"source\":\"iana\"},\"application/vnd.patentdive\":{\"source\":\"iana\"},\"application/vnd.patientecommsdoc\":{\"source\":\"iana\"},\"application/vnd.pawaafile\":{\"source\":\"iana\",\"extensions\":[\"paw\"]},\"application/vnd.pcos\":{\"source\":\"iana\"},\"application/vnd.pg.format\":{\"source\":\"iana\",\"extensions\":[\"str\"]},\"application/vnd.pg.osasli\":{\"source\":\"iana\",\"extensions\":[\"ei6\"]},\"application/vnd.piaccess.application-licence\":{\"source\":\"iana\"},\"application/vnd.picsel\":{\"source\":\"iana\",\"extensions\":[\"efif\"]},\"application/vnd.pmi.widget\":{\"source\":\"iana\",\"extensions\":[\"wg\"]},\"application/vnd.poc.group-advertisement+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.pocketlearn\":{\"source\":\"iana\",\"extensions\":[\"plf\"]},\"application/vnd.powerbuilder6\":{\"source\":\"iana\",\"extensions\":[\"pbd\"]},\"application/vnd.powerbuilder6-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75-s\":{\"source\":\"iana\"},\"application/vnd.preminet\":{\"source\":\"iana\"},\"application/vnd.previewsystems.box\":{\"source\":\"iana\",\"extensions\":[\"box\"]},\"application/vnd.proteus.magazine\":{\"source\":\"iana\",\"extensions\":[\"mgz\"]},\"application/vnd.psfs\":{\"source\":\"iana\"},\"application/vnd.publishare-delta-tree\":{\"source\":\"iana\",\"extensions\":[\"qps\"]},\"application/vnd.pvi.ptid1\":{\"source\":\"iana\",\"extensions\":[\"ptid\"]},\"application/vnd.pwg-multiplexed\":{\"source\":\"iana\"},\"application/vnd.pwg-xhtml-print+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.qualcomm.brew-app-res\":{\"source\":\"iana\"},\"application/vnd.quarantainenet\":{\"source\":\"iana\"},\"application/vnd.quark.quarkxpress\":{\"source\":\"iana\",\"extensions\":[\"qxd\",\"qxt\",\"qwd\",\"qwt\",\"qxl\",\"qxb\"]},\"application/vnd.quobject-quoxdocument\":{\"source\":\"iana\"},\"application/vnd.radisys.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-stream+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-base+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-detect+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-sendrecv+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-group+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-speech+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-transform+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rainstor.data\":{\"source\":\"iana\"},\"application/vnd.rapid\":{\"source\":\"iana\"},\"application/vnd.rar\":{\"source\":\"iana\"},\"application/vnd.realvnc.bed\":{\"source\":\"iana\",\"extensions\":[\"bed\"]},\"application/vnd.recordare.musicxml\":{\"source\":\"iana\",\"extensions\":[\"mxl\"]},\"application/vnd.recordare.musicxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musicxml\"]},\"application/vnd.renlearn.rlprint\":{\"source\":\"iana\"},\"application/vnd.restful+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rig.cryptonote\":{\"source\":\"iana\",\"extensions\":[\"cryptonote\"]},\"application/vnd.rim.cod\":{\"source\":\"apache\",\"extensions\":[\"cod\"]},\"application/vnd.rn-realmedia\":{\"source\":\"apache\",\"extensions\":[\"rm\"]},\"application/vnd.rn-realmedia-vbr\":{\"source\":\"apache\",\"extensions\":[\"rmvb\"]},\"application/vnd.route66.link66+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"link66\"]},\"application/vnd.rs-274x\":{\"source\":\"iana\"},\"application/vnd.ruckus.download\":{\"source\":\"iana\"},\"application/vnd.s3sms\":{\"source\":\"iana\"},\"application/vnd.sailingtracker.track\":{\"source\":\"iana\",\"extensions\":[\"st\"]},\"application/vnd.sar\":{\"source\":\"iana\"},\"application/vnd.sbm.cid\":{\"source\":\"iana\"},\"application/vnd.sbm.mid2\":{\"source\":\"iana\"},\"application/vnd.scribus\":{\"source\":\"iana\"},\"application/vnd.sealed.3df\":{\"source\":\"iana\"},\"application/vnd.sealed.csf\":{\"source\":\"iana\"},\"application/vnd.sealed.doc\":{\"source\":\"iana\"},\"application/vnd.sealed.eml\":{\"source\":\"iana\"},\"application/vnd.sealed.mht\":{\"source\":\"iana\"},\"application/vnd.sealed.net\":{\"source\":\"iana\"},\"application/vnd.sealed.ppt\":{\"source\":\"iana\"},\"application/vnd.sealed.tiff\":{\"source\":\"iana\"},\"application/vnd.sealed.xls\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.html\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.pdf\":{\"source\":\"iana\"},\"application/vnd.seemail\":{\"source\":\"iana\",\"extensions\":[\"see\"]},\"application/vnd.sema\":{\"source\":\"iana\",\"extensions\":[\"sema\"]},\"application/vnd.semd\":{\"source\":\"iana\",\"extensions\":[\"semd\"]},\"application/vnd.semf\":{\"source\":\"iana\",\"extensions\":[\"semf\"]},\"application/vnd.shade-save-file\":{\"source\":\"iana\"},\"application/vnd.shana.informed.formdata\":{\"source\":\"iana\",\"extensions\":[\"ifm\"]},\"application/vnd.shana.informed.formtemplate\":{\"source\":\"iana\",\"extensions\":[\"itp\"]},\"application/vnd.shana.informed.interchange\":{\"source\":\"iana\",\"extensions\":[\"iif\"]},\"application/vnd.shana.informed.package\":{\"source\":\"iana\",\"extensions\":[\"ipk\"]},\"application/vnd.shootproof+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shopkick+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shp\":{\"source\":\"iana\"},\"application/vnd.shx\":{\"source\":\"iana\"},\"application/vnd.sigrok.session\":{\"source\":\"iana\"},\"application/vnd.simtech-mindmapper\":{\"source\":\"iana\",\"extensions\":[\"twd\",\"twds\"]},\"application/vnd.siren+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.smaf\":{\"source\":\"iana\",\"extensions\":[\"mmf\"]},\"application/vnd.smart.notebook\":{\"source\":\"iana\"},\"application/vnd.smart.teacher\":{\"source\":\"iana\",\"extensions\":[\"teacher\"]},\"application/vnd.snesdev-page-table\":{\"source\":\"iana\"},\"application/vnd.software602.filler.form+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fo\"]},\"application/vnd.software602.filler.form-xml-zip\":{\"source\":\"iana\"},\"application/vnd.solent.sdkm+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sdkm\",\"sdkd\"]},\"application/vnd.spotfire.dxp\":{\"source\":\"iana\",\"extensions\":[\"dxp\"]},\"application/vnd.spotfire.sfs\":{\"source\":\"iana\",\"extensions\":[\"sfs\"]},\"application/vnd.sqlite3\":{\"source\":\"iana\"},\"application/vnd.sss-cod\":{\"source\":\"iana\"},\"application/vnd.sss-dtf\":{\"source\":\"iana\"},\"application/vnd.sss-ntf\":{\"source\":\"iana\"},\"application/vnd.stardivision.calc\":{\"source\":\"apache\",\"extensions\":[\"sdc\"]},\"application/vnd.stardivision.draw\":{\"source\":\"apache\",\"extensions\":[\"sda\"]},\"application/vnd.stardivision.impress\":{\"source\":\"apache\",\"extensions\":[\"sdd\"]},\"application/vnd.stardivision.math\":{\"source\":\"apache\",\"extensions\":[\"smf\"]},\"application/vnd.stardivision.writer\":{\"source\":\"apache\",\"extensions\":[\"sdw\",\"vor\"]},\"application/vnd.stardivision.writer-global\":{\"source\":\"apache\",\"extensions\":[\"sgl\"]},\"application/vnd.stepmania.package\":{\"source\":\"iana\",\"extensions\":[\"smzip\"]},\"application/vnd.stepmania.stepchart\":{\"source\":\"iana\",\"extensions\":[\"sm\"]},\"application/vnd.street-stream\":{\"source\":\"iana\"},\"application/vnd.sun.wadl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wadl\"]},\"application/vnd.sun.xml.calc\":{\"source\":\"apache\",\"extensions\":[\"sxc\"]},\"application/vnd.sun.xml.calc.template\":{\"source\":\"apache\",\"extensions\":[\"stc\"]},\"application/vnd.sun.xml.draw\":{\"source\":\"apache\",\"extensions\":[\"sxd\"]},\"application/vnd.sun.xml.draw.template\":{\"source\":\"apache\",\"extensions\":[\"std\"]},\"application/vnd.sun.xml.impress\":{\"source\":\"apache\",\"extensions\":[\"sxi\"]},\"application/vnd.sun.xml.impress.template\":{\"source\":\"apache\",\"extensions\":[\"sti\"]},\"application/vnd.sun.xml.math\":{\"source\":\"apache\",\"extensions\":[\"sxm\"]},\"application/vnd.sun.xml.writer\":{\"source\":\"apache\",\"extensions\":[\"sxw\"]},\"application/vnd.sun.xml.writer.global\":{\"source\":\"apache\",\"extensions\":[\"sxg\"]},\"application/vnd.sun.xml.writer.template\":{\"source\":\"apache\",\"extensions\":[\"stw\"]},\"application/vnd.sus-calendar\":{\"source\":\"iana\",\"extensions\":[\"sus\",\"susp\"]},\"application/vnd.svd\":{\"source\":\"iana\",\"extensions\":[\"svd\"]},\"application/vnd.swiftview-ics\":{\"source\":\"iana\"},\"application/vnd.symbian.install\":{\"source\":\"apache\",\"extensions\":[\"sis\",\"sisx\"]},\"application/vnd.syncml+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xsm\"]},\"application/vnd.syncml.dm+wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"bdm\"]},\"application/vnd.syncml.dm+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xdm\"]},\"application/vnd.syncml.dm.notification\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"ddf\"]},\"application/vnd.syncml.dmtnds+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.syncml.ds.notification\":{\"source\":\"iana\"},\"application/vnd.tableschema+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tao.intent-module-archive\":{\"source\":\"iana\",\"extensions\":[\"tao\"]},\"application/vnd.tcpdump.pcap\":{\"source\":\"iana\",\"extensions\":[\"pcap\",\"cap\",\"dmp\"]},\"application/vnd.think-cell.ppttc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tmd.mediaflex.api+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tml\":{\"source\":\"iana\"},\"application/vnd.tmobile-livetv\":{\"source\":\"iana\",\"extensions\":[\"tmo\"]},\"application/vnd.tri.onesource\":{\"source\":\"iana\"},\"application/vnd.trid.tpt\":{\"source\":\"iana\",\"extensions\":[\"tpt\"]},\"application/vnd.triscape.mxs\":{\"source\":\"iana\",\"extensions\":[\"mxs\"]},\"application/vnd.trueapp\":{\"source\":\"iana\",\"extensions\":[\"tra\"]},\"application/vnd.truedoc\":{\"source\":\"iana\"},\"application/vnd.ubisoft.webplayer\":{\"source\":\"iana\"},\"application/vnd.ufdl\":{\"source\":\"iana\",\"extensions\":[\"ufd\",\"ufdl\"]},\"application/vnd.uiq.theme\":{\"source\":\"iana\",\"extensions\":[\"utz\"]},\"application/vnd.umajin\":{\"source\":\"iana\",\"extensions\":[\"umj\"]},\"application/vnd.unity\":{\"source\":\"iana\",\"extensions\":[\"unityweb\"]},\"application/vnd.uoml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uoml\"]},\"application/vnd.uplanet.alert\":{\"source\":\"iana\"},\"application/vnd.uplanet.alert-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.list\":{\"source\":\"iana\"},\"application/vnd.uplanet.list-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.signal\":{\"source\":\"iana\"},\"application/vnd.uri-map\":{\"source\":\"iana\"},\"application/vnd.valve.source.material\":{\"source\":\"iana\"},\"application/vnd.vcx\":{\"source\":\"iana\",\"extensions\":[\"vcx\"]},\"application/vnd.vd-study\":{\"source\":\"iana\"},\"application/vnd.vectorworks\":{\"source\":\"iana\"},\"application/vnd.vel+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.verimatrix.vcas\":{\"source\":\"iana\"},\"application/vnd.veryant.thin\":{\"source\":\"iana\"},\"application/vnd.ves.encrypted\":{\"source\":\"iana\"},\"application/vnd.vidsoft.vidconference\":{\"source\":\"iana\"},\"application/vnd.visio\":{\"source\":\"iana\",\"extensions\":[\"vsd\",\"vst\",\"vss\",\"vsw\"]},\"application/vnd.visionary\":{\"source\":\"iana\",\"extensions\":[\"vis\"]},\"application/vnd.vividence.scriptfile\":{\"source\":\"iana\"},\"application/vnd.vsf\":{\"source\":\"iana\",\"extensions\":[\"vsf\"]},\"application/vnd.wap.sic\":{\"source\":\"iana\"},\"application/vnd.wap.slc\":{\"source\":\"iana\"},\"application/vnd.wap.wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"wbxml\"]},\"application/vnd.wap.wmlc\":{\"source\":\"iana\",\"extensions\":[\"wmlc\"]},\"application/vnd.wap.wmlscriptc\":{\"source\":\"iana\",\"extensions\":[\"wmlsc\"]},\"application/vnd.webturbo\":{\"source\":\"iana\",\"extensions\":[\"wtb\"]},\"application/vnd.wfa.p2p\":{\"source\":\"iana\"},\"application/vnd.wfa.wsc\":{\"source\":\"iana\"},\"application/vnd.windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.wmc\":{\"source\":\"iana\"},\"application/vnd.wmf.bootstrap\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica.package\":{\"source\":\"iana\"},\"application/vnd.wolfram.player\":{\"source\":\"iana\",\"extensions\":[\"nbp\"]},\"application/vnd.wordperfect\":{\"source\":\"iana\",\"extensions\":[\"wpd\"]},\"application/vnd.wqd\":{\"source\":\"iana\",\"extensions\":[\"wqd\"]},\"application/vnd.wrq-hp3000-labelled\":{\"source\":\"iana\"},\"application/vnd.wt.stf\":{\"source\":\"iana\",\"extensions\":[\"stf\"]},\"application/vnd.wv.csp+wbxml\":{\"source\":\"iana\"},\"application/vnd.wv.csp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.wv.ssp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xacml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xara\":{\"source\":\"iana\",\"extensions\":[\"xar\"]},\"application/vnd.xfdl\":{\"source\":\"iana\",\"extensions\":[\"xfdl\"]},\"application/vnd.xfdl.webform\":{\"source\":\"iana\"},\"application/vnd.xmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xmpie.cpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.dpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.plan\":{\"source\":\"iana\"},\"application/vnd.xmpie.ppkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.xlim\":{\"source\":\"iana\"},\"application/vnd.yamaha.hv-dic\":{\"source\":\"iana\",\"extensions\":[\"hvd\"]},\"application/vnd.yamaha.hv-script\":{\"source\":\"iana\",\"extensions\":[\"hvs\"]},\"application/vnd.yamaha.hv-voice\":{\"source\":\"iana\",\"extensions\":[\"hvp\"]},\"application/vnd.yamaha.openscoreformat\":{\"source\":\"iana\",\"extensions\":[\"osf\"]},\"application/vnd.yamaha.openscoreformat.osfpvg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osfpvg\"]},\"application/vnd.yamaha.remote-setup\":{\"source\":\"iana\"},\"application/vnd.yamaha.smaf-audio\":{\"source\":\"iana\",\"extensions\":[\"saf\"]},\"application/vnd.yamaha.smaf-phrase\":{\"source\":\"iana\",\"extensions\":[\"spf\"]},\"application/vnd.yamaha.through-ngn\":{\"source\":\"iana\"},\"application/vnd.yamaha.tunnel-udpencap\":{\"source\":\"iana\"},\"application/vnd.yaoweme\":{\"source\":\"iana\"},\"application/vnd.yellowriver-custom-menu\":{\"source\":\"iana\",\"extensions\":[\"cmp\"]},\"application/vnd.youtube.yt\":{\"source\":\"iana\"},\"application/vnd.zul\":{\"source\":\"iana\",\"extensions\":[\"zir\",\"zirz\"]},\"application/vnd.zzazz.deck+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zaz\"]},\"application/voicexml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vxml\"]},\"application/voucher-cms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vq-rtcpxr\":{\"source\":\"iana\"},\"application/wasm\":{\"compressible\":true,\"extensions\":[\"wasm\"]},\"application/watcherinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/webpush-options+json\":{\"source\":\"iana\",\"compressible\":true},\"application/whoispp-query\":{\"source\":\"iana\"},\"application/whoispp-response\":{\"source\":\"iana\"},\"application/widget\":{\"source\":\"iana\",\"extensions\":[\"wgt\"]},\"application/winhlp\":{\"source\":\"apache\",\"extensions\":[\"hlp\"]},\"application/wita\":{\"source\":\"iana\"},\"application/wordperfect5.1\":{\"source\":\"iana\"},\"application/wsdl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wsdl\"]},\"application/wspolicy+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wspolicy\"]},\"application/x-7z-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"7z\"]},\"application/x-abiword\":{\"source\":\"apache\",\"extensions\":[\"abw\"]},\"application/x-ace-compressed\":{\"source\":\"apache\",\"extensions\":[\"ace\"]},\"application/x-amf\":{\"source\":\"apache\"},\"application/x-apple-diskimage\":{\"source\":\"apache\",\"extensions\":[\"dmg\"]},\"application/x-arj\":{\"compressible\":false,\"extensions\":[\"arj\"]},\"application/x-authorware-bin\":{\"source\":\"apache\",\"extensions\":[\"aab\",\"x32\",\"u32\",\"vox\"]},\"application/x-authorware-map\":{\"source\":\"apache\",\"extensions\":[\"aam\"]},\"application/x-authorware-seg\":{\"source\":\"apache\",\"extensions\":[\"aas\"]},\"application/x-bcpio\":{\"source\":\"apache\",\"extensions\":[\"bcpio\"]},\"application/x-bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/x-bittorrent\":{\"source\":\"apache\",\"extensions\":[\"torrent\"]},\"application/x-blorb\":{\"source\":\"apache\",\"extensions\":[\"blb\",\"blorb\"]},\"application/x-bzip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz\"]},\"application/x-bzip2\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz2\",\"boz\"]},\"application/x-cbr\":{\"source\":\"apache\",\"extensions\":[\"cbr\",\"cba\",\"cbt\",\"cbz\",\"cb7\"]},\"application/x-cdlink\":{\"source\":\"apache\",\"extensions\":[\"vcd\"]},\"application/x-cfs-compressed\":{\"source\":\"apache\",\"extensions\":[\"cfs\"]},\"application/x-chat\":{\"source\":\"apache\",\"extensions\":[\"chat\"]},\"application/x-chess-pgn\":{\"source\":\"apache\",\"extensions\":[\"pgn\"]},\"application/x-chrome-extension\":{\"extensions\":[\"crx\"]},\"application/x-cocoa\":{\"source\":\"nginx\",\"extensions\":[\"cco\"]},\"application/x-compress\":{\"source\":\"apache\"},\"application/x-conference\":{\"source\":\"apache\",\"extensions\":[\"nsc\"]},\"application/x-cpio\":{\"source\":\"apache\",\"extensions\":[\"cpio\"]},\"application/x-csh\":{\"source\":\"apache\",\"extensions\":[\"csh\"]},\"application/x-deb\":{\"compressible\":false},\"application/x-debian-package\":{\"source\":\"apache\",\"extensions\":[\"deb\",\"udeb\"]},\"application/x-dgc-compressed\":{\"source\":\"apache\",\"extensions\":[\"dgc\"]},\"application/x-director\":{\"source\":\"apache\",\"extensions\":[\"dir\",\"dcr\",\"dxr\",\"cst\",\"cct\",\"cxt\",\"w3d\",\"fgd\",\"swa\"]},\"application/x-doom\":{\"source\":\"apache\",\"extensions\":[\"wad\"]},\"application/x-dtbncx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ncx\"]},\"application/x-dtbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dtb\"]},\"application/x-dtbresource+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"res\"]},\"application/x-dvi\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"dvi\"]},\"application/x-envoy\":{\"source\":\"apache\",\"extensions\":[\"evy\"]},\"application/x-eva\":{\"source\":\"apache\",\"extensions\":[\"eva\"]},\"application/x-font-bdf\":{\"source\":\"apache\",\"extensions\":[\"bdf\"]},\"application/x-font-dos\":{\"source\":\"apache\"},\"application/x-font-framemaker\":{\"source\":\"apache\"},\"application/x-font-ghostscript\":{\"source\":\"apache\",\"extensions\":[\"gsf\"]},\"application/x-font-libgrx\":{\"source\":\"apache\"},\"application/x-font-linux-psf\":{\"source\":\"apache\",\"extensions\":[\"psf\"]},\"application/x-font-pcf\":{\"source\":\"apache\",\"extensions\":[\"pcf\"]},\"application/x-font-snf\":{\"source\":\"apache\",\"extensions\":[\"snf\"]},\"application/x-font-speedo\":{\"source\":\"apache\"},\"application/x-font-sunos-news\":{\"source\":\"apache\"},\"application/x-font-type1\":{\"source\":\"apache\",\"extensions\":[\"pfa\",\"pfb\",\"pfm\",\"afm\"]},\"application/x-font-vfont\":{\"source\":\"apache\"},\"application/x-freearc\":{\"source\":\"apache\",\"extensions\":[\"arc\"]},\"application/x-futuresplash\":{\"source\":\"apache\",\"extensions\":[\"spl\"]},\"application/x-gca-compressed\":{\"source\":\"apache\",\"extensions\":[\"gca\"]},\"application/x-glulx\":{\"source\":\"apache\",\"extensions\":[\"ulx\"]},\"application/x-gnumeric\":{\"source\":\"apache\",\"extensions\":[\"gnumeric\"]},\"application/x-gramps-xml\":{\"source\":\"apache\",\"extensions\":[\"gramps\"]},\"application/x-gtar\":{\"source\":\"apache\",\"extensions\":[\"gtar\"]},\"application/x-gzip\":{\"source\":\"apache\"},\"application/x-hdf\":{\"source\":\"apache\",\"extensions\":[\"hdf\"]},\"application/x-httpd-php\":{\"compressible\":true,\"extensions\":[\"php\"]},\"application/x-install-instructions\":{\"source\":\"apache\",\"extensions\":[\"install\"]},\"application/x-iso9660-image\":{\"source\":\"apache\",\"extensions\":[\"iso\"]},\"application/x-java-archive-diff\":{\"source\":\"nginx\",\"extensions\":[\"jardiff\"]},\"application/x-java-jnlp-file\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jnlp\"]},\"application/x-javascript\":{\"compressible\":true},\"application/x-keepass2\":{\"extensions\":[\"kdbx\"]},\"application/x-latex\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"latex\"]},\"application/x-lua-bytecode\":{\"extensions\":[\"luac\"]},\"application/x-lzh-compressed\":{\"source\":\"apache\",\"extensions\":[\"lzh\",\"lha\"]},\"application/x-makeself\":{\"source\":\"nginx\",\"extensions\":[\"run\"]},\"application/x-mie\":{\"source\":\"apache\",\"extensions\":[\"mie\"]},\"application/x-mobipocket-ebook\":{\"source\":\"apache\",\"extensions\":[\"prc\",\"mobi\"]},\"application/x-mpegurl\":{\"compressible\":false},\"application/x-ms-application\":{\"source\":\"apache\",\"extensions\":[\"application\"]},\"application/x-ms-shortcut\":{\"source\":\"apache\",\"extensions\":[\"lnk\"]},\"application/x-ms-wmd\":{\"source\":\"apache\",\"extensions\":[\"wmd\"]},\"application/x-ms-wmz\":{\"source\":\"apache\",\"extensions\":[\"wmz\"]},\"application/x-ms-xbap\":{\"source\":\"apache\",\"extensions\":[\"xbap\"]},\"application/x-msaccess\":{\"source\":\"apache\",\"extensions\":[\"mdb\"]},\"application/x-msbinder\":{\"source\":\"apache\",\"extensions\":[\"obd\"]},\"application/x-mscardfile\":{\"source\":\"apache\",\"extensions\":[\"crd\"]},\"application/x-msclip\":{\"source\":\"apache\",\"extensions\":[\"clp\"]},\"application/x-msdos-program\":{\"extensions\":[\"exe\"]},\"application/x-msdownload\":{\"source\":\"apache\",\"extensions\":[\"exe\",\"dll\",\"com\",\"bat\",\"msi\"]},\"application/x-msmediaview\":{\"source\":\"apache\",\"extensions\":[\"mvb\",\"m13\",\"m14\"]},\"application/x-msmetafile\":{\"source\":\"apache\",\"extensions\":[\"wmf\",\"wmz\",\"emf\",\"emz\"]},\"application/x-msmoney\":{\"source\":\"apache\",\"extensions\":[\"mny\"]},\"application/x-mspublisher\":{\"source\":\"apache\",\"extensions\":[\"pub\"]},\"application/x-msschedule\":{\"source\":\"apache\",\"extensions\":[\"scd\"]},\"application/x-msterminal\":{\"source\":\"apache\",\"extensions\":[\"trm\"]},\"application/x-mswrite\":{\"source\":\"apache\",\"extensions\":[\"wri\"]},\"application/x-netcdf\":{\"source\":\"apache\",\"extensions\":[\"nc\",\"cdf\"]},\"application/x-ns-proxy-autoconfig\":{\"compressible\":true,\"extensions\":[\"pac\"]},\"application/x-nzb\":{\"source\":\"apache\",\"extensions\":[\"nzb\"]},\"application/x-perl\":{\"source\":\"nginx\",\"extensions\":[\"pl\",\"pm\"]},\"application/x-pilot\":{\"source\":\"nginx\",\"extensions\":[\"prc\",\"pdb\"]},\"application/x-pkcs12\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"p12\",\"pfx\"]},\"application/x-pkcs7-certificates\":{\"source\":\"apache\",\"extensions\":[\"p7b\",\"spc\"]},\"application/x-pkcs7-certreqresp\":{\"source\":\"apache\",\"extensions\":[\"p7r\"]},\"application/x-pki-message\":{\"source\":\"iana\"},\"application/x-rar-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"rar\"]},\"application/x-redhat-package-manager\":{\"source\":\"nginx\",\"extensions\":[\"rpm\"]},\"application/x-research-info-systems\":{\"source\":\"apache\",\"extensions\":[\"ris\"]},\"application/x-sea\":{\"source\":\"nginx\",\"extensions\":[\"sea\"]},\"application/x-sh\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"sh\"]},\"application/x-shar\":{\"source\":\"apache\",\"extensions\":[\"shar\"]},\"application/x-shockwave-flash\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"swf\"]},\"application/x-silverlight-app\":{\"source\":\"apache\",\"extensions\":[\"xap\"]},\"application/x-sql\":{\"source\":\"apache\",\"extensions\":[\"sql\"]},\"application/x-stuffit\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"sit\"]},\"application/x-stuffitx\":{\"source\":\"apache\",\"extensions\":[\"sitx\"]},\"application/x-subrip\":{\"source\":\"apache\",\"extensions\":[\"srt\"]},\"application/x-sv4cpio\":{\"source\":\"apache\",\"extensions\":[\"sv4cpio\"]},\"application/x-sv4crc\":{\"source\":\"apache\",\"extensions\":[\"sv4crc\"]},\"application/x-t3vm-image\":{\"source\":\"apache\",\"extensions\":[\"t3\"]},\"application/x-tads\":{\"source\":\"apache\",\"extensions\":[\"gam\"]},\"application/x-tar\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"tar\"]},\"application/x-tcl\":{\"source\":\"apache\",\"extensions\":[\"tcl\",\"tk\"]},\"application/x-tex\":{\"source\":\"apache\",\"extensions\":[\"tex\"]},\"application/x-tex-tfm\":{\"source\":\"apache\",\"extensions\":[\"tfm\"]},\"application/x-texinfo\":{\"source\":\"apache\",\"extensions\":[\"texinfo\",\"texi\"]},\"application/x-tgif\":{\"source\":\"apache\",\"extensions\":[\"obj\"]},\"application/x-ustar\":{\"source\":\"apache\",\"extensions\":[\"ustar\"]},\"application/x-virtualbox-hdd\":{\"compressible\":true,\"extensions\":[\"hdd\"]},\"application/x-virtualbox-ova\":{\"compressible\":true,\"extensions\":[\"ova\"]},\"application/x-virtualbox-ovf\":{\"compressible\":true,\"extensions\":[\"ovf\"]},\"application/x-virtualbox-vbox\":{\"compressible\":true,\"extensions\":[\"vbox\"]},\"application/x-virtualbox-vbox-extpack\":{\"compressible\":false,\"extensions\":[\"vbox-extpack\"]},\"application/x-virtualbox-vdi\":{\"compressible\":true,\"extensions\":[\"vdi\"]},\"application/x-virtualbox-vhd\":{\"compressible\":true,\"extensions\":[\"vhd\"]},\"application/x-virtualbox-vmdk\":{\"compressible\":true,\"extensions\":[\"vmdk\"]},\"application/x-wais-source\":{\"source\":\"apache\",\"extensions\":[\"src\"]},\"application/x-web-app-manifest+json\":{\"compressible\":true,\"extensions\":[\"webapp\"]},\"application/x-www-form-urlencoded\":{\"source\":\"iana\",\"compressible\":true},\"application/x-x509-ca-cert\":{\"source\":\"iana\",\"extensions\":[\"der\",\"crt\",\"pem\"]},\"application/x-x509-ca-ra-cert\":{\"source\":\"iana\"},\"application/x-x509-next-ca-cert\":{\"source\":\"iana\"},\"application/x-xfig\":{\"source\":\"apache\",\"extensions\":[\"fig\"]},\"application/x-xliff+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/x-xpinstall\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"xpi\"]},\"application/x-xz\":{\"source\":\"apache\",\"extensions\":[\"xz\"]},\"application/x-zmachine\":{\"source\":\"apache\",\"extensions\":[\"z1\",\"z2\",\"z3\",\"z4\",\"z5\",\"z6\",\"z7\",\"z8\"]},\"application/x400-bp\":{\"source\":\"iana\"},\"application/xacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xaml+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xaml\"]},\"application/xcap-att+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xav\"]},\"application/xcap-caps+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xca\"]},\"application/xcap-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/xcap-el+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xel\"]},\"application/xcap-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/xcap-ns+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xns\"]},\"application/xcon-conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcon-conference-info-diff+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xenc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xenc\"]},\"application/xhtml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xhtml\",\"xht\"]},\"application/xhtml-voice+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/xliff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\",\"xsl\",\"xsd\",\"rng\"]},\"application/xml-dtd\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dtd\"]},\"application/xml-external-parsed-entity\":{\"source\":\"iana\"},\"application/xml-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xmpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xop+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xop\"]},\"application/xproc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xpl\"]},\"application/xslt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xslt\"]},\"application/xspf+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xspf\"]},\"application/xv+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"]},\"application/yang\":{\"source\":\"iana\",\"extensions\":[\"yang\"]},\"application/yang-data+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yin+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"yin\"]},\"application/zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"zip\"]},\"application/zlib\":{\"source\":\"iana\"},\"application/zstd\":{\"source\":\"iana\"},\"audio/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"audio/32kadpcm\":{\"source\":\"iana\"},\"audio/3gpp\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"3gpp\"]},\"audio/3gpp2\":{\"source\":\"iana\"},\"audio/aac\":{\"source\":\"iana\"},\"audio/ac3\":{\"source\":\"iana\"},\"audio/adpcm\":{\"source\":\"apache\",\"extensions\":[\"adp\"]},\"audio/amr\":{\"source\":\"iana\"},\"audio/amr-wb\":{\"source\":\"iana\"},\"audio/amr-wb+\":{\"source\":\"iana\"},\"audio/aptx\":{\"source\":\"iana\"},\"audio/asc\":{\"source\":\"iana\"},\"audio/atrac-advanced-lossless\":{\"source\":\"iana\"},\"audio/atrac-x\":{\"source\":\"iana\"},\"audio/atrac3\":{\"source\":\"iana\"},\"audio/basic\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"au\",\"snd\"]},\"audio/bv16\":{\"source\":\"iana\"},\"audio/bv32\":{\"source\":\"iana\"},\"audio/clearmode\":{\"source\":\"iana\"},\"audio/cn\":{\"source\":\"iana\"},\"audio/dat12\":{\"source\":\"iana\"},\"audio/dls\":{\"source\":\"iana\"},\"audio/dsr-es201108\":{\"source\":\"iana\"},\"audio/dsr-es202050\":{\"source\":\"iana\"},\"audio/dsr-es202211\":{\"source\":\"iana\"},\"audio/dsr-es202212\":{\"source\":\"iana\"},\"audio/dv\":{\"source\":\"iana\"},\"audio/dvi4\":{\"source\":\"iana\"},\"audio/eac3\":{\"source\":\"iana\"},\"audio/encaprtp\":{\"source\":\"iana\"},\"audio/evrc\":{\"source\":\"iana\"},\"audio/evrc-qcp\":{\"source\":\"iana\"},\"audio/evrc0\":{\"source\":\"iana\"},\"audio/evrc1\":{\"source\":\"iana\"},\"audio/evrcb\":{\"source\":\"iana\"},\"audio/evrcb0\":{\"source\":\"iana\"},\"audio/evrcb1\":{\"source\":\"iana\"},\"audio/evrcnw\":{\"source\":\"iana\"},\"audio/evrcnw0\":{\"source\":\"iana\"},\"audio/evrcnw1\":{\"source\":\"iana\"},\"audio/evrcwb\":{\"source\":\"iana\"},\"audio/evrcwb0\":{\"source\":\"iana\"},\"audio/evrcwb1\":{\"source\":\"iana\"},\"audio/evs\":{\"source\":\"iana\"},\"audio/flexfec\":{\"source\":\"iana\"},\"audio/fwdred\":{\"source\":\"iana\"},\"audio/g711-0\":{\"source\":\"iana\"},\"audio/g719\":{\"source\":\"iana\"},\"audio/g722\":{\"source\":\"iana\"},\"audio/g7221\":{\"source\":\"iana\"},\"audio/g723\":{\"source\":\"iana\"},\"audio/g726-16\":{\"source\":\"iana\"},\"audio/g726-24\":{\"source\":\"iana\"},\"audio/g726-32\":{\"source\":\"iana\"},\"audio/g726-40\":{\"source\":\"iana\"},\"audio/g728\":{\"source\":\"iana\"},\"audio/g729\":{\"source\":\"iana\"},\"audio/g7291\":{\"source\":\"iana\"},\"audio/g729d\":{\"source\":\"iana\"},\"audio/g729e\":{\"source\":\"iana\"},\"audio/gsm\":{\"source\":\"iana\"},\"audio/gsm-efr\":{\"source\":\"iana\"},\"audio/gsm-hr-08\":{\"source\":\"iana\"},\"audio/ilbc\":{\"source\":\"iana\"},\"audio/ip-mr_v2.5\":{\"source\":\"iana\"},\"audio/isac\":{\"source\":\"apache\"},\"audio/l16\":{\"source\":\"iana\"},\"audio/l20\":{\"source\":\"iana\"},\"audio/l24\":{\"source\":\"iana\",\"compressible\":false},\"audio/l8\":{\"source\":\"iana\"},\"audio/lpc\":{\"source\":\"iana\"},\"audio/melp\":{\"source\":\"iana\"},\"audio/melp1200\":{\"source\":\"iana\"},\"audio/melp2400\":{\"source\":\"iana\"},\"audio/melp600\":{\"source\":\"iana\"},\"audio/mhas\":{\"source\":\"iana\"},\"audio/midi\":{\"source\":\"apache\",\"extensions\":[\"mid\",\"midi\",\"kar\",\"rmi\"]},\"audio/mobile-xmf\":{\"source\":\"iana\",\"extensions\":[\"mxmf\"]},\"audio/mp3\":{\"compressible\":false,\"extensions\":[\"mp3\"]},\"audio/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"m4a\",\"mp4a\"]},\"audio/mp4a-latm\":{\"source\":\"iana\"},\"audio/mpa\":{\"source\":\"iana\"},\"audio/mpa-robust\":{\"source\":\"iana\"},\"audio/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"]},\"audio/mpeg4-generic\":{\"source\":\"iana\"},\"audio/musepack\":{\"source\":\"apache\"},\"audio/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"oga\",\"ogg\",\"spx\"]},\"audio/opus\":{\"source\":\"iana\"},\"audio/parityfec\":{\"source\":\"iana\"},\"audio/pcma\":{\"source\":\"iana\"},\"audio/pcma-wb\":{\"source\":\"iana\"},\"audio/pcmu\":{\"source\":\"iana\"},\"audio/pcmu-wb\":{\"source\":\"iana\"},\"audio/prs.sid\":{\"source\":\"iana\"},\"audio/qcelp\":{\"source\":\"iana\"},\"audio/raptorfec\":{\"source\":\"iana\"},\"audio/red\":{\"source\":\"iana\"},\"audio/rtp-enc-aescm128\":{\"source\":\"iana\"},\"audio/rtp-midi\":{\"source\":\"iana\"},\"audio/rtploopback\":{\"source\":\"iana\"},\"audio/rtx\":{\"source\":\"iana\"},\"audio/s3m\":{\"source\":\"apache\",\"extensions\":[\"s3m\"]},\"audio/silk\":{\"source\":\"apache\",\"extensions\":[\"sil\"]},\"audio/smv\":{\"source\":\"iana\"},\"audio/smv-qcp\":{\"source\":\"iana\"},\"audio/smv0\":{\"source\":\"iana\"},\"audio/sp-midi\":{\"source\":\"iana\"},\"audio/speex\":{\"source\":\"iana\"},\"audio/t140c\":{\"source\":\"iana\"},\"audio/t38\":{\"source\":\"iana\"},\"audio/telephone-event\":{\"source\":\"iana\"},\"audio/tetra_acelp\":{\"source\":\"iana\"},\"audio/tetra_acelp_bb\":{\"source\":\"iana\"},\"audio/tone\":{\"source\":\"iana\"},\"audio/uemclip\":{\"source\":\"iana\"},\"audio/ulpfec\":{\"source\":\"iana\"},\"audio/usac\":{\"source\":\"iana\"},\"audio/vdvi\":{\"source\":\"iana\"},\"audio/vmr-wb\":{\"source\":\"iana\"},\"audio/vnd.3gpp.iufp\":{\"source\":\"iana\"},\"audio/vnd.4sb\":{\"source\":\"iana\"},\"audio/vnd.audiokoz\":{\"source\":\"iana\"},\"audio/vnd.celp\":{\"source\":\"iana\"},\"audio/vnd.cisco.nse\":{\"source\":\"iana\"},\"audio/vnd.cmles.radio-events\":{\"source\":\"iana\"},\"audio/vnd.cns.anp1\":{\"source\":\"iana\"},\"audio/vnd.cns.inf1\":{\"source\":\"iana\"},\"audio/vnd.dece.audio\":{\"source\":\"iana\",\"extensions\":[\"uva\",\"uvva\"]},\"audio/vnd.digital-winds\":{\"source\":\"iana\",\"extensions\":[\"eol\"]},\"audio/vnd.dlna.adts\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.1\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.2\":{\"source\":\"iana\"},\"audio/vnd.dolby.mlp\":{\"source\":\"iana\"},\"audio/vnd.dolby.mps\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2x\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2z\":{\"source\":\"iana\"},\"audio/vnd.dolby.pulse.1\":{\"source\":\"iana\"},\"audio/vnd.dra\":{\"source\":\"iana\",\"extensions\":[\"dra\"]},\"audio/vnd.dts\":{\"source\":\"iana\",\"extensions\":[\"dts\"]},\"audio/vnd.dts.hd\":{\"source\":\"iana\",\"extensions\":[\"dtshd\"]},\"audio/vnd.dts.uhd\":{\"source\":\"iana\"},\"audio/vnd.dvb.file\":{\"source\":\"iana\"},\"audio/vnd.everad.plj\":{\"source\":\"iana\"},\"audio/vnd.hns.audio\":{\"source\":\"iana\"},\"audio/vnd.lucent.voice\":{\"source\":\"iana\",\"extensions\":[\"lvp\"]},\"audio/vnd.ms-playready.media.pya\":{\"source\":\"iana\",\"extensions\":[\"pya\"]},\"audio/vnd.nokia.mobile-xmf\":{\"source\":\"iana\"},\"audio/vnd.nortel.vbk\":{\"source\":\"iana\"},\"audio/vnd.nuera.ecelp4800\":{\"source\":\"iana\",\"extensions\":[\"ecelp4800\"]},\"audio/vnd.nuera.ecelp7470\":{\"source\":\"iana\",\"extensions\":[\"ecelp7470\"]},\"audio/vnd.nuera.ecelp9600\":{\"source\":\"iana\",\"extensions\":[\"ecelp9600\"]},\"audio/vnd.octel.sbc\":{\"source\":\"iana\"},\"audio/vnd.presonus.multitrack\":{\"source\":\"iana\"},\"audio/vnd.qcelp\":{\"source\":\"iana\"},\"audio/vnd.rhetorex.32kadpcm\":{\"source\":\"iana\"},\"audio/vnd.rip\":{\"source\":\"iana\",\"extensions\":[\"rip\"]},\"audio/vnd.rn-realaudio\":{\"compressible\":false},\"audio/vnd.sealedmedia.softseal.mpeg\":{\"source\":\"iana\"},\"audio/vnd.vmx.cvsd\":{\"source\":\"iana\"},\"audio/vnd.wave\":{\"compressible\":false},\"audio/vorbis\":{\"source\":\"iana\",\"compressible\":false},\"audio/vorbis-config\":{\"source\":\"iana\"},\"audio/wav\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/wave\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"weba\"]},\"audio/x-aac\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"aac\"]},\"audio/x-aiff\":{\"source\":\"apache\",\"extensions\":[\"aif\",\"aiff\",\"aifc\"]},\"audio/x-caf\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"caf\"]},\"audio/x-flac\":{\"source\":\"apache\",\"extensions\":[\"flac\"]},\"audio/x-m4a\":{\"source\":\"nginx\",\"extensions\":[\"m4a\"]},\"audio/x-matroska\":{\"source\":\"apache\",\"extensions\":[\"mka\"]},\"audio/x-mpegurl\":{\"source\":\"apache\",\"extensions\":[\"m3u\"]},\"audio/x-ms-wax\":{\"source\":\"apache\",\"extensions\":[\"wax\"]},\"audio/x-ms-wma\":{\"source\":\"apache\",\"extensions\":[\"wma\"]},\"audio/x-pn-realaudio\":{\"source\":\"apache\",\"extensions\":[\"ram\",\"ra\"]},\"audio/x-pn-realaudio-plugin\":{\"source\":\"apache\",\"extensions\":[\"rmp\"]},\"audio/x-realaudio\":{\"source\":\"nginx\",\"extensions\":[\"ra\"]},\"audio/x-tta\":{\"source\":\"apache\"},\"audio/x-wav\":{\"source\":\"apache\",\"extensions\":[\"wav\"]},\"audio/xm\":{\"source\":\"apache\",\"extensions\":[\"xm\"]},\"chemical/x-cdx\":{\"source\":\"apache\",\"extensions\":[\"cdx\"]},\"chemical/x-cif\":{\"source\":\"apache\",\"extensions\":[\"cif\"]},\"chemical/x-cmdf\":{\"source\":\"apache\",\"extensions\":[\"cmdf\"]},\"chemical/x-cml\":{\"source\":\"apache\",\"extensions\":[\"cml\"]},\"chemical/x-csml\":{\"source\":\"apache\",\"extensions\":[\"csml\"]},\"chemical/x-pdb\":{\"source\":\"apache\"},\"chemical/x-xyz\":{\"source\":\"apache\",\"extensions\":[\"xyz\"]},\"font/collection\":{\"source\":\"iana\",\"extensions\":[\"ttc\"]},\"font/otf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"otf\"]},\"font/sfnt\":{\"source\":\"iana\"},\"font/ttf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttf\"]},\"font/woff\":{\"source\":\"iana\",\"extensions\":[\"woff\"]},\"font/woff2\":{\"source\":\"iana\",\"extensions\":[\"woff2\"]},\"image/aces\":{\"source\":\"iana\",\"extensions\":[\"exr\"]},\"image/apng\":{\"compressible\":false,\"extensions\":[\"apng\"]},\"image/avci\":{\"source\":\"iana\"},\"image/avcs\":{\"source\":\"iana\"},\"image/bmp\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/cgm\":{\"source\":\"iana\",\"extensions\":[\"cgm\"]},\"image/dicom-rle\":{\"source\":\"iana\",\"extensions\":[\"drle\"]},\"image/emf\":{\"source\":\"iana\",\"extensions\":[\"emf\"]},\"image/fits\":{\"source\":\"iana\",\"extensions\":[\"fits\"]},\"image/g3fax\":{\"source\":\"iana\",\"extensions\":[\"g3\"]},\"image/gif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gif\"]},\"image/heic\":{\"source\":\"iana\",\"extensions\":[\"heic\"]},\"image/heic-sequence\":{\"source\":\"iana\",\"extensions\":[\"heics\"]},\"image/heif\":{\"source\":\"iana\",\"extensions\":[\"heif\"]},\"image/heif-sequence\":{\"source\":\"iana\",\"extensions\":[\"heifs\"]},\"image/hej2k\":{\"source\":\"iana\",\"extensions\":[\"hej2\"]},\"image/hsj2\":{\"source\":\"iana\",\"extensions\":[\"hsj2\"]},\"image/ief\":{\"source\":\"iana\",\"extensions\":[\"ief\"]},\"image/jls\":{\"source\":\"iana\",\"extensions\":[\"jls\"]},\"image/jp2\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jp2\",\"jpg2\"]},\"image/jpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpeg\",\"jpg\",\"jpe\"]},\"image/jph\":{\"source\":\"iana\",\"extensions\":[\"jph\"]},\"image/jphc\":{\"source\":\"iana\",\"extensions\":[\"jhc\"]},\"image/jpm\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpm\"]},\"image/jpx\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpx\",\"jpf\"]},\"image/jxr\":{\"source\":\"iana\",\"extensions\":[\"jxr\"]},\"image/jxra\":{\"source\":\"iana\",\"extensions\":[\"jxra\"]},\"image/jxrs\":{\"source\":\"iana\",\"extensions\":[\"jxrs\"]},\"image/jxs\":{\"source\":\"iana\",\"extensions\":[\"jxs\"]},\"image/jxsc\":{\"source\":\"iana\",\"extensions\":[\"jxsc\"]},\"image/jxsi\":{\"source\":\"iana\",\"extensions\":[\"jxsi\"]},\"image/jxss\":{\"source\":\"iana\",\"extensions\":[\"jxss\"]},\"image/ktx\":{\"source\":\"iana\",\"extensions\":[\"ktx\"]},\"image/naplps\":{\"source\":\"iana\"},\"image/pjpeg\":{\"compressible\":false},\"image/png\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"png\"]},\"image/prs.btif\":{\"source\":\"iana\",\"extensions\":[\"btif\"]},\"image/prs.pti\":{\"source\":\"iana\",\"extensions\":[\"pti\"]},\"image/pwg-raster\":{\"source\":\"iana\"},\"image/sgi\":{\"source\":\"apache\",\"extensions\":[\"sgi\"]},\"image/svg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"svg\",\"svgz\"]},\"image/t38\":{\"source\":\"iana\",\"extensions\":[\"t38\"]},\"image/tiff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"tif\",\"tiff\"]},\"image/tiff-fx\":{\"source\":\"iana\",\"extensions\":[\"tfx\"]},\"image/vnd.adobe.photoshop\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"psd\"]},\"image/vnd.airzip.accelerator.azv\":{\"source\":\"iana\",\"extensions\":[\"azv\"]},\"image/vnd.cns.inf2\":{\"source\":\"iana\"},\"image/vnd.dece.graphic\":{\"source\":\"iana\",\"extensions\":[\"uvi\",\"uvvi\",\"uvg\",\"uvvg\"]},\"image/vnd.djvu\":{\"source\":\"iana\",\"extensions\":[\"djvu\",\"djv\"]},\"image/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"image/vnd.dwg\":{\"source\":\"iana\",\"extensions\":[\"dwg\"]},\"image/vnd.dxf\":{\"source\":\"iana\",\"extensions\":[\"dxf\"]},\"image/vnd.fastbidsheet\":{\"source\":\"iana\",\"extensions\":[\"fbs\"]},\"image/vnd.fpx\":{\"source\":\"iana\",\"extensions\":[\"fpx\"]},\"image/vnd.fst\":{\"source\":\"iana\",\"extensions\":[\"fst\"]},\"image/vnd.fujixerox.edmics-mmr\":{\"source\":\"iana\",\"extensions\":[\"mmr\"]},\"image/vnd.fujixerox.edmics-rlc\":{\"source\":\"iana\",\"extensions\":[\"rlc\"]},\"image/vnd.globalgraphics.pgb\":{\"source\":\"iana\"},\"image/vnd.microsoft.icon\":{\"source\":\"iana\",\"extensions\":[\"ico\"]},\"image/vnd.mix\":{\"source\":\"iana\"},\"image/vnd.mozilla.apng\":{\"source\":\"iana\"},\"image/vnd.ms-dds\":{\"extensions\":[\"dds\"]},\"image/vnd.ms-modi\":{\"source\":\"iana\",\"extensions\":[\"mdi\"]},\"image/vnd.ms-photo\":{\"source\":\"apache\",\"extensions\":[\"wdp\"]},\"image/vnd.net-fpx\":{\"source\":\"iana\",\"extensions\":[\"npx\"]},\"image/vnd.radiance\":{\"source\":\"iana\"},\"image/vnd.sealed.png\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.gif\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.jpg\":{\"source\":\"iana\"},\"image/vnd.svf\":{\"source\":\"iana\"},\"image/vnd.tencent.tap\":{\"source\":\"iana\",\"extensions\":[\"tap\"]},\"image/vnd.valve.source.texture\":{\"source\":\"iana\",\"extensions\":[\"vtf\"]},\"image/vnd.wap.wbmp\":{\"source\":\"iana\",\"extensions\":[\"wbmp\"]},\"image/vnd.xiff\":{\"source\":\"iana\",\"extensions\":[\"xif\"]},\"image/vnd.zbrush.pcx\":{\"source\":\"iana\",\"extensions\":[\"pcx\"]},\"image/webp\":{\"source\":\"apache\",\"extensions\":[\"webp\"]},\"image/wmf\":{\"source\":\"iana\",\"extensions\":[\"wmf\"]},\"image/x-3ds\":{\"source\":\"apache\",\"extensions\":[\"3ds\"]},\"image/x-cmu-raster\":{\"source\":\"apache\",\"extensions\":[\"ras\"]},\"image/x-cmx\":{\"source\":\"apache\",\"extensions\":[\"cmx\"]},\"image/x-freehand\":{\"source\":\"apache\",\"extensions\":[\"fh\",\"fhc\",\"fh4\",\"fh5\",\"fh7\"]},\"image/x-icon\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ico\"]},\"image/x-jng\":{\"source\":\"nginx\",\"extensions\":[\"jng\"]},\"image/x-mrsid-image\":{\"source\":\"apache\",\"extensions\":[\"sid\"]},\"image/x-ms-bmp\":{\"source\":\"nginx\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/x-pcx\":{\"source\":\"apache\",\"extensions\":[\"pcx\"]},\"image/x-pict\":{\"source\":\"apache\",\"extensions\":[\"pic\",\"pct\"]},\"image/x-portable-anymap\":{\"source\":\"apache\",\"extensions\":[\"pnm\"]},\"image/x-portable-bitmap\":{\"source\":\"apache\",\"extensions\":[\"pbm\"]},\"image/x-portable-graymap\":{\"source\":\"apache\",\"extensions\":[\"pgm\"]},\"image/x-portable-pixmap\":{\"source\":\"apache\",\"extensions\":[\"ppm\"]},\"image/x-rgb\":{\"source\":\"apache\",\"extensions\":[\"rgb\"]},\"image/x-tga\":{\"source\":\"apache\",\"extensions\":[\"tga\"]},\"image/x-xbitmap\":{\"source\":\"apache\",\"extensions\":[\"xbm\"]},\"image/x-xcf\":{\"compressible\":false},\"image/x-xpixmap\":{\"source\":\"apache\",\"extensions\":[\"xpm\"]},\"image/x-xwindowdump\":{\"source\":\"apache\",\"extensions\":[\"xwd\"]},\"message/cpim\":{\"source\":\"iana\"},\"message/delivery-status\":{\"source\":\"iana\"},\"message/disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"disposition-notification\"]},\"message/external-body\":{\"source\":\"iana\"},\"message/feedback-report\":{\"source\":\"iana\"},\"message/global\":{\"source\":\"iana\",\"extensions\":[\"u8msg\"]},\"message/global-delivery-status\":{\"source\":\"iana\",\"extensions\":[\"u8dsn\"]},\"message/global-disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"u8mdn\"]},\"message/global-headers\":{\"source\":\"iana\",\"extensions\":[\"u8hdr\"]},\"message/http\":{\"source\":\"iana\",\"compressible\":false},\"message/imdn+xml\":{\"source\":\"iana\",\"compressible\":true},\"message/news\":{\"source\":\"iana\"},\"message/partial\":{\"source\":\"iana\",\"compressible\":false},\"message/rfc822\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eml\",\"mime\"]},\"message/s-http\":{\"source\":\"iana\"},\"message/sip\":{\"source\":\"iana\"},\"message/sipfrag\":{\"source\":\"iana\"},\"message/tracking-status\":{\"source\":\"iana\"},\"message/vnd.si.simp\":{\"source\":\"iana\"},\"message/vnd.wfa.wsc\":{\"source\":\"iana\",\"extensions\":[\"wsc\"]},\"model/3mf\":{\"source\":\"iana\",\"extensions\":[\"3mf\"]},\"model/gltf+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gltf\"]},\"model/gltf-binary\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"glb\"]},\"model/iges\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"igs\",\"iges\"]},\"model/mesh\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"msh\",\"mesh\",\"silo\"]},\"model/mtl\":{\"source\":\"iana\",\"extensions\":[\"mtl\"]},\"model/obj\":{\"source\":\"iana\",\"extensions\":[\"obj\"]},\"model/stl\":{\"source\":\"iana\",\"extensions\":[\"stl\"]},\"model/vnd.collada+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dae\"]},\"model/vnd.dwf\":{\"source\":\"iana\",\"extensions\":[\"dwf\"]},\"model/vnd.flatland.3dml\":{\"source\":\"iana\"},\"model/vnd.gdl\":{\"source\":\"iana\",\"extensions\":[\"gdl\"]},\"model/vnd.gs-gdl\":{\"source\":\"apache\"},\"model/vnd.gs.gdl\":{\"source\":\"iana\"},\"model/vnd.gtw\":{\"source\":\"iana\",\"extensions\":[\"gtw\"]},\"model/vnd.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"model/vnd.mts\":{\"source\":\"iana\",\"extensions\":[\"mts\"]},\"model/vnd.opengex\":{\"source\":\"iana\",\"extensions\":[\"ogex\"]},\"model/vnd.parasolid.transmit.binary\":{\"source\":\"iana\",\"extensions\":[\"x_b\"]},\"model/vnd.parasolid.transmit.text\":{\"source\":\"iana\",\"extensions\":[\"x_t\"]},\"model/vnd.rosette.annotated-data-model\":{\"source\":\"iana\"},\"model/vnd.usdz+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"usdz\"]},\"model/vnd.valve.source.compiled-map\":{\"source\":\"iana\",\"extensions\":[\"bsp\"]},\"model/vnd.vtu\":{\"source\":\"iana\",\"extensions\":[\"vtu\"]},\"model/vrml\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"wrl\",\"vrml\"]},\"model/x3d+binary\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3db\",\"x3dbz\"]},\"model/x3d+fastinfoset\":{\"source\":\"iana\",\"extensions\":[\"x3db\"]},\"model/x3d+vrml\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3dv\",\"x3dvz\"]},\"model/x3d+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"x3d\",\"x3dz\"]},\"model/x3d-vrml\":{\"source\":\"iana\",\"extensions\":[\"x3dv\"]},\"multipart/alternative\":{\"source\":\"iana\",\"compressible\":false},\"multipart/appledouble\":{\"source\":\"iana\"},\"multipart/byteranges\":{\"source\":\"iana\"},\"multipart/digest\":{\"source\":\"iana\"},\"multipart/encrypted\":{\"source\":\"iana\",\"compressible\":false},\"multipart/form-data\":{\"source\":\"iana\",\"compressible\":false},\"multipart/header-set\":{\"source\":\"iana\"},\"multipart/mixed\":{\"source\":\"iana\"},\"multipart/multilingual\":{\"source\":\"iana\"},\"multipart/parallel\":{\"source\":\"iana\"},\"multipart/related\":{\"source\":\"iana\",\"compressible\":false},\"multipart/report\":{\"source\":\"iana\"},\"multipart/signed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/vnd.bint.med-plus\":{\"source\":\"iana\"},\"multipart/voice-message\":{\"source\":\"iana\"},\"multipart/x-mixed-replace\":{\"source\":\"iana\"},\"text/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"text/cache-manifest\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"appcache\",\"manifest\"]},\"text/calendar\":{\"source\":\"iana\",\"extensions\":[\"ics\",\"ifb\"]},\"text/calender\":{\"compressible\":true},\"text/cmd\":{\"compressible\":true},\"text/coffeescript\":{\"extensions\":[\"coffee\",\"litcoffee\"]},\"text/css\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"css\"]},\"text/csv\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csv\"]},\"text/csv-schema\":{\"source\":\"iana\"},\"text/directory\":{\"source\":\"iana\"},\"text/dns\":{\"source\":\"iana\"},\"text/ecmascript\":{\"source\":\"iana\"},\"text/encaprtp\":{\"source\":\"iana\"},\"text/enriched\":{\"source\":\"iana\"},\"text/flexfec\":{\"source\":\"iana\"},\"text/fwdred\":{\"source\":\"iana\"},\"text/grammar-ref-list\":{\"source\":\"iana\"},\"text/html\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"html\",\"htm\",\"shtml\"]},\"text/jade\":{\"extensions\":[\"jade\"]},\"text/javascript\":{\"source\":\"iana\",\"compressible\":true},\"text/jcr-cnd\":{\"source\":\"iana\"},\"text/jsx\":{\"compressible\":true,\"extensions\":[\"jsx\"]},\"text/less\":{\"compressible\":true,\"extensions\":[\"less\"]},\"text/markdown\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"markdown\",\"md\"]},\"text/mathml\":{\"source\":\"nginx\",\"extensions\":[\"mml\"]},\"text/mdx\":{\"compressible\":true,\"extensions\":[\"mdx\"]},\"text/mizar\":{\"source\":\"iana\"},\"text/n3\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"n3\"]},\"text/parameters\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/parityfec\":{\"source\":\"iana\"},\"text/plain\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"]},\"text/provenance-notation\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/prs.fallenstein.rst\":{\"source\":\"iana\"},\"text/prs.lines.tag\":{\"source\":\"iana\",\"extensions\":[\"dsc\"]},\"text/prs.prop.logic\":{\"source\":\"iana\"},\"text/raptorfec\":{\"source\":\"iana\"},\"text/red\":{\"source\":\"iana\"},\"text/rfc822-headers\":{\"source\":\"iana\"},\"text/richtext\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtx\"]},\"text/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"text/rtp-enc-aescm128\":{\"source\":\"iana\"},\"text/rtploopback\":{\"source\":\"iana\"},\"text/rtx\":{\"source\":\"iana\"},\"text/sgml\":{\"source\":\"iana\",\"extensions\":[\"sgml\",\"sgm\"]},\"text/shex\":{\"extensions\":[\"shex\"]},\"text/slim\":{\"extensions\":[\"slim\",\"slm\"]},\"text/strings\":{\"source\":\"iana\"},\"text/stylus\":{\"extensions\":[\"stylus\",\"styl\"]},\"text/t140\":{\"source\":\"iana\"},\"text/tab-separated-values\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tsv\"]},\"text/troff\":{\"source\":\"iana\",\"extensions\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"]},\"text/turtle\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"ttl\"]},\"text/ulpfec\":{\"source\":\"iana\"},\"text/uri-list\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uri\",\"uris\",\"urls\"]},\"text/vcard\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vcard\"]},\"text/vnd.a\":{\"source\":\"iana\"},\"text/vnd.abc\":{\"source\":\"iana\"},\"text/vnd.ascii-art\":{\"source\":\"iana\"},\"text/vnd.curl\":{\"source\":\"iana\",\"extensions\":[\"curl\"]},\"text/vnd.curl.dcurl\":{\"source\":\"apache\",\"extensions\":[\"dcurl\"]},\"text/vnd.curl.mcurl\":{\"source\":\"apache\",\"extensions\":[\"mcurl\"]},\"text/vnd.curl.scurl\":{\"source\":\"apache\",\"extensions\":[\"scurl\"]},\"text/vnd.debian.copyright\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.dmclientscript\":{\"source\":\"iana\"},\"text/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"text/vnd.esmertec.theme-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.ficlab.flt\":{\"source\":\"iana\"},\"text/vnd.fly\":{\"source\":\"iana\",\"extensions\":[\"fly\"]},\"text/vnd.fmi.flexstor\":{\"source\":\"iana\",\"extensions\":[\"flx\"]},\"text/vnd.gml\":{\"source\":\"iana\"},\"text/vnd.graphviz\":{\"source\":\"iana\",\"extensions\":[\"gv\"]},\"text/vnd.hgl\":{\"source\":\"iana\"},\"text/vnd.in3d.3dml\":{\"source\":\"iana\",\"extensions\":[\"3dml\"]},\"text/vnd.in3d.spot\":{\"source\":\"iana\",\"extensions\":[\"spot\"]},\"text/vnd.iptc.newsml\":{\"source\":\"iana\"},\"text/vnd.iptc.nitf\":{\"source\":\"iana\"},\"text/vnd.latex-z\":{\"source\":\"iana\"},\"text/vnd.motorola.reflex\":{\"source\":\"iana\"},\"text/vnd.ms-mediapackage\":{\"source\":\"iana\"},\"text/vnd.net2phone.commcenter.command\":{\"source\":\"iana\"},\"text/vnd.radisys.msml-basic-layout\":{\"source\":\"iana\"},\"text/vnd.senx.warpscript\":{\"source\":\"iana\"},\"text/vnd.si.uricatalogue\":{\"source\":\"iana\"},\"text/vnd.sosi\":{\"source\":\"iana\"},\"text/vnd.sun.j2me.app-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"jad\"]},\"text/vnd.trolltech.linguist\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.wap.si\":{\"source\":\"iana\"},\"text/vnd.wap.sl\":{\"source\":\"iana\"},\"text/vnd.wap.wml\":{\"source\":\"iana\",\"extensions\":[\"wml\"]},\"text/vnd.wap.wmlscript\":{\"source\":\"iana\",\"extensions\":[\"wmls\"]},\"text/vtt\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"vtt\"]},\"text/x-asm\":{\"source\":\"apache\",\"extensions\":[\"s\",\"asm\"]},\"text/x-c\":{\"source\":\"apache\",\"extensions\":[\"c\",\"cc\",\"cxx\",\"cpp\",\"h\",\"hh\",\"dic\"]},\"text/x-component\":{\"source\":\"nginx\",\"extensions\":[\"htc\"]},\"text/x-fortran\":{\"source\":\"apache\",\"extensions\":[\"f\",\"for\",\"f77\",\"f90\"]},\"text/x-gwt-rpc\":{\"compressible\":true},\"text/x-handlebars-template\":{\"extensions\":[\"hbs\"]},\"text/x-java-source\":{\"source\":\"apache\",\"extensions\":[\"java\"]},\"text/x-jquery-tmpl\":{\"compressible\":true},\"text/x-lua\":{\"extensions\":[\"lua\"]},\"text/x-markdown\":{\"compressible\":true,\"extensions\":[\"mkd\"]},\"text/x-nfo\":{\"source\":\"apache\",\"extensions\":[\"nfo\"]},\"text/x-opml\":{\"source\":\"apache\",\"extensions\":[\"opml\"]},\"text/x-org\":{\"compressible\":true,\"extensions\":[\"org\"]},\"text/x-pascal\":{\"source\":\"apache\",\"extensions\":[\"p\",\"pas\"]},\"text/x-processing\":{\"compressible\":true,\"extensions\":[\"pde\"]},\"text/x-sass\":{\"extensions\":[\"sass\"]},\"text/x-scss\":{\"extensions\":[\"scss\"]},\"text/x-setext\":{\"source\":\"apache\",\"extensions\":[\"etx\"]},\"text/x-sfv\":{\"source\":\"apache\",\"extensions\":[\"sfv\"]},\"text/x-suse-ymp\":{\"compressible\":true,\"extensions\":[\"ymp\"]},\"text/x-uuencode\":{\"source\":\"apache\",\"extensions\":[\"uu\"]},\"text/x-vcalendar\":{\"source\":\"apache\",\"extensions\":[\"vcs\"]},\"text/x-vcard\":{\"source\":\"apache\",\"extensions\":[\"vcf\"]},\"text/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\"]},\"text/xml-external-parsed-entity\":{\"source\":\"iana\"},\"text/yaml\":{\"extensions\":[\"yaml\",\"yml\"]},\"video/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"video/3gpp\":{\"source\":\"iana\",\"extensions\":[\"3gp\",\"3gpp\"]},\"video/3gpp-tt\":{\"source\":\"iana\"},\"video/3gpp2\":{\"source\":\"iana\",\"extensions\":[\"3g2\"]},\"video/bmpeg\":{\"source\":\"iana\"},\"video/bt656\":{\"source\":\"iana\"},\"video/celb\":{\"source\":\"iana\"},\"video/dv\":{\"source\":\"iana\"},\"video/encaprtp\":{\"source\":\"iana\"},\"video/flexfec\":{\"source\":\"iana\"},\"video/h261\":{\"source\":\"iana\",\"extensions\":[\"h261\"]},\"video/h263\":{\"source\":\"iana\",\"extensions\":[\"h263\"]},\"video/h263-1998\":{\"source\":\"iana\"},\"video/h263-2000\":{\"source\":\"iana\"},\"video/h264\":{\"source\":\"iana\",\"extensions\":[\"h264\"]},\"video/h264-rcdo\":{\"source\":\"iana\"},\"video/h264-svc\":{\"source\":\"iana\"},\"video/h265\":{\"source\":\"iana\"},\"video/iso.segment\":{\"source\":\"iana\"},\"video/jpeg\":{\"source\":\"iana\",\"extensions\":[\"jpgv\"]},\"video/jpeg2000\":{\"source\":\"iana\"},\"video/jpm\":{\"source\":\"apache\",\"extensions\":[\"jpm\",\"jpgm\"]},\"video/mj2\":{\"source\":\"iana\",\"extensions\":[\"mj2\",\"mjp2\"]},\"video/mp1s\":{\"source\":\"iana\"},\"video/mp2p\":{\"source\":\"iana\"},\"video/mp2t\":{\"source\":\"iana\",\"extensions\":[\"ts\"]},\"video/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mp4\",\"mp4v\",\"mpg4\"]},\"video/mp4v-es\":{\"source\":\"iana\"},\"video/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"]},\"video/mpeg4-generic\":{\"source\":\"iana\"},\"video/mpv\":{\"source\":\"iana\"},\"video/nv\":{\"source\":\"iana\"},\"video/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogv\"]},\"video/parityfec\":{\"source\":\"iana\"},\"video/pointer\":{\"source\":\"iana\"},\"video/quicktime\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"qt\",\"mov\"]},\"video/raptorfec\":{\"source\":\"iana\"},\"video/raw\":{\"source\":\"iana\"},\"video/rtp-enc-aescm128\":{\"source\":\"iana\"},\"video/rtploopback\":{\"source\":\"iana\"},\"video/rtx\":{\"source\":\"iana\"},\"video/smpte291\":{\"source\":\"iana\"},\"video/smpte292m\":{\"source\":\"iana\"},\"video/ulpfec\":{\"source\":\"iana\"},\"video/vc1\":{\"source\":\"iana\"},\"video/vc2\":{\"source\":\"iana\"},\"video/vnd.cctv\":{\"source\":\"iana\"},\"video/vnd.dece.hd\":{\"source\":\"iana\",\"extensions\":[\"uvh\",\"uvvh\"]},\"video/vnd.dece.mobile\":{\"source\":\"iana\",\"extensions\":[\"uvm\",\"uvvm\"]},\"video/vnd.dece.mp4\":{\"source\":\"iana\"},\"video/vnd.dece.pd\":{\"source\":\"iana\",\"extensions\":[\"uvp\",\"uvvp\"]},\"video/vnd.dece.sd\":{\"source\":\"iana\",\"extensions\":[\"uvs\",\"uvvs\"]},\"video/vnd.dece.video\":{\"source\":\"iana\",\"extensions\":[\"uvv\",\"uvvv\"]},\"video/vnd.directv.mpeg\":{\"source\":\"iana\"},\"video/vnd.directv.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dlna.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dvb.file\":{\"source\":\"iana\",\"extensions\":[\"dvb\"]},\"video/vnd.fvt\":{\"source\":\"iana\",\"extensions\":[\"fvt\"]},\"video/vnd.hns.video\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsavc\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsmpeg2\":{\"source\":\"iana\"},\"video/vnd.motorola.video\":{\"source\":\"iana\"},\"video/vnd.motorola.videop\":{\"source\":\"iana\"},\"video/vnd.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"mxu\",\"m4u\"]},\"video/vnd.ms-playready.media.pyv\":{\"source\":\"iana\",\"extensions\":[\"pyv\"]},\"video/vnd.nokia.interleaved-multimedia\":{\"source\":\"iana\"},\"video/vnd.nokia.mp4vr\":{\"source\":\"iana\"},\"video/vnd.nokia.videovoip\":{\"source\":\"iana\"},\"video/vnd.objectvideo\":{\"source\":\"iana\"},\"video/vnd.radgamettools.bink\":{\"source\":\"iana\"},\"video/vnd.radgamettools.smacker\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg1\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg4\":{\"source\":\"iana\"},\"video/vnd.sealed.swf\":{\"source\":\"iana\"},\"video/vnd.sealedmedia.softseal.mov\":{\"source\":\"iana\"},\"video/vnd.uvvu.mp4\":{\"source\":\"iana\",\"extensions\":[\"uvu\",\"uvvu\"]},\"video/vnd.vivo\":{\"source\":\"iana\",\"extensions\":[\"viv\"]},\"video/vnd.youtube.yt\":{\"source\":\"iana\"},\"video/vp8\":{\"source\":\"iana\"},\"video/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"webm\"]},\"video/x-f4v\":{\"source\":\"apache\",\"extensions\":[\"f4v\"]},\"video/x-fli\":{\"source\":\"apache\",\"extensions\":[\"fli\"]},\"video/x-flv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"flv\"]},\"video/x-m4v\":{\"source\":\"apache\",\"extensions\":[\"m4v\"]},\"video/x-matroska\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"mkv\",\"mk3d\",\"mks\"]},\"video/x-mng\":{\"source\":\"apache\",\"extensions\":[\"mng\"]},\"video/x-ms-asf\":{\"source\":\"apache\",\"extensions\":[\"asf\",\"asx\"]},\"video/x-ms-vob\":{\"source\":\"apache\",\"extensions\":[\"vob\"]},\"video/x-ms-wm\":{\"source\":\"apache\",\"extensions\":[\"wm\"]},\"video/x-ms-wmv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"wmv\"]},\"video/x-ms-wmx\":{\"source\":\"apache\",\"extensions\":[\"wmx\"]},\"video/x-ms-wvx\":{\"source\":\"apache\",\"extensions\":[\"wvx\"]},\"video/x-msvideo\":{\"source\":\"apache\",\"extensions\":[\"avi\"]},\"video/x-sgi-movie\":{\"source\":\"apache\",\"extensions\":[\"movie\"]},\"video/x-smv\":{\"source\":\"apache\",\"extensions\":[\"smv\"]},\"x-conference/x-cooltalk\":{\"source\":\"apache\",\"extensions\":[\"ice\"]},\"x-shader/x-fragment\":{\"compressible\":true},\"x-shader/x-vertex\":{\"compressible\":true}}"); - -/***/ }), - -/***/ "../../node_modules/mime-db/index.js": -/***/ (function(module, exports, __webpack_require__) { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __webpack_require__("../../node_modules/mime-db/db.json") - - -/***/ }), - -/***/ "../../node_modules/mime-types/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __webpack_require__("../../node_modules/mime-db/index.js") -var extname = __webpack_require__("path").extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ "../../node_modules/mimic-fn/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const mimicFn = (to, from) => { - for (const prop of Reflect.ownKeys(from)) { - Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); - } - - return to; -}; - -module.exports = mimicFn; -// TODO: Remove this for the next major release -module.exports.default = mimicFn; - - -/***/ }), - -/***/ "../../node_modules/minimatch/minimatch.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return __webpack_require__("path") } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__("../../node_modules/brace-expansion/index.js") - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - /* istanbul ignore if */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - - -/***/ }), - -/***/ "../../node_modules/minimist/index.js": -/***/ (function(module, exports) { - -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length-1; i++) { - var key = keys[i]; - if (isConstructorOrProto(o, key)) return; - if (o[key] === undefined) o[key] = {}; - if (o[key] === Object.prototype || o[key] === Number.prototype - || o[key] === String.prototype) o[key] = {}; - if (o[key] === Array.prototype) o[key] = []; - o = o[key]; - } - - var key = keys[keys.length - 1]; - if (isConstructorOrProto(o, key)) return; - if (o === Object.prototype || o === Number.prototype - || o === String.prototype) o = {}; - if (o === Array.prototype) o = []; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - - -function isConstructorOrProto (obj, key) { - return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__'; -} - - -/***/ }), - -/***/ "../../node_modules/mkdirp/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var path = __webpack_require__("path"); -var fs = __webpack_require__("fs"); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return cb(er); - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; - - -/***/ }), - -/***/ "../../node_modules/multimatch/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const minimatch = __webpack_require__("../../node_modules/minimatch/minimatch.js"); -const arrayUnion = __webpack_require__("../../node_modules/array-union/index.js"); -const arrayDiffer = __webpack_require__("../../node_modules/array-differ/index.js"); -const arrify = __webpack_require__("../../node_modules/arrify/index.js"); - -module.exports = (list, patterns, options = {}) => { - list = arrify(list); - patterns = arrify(patterns); - - if (list.length === 0 || patterns.length === 0) { - return []; - } - - return patterns.reduce((result, pattern) => { - let process = arrayUnion; - - if (pattern[0] === '!') { - pattern = pattern.slice(1); - process = arrayDiffer; - } - - return process(result, minimatch.match(list, pattern, options)); - }, []); -}; - - -/***/ }), - -/***/ "../../node_modules/mute-stream/mute.js": -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__("stream") - -module.exports = MuteStream - -// var out = new MuteStream(process.stdout) -// argument auto-pipes -function MuteStream (opts) { - Stream.apply(this) - opts = opts || {} - this.writable = this.readable = true - this.muted = false - this.on('pipe', this._onpipe) - this.replace = opts.replace - - // For readline-type situations - // This much at the start of a line being redrawn after a ctrl char - // is seen (such as backspace) won't be redrawn as the replacement - this._prompt = opts.prompt || null - this._hadControl = false -} - -MuteStream.prototype = Object.create(Stream.prototype) - -Object.defineProperty(MuteStream.prototype, 'constructor', { - value: MuteStream, - enumerable: false -}) - -MuteStream.prototype.mute = function () { - this.muted = true -} - -MuteStream.prototype.unmute = function () { - this.muted = false -} - -Object.defineProperty(MuteStream.prototype, '_onpipe', { - value: onPipe, - enumerable: false, - writable: true, - configurable: true -}) - -function onPipe (src) { - this._src = src -} - -Object.defineProperty(MuteStream.prototype, 'isTTY', { - get: getIsTTY, - set: setIsTTY, - enumerable: true, - configurable: true -}) - -function getIsTTY () { - return( (this._dest) ? this._dest.isTTY - : (this._src) ? this._src.isTTY - : false - ) -} - -// basically just get replace the getter/setter with a regular value -function setIsTTY (isTTY) { - Object.defineProperty(this, 'isTTY', { - value: isTTY, - enumerable: true, - writable: true, - configurable: true - }) -} - -Object.defineProperty(MuteStream.prototype, 'rows', { - get: function () { - return( this._dest ? this._dest.rows - : this._src ? this._src.rows - : undefined ) - }, enumerable: true, configurable: true }) - -Object.defineProperty(MuteStream.prototype, 'columns', { - get: function () { - return( this._dest ? this._dest.columns - : this._src ? this._src.columns - : undefined ) - }, enumerable: true, configurable: true }) - - -MuteStream.prototype.pipe = function (dest, options) { - this._dest = dest - return Stream.prototype.pipe.call(this, dest, options) -} - -MuteStream.prototype.pause = function () { - if (this._src) return this._src.pause() -} - -MuteStream.prototype.resume = function () { - if (this._src) return this._src.resume() -} - -MuteStream.prototype.write = function (c) { - if (this.muted) { - if (!this.replace) return true - if (c.match(/^\u001b/)) { - if(c.indexOf(this._prompt) === 0) { - c = c.substr(this._prompt.length); - c = c.replace(/./g, this.replace); - c = this._prompt + c; - } - this._hadControl = true - return this.emit('data', c) - } else { - if (this._prompt && this._hadControl && - c.indexOf(this._prompt) === 0) { - this._hadControl = false - this.emit('data', this._prompt) - c = c.substr(this._prompt.length) - } - c = c.toString().replace(/./g, this.replace) - } - } - this.emit('data', c) -} - -MuteStream.prototype.end = function (c) { - if (this.muted) { - if (c && this.replace) { - c = c.toString().replace(/./g, this.replace) - } else { - c = null - } - } - if (c) this.emit('data', c) - this.emit('end') -} - -function proxy (fn) { return function () { - var d = this._dest - var s = this._src - if (d && d[fn]) d[fn].apply(d, arguments) - if (s && s[fn]) s[fn].apply(s, arguments) -}} - -MuteStream.prototype.destroy = proxy('destroy') -MuteStream.prototype.destroySoon = proxy('destroySoon') -MuteStream.prototype.close = proxy('close') - - -/***/ }), - -/***/ "../../node_modules/ncp/lib/ncp.js": -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__("fs"), - path = __webpack_require__("path"); - -module.exports = ncp; -ncp.ncp = ncp; - -function ncp (source, dest, options, callback) { - var cback = callback; - - if (!callback) { - cback = options; - options = {}; - } - - var basePath = process.cwd(), - currentPath = path.resolve(basePath, source), - targetPath = path.resolve(basePath, dest), - filter = options.filter, - rename = options.rename, - transform = options.transform, - clobber = options.clobber !== false, - modified = options.modified, - dereference = options.dereference, - errs = null, - started = 0, - finished = 0, - running = 0, - limit = options.limit || ncp.limit || 16; - - limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; - - startCopy(currentPath); - - function startCopy(source) { - started++; - if (filter) { - if (filter instanceof RegExp) { - if (!filter.test(source)) { - return cb(true); - } - } - else if (typeof filter === 'function') { - if (!filter(source)) { - return cb(true); - } - } - } - return getStats(source); - } - - function getStats(source) { - var stat = dereference ? fs.stat : fs.lstat; - if (running >= limit) { - return setImmediate(function () { - getStats(source); - }); - } - running++; - stat(source, function (err, stats) { - var item = {}; - if (err) { - return onError(err); - } - - // We need to get the mode from the stats object and preserve it. - item.name = source; - item.mode = stats.mode; - item.mtime = stats.mtime; //modified time - item.atime = stats.atime; //access time - - if (stats.isDirectory()) { - return onDir(item); - } - else if (stats.isFile()) { - return onFile(item); - } - else if (stats.isSymbolicLink()) { - // Symlinks don't really need to know about the mode. - return onLink(source); - } - }); - } - - function onFile(file) { - var target = file.name.replace(currentPath, targetPath); - if(rename) { - target = rename(target); - } - isWritable(target, function (writable) { - if (writable) { - return copyFile(file, target); - } - if(clobber) { - rmFile(target, function () { - copyFile(file, target); - }); - } - if (modified) { - var stat = dereference ? fs.stat : fs.lstat; - stat(target, function(err, stats) { - //if souce modified time greater to target modified time copy file - if (file.mtime.getTime()>stats.mtime.getTime()) - copyFile(file, target); - else return cb(); - }); - } - else { - return cb(); - } - }); - } - - function copyFile(file, target) { - var readStream = fs.createReadStream(file.name), - writeStream = fs.createWriteStream(target, { mode: file.mode }); - - readStream.on('error', onError); - writeStream.on('error', onError); - - if(transform) { - transform(readStream, writeStream, file); - } else { - writeStream.on('open', function() { - readStream.pipe(writeStream); - }); - } - writeStream.once('finish', function() { - if (modified) { - //target file modified date sync. - fs.utimesSync(target, file.atime, file.mtime); - cb(); - } - else cb(); - }); - } - - function rmFile(file, done) { - fs.unlink(file, function (err) { - if (err) { - return onError(err); - } - return done(); - }); - } - - function onDir(dir) { - var target = dir.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return mkDir(dir, target); - } - copyDir(dir.name); - }); - } - - function mkDir(dir, target) { - fs.mkdir(target, dir.mode, function (err) { - if (err) { - return onError(err); - } - copyDir(dir.name); - }); - } - - function copyDir(dir) { - fs.readdir(dir, function (err, items) { - if (err) { - return onError(err); - } - items.forEach(function (item) { - startCopy(path.join(dir, item)); - }); - return cb(); - }); - } - - function onLink(link) { - var target = link.replace(currentPath, targetPath); - fs.readlink(link, function (err, resolvedPath) { - if (err) { - return onError(err); - } - checkLink(resolvedPath, target); - }); - } - - function checkLink(resolvedPath, target) { - if (dereference) { - resolvedPath = path.resolve(basePath, resolvedPath); - } - isWritable(target, function (writable) { - if (writable) { - return makeLink(resolvedPath, target); - } - fs.readlink(target, function (err, targetDest) { - if (err) { - return onError(err); - } - if (dereference) { - targetDest = path.resolve(basePath, targetDest); - } - if (targetDest === resolvedPath) { - return cb(); - } - return rmFile(target, function () { - makeLink(resolvedPath, target); - }); - }); - }); - } - - function makeLink(linkPath, target) { - fs.symlink(linkPath, target, function (err) { - if (err) { - return onError(err); - } - return cb(); - }); - } - - function isWritable(path, done) { - fs.lstat(path, function (err) { - if (err) { - if (err.code === 'ENOENT') return done(true); - return done(false); - } - return done(false); - }); - } - - function onError(err) { - if (options.stopOnError) { - return cback(err); - } - else if (!errs && options.errs) { - errs = fs.createWriteStream(options.errs); - } - else if (!errs) { - errs = []; - } - if (typeof errs.write === 'undefined') { - errs.push(err); - } - else { - errs.write(err.stack + '\n\n'); - } - return cb(); - } - - function cb(skipped) { - if (!skipped) running--; - finished++; - if ((started === finished) && (running === 0)) { - if (cback !== undefined ) { - return errs ? cback(errs) : cback(null); - } - } - } -} - - - - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/extract_description.js": -/***/ (function(module, exports) { - -module.exports = extractDescription - -// Extracts description from contents of a readme file in markdown format -function extractDescription (d) { - if (!d) return; - if (d === "ERROR: No README data found!") return; - // the first block of text before the first heading - // that isn't the first line heading - d = d.trim().split('\n') - for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); - var l = d.length - for (var e = s + 1; e < l && d[e].trim(); e ++); - return d.slice(s, e).join(' ').trim() -} - - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/fixer.js": -/***/ (function(module, exports, __webpack_require__) { - -var semver = __webpack_require__("../../node_modules/normalize-package-data/node_modules/semver/semver.js") -var validateLicense = __webpack_require__("../../node_modules/validate-npm-package-license/index.js"); -var hostedGitInfo = __webpack_require__("../../node_modules/hosted-git-info/index.js") -var isBuiltinModule = __webpack_require__("../../node_modules/resolve/index.js").isCore -var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = __webpack_require__("../../node_modules/normalize-package-data/lib/extract_description.js") -var url = __webpack_require__("url") -var typos = __webpack_require__("../../node_modules/normalize-package-data/lib/typos.json") - -var fixer = module.exports = { - // default warning function - warn: function() {}, - - fixRepositoryField: function(data) { - if (data.repositories) { - this.warn("repositories"); - data.repository = data.repositories[0] - } - if (!data.repository) return this.warn("missingRepository") - if (typeof data.repository === "string") { - data.repository = { - type: "git", - url: data.repository - } - } - var r = data.repository.url || "" - if (r) { - var hosted = hostedGitInfo.fromUrl(r) - if (hosted) { - r = data.repository.url - = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() - } - } - - if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { - this.warn("brokenGitUrl", r) - } - } - -, fixTypos: function(data) { - Object.keys(typos.topLevel).forEach(function (d) { - if (data.hasOwnProperty(d)) { - this.warn("typo", d, typos.topLevel[d]) - } - }, this) - } - -, fixScriptsField: function(data) { - if (!data.scripts) return - if (typeof data.scripts !== "object") { - this.warn("nonObjectScripts") - delete data.scripts - return - } - Object.keys(data.scripts).forEach(function (k) { - if (typeof data.scripts[k] !== "string") { - this.warn("nonStringScript") - delete data.scripts[k] - } else if (typos.script[k] && !data.scripts[typos.script[k]]) { - this.warn("typo", k, typos.script[k], "scripts") - } - }, this) - } - -, fixFilesField: function(data) { - var files = data.files - if (files && !Array.isArray(files)) { - this.warn("nonArrayFiles") - delete data.files - } else if (data.files) { - data.files = data.files.filter(function(file) { - if (!file || typeof file !== "string") { - this.warn("invalidFilename", file) - return false - } else { - return true - } - }, this) - } - } - -, fixBinField: function(data) { - if (!data.bin) return; - if (typeof data.bin === "string") { - var b = {} - var match - if (match = data.name.match(/^@[^/]+[/](.*)$/)) { - b[match[1]] = data.bin - } else { - b[data.name] = data.bin - } - data.bin = b - } - } - -, fixManField: function(data) { - if (!data.man) return; - if (typeof data.man === "string") { - data.man = [ data.man ] - } - } -, fixBundleDependenciesField: function(data) { - var bdd = "bundledDependencies" - var bd = "bundleDependencies" - if (data[bdd] && !data[bd]) { - data[bd] = data[bdd] - delete data[bdd] - } - if (data[bd] && !Array.isArray(data[bd])) { - this.warn("nonArrayBundleDependencies") - delete data[bd] - } else if (data[bd]) { - data[bd] = data[bd].filter(function(bd) { - if (!bd || typeof bd !== 'string') { - this.warn("nonStringBundleDependency", bd) - return false - } else { - if (!data.dependencies) { - data.dependencies = {} - } - if (!data.dependencies.hasOwnProperty(bd)) { - this.warn("nonDependencyBundleDependency", bd) - data.dependencies[bd] = "*" - } - return true - } - }, this) - } - } - -, fixDependencies: function(data, strict) { - var loose = !strict - objectifyDeps(data, this.warn) - addOptionalDepsToDeps(data, this.warn) - this.fixBundleDependenciesField(data) - - ;['dependencies','devDependencies'].forEach(function(deps) { - if (!(deps in data)) return - if (!data[deps] || typeof data[deps] !== "object") { - this.warn("nonObjectDependencies", deps) - delete data[deps] - return - } - Object.keys(data[deps]).forEach(function (d) { - var r = data[deps][d] - if (typeof r !== 'string') { - this.warn("nonStringDependency", d, JSON.stringify(r)) - delete data[deps][d] - } - var hosted = hostedGitInfo.fromUrl(data[deps][d]) - if (hosted) data[deps][d] = hosted.toString() - }, this) - }, this) - } - -, fixModulesField: function (data) { - if (data.modules) { - this.warn("deprecatedModules") - delete data.modules - } - } - -, fixKeywordsField: function (data) { - if (typeof data.keywords === "string") { - data.keywords = data.keywords.split(/,\s+/) - } - if (data.keywords && !Array.isArray(data.keywords)) { - delete data.keywords - this.warn("nonArrayKeywords") - } else if (data.keywords) { - data.keywords = data.keywords.filter(function(kw) { - if (typeof kw !== "string" || !kw) { - this.warn("nonStringKeyword"); - return false - } else { - return true - } - }, this) - } - } - -, fixVersionField: function(data, strict) { - // allow "loose" semver 1.0 versions in non-strict mode - // enforce strict semver 2.0 compliance in strict mode - var loose = !strict - if (!data.version) { - data.version = "" - return true - } - if (!semver.valid(data.version, loose)) { - throw new Error('Invalid version: "'+ data.version + '"') - } - data.version = semver.clean(data.version, loose) - return true - } - -, fixPeople: function(data) { - modifyPeople(data, unParsePerson) - modifyPeople(data, parsePerson) - } - -, fixNameField: function(data, options) { - if (typeof options === "boolean") options = {strict: options} - else if (typeof options === "undefined") options = {} - var strict = options.strict - if (!data.name && !strict) { - data.name = "" - return - } - if (typeof data.name !== "string") { - throw new Error("name field must be a string.") - } - if (!strict) - data.name = data.name.trim() - ensureValidName(data.name, strict, options.allowLegacyCase) - if (isBuiltinModule(data.name)) - this.warn("conflictingName", data.name) - } - - -, fixDescriptionField: function (data) { - if (data.description && typeof data.description !== 'string') { - this.warn("nonStringDescription") - delete data.description - } - if (data.readme && !data.description) - data.description = extractDescription(data.readme) - if(data.description === undefined) delete data.description; - if (!data.description) this.warn("missingDescription") - } - -, fixReadmeField: function (data) { - if (!data.readme) { - this.warn("missingReadme") - data.readme = "ERROR: No README data found!" - } - } - -, fixBugsField: function(data) { - if (!data.bugs && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if(hosted && hosted.bugs()) { - data.bugs = {url: hosted.bugs()} - } - } - else if(data.bugs) { - var emailRe = /^.+@.*\..+$/ - if(typeof data.bugs == "string") { - if(emailRe.test(data.bugs)) - data.bugs = {email:data.bugs} - else if(url.parse(data.bugs).protocol) - data.bugs = {url: data.bugs} - else - this.warn("nonEmailUrlBugsString") - } - else { - bugsTypos(data.bugs, this.warn) - var oldBugs = data.bugs - data.bugs = {} - if(oldBugs.url) { - if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) - data.bugs.url = oldBugs.url - else - this.warn("nonUrlBugsUrlField") - } - if(oldBugs.email) { - if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) - data.bugs.email = oldBugs.email - else - this.warn("nonEmailBugsEmailField") - } - } - if(!data.bugs.email && !data.bugs.url) { - delete data.bugs - this.warn("emptyNormalizedBugs") - } - } - } - -, fixHomepageField: function(data) { - if (!data.homepage && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if (hosted && hosted.docs()) data.homepage = hosted.docs() - } - if (!data.homepage) return - - if(typeof data.homepage !== "string") { - this.warn("nonUrlHomepage") - return delete data.homepage - } - if(!url.parse(data.homepage).protocol) { - data.homepage = "http://" + data.homepage - } - } - -, fixLicenseField: function(data) { - if (!data.license) { - return this.warn("missingLicense") - } else{ - if ( - typeof(data.license) !== 'string' || - data.license.length < 1 || - data.license.trim() === '' - ) { - this.warn("invalidLicense") - } else { - if (!validateLicense(data.license).validForNewPackages) - this.warn("invalidLicense") - } - } - } -} - -function isValidScopedPackageName(spec) { - if (spec.charAt(0) !== '@') return false - - var rest = spec.slice(1).split('/') - if (rest.length !== 2) return false - - return rest[0] && rest[1] && - rest[0] === encodeURIComponent(rest[0]) && - rest[1] === encodeURIComponent(rest[1]) -} - -function isCorrectlyEncodedName(spec) { - return !spec.match(/[\/@\s\+%:]/) && - spec === encodeURIComponent(spec) -} - -function ensureValidName (name, strict, allowLegacyCase) { - if (name.charAt(0) === "." || - !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || - (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || - name.toLowerCase() === "node_modules" || - name.toLowerCase() === "favicon.ico") { - throw new Error("Invalid name: " + JSON.stringify(name)) - } -} - -function modifyPeople (data, fn) { - if (data.author) data.author = fn(data.author) - ;["maintainers", "contributors"].forEach(function (set) { - if (!Array.isArray(data[set])) return; - data[set] = data[set].map(fn) - }) - return data -} - -function unParsePerson (person) { - if (typeof person === "string") return person - var name = person.name || "" - var u = person.url || person.web - var url = u ? (" ("+u+")") : "" - var e = person.email || person.mail - var email = e ? (" <"+e+">") : "" - return name+email+url -} - -function parsePerson (person) { - if (typeof person !== "string") return person - var name = person.match(/^([^\(<]+)/) - var url = person.match(/\(([^\)]+)\)/) - var email = person.match(/<([^>]+)>/) - var obj = {} - if (name && name[0].trim()) obj.name = name[0].trim() - if (email) obj.email = email[1]; - if (url) obj.url = url[1]; - return obj -} - -function addOptionalDepsToDeps (data, warn) { - var o = data.optionalDependencies - if (!o) return; - var d = data.dependencies || {} - Object.keys(o).forEach(function (k) { - d[k] = o[k] - }) - data.dependencies = d -} - -function depObjectify (deps, type, warn) { - if (!deps) return {} - if (typeof deps === "string") { - deps = deps.trim().split(/[\n\r\s\t ,]+/) - } - if (!Array.isArray(deps)) return deps - warn("deprecatedArrayDependencies", type) - var o = {} - deps.filter(function (d) { - return typeof d === "string" - }).forEach(function(d) { - d = d.trim().split(/(:?[@\s><=])/) - var dn = d.shift() - var dv = d.join("") - dv = dv.trim() - dv = dv.replace(/^@/, "") - o[dn] = dv - }) - return o -} - -function objectifyDeps (data, warn) { - depTypes.forEach(function (type) { - if (!data[type]) return; - data[type] = depObjectify(data[type], type, warn) - }) -} - -function bugsTypos(bugs, warn) { - if (!bugs) return - Object.keys(bugs).forEach(function (k) { - if (typos.bugs[k]) { - warn("typo", k, typos.bugs[k], "bugs") - bugs[typos.bugs[k]] = bugs[k] - delete bugs[k] - } - }) -} - - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/make_warning.js": -/***/ (function(module, exports, __webpack_require__) { - -var util = __webpack_require__("util") -var messages = __webpack_require__("../../node_modules/normalize-package-data/lib/warning_messages.json") - -module.exports = function() { - var args = Array.prototype.slice.call(arguments, 0) - var warningName = args.shift() - if (warningName == "typo") { - return makeTypoWarning.apply(null,args) - } - else { - var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" - args.unshift(msgTemplate) - return util.format.apply(null, args) - } -} - -function makeTypoWarning (providedName, probableName, field) { - if (field) { - providedName = field + "['" + providedName + "']" - probableName = field + "['" + probableName + "']" - } - return util.format(messages.typo, providedName, probableName) -} - - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/normalize.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = normalize - -var fixer = __webpack_require__("../../node_modules/normalize-package-data/lib/fixer.js") -normalize.fixer = fixer - -var makeWarning = __webpack_require__("../../node_modules/normalize-package-data/lib/make_warning.js") - -var fieldsToFix = ['name','version','description','repository','modules','scripts' - ,'files','bin','man','bugs','keywords','readme','homepage','license'] -var otherThingsToFix = ['dependencies','people', 'typos'] - -var thingsToFix = fieldsToFix.map(function(fieldName) { - return ucFirst(fieldName) + "Field" -}) -// two ways to do this in CoffeeScript on only one line, sub-70 chars: -// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" -// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) -thingsToFix = thingsToFix.concat(otherThingsToFix) - -function normalize (data, warn, strict) { - if(warn === true) warn = null, strict = true - if(!strict) strict = false - if(!warn || data.private) warn = function(msg) { /* noop */ } - - if (data.scripts && - data.scripts.install === "node-gyp rebuild" && - !data.scripts.preinstall) { - data.gypfile = true - } - fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } - thingsToFix.forEach(function(thingName) { - fixer["fix" + ucFirst(thingName)](data, strict) - }) - data._id = data.name + "@" + data.version -} - -function ucFirst (string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} - - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/typos.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"topLevel\":{\"dependancies\":\"dependencies\",\"dependecies\":\"dependencies\",\"depdenencies\":\"dependencies\",\"devEependencies\":\"devDependencies\",\"depends\":\"dependencies\",\"dev-dependencies\":\"devDependencies\",\"devDependences\":\"devDependencies\",\"devDepenencies\":\"devDependencies\",\"devdependencies\":\"devDependencies\",\"repostitory\":\"repository\",\"repo\":\"repository\",\"prefereGlobal\":\"preferGlobal\",\"hompage\":\"homepage\",\"hampage\":\"homepage\",\"autohr\":\"author\",\"autor\":\"author\",\"contributers\":\"contributors\",\"publicationConfig\":\"publishConfig\",\"script\":\"scripts\"},\"bugs\":{\"web\":\"url\",\"name\":\"url\"},\"script\":{\"server\":\"start\",\"tests\":\"test\"}}"); - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/lib/warning_messages.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"repositories\":\"'repositories' (plural) Not supported. Please pick one as the 'repository' field\",\"missingRepository\":\"No repository field.\",\"brokenGitUrl\":\"Probably broken git url: %s\",\"nonObjectScripts\":\"scripts must be an object\",\"nonStringScript\":\"script values must be string commands\",\"nonArrayFiles\":\"Invalid 'files' member\",\"invalidFilename\":\"Invalid filename in 'files' list: %s\",\"nonArrayBundleDependencies\":\"Invalid 'bundleDependencies' list. Must be array of package names\",\"nonStringBundleDependency\":\"Invalid bundleDependencies member: %s\",\"nonDependencyBundleDependency\":\"Non-dependency in bundleDependencies: %s\",\"nonObjectDependencies\":\"%s field must be an object\",\"nonStringDependency\":\"Invalid dependency: %s %s\",\"deprecatedArrayDependencies\":\"specifying %s as array is deprecated\",\"deprecatedModules\":\"modules field is deprecated\",\"nonArrayKeywords\":\"keywords should be an array of strings\",\"nonStringKeyword\":\"keywords should be an array of strings\",\"conflictingName\":\"%s is also the name of a node core module.\",\"nonStringDescription\":\"'description' field should be a string\",\"missingDescription\":\"No description\",\"missingReadme\":\"No README data\",\"missingLicense\":\"No license field.\",\"nonEmailUrlBugsString\":\"Bug string field must be url, email, or {email,url}\",\"nonUrlBugsUrlField\":\"bugs.url field must be a string url. Deleted.\",\"nonEmailBugsEmailField\":\"bugs.email field must be a string email. Deleted.\",\"emptyNormalizedBugs\":\"Normalized value of bugs field is an empty object. Deleted.\",\"nonUrlHomepage\":\"homepage field must be a string url. Deleted.\",\"invalidLicense\":\"license should be a valid SPDX license expression\",\"typo\":\"%s should probably be %s.\"}"); - -/***/ }), - -/***/ "../../node_modules/normalize-package-data/node_modules/semver/semver.js": -/***/ (function(module, exports) { - -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} - - -/***/ }), - -/***/ "../../node_modules/normalize-path/index.js": -/***/ (function(module, exports) { - -/*! - * normalize-path - * - * Copyright (c) 2014-2018, Jon Schlinkert. - * Released under the MIT License. - */ - -module.exports = function(path, stripTrailing) { - if (typeof path !== 'string') { - throw new TypeError('expected path to be a string'); - } - - if (path === '\\' || path === '/') return '/'; - - var len = path.length; - if (len <= 1) return path; - - // ensure that win32 namespaces has two leading slashes, so that the path is - // handled properly by the win32 version of path.parse() after being normalized - // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces - var prefix = ''; - if (len > 4 && path[3] === '\\') { - var ch = path[2]; - if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { - path = path.slice(2); - prefix = '//'; - } - } - - var segs = path.split(/[/\\]+/); - if (stripTrailing !== false && segs[segs.length - 1] === '') { - segs.pop(); - } - return prefix + segs.join('/'); -}; - - -/***/ }), - -/***/ "../../node_modules/npm-run-path/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const pathKey = __webpack_require__("../../node_modules/npm-run-path/node_modules/path-key/index.js"); - -const npmRunPath = options => { - options = { - cwd: process.cwd(), - path: process.env[pathKey()], - execPath: process.execPath, - ...options - }; - - let previous; - let cwdPath = path.resolve(options.cwd); - const result = []; - - while (previous !== cwdPath) { - result.push(path.join(cwdPath, 'node_modules/.bin')); - previous = cwdPath; - cwdPath = path.resolve(cwdPath, '..'); - } - - // Ensure the running `node` binary is used - const execPathDir = path.resolve(options.cwd, options.execPath, '..'); - result.push(execPathDir); - - return result.concat(options.path).join(path.delimiter); -}; - -module.exports = npmRunPath; -// TODO: Remove this for the next major release -module.exports.default = npmRunPath; - -module.exports.env = options => { - options = { - env: process.env, - ...options - }; - - const env = {...options.env}; - const path = pathKey({env}); - - options.path = env[path]; - env[path] = module.exports(options); - - return env; -}; - - -/***/ }), - -/***/ "../../node_modules/npm-run-path/node_modules/path-key/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports.default = pathKey; - - -/***/ }), - -/***/ "../../node_modules/once/once.js": -/***/ (function(module, exports, __webpack_require__) { - -var wrappy = __webpack_require__("../../node_modules/wrappy/wrappy.js") -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }), - -/***/ "../../node_modules/onetime/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const mimicFn = __webpack_require__("../../node_modules/mimic-fn/index.js"); - -const calledFunctions = new WeakMap(); - -const onetime = (function_, options = {}) => { - if (typeof function_ !== 'function') { - throw new TypeError('Expected a function'); - } - - let returnValue; - let callCount = 0; - const functionName = function_.displayName || function_.name || ''; - - const onetime = function (...arguments_) { - calledFunctions.set(onetime, ++callCount); - - if (callCount === 1) { - returnValue = function_.apply(this, arguments_); - function_ = null; - } else if (options.throw === true) { - throw new Error(`Function \`${functionName}\` can only be called once`); - } - - return returnValue; - }; - - mimicFn(onetime, function_); - calledFunctions.set(onetime, callCount); - - return onetime; -}; - -module.exports = onetime; -// TODO: Remove this for the next major release -module.exports.default = onetime; - -module.exports.callCount = function_ => { - if (!calledFunctions.has(function_)) { - throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); - } - - return calledFunctions.get(function_); -}; - - -/***/ }), - -/***/ "../../node_modules/ora/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const readline = __webpack_require__("readline"); -const chalk = __webpack_require__("../../node_modules/ora/node_modules/chalk/source/index.js"); -const cliCursor = __webpack_require__("../../node_modules/cli-cursor/index.js"); -const cliSpinners = __webpack_require__("../../node_modules/cli-spinners/index.js"); -const logSymbols = __webpack_require__("../../node_modules/ora/node_modules/log-symbols/index.js"); -const stripAnsi = __webpack_require__("../../node_modules/strip-ansi/index.js"); -const wcwidth = __webpack_require__("../../node_modules/wcwidth/index.js"); -const isInteractive = __webpack_require__("../../node_modules/is-interactive/index.js"); -const MuteStream = __webpack_require__("../../node_modules/mute-stream/mute.js"); - -const TEXT = Symbol('text'); -const PREFIX_TEXT = Symbol('prefixText'); - -const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code - -class StdinDiscarder { - constructor() { - this.requests = 0; - - this.mutedStream = new MuteStream(); - this.mutedStream.pipe(process.stdout); - this.mutedStream.mute(); - - const self = this; - this.ourEmit = function (event, data, ...args) { - const {stdin} = process; - if (self.requests > 0 || stdin.emit === self.ourEmit) { - if (event === 'keypress') { // Fixes readline behavior - return; - } - - if (event === 'data' && data.includes(ASCII_ETX_CODE)) { - process.emit('SIGINT'); - } - - Reflect.apply(self.oldEmit, this, [event, data, ...args]); - } else { - Reflect.apply(process.stdin.emit, this, [event, data, ...args]); - } - }; - } - - start() { - this.requests++; - - if (this.requests === 1) { - this.realStart(); - } - } - - stop() { - if (this.requests <= 0) { - throw new Error('`stop` called more times than `start`'); - } - - this.requests--; - - if (this.requests === 0) { - this.realStop(); - } - } - - realStart() { - // No known way to make it work reliably on Windows - if (process.platform === 'win32') { - return; - } - - this.rl = readline.createInterface({ - input: process.stdin, - output: this.mutedStream - }); - - this.rl.on('SIGINT', () => { - if (process.listenerCount('SIGINT') === 0) { - process.emit('SIGINT'); - } else { - this.rl.close(); - process.kill(process.pid, 'SIGINT'); - } - }); - } - - realStop() { - if (process.platform === 'win32') { - return; - } - - this.rl.close(); - this.rl = undefined; - } -} - -let stdinDiscarder; - -class Ora { - constructor(options) { - if (!stdinDiscarder) { - stdinDiscarder = new StdinDiscarder(); - } - - if (typeof options === 'string') { - options = { - text: options - }; - } - - this.options = { - text: '', - color: 'cyan', - stream: process.stderr, - discardStdin: true, - ...options - }; - - this.spinner = this.options.spinner; - - this.color = this.options.color; - this.hideCursor = this.options.hideCursor !== false; - this.interval = this.options.interval || this.spinner.interval || 100; - this.stream = this.options.stream; - this.id = undefined; - this.isEnabled = typeof this.options.isEnabled === 'boolean' ? this.options.isEnabled : isInteractive({stream: this.stream}); - - // Set *after* `this.stream` - this.text = this.options.text; - this.prefixText = this.options.prefixText; - this.linesToClear = 0; - this.indent = this.options.indent; - this.discardStdin = this.options.discardStdin; - this.isDiscardingStdin = false; - } - - get indent() { - return this._indent; - } - - set indent(indent = 0) { - if (!(indent >= 0 && Number.isInteger(indent))) { - throw new Error('The `indent` option must be an integer from 0 and up'); - } - - this._indent = indent; - } - - _updateInterval(interval) { - if (interval !== undefined) { - this.interval = interval; - } - } - - get spinner() { - return this._spinner; - } - - set spinner(spinner) { - this.frameIndex = 0; - - if (typeof spinner === 'object') { - if (spinner.frames === undefined) { - throw new Error('The given spinner must have a `frames` property'); - } - - this._spinner = spinner; - } else if (process.platform === 'win32') { - this._spinner = cliSpinners.line; - } else if (spinner === undefined) { - // Set default spinner - this._spinner = cliSpinners.dots; - } else if (cliSpinners[spinner]) { - this._spinner = cliSpinners[spinner]; - } else { - throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`); - } - - this._updateInterval(this._spinner.interval); - } - - get text() { - return this[TEXT]; - } - - get prefixText() { - return this[PREFIX_TEXT]; - } - - get isSpinning() { - return this.id !== undefined; - } - - updateLineCount() { - const columns = this.stream.columns || 80; - const fullPrefixText = (typeof this[PREFIX_TEXT] === 'string') ? this[PREFIX_TEXT] + '-' : ''; - this.lineCount = stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n').reduce((count, line) => { - return count + Math.max(1, Math.ceil(wcwidth(line) / columns)); - }, 0); - } - - set text(value) { - this[TEXT] = value; - this.updateLineCount(); - } - - set prefixText(value) { - this[PREFIX_TEXT] = value; - this.updateLineCount(); - } - - frame() { - const {frames} = this.spinner; - let frame = frames[this.frameIndex]; - - if (this.color) { - frame = chalk[this.color](frame); - } - - this.frameIndex = ++this.frameIndex % frames.length; - const fullPrefixText = (typeof this.prefixText === 'string' && this.prefixText !== '') ? this.prefixText + ' ' : ''; - const fullText = typeof this.text === 'string' ? ' ' + this.text : ''; - - return fullPrefixText + frame + fullText; - } - - clear() { - if (!this.isEnabled || !this.stream.isTTY) { - return this; - } - - for (let i = 0; i < this.linesToClear; i++) { - if (i > 0) { - this.stream.moveCursor(0, -1); - } - - this.stream.clearLine(); - this.stream.cursorTo(this.indent); - } - - this.linesToClear = 0; - - return this; - } - - render() { - this.clear(); - this.stream.write(this.frame()); - this.linesToClear = this.lineCount; - - return this; - } - - start(text) { - if (text) { - this.text = text; - } - - if (!this.isEnabled) { - if (this.text) { - this.stream.write(`- ${this.text}\n`); - } - - return this; - } - - if (this.isSpinning) { - return this; - } - - if (this.hideCursor) { - cliCursor.hide(this.stream); - } - - if (this.discardStdin && process.stdin.isTTY) { - this.isDiscardingStdin = true; - stdinDiscarder.start(); - } - - this.render(); - this.id = setInterval(this.render.bind(this), this.interval); - - return this; - } - - stop() { - if (!this.isEnabled) { - return this; - } - - clearInterval(this.id); - this.id = undefined; - this.frameIndex = 0; - this.clear(); - if (this.hideCursor) { - cliCursor.show(this.stream); - } - - if (this.discardStdin && process.stdin.isTTY && this.isDiscardingStdin) { - stdinDiscarder.stop(); - this.isDiscardingStdin = false; - } - - return this; - } - - succeed(text) { - return this.stopAndPersist({symbol: logSymbols.success, text}); - } - - fail(text) { - return this.stopAndPersist({symbol: logSymbols.error, text}); - } - - warn(text) { - return this.stopAndPersist({symbol: logSymbols.warning, text}); - } - - info(text) { - return this.stopAndPersist({symbol: logSymbols.info, text}); - } - - stopAndPersist(options = {}) { - const prefixText = options.prefixText || this.prefixText; - const fullPrefixText = (typeof prefixText === 'string' && prefixText !== '') ? prefixText + ' ' : ''; - const text = options.text || this.text; - const fullText = (typeof text === 'string') ? ' ' + text : ''; - - this.stop(); - this.stream.write(`${fullPrefixText}${options.symbol || ' '}${fullText}\n`); - - return this; - } -} - -const oraFactory = function (options) { - return new Ora(options); -}; - -module.exports = oraFactory; - -module.exports.promise = (action, options) => { - // eslint-disable-next-line promise/prefer-await-to-then - if (typeof action.then !== 'function') { - throw new TypeError('Parameter `action` must be a Promise'); - } - - const spinner = new Ora(options); - spinner.start(); - - (async () => { - try { - await action; - spinner.succeed(); - } catch (_) { - spinner.fail(); - } - })(); - - return spinner; -}; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/chalk/source/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const ansiStyles = __webpack_require__("../../node_modules/ansi-styles/index.js"); -const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__("../../node_modules/supports-color/index.js"); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = __webpack_require__("../../node_modules/ora/node_modules/chalk/source/util.js"); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level > 3 || options.level < 0) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!Array.isArray(firstString)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = __webpack_require__("../../node_modules/ora/node_modules/chalk/source/templates.js"); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -// For TypeScript -chalk.Level = { - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3, - 0: 'None', - 1: 'Basic', - 2: 'Ansi256', - 3: 'TrueColor' -}; - -module.exports = chalk; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/chalk/source/templates.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } - - return chunks.join(''); -}; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/chalk/source/util.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/has-flag/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/log-symbols/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const chalk = __webpack_require__("../../node_modules/ora/node_modules/log-symbols/node_modules/chalk/index.js"); - -const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; - -const main = { - info: chalk.blue('ℹ'), - success: chalk.green('✔'), - warning: chalk.yellow('⚠'), - error: chalk.red('✖') -}; - -const fallbacks = { - info: chalk.blue('i'), - success: chalk.green('√'), - warning: chalk.yellow('‼'), - error: chalk.red('×') -}; - -module.exports = isSupported ? main : fallbacks; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/log-symbols/node_modules/ansi-styles/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__("../../node_modules/color-convert/index.js"); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("../../node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/log-symbols/node_modules/chalk/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const escapeStringRegexp = __webpack_require__("../../node_modules/escape-string-regexp/index.js"); -const ansiStyles = __webpack_require__("../../node_modules/ora/node_modules/log-symbols/node_modules/ansi-styles/index.js"); -const stdoutColor = __webpack_require__("../../node_modules/ora/node_modules/log-symbols/node_modules/supports-color/index.js").stdout; - -const template = __webpack_require__("../../node_modules/ora/node_modules/log-symbols/node_modules/chalk/templates.js"); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/log-symbols/node_modules/chalk/templates.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - - return current; -} - -module.exports = (chalk, tmp) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(chr); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } - - return chunks.join(''); -}; - - -/***/ }), - -/***/ "../../node_modules/ora/node_modules/log-symbols/node_modules/supports-color/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__("os"); -const hasFlag = __webpack_require__("../../node_modules/ora/node_modules/has-flag/index.js"); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; - - -/***/ }), - -/***/ "../../node_modules/parse-json/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const errorEx = __webpack_require__("../../node_modules/error-ex/index.js"); -const fallback = __webpack_require__("../../node_modules/json-parse-better-errors/index.js"); -const {default: LinesAndColumns} = __webpack_require__("../../node_modules/lines-and-columns/dist/index.mjs"); -const {codeFrameColumns} = __webpack_require__("../../node_modules/@babel/code-frame/lib/index.js"); - -const JSONError = errorEx('JSONError', { - fileName: errorEx.append('in %s'), - codeFrame: errorEx.append('\n\n%s\n') -}); - -module.exports = (string, reviver, filename) => { - if (typeof reviver === 'string') { - filename = reviver; - reviver = null; - } - - try { - try { - return JSON.parse(string, reviver); - } catch (error) { - fallback(string, reviver); - throw error; - } - } catch (error) { - error.message = error.message.replace(/\n/g, ''); - const indexMatch = error.message.match(/in JSON at position (\d+) while parsing near/); - - const jsonError = new JSONError(error); - if (filename) { - jsonError.fileName = filename; - } - - if (indexMatch && indexMatch.length > 0) { - const lines = new LinesAndColumns(string); - const index = Number(indexMatch[1]); - const location = lines.locationForIndex(index); - - const codeFrame = codeFrameColumns( - string, - {start: {line: location.line + 1, column: location.column + 1}}, - {highlightCode: true} - ); - - jsonError.codeFrame = codeFrame; - } - - throw jsonError; - } -}; - - -/***/ }), - -/***/ "../../node_modules/path-is-absolute/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; - - -/***/ }), - -/***/ "../../node_modules/path-parse/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isWindows = process.platform === 'win32'; - -// Regex to split a windows path into into [dir, root, basename, name, ext] -var splitWindowsRe = - /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; - -var win32 = {}; - -function win32SplitPath(filename) { - return splitWindowsRe.exec(filename).slice(1); -} - -win32.parse = function(pathString) { - if (typeof pathString !== 'string') { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 5) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - return { - root: allParts[1], - dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), - base: allParts[2], - ext: allParts[4], - name: allParts[3] - }; -}; - - - -// Split a filename into [dir, root, basename, name, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; -var posix = {}; - - -function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); -} - - -posix.parse = function(pathString) { - if (typeof pathString !== 'string') { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 5) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - - return { - root: allParts[1], - dir: allParts[0].slice(0, -1), - base: allParts[2], - ext: allParts[4], - name: allParts[3], - }; -}; - - -if (isWindows) - module.exports = win32.parse; -else /* posix */ - module.exports = posix.parse; - -module.exports.posix = posix.parse; -module.exports.win32 = win32.parse; - - -/***/ }), - -/***/ "../../node_modules/path-type/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {promisify} = __webpack_require__("util"); -const fs = __webpack_require__("fs"); - -async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== 'string') { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - - try { - const stats = await promisify(fs[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error) { - if (error.code === 'ENOENT') { - return false; - } - - throw error; - } -} - -function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== 'string') { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - - try { - return fs[fsStatType](filePath)[statsMethodName](); - } catch (error) { - if (error.code === 'ENOENT') { - return false; - } - - throw error; - } -} - -exports.isFile = isType.bind(null, 'stat', 'isFile'); -exports.isDirectory = isType.bind(null, 'stat', 'isDirectory'); -exports.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink'); -exports.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile'); -exports.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory'); -exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); - - -/***/ }), - -/***/ "../../node_modules/picomatch/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = __webpack_require__("../../node_modules/picomatch/lib/picomatch.js"); - - -/***/ }), - -/***/ "../../node_modules/picomatch/lib/constants.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__("path"); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - - -/***/ }), - -/***/ "../../node_modules/picomatch/lib/parse.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const constants = __webpack_require__("../../node_modules/picomatch/lib/constants.js"); -const utils = __webpack_require__("../../node_modules/picomatch/lib/utils.js"); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - output = token.close = `)${rest})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; - - -/***/ }), - -/***/ "../../node_modules/picomatch/lib/picomatch.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__("path"); -const scan = __webpack_require__("../../node_modules/picomatch/lib/scan.js"); -const parse = __webpack_require__("../../node_modules/picomatch/lib/parse.js"); -const utils = __webpack_require__("../../node_modules/picomatch/lib/utils.js"); -const constants = __webpack_require__("../../node_modules/picomatch/lib/constants.js"); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; - - -/***/ }), - -/***/ "../../node_modules/picomatch/lib/scan.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const utils = __webpack_require__("../../node_modules/picomatch/lib/utils.js"); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __webpack_require__("../../node_modules/picomatch/lib/constants.js"); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; - - -/***/ }), - -/***/ "../../node_modules/picomatch/lib/utils.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__("path"); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = __webpack_require__("../../node_modules/picomatch/lib/constants.js"); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; - - -/***/ }), - -/***/ "../../node_modules/pump/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var once = __webpack_require__("../../node_modules/once/once.js") -var eos = __webpack_require__("../../node_modules/end-of-stream/index.js") -var fs = __webpack_require__("fs") // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump - - -/***/ }), - -/***/ "../../node_modules/read-pkg/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const {promisify} = __webpack_require__("util"); -const fs = __webpack_require__("fs"); -const path = __webpack_require__("path"); -const parseJson = __webpack_require__("../../node_modules/parse-json/index.js"); - -const readFileAsync = promisify(fs.readFile); - -module.exports = async options => { - options = { - cwd: process.cwd(), - normalize: true, - ...options - }; - - const filePath = path.resolve(options.cwd, 'package.json'); - const json = parseJson(await readFileAsync(filePath, 'utf8')); - - if (options.normalize) { - __webpack_require__("../../node_modules/normalize-package-data/lib/normalize.js")(json); - } - - return json; -}; - -module.exports.sync = options => { - options = { - cwd: process.cwd(), - normalize: true, - ...options - }; - - const filePath = path.resolve(options.cwd, 'package.json'); - const json = parseJson(fs.readFileSync(filePath, 'utf8')); - - if (options.normalize) { - __webpack_require__("../../node_modules/normalize-package-data/lib/normalize.js")(json); - } - - return json; -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var async = __webpack_require__("../../node_modules/resolve/lib/async.js"); -async.core = __webpack_require__("../../node_modules/resolve/lib/core.js"); -async.isCore = __webpack_require__("../../node_modules/resolve/lib/is-core.js"); -async.sync = __webpack_require__("../../node_modules/resolve/lib/sync.js"); - -module.exports = async; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/async.js": -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__("fs"); -var getHomedir = __webpack_require__("../../node_modules/resolve/lib/homedir.js"); -var path = __webpack_require__("path"); -var caller = __webpack_require__("../../node_modules/resolve/lib/caller.js"); -var nodeModulesPaths = __webpack_require__("../../node_modules/resolve/lib/node-modules-paths.js"); -var normalizeOptions = __webpack_require__("../../node_modules/resolve/lib/normalize-options.js"); -var isCore = __webpack_require__("../../node_modules/is-core-module/index.js"); - -var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; - -var homedir = getHomedir(); -var defaultPaths = function () { - return [ - path.join(homedir, '.node_modules'), - path.join(homedir, '.node_libraries') - ]; -}; - -var defaultIsFile = function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var defaultIsDir = function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var defaultRealpath = function realpath(x, cb) { - realpathFS(x, function (realpathErr, realPath) { - if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); - else cb(null, realpathErr ? x : realPath); - }); -}; - -var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { - if (opts && opts.preserveSymlinks === false) { - realpath(x, cb); - } else { - cb(null, x); - } -}; - -var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { - readFile(pkgfile, function (readFileErr, body) { - if (readFileErr) cb(readFileErr); - else { - try { - var pkg = JSON.parse(body); - cb(null, pkg); - } catch (jsonErr) { - cb(null); - } - } - }); -}; - -var getPackageCandidates = function getPackageCandidates(x, start, opts) { - var dirs = nodeModulesPaths(start, opts, x); - for (var i = 0; i < dirs.length; i++) { - dirs[i] = path.join(dirs[i], x); - } - return dirs; -}; - -module.exports = function resolve(x, options, callback) { - var cb = callback; - var opts = options; - if (typeof options === 'function') { - cb = opts; - opts = {}; - } - if (typeof x !== 'string') { - var err = new TypeError('Path must be a string.'); - return process.nextTick(function () { - cb(err); - }); - } - - opts = normalizeOptions(x, opts); - - var isFile = opts.isFile || defaultIsFile; - var isDirectory = opts.isDirectory || defaultIsDir; - var readFile = opts.readFile || fs.readFile; - var realpath = opts.realpath || defaultRealpath; - var readPackage = opts.readPackage || defaultReadPackage; - if (opts.readFile && opts.readPackage) { - var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); - return process.nextTick(function () { - cb(conflictErr); - }); - } - var packageIterator = opts.packageIterator; - - var extensions = opts.extensions || ['.js']; - var includeCoreModules = opts.includeCoreModules !== false; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || defaultPaths(); - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - maybeRealpath( - realpath, - absoluteStart, - opts, - function (err, realStart) { - if (err) cb(err); - else init(realStart); - } - ); - - var res; - function init(basedir) { - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - res = path.resolve(basedir, x); - if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; - if ((/\/$/).test(x) && res === basedir) { - loadAsDirectory(res, opts.package, onfile); - } else loadAsFile(res, opts.package, onfile); - } else if (includeCoreModules && isCore(x)) { - return cb(null, x); - } else loadNodeModules(x, basedir, function (err, n, pkg) { - if (err) cb(err); - else if (n) { - return maybeRealpath(realpath, n, opts, function (err, realN) { - if (err) { - cb(err); - } else { - cb(null, realN, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function onfile(err, m, pkg) { - if (err) cb(err); - else if (m) cb(null, m, pkg); - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err); - else if (d) { - maybeRealpath(realpath, d, opts, function (err, realD) { - if (err) { - cb(err); - } else { - cb(null, realD, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function loadAsFile(x, thePackage, callback) { - var loadAsFilePackage = thePackage; - var cb = callback; - if (typeof loadAsFilePackage === 'function') { - cb = loadAsFilePackage; - loadAsFilePackage = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, loadAsFilePackage); - - function load(exts, x, loadPackage) { - if (exts.length === 0) return cb(null, undefined, loadPackage); - var file = x + exts[0]; - - var pkg = loadPackage; - if (pkg) onpkg(null, pkg); - else loadpkg(path.dirname(file), onpkg); - - function onpkg(err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err); - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex(err, ex) { - if (err) return cb(err); - if (ex) return cb(null, file, pkg); - load(exts.slice(1), x, pkg); - } - } - } - - function loadpkg(dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return cb(null); - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); - - maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { - if (unwrapErr) return loadpkg(path.dirname(dir), cb); - var pkgfile = path.join(pkgdir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg(path.dirname(dir), cb); - - readPackage(readFile, pkgfile, function (err, pkgParam) { - if (err) cb(err); - - var pkg = pkgParam; - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - }); - } - - function loadAsDirectory(x, loadAsDirectoryPackage, callback) { - var cb = callback; - var fpkg = loadAsDirectoryPackage; - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { - if (unwrapErr) return cb(unwrapErr); - var pkgfile = path.join(pkgdir, 'package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); - - readPackage(readFile, pkgfile, function (err, pkgParam) { - if (err) return cb(err); - - var pkg = pkgParam; - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg && pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - return cb(mainError); - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, 'index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - }); - } - - function processDirs(cb, dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - isDirectory(path.dirname(dir), isdir); - - function isdir(err, isdir) { - if (err) return cb(err); - if (!isdir) return processDirs(cb, dirs.slice(1)); - loadAsFile(dir, opts.package, onfile); - } - - function onfile(err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(dir, opts.package, ondir); - } - - function ondir(err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - processDirs(cb, dirs.slice(1)); - } - } - function loadNodeModules(x, start, cb) { - var thunk = function () { return getPackageCandidates(x, start, opts); }; - processDirs( - cb, - packageIterator ? packageIterator(x, start, thunk, opts) : thunk() - ); - } -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/caller.js": -/***/ (function(module, exports) { - -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/core.js": -/***/ (function(module, exports, __webpack_require__) { - -var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; - -function specifierIncluded(specifier) { - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = parseInt(current[i] || 0, 10); - var ver = parseInt(versionParts[i] || 0, 10); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } else if (op === '>=') { - return cur >= ver; - } - return false; - } - return op === '>='; -} - -function matchesRange(range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { return false; } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(specifiers[i])) { return false; } - } - return true; -} - -function versionIncluded(specifierValue) { - if (typeof specifierValue === 'boolean') { return specifierValue; } - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(specifierValue[i])) { return true; } - } - return false; - } - return matchesRange(specifierValue); -} - -var data = __webpack_require__("../../node_modules/resolve/lib/core.json"); - -var core = {}; -for (var mod in data) { // eslint-disable-line no-restricted-syntax - if (Object.prototype.hasOwnProperty.call(data, mod)) { - core[mod] = versionIncluded(data[mod]); - } -} -module.exports = core; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/core.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"assert\":true,\"node:assert\":[\">= 14.18 && < 15\",\">= 16\"],\"assert/strict\":\">= 15\",\"node:assert/strict\":\">= 16\",\"async_hooks\":\">= 8\",\"node:async_hooks\":[\">= 14.18 && < 15\",\">= 16\"],\"buffer_ieee754\":\">= 0.5 && < 0.9.7\",\"buffer\":true,\"node:buffer\":[\">= 14.18 && < 15\",\">= 16\"],\"child_process\":true,\"node:child_process\":[\">= 14.18 && < 15\",\">= 16\"],\"cluster\":\">= 0.5\",\"node:cluster\":[\">= 14.18 && < 15\",\">= 16\"],\"console\":true,\"node:console\":[\">= 14.18 && < 15\",\">= 16\"],\"constants\":true,\"node:constants\":[\">= 14.18 && < 15\",\">= 16\"],\"crypto\":true,\"node:crypto\":[\">= 14.18 && < 15\",\">= 16\"],\"_debug_agent\":\">= 1 && < 8\",\"_debugger\":\"< 8\",\"dgram\":true,\"node:dgram\":[\">= 14.18 && < 15\",\">= 16\"],\"diagnostics_channel\":[\">= 14.17 && < 15\",\">= 15.1\"],\"node:diagnostics_channel\":[\">= 14.18 && < 15\",\">= 16\"],\"dns\":true,\"node:dns\":[\">= 14.18 && < 15\",\">= 16\"],\"dns/promises\":\">= 15\",\"node:dns/promises\":\">= 16\",\"domain\":\">= 0.7.12\",\"node:domain\":[\">= 14.18 && < 15\",\">= 16\"],\"events\":true,\"node:events\":[\">= 14.18 && < 15\",\">= 16\"],\"freelist\":\"< 6\",\"fs\":true,\"node:fs\":[\">= 14.18 && < 15\",\">= 16\"],\"fs/promises\":[\">= 10 && < 10.1\",\">= 14\"],\"node:fs/promises\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_agent\":\">= 0.11.1\",\"node:_http_agent\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_client\":\">= 0.11.1\",\"node:_http_client\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_common\":\">= 0.11.1\",\"node:_http_common\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_incoming\":\">= 0.11.1\",\"node:_http_incoming\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_outgoing\":\">= 0.11.1\",\"node:_http_outgoing\":[\">= 14.18 && < 15\",\">= 16\"],\"_http_server\":\">= 0.11.1\",\"node:_http_server\":[\">= 14.18 && < 15\",\">= 16\"],\"http\":true,\"node:http\":[\">= 14.18 && < 15\",\">= 16\"],\"http2\":\">= 8.8\",\"node:http2\":[\">= 14.18 && < 15\",\">= 16\"],\"https\":true,\"node:https\":[\">= 14.18 && < 15\",\">= 16\"],\"inspector\":\">= 8\",\"node:inspector\":[\">= 14.18 && < 15\",\">= 16\"],\"_linklist\":\"< 8\",\"module\":true,\"node:module\":[\">= 14.18 && < 15\",\">= 16\"],\"net\":true,\"node:net\":[\">= 14.18 && < 15\",\">= 16\"],\"node-inspect/lib/_inspect\":\">= 7.6 && < 12\",\"node-inspect/lib/internal/inspect_client\":\">= 7.6 && < 12\",\"node-inspect/lib/internal/inspect_repl\":\">= 7.6 && < 12\",\"os\":true,\"node:os\":[\">= 14.18 && < 15\",\">= 16\"],\"path\":true,\"node:path\":[\">= 14.18 && < 15\",\">= 16\"],\"path/posix\":\">= 15.3\",\"node:path/posix\":\">= 16\",\"path/win32\":\">= 15.3\",\"node:path/win32\":\">= 16\",\"perf_hooks\":\">= 8.5\",\"node:perf_hooks\":[\">= 14.18 && < 15\",\">= 16\"],\"process\":\">= 1\",\"node:process\":[\">= 14.18 && < 15\",\">= 16\"],\"punycode\":\">= 0.5\",\"node:punycode\":[\">= 14.18 && < 15\",\">= 16\"],\"querystring\":true,\"node:querystring\":[\">= 14.18 && < 15\",\">= 16\"],\"readline\":true,\"node:readline\":[\">= 14.18 && < 15\",\">= 16\"],\"readline/promises\":\">= 17\",\"node:readline/promises\":\">= 17\",\"repl\":true,\"node:repl\":[\">= 14.18 && < 15\",\">= 16\"],\"smalloc\":\">= 0.11.5 && < 3\",\"_stream_duplex\":\">= 0.9.4\",\"node:_stream_duplex\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_transform\":\">= 0.9.4\",\"node:_stream_transform\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_wrap\":\">= 1.4.1\",\"node:_stream_wrap\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_passthrough\":\">= 0.9.4\",\"node:_stream_passthrough\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_readable\":\">= 0.9.4\",\"node:_stream_readable\":[\">= 14.18 && < 15\",\">= 16\"],\"_stream_writable\":\">= 0.9.4\",\"node:_stream_writable\":[\">= 14.18 && < 15\",\">= 16\"],\"stream\":true,\"node:stream\":[\">= 14.18 && < 15\",\">= 16\"],\"stream/consumers\":\">= 16.7\",\"node:stream/consumers\":\">= 16.7\",\"stream/promises\":\">= 15\",\"node:stream/promises\":\">= 16\",\"stream/web\":\">= 16.5\",\"node:stream/web\":\">= 16.5\",\"string_decoder\":true,\"node:string_decoder\":[\">= 14.18 && < 15\",\">= 16\"],\"sys\":[\">= 0.4 && < 0.7\",\">= 0.8\"],\"node:sys\":[\">= 14.18 && < 15\",\">= 16\"],\"timers\":true,\"node:timers\":[\">= 14.18 && < 15\",\">= 16\"],\"timers/promises\":\">= 15\",\"node:timers/promises\":\">= 16\",\"_tls_common\":\">= 0.11.13\",\"node:_tls_common\":[\">= 14.18 && < 15\",\">= 16\"],\"_tls_legacy\":\">= 0.11.3 && < 10\",\"_tls_wrap\":\">= 0.11.3\",\"node:_tls_wrap\":[\">= 14.18 && < 15\",\">= 16\"],\"tls\":true,\"node:tls\":[\">= 14.18 && < 15\",\">= 16\"],\"trace_events\":\">= 10\",\"node:trace_events\":[\">= 14.18 && < 15\",\">= 16\"],\"tty\":true,\"node:tty\":[\">= 14.18 && < 15\",\">= 16\"],\"url\":true,\"node:url\":[\">= 14.18 && < 15\",\">= 16\"],\"util\":true,\"node:util\":[\">= 14.18 && < 15\",\">= 16\"],\"util/types\":\">= 15.3\",\"node:util/types\":\">= 16\",\"v8/tools/arguments\":\">= 10 && < 12\",\"v8/tools/codemap\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/consarray\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/csvparser\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/logreader\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/profile_view\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8/tools/splaytree\":[\">= 4.4 && < 5\",\">= 5.2 && < 12\"],\"v8\":\">= 1\",\"node:v8\":[\">= 14.18 && < 15\",\">= 16\"],\"vm\":true,\"node:vm\":[\">= 14.18 && < 15\",\">= 16\"],\"wasi\":\">= 13.4 && < 13.5\",\"worker_threads\":\">= 11.7\",\"node:worker_threads\":[\">= 14.18 && < 15\",\">= 16\"],\"zlib\":\">= 0.5\",\"node:zlib\":[\">= 14.18 && < 15\",\">= 16\"]}"); - -/***/ }), - -/***/ "../../node_modules/resolve/lib/homedir.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var os = __webpack_require__("os"); - -// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js - -module.exports = os.homedir || function homedir() { - var home = process.env.HOME; - var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; - - if (process.platform === 'win32') { - return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; - } - - if (process.platform === 'darwin') { - return home || (user ? '/Users/' + user : null); - } - - if (process.platform === 'linux') { - return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens - } - - return home || null; -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/is-core.js": -/***/ (function(module, exports, __webpack_require__) { - -var isCoreModule = __webpack_require__("../../node_modules/is-core-module/index.js"); - -module.exports = function isCore(x) { - return isCoreModule(x); -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/node-modules-paths.js": -/***/ (function(module, exports, __webpack_require__) { - -var path = __webpack_require__("path"); -var parse = path.parse || __webpack_require__("../../node_modules/path-parse/index.js"); // eslint-disable-line global-require - -var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { - var prefix = '/'; - if ((/^([A-Za-z]:)/).test(absoluteStart)) { - prefix = ''; - } else if ((/^\\\\/).test(absoluteStart)) { - prefix = '\\\\'; - } - - var paths = [absoluteStart]; - var parsed = parse(absoluteStart); - while (parsed.dir !== paths[paths.length - 1]) { - paths.push(parsed.dir); - parsed = parse(parsed.dir); - } - - return paths.reduce(function (dirs, aPath) { - return dirs.concat(modules.map(function (moduleDir) { - return path.resolve(prefix, aPath, moduleDir); - })); - }, []); -}; - -module.exports = function nodeModulesPaths(start, opts, request) { - var modules = opts && opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules']; - - if (opts && typeof opts.paths === 'function') { - return opts.paths( - request, - start, - function () { return getNodeModulesDirs(start, modules); }, - opts - ); - } - - var dirs = getNodeModulesDirs(start, modules); - return opts && opts.paths ? dirs.concat(opts.paths) : dirs; -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/normalize-options.js": -/***/ (function(module, exports) { - -module.exports = function (x, opts) { - /** - * This file is purposefully a passthrough. It's expected that third-party - * environments will override it at runtime in order to inject special logic - * into `resolve` (by manipulating the options). One such example is the PnP - * code path in Yarn. - */ - - return opts || {}; -}; - - -/***/ }), - -/***/ "../../node_modules/resolve/lib/sync.js": -/***/ (function(module, exports, __webpack_require__) { - -var isCore = __webpack_require__("../../node_modules/is-core-module/index.js"); -var fs = __webpack_require__("fs"); -var path = __webpack_require__("path"); -var getHomedir = __webpack_require__("../../node_modules/resolve/lib/homedir.js"); -var caller = __webpack_require__("../../node_modules/resolve/lib/caller.js"); -var nodeModulesPaths = __webpack_require__("../../node_modules/resolve/lib/node-modules-paths.js"); -var normalizeOptions = __webpack_require__("../../node_modules/resolve/lib/normalize-options.js"); - -var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; - -var homedir = getHomedir(); -var defaultPaths = function () { - return [ - path.join(homedir, '.node_modules'), - path.join(homedir, '.node_libraries') - ]; -}; - -var defaultIsFile = function isFile(file) { - try { - var stat = fs.statSync(file, { throwIfNoEntry: false }); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return !!stat && (stat.isFile() || stat.isFIFO()); -}; - -var defaultIsDir = function isDirectory(dir) { - try { - var stat = fs.statSync(dir, { throwIfNoEntry: false }); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return !!stat && stat.isDirectory(); -}; - -var defaultRealpathSync = function realpathSync(x) { - try { - return realpathFS(x); - } catch (realpathErr) { - if (realpathErr.code !== 'ENOENT') { - throw realpathErr; - } - } - return x; -}; - -var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { - if (opts && opts.preserveSymlinks === false) { - return realpathSync(x); - } - return x; -}; - -var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { - var body = readFileSync(pkgfile); - try { - var pkg = JSON.parse(body); - return pkg; - } catch (jsonErr) {} -}; - -var getPackageCandidates = function getPackageCandidates(x, start, opts) { - var dirs = nodeModulesPaths(start, opts, x); - for (var i = 0; i < dirs.length; i++) { - dirs[i] = path.join(dirs[i], x); - } - return dirs; -}; - -module.exports = function resolveSync(x, options) { - if (typeof x !== 'string') { - throw new TypeError('Path must be a string.'); - } - var opts = normalizeOptions(x, options); - - var isFile = opts.isFile || defaultIsFile; - var readFileSync = opts.readFileSync || fs.readFileSync; - var isDirectory = opts.isDirectory || defaultIsDir; - var realpathSync = opts.realpathSync || defaultRealpathSync; - var readPackageSync = opts.readPackageSync || defaultReadPackageSync; - if (opts.readFileSync && opts.readPackageSync) { - throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); - } - var packageIterator = opts.packageIterator; - - var extensions = opts.extensions || ['.js']; - var includeCoreModules = opts.includeCoreModules !== false; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || defaultPaths(); - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); - - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - var res = path.resolve(absoluteStart, x); - if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return maybeRealpathSync(realpathSync, m, opts); - } else if (includeCoreModules && isCore(x)) { - return x; - } else { - var n = loadNodeModulesSync(x, absoluteStart); - if (n) return maybeRealpathSync(realpathSync, n, opts); - } - - var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - - function loadAsFileSync(x) { - var pkg = loadpkg(path.dirname(x)); - - if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { - var rfile = path.relative(pkg.dir, x); - var r = opts.pathFilter(pkg.pkg, x, rfile); - if (r) { - x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign - } - } - - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadpkg(dir) { - if (dir === '' || dir === '/') return; - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return; - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; - - var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); - - if (!isFile(pkgfile)) { - return loadpkg(path.dirname(dir)); - } - - var pkg = readPackageSync(readFileSync, pkgfile); - - if (pkg && opts.packageFilter) { - // v2 will pass pkgfile - pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment - } - - return { pkg: pkg, dir: dir }; - } - - function loadAsDirectorySync(x) { - var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); - if (isFile(pkgfile)) { - try { - var pkg = readPackageSync(readFileSync, pkgfile); - } catch (e) {} - - if (pkg && opts.packageFilter) { - // v2 will pass pkgfile - pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment - } - - if (pkg && pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - throw mainError; - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - try { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } catch (e) {} - } - } - - return loadAsFileSync(path.join(x, '/index')); - } - - function loadNodeModulesSync(x, start) { - var thunk = function () { return getPackageCandidates(x, start, opts); }; - var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); - - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - if (isDirectory(path.dirname(dir))) { - var m = loadAsFileSync(dir); - if (m) return m; - var n = loadAsDirectorySync(dir); - if (n) return n; - } - } - } -}; - - -/***/ }), - -/***/ "../../node_modules/restore-cursor/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const onetime = __webpack_require__("../../node_modules/onetime/index.js"); -const signalExit = __webpack_require__("../../node_modules/signal-exit/index.js"); - -module.exports = onetime(() => { - signalExit(() => { - process.stderr.write('\u001B[?25h'); - }, {alwaysLast: true}); -}); - - -/***/ }), - -/***/ "../../node_modules/reusify/reusify.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function reusify (Constructor) { - var head = new Constructor() - var tail = head - - function get () { - var current = head - - if (current.next) { - head = current.next - } else { - head = new Constructor() - tail = head - } - - current.next = null - - return current - } - - function release (obj) { - tail.next = obj - tail = obj - } - - return { - get: get, - release: release - } -} - -module.exports = reusify - - -/***/ }), - -/***/ "../../node_modules/rimraf/rimraf.js": -/***/ (function(module, exports, __webpack_require__) { - -const assert = __webpack_require__("assert") -const path = __webpack_require__("path") -const fs = __webpack_require__("fs") -let glob = undefined -try { - glob = __webpack_require__("../../node_modules/glob/glob.js") -} catch (_err) { - // treat glob as optional. -} - -const defaultGlobOpts = { - nosort: true, - silent: true -} - -// for EMFILE handling -let timeout = 0 - -const isWindows = (process.platform === "win32") - -const defaults = options => { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 - options.emfileWait = options.emfileWait || 1000 - if (options.glob === false) { - options.disableGlob = true - } - if (options.disableGlob !== true && glob === undefined) { - throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') - } - options.disableGlob = options.disableGlob || false - options.glob = options.glob || defaultGlobOpts -} - -const rimraf = (p, options, cb) => { - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - let busyTries = 0 - let errState = null - let n = 0 - - const next = (er) => { - errState = errState || er - if (--n === 0) - cb(errState) - } - - const afterGlob = (er, results) => { - if (er) - return cb(er) - - n = results.length - if (n === 0) - return cb() - - results.forEach(p => { - const CB = (er) => { - if (er) { - if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && - busyTries < options.maxBusyTries) { - busyTries ++ - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), busyTries * 100) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p, options, CB), timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - next(er) - } - rimraf_(p, options, CB) - }) - } - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) - - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]) - - glob(p, options.glob, afterGlob) - }) - -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -const rimraf_ = (p, options, cb) => { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null) - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb) - - if (st && st.isDirectory()) - return rmdir(p, options, er, cb) - - options.unlink(p, er => { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - if (er.code === "EISDIR") - return rmdir(p, options, er, cb) - } - return cb(er) - }) - }) -} - -const fixWinEPERM = (p, options, er, cb) => { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.chmod(p, 0o666, er2 => { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, options, er, cb) - else - options.unlink(p, cb) - }) - }) -} - -const fixWinEPERMSync = (p, options, er) => { - assert(p) - assert(options) - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === "ENOENT") - return - else - throw er - } - - let stats - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === "ENOENT") - return - else - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, options, er) - else - options.unlinkSync(p) -} - -const rmdir = (p, options, originalEr, cb) => { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -const rmkids = (p, options, cb) => { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) - return cb(er) - let n = files.length - if (n === 0) - return options.rmdir(p, cb) - let errState - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - options.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -const rimrafSync = (p, options) => { - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - let results - - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p] - } else { - try { - options.lstatSync(p) - results = [p] - } catch (er) { - results = glob.sync(p, options.glob) - } - } - - if (!results.length) - return - - for (let i = 0; i < results.length; i++) { - const p = results[i] - - let st - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - - // Windows can EPERM on stat. Life is suffering. - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p, options, er) - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) - rmdirSync(p, options, null) - else - options.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - if (er.code !== "EISDIR") - throw er - - rmdirSync(p, options, er) - } - } -} - -const rmdirSync = (p, options, originalEr) => { - assert(p) - assert(options) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options) - } -} - -const rmkidsSync = (p, options) => { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const retries = isWindows ? 100 : 1 - let i = 0 - do { - let threw = true - try { - const ret = options.rmdirSync(p, options) - threw = false - return ret - } finally { - if (++i < retries && threw) - continue - } - } while (true) -} - -module.exports = rimraf -rimraf.sync = rimrafSync - - -/***/ }), - -/***/ "../../node_modules/run-parallel/index.js": -/***/ (function(module, exports) { - -module.exports = runParallel - -function runParallel (tasks, cb) { - var results, pending, keys - var isSync = true - - if (Array.isArray(tasks)) { - results = [] - pending = tasks.length - } else { - keys = Object.keys(tasks) - results = {} - pending = keys.length - } - - function done (err) { - function end () { - if (cb) cb(err, results) - cb = null - } - if (isSync) process.nextTick(end) - else end() - } - - function each (i, err, result) { - results[i] = result - if (--pending === 0 || err) { - done(err) - } - } - - if (!pending) { - // empty - done(null) - } else if (keys) { - // object - keys.forEach(function (key) { - tasks[key](function (err, result) { each(key, err, result) }) - }) - } else { - // array - tasks.forEach(function (task, i) { - task(function (err, result) { each(i, err, result) }) - }) - } - - isSync = false -} - - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["a"]; }); - -/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["a"]; }); - -/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["a"]; }); - -/* harmony import */ var _internal_observable_dom_animationFrames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrames", function() { return _internal_observable_dom_animationFrames__WEBPACK_IMPORTED_MODULE_3__["a"]; }); - -/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["a"]; }); - -/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["a"]; }); - -/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["a"]; }); - -/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/AsyncSubject.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["a"]; }); - -/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/asap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["b"]; }); - -/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "async", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["b"]; }); - -/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/queue.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["b"]; }); - -/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["b"]; }); - -/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["b"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["a"]; }); - -/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Scheduler.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["a"]; }); - -/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["b"]; }); - -/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscriber.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["b"]; }); - -/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Notification.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["b"]; }); - -/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/pipe.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["a"]; }); - -/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["a"]; }); - -/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["a"]; }); - -/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isObservable.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["a"]; }); - -/* harmony import */ var _internal_lastValueFrom__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/lastValueFrom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastValueFrom", function() { return _internal_lastValueFrom__WEBPACK_IMPORTED_MODULE_21__["a"]; }); - -/* harmony import */ var _internal_firstValueFrom__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/firstValueFrom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "firstValueFrom", function() { return _internal_firstValueFrom__WEBPACK_IMPORTED_MODULE_22__["a"]; }); - -/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_23__["a"]; }); - -/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_24__["a"]; }); - -/* harmony import */ var _internal_util_NotFoundError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotFoundError", function() { return _internal_util_NotFoundError__WEBPACK_IMPORTED_MODULE_25__["a"]; }); - -/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_26__["a"]; }); - -/* harmony import */ var _internal_util_SequenceError__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/SequenceError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SequenceError", function() { return _internal_util_SequenceError__WEBPACK_IMPORTED_MODULE_27__["a"]; }); - -/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeout.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_28__["a"]; }); - -/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_29__["a"]; }); - -/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_30__["a"]; }); - -/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_31__["a"]; }); - -/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_32__["a"]; }); - -/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/concat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_33__["a"]; }); - -/* harmony import */ var _internal_observable_connectable__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/connectable.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectable", function() { return _internal_observable_connectable__WEBPACK_IMPORTED_MODULE_34__["a"]; }); - -/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/defer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_35__["a"]; }); - -/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_36__["b"]; }); - -/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_37__["a"]; }); - -/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_38__["a"]; }); - -/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_39__["a"]; }); - -/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_40__["a"]; }); - -/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/generate.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_41__["a"]; }); - -/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/iif.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_42__["a"]; }); - -/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/interval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_43__["a"]; }); - -/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/merge.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_44__["a"]; }); - -/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/never.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_45__["b"]; }); - -/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/of.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_46__["a"]; }); - -/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_47__["a"]; }); - -/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/pairs.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_48__["a"]; }); - -/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/partition.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_49__["a"]; }); - -/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/race.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_50__["a"]; }); - -/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/range.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_51__["a"]; }); - -/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/throwError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_52__["a"]; }); - -/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_53__["a"]; }); - -/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/using.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_54__["a"]; }); - -/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/zip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_55__["a"]; }); - -/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_56__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_36__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_45__["a"]; }); - -/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/config.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_57__["a"]; }); - -/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/audit.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_58__["a"]; }); - -/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/auditTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_59__["a"]; }); - -/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/buffer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_60__["a"]; }); - -/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_61__["a"]; }); - -/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_62__["a"]; }); - -/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_63__["a"]; }); - -/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_64__["a"]; }); - -/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/catchError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_65__["a"]; }); - -/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_66__["a"]; }); - -/* harmony import */ var _internal_operators_combineLatestAll__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatestAll", function() { return _internal_operators_combineLatestAll__WEBPACK_IMPORTED_MODULE_67__["a"]; }); - -/* harmony import */ var _internal_operators_combineLatestWith__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatestWith", function() { return _internal_operators_combineLatestWith__WEBPACK_IMPORTED_MODULE_68__["a"]; }); - -/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_69__["a"]; }); - -/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_70__["a"]; }); - -/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_71__["a"]; }); - -/* harmony import */ var _internal_operators_concatWith__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatWith", function() { return _internal_operators_concatWith__WEBPACK_IMPORTED_MODULE_72__["a"]; }); - -/* harmony import */ var _internal_operators_connect__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/connect.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _internal_operators_connect__WEBPACK_IMPORTED_MODULE_73__["a"]; }); - -/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/count.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_74__["a"]; }); - -/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/debounce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_75__["a"]; }); - -/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_76__["a"]; }); - -/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_77__["a"]; }); - -/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/delay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_78__["a"]; }); - -/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_79__["a"]; }); - -/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_80__["a"]; }); - -/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinct.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_81__["a"]; }); - -/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_82__["a"]; }); - -/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_83__["a"]; }); - -/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/elementAt.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_84__["a"]; }); - -/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/endWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_85__["a"]; }); - -/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/every.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_86__["a"]; }); - -/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaust.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_87__["a"]; }); - -/* harmony import */ var _internal_operators_exhaustAll__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustAll", function() { return _internal_operators_exhaustAll__WEBPACK_IMPORTED_MODULE_88__["a"]; }); - -/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_89__["a"]; }); - -/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/expand.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_90__["a"]; }); - -/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_91__["a"]; }); - -/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/finalize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_92__["a"]; }); - -/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/find.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_93__["b"]; }); - -/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/findIndex.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_94__["a"]; }); - -/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/first.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_95__["a"]; }); - -/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/groupBy.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_96__["a"]; }); - -/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_97__["a"]; }); - -/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_98__["a"]; }); - -/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/last.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_99__["a"]; }); - -/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_100__["a"]; }); - -/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_101__["a"]; }); - -/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/materialize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_102__["a"]; }); - -/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/max.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_103__["a"]; }); - -/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_104__["a"]; }); - -/* harmony import */ var _internal_operators_flatMap__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/flatMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_flatMap__WEBPACK_IMPORTED_MODULE_105__["a"]; }); - -/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_106__["a"]; }); - -/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_107__["a"]; }); - -/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_108__["a"]; }); - -/* harmony import */ var _internal_operators_mergeWith__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWith", function() { return _internal_operators_mergeWith__WEBPACK_IMPORTED_MODULE_109__["a"]; }); - -/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/min.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_110__["a"]; }); - -/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/multicast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_111__["a"]; }); - -/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_112__["a"]; }); - -/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/pairwise.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_113__["a"]; }); - -/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/pluck.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_114__["a"]; }); - -/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publish.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_115__["a"]; }); - -/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_116__["a"]; }); - -/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_117__["a"]; }); - -/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_118__["a"]; }); - -/* harmony import */ var _internal_operators_raceWith__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/raceWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "raceWith", function() { return _internal_operators_raceWith__WEBPACK_IMPORTED_MODULE_119__["a"]; }); - -/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_120__["a"]; }); - -/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/repeat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_121__["a"]; }); - -/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_122__["a"]; }); - -/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/retry.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_123__["a"]; }); - -/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_124__["a"]; }); - -/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/refCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_125__["a"]; }); - -/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sample.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_126__["a"]; }); - -/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_127__["a"]; }); - -/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/scan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_128__["a"]; }); - -/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_129__["a"]; }); - -/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/share.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_130__["a"]; }); - -/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_131__["a"]; }); - -/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/single.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_132__["a"]; }); - -/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_133__["a"]; }); - -/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_134__["a"]; }); - -/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_135__["a"]; }); - -/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_136__["a"]; }); - -/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/startWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_137__["a"]; }); - -/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_138__["a"]; }); - -/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_139__["a"]; }); - -/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_140__["a"]; }); - -/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_141__["a"]; }); - -/* harmony import */ var _internal_operators_switchScan__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchScan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchScan", function() { return _internal_operators_switchScan__WEBPACK_IMPORTED_MODULE_142__["a"]; }); - -/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_143__["a"]; }); - -/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_144__["a"]; }); - -/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_145__["a"]; }); - -/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_146__["a"]; }); - -/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/tap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_147__["a"]; }); - -/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throttle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_148__["b"]; }); - -/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_149__["a"]; }); - -/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_150__["a"]; }); - -/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_151__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_28__["b"]; }); - -/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_152__["a"]; }); - -/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timestamp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_153__["a"]; }); - -/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/toArray.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_154__["a"]; }); - -/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/window.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_155__["a"]; }); - -/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_156__["a"]; }); - -/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_157__["a"]; }); - -/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_158__["a"]; }); - -/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_159__["a"]; }); - -/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_160__["a"]; }); - -/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zipAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_161__["a"]; }); - -/* harmony import */ var _internal_operators_zipWith__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zipWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipWith", function() { return _internal_operators_zipWith__WEBPACK_IMPORTED_MODULE_162__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/AsyncSubject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncSubject; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); - - -var AsyncSubject = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AsyncSubject, _super); - function AsyncSubject() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._value = null; - _this._hasValue = false; - _this._isComplete = false; - return _this; - } - AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value); - subscriber.complete(); - } - }; - AsyncSubject.prototype.next = function (value) { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - }; - AsyncSubject.prototype.complete = function () { - var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; - if (!_isComplete) { - this._isComplete = true; - _hasValue && _super.prototype.next.call(this, _value); - _super.prototype.complete.call(this); - } - }; - return AsyncSubject; -}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"])); - -//# sourceMappingURL=AsyncSubject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BehaviorSubject; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); - - -var BehaviorSubject = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(BehaviorSubject, _super); - function BehaviorSubject(_value) { - var _this = _super.call(this) || this; - _this._value = _value; - return _this; - } - Object.defineProperty(BehaviorSubject.prototype, "value", { - get: function () { - return this.getValue(); - }, - enumerable: false, - configurable: true - }); - BehaviorSubject.prototype._subscribe = function (subscriber) { - var subscription = _super.prototype._subscribe.call(this, subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - }; - BehaviorSubject.prototype.getValue = function () { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - }; - BehaviorSubject.prototype.next = function (value) { - _super.prototype.next.call(this, (this._value = value)); - }; - return BehaviorSubject; -}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"])); - -//# sourceMappingURL=BehaviorSubject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Notification.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NotificationKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return observeNotification; }); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/of.js"); -/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/throwError.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - - - -var NotificationKind; -(function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; -})(NotificationKind || (NotificationKind = {})); -var Notification = (function () { - function Notification(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === 'N'; - } - Notification.prototype.observe = function (observer) { - return observeNotification(this, observer); - }; - Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - }; - Notification.prototype.accept = function (nextOrObserver, error, complete) { - var _a; - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__[/* isFunction */ "a"])((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) - ? this.observe(nextOrObserver) - : this.do(nextOrObserver, error, complete); - }; - Notification.prototype.toObservable = function () { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - var result = kind === 'N' - ? - Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__[/* of */ "a"])(value) - : - kind === 'E' - ? - Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__[/* throwError */ "a"])(function () { return error; }) - : - kind === 'C' - ? - _observable_empty__WEBPACK_IMPORTED_MODULE_0__[/* EMPTY */ "a"] - : - 0; - if (!result) { - throw new TypeError("Unexpected notification kind " + kind); - } - return result; - }; - Notification.createNext = function (value) { - return new Notification('N', value); - }; - Notification.createError = function (err) { - return new Notification('E', undefined, err); - }; - Notification.createComplete = function () { - return Notification.completeNotification; - }; - Notification.completeNotification = new Notification('C'); - return Notification; -}()); - -function observeNotification(notification, observer) { - var _a, _b, _c; - var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; - if (typeof kind !== 'string') { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); -} -//# sourceMappingURL=Notification.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/NotificationFactories.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return COMPLETE_NOTIFICATION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return errorNotification; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return nextNotification; }); -/* unused harmony export createNotification */ -var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); -function errorNotification(error) { - return createNotification('E', undefined, error); -} -function nextNotification(value) { - return createNotification('N', value, undefined); -} -function createNotification(kind, value, error) { - return { - kind: kind, - value: value, - error: error, - }; -} -//# sourceMappingURL=NotificationFactories.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Observable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscriber.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js"); -/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/pipe.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/config.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js"); - - - - - - - -var Observable = (function () { - function Observable(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable.prototype.lift = function (operator) { - var observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - }; - Observable.prototype.subscribe = function (observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new _Subscriber__WEBPACK_IMPORTED_MODULE_0__[/* SafeSubscriber */ "a"](observerOrNext, error, complete); - Object(_util_errorContext__WEBPACK_IMPORTED_MODULE_6__[/* errorContext */ "b"])(function () { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator - ? - operator.call(subscriber, source) - : source - ? - _this._subscribe(subscriber) - : - _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable.prototype._trySubscribe = function (sink) { - try { - return this._subscribe(sink); - } - catch (err) { - sink.error(err); - } - }; - Observable.prototype.forEach = function (next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var subscriber = new _Subscriber__WEBPACK_IMPORTED_MODULE_0__[/* SafeSubscriber */ "a"]({ - next: function (value) { - try { - next(value); - } - catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve, - }); - _this.subscribe(subscriber); - }); - }; - Observable.prototype._subscribe = function (subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__[/* observable */ "a"]] = function () { - return this; - }; - Observable.prototype.pipe = function () { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__[/* pipeFromArray */ "b"])(operations)(this); - }; - Observable.prototype.toPromise = function (promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var value; - _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); - }); - }; - Observable.create = function (subscribe) { - return new Observable(subscribe); - }; - return Observable; -}()); - -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : _config__WEBPACK_IMPORTED_MODULE_4__[/* config */ "a"].Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(value.next) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(value.error) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(value.complete); -} -function isSubscriber(value) { - return (value && value instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__[/* Subscriber */ "b"]) || (isObserver(value) && Object(_Subscription__WEBPACK_IMPORTED_MODULE_1__[/* isSubscription */ "c"])(value)); -} -//# sourceMappingURL=Observable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/ReplaySubject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ReplaySubject; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js"); - - - -var ReplaySubject = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(ReplaySubject, _super); - function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { _bufferSize = Infinity; } - if (_windowTime === void 0) { _windowTime = Infinity; } - if (_timestampProvider === void 0) { _timestampProvider = _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_2__[/* dateTimestampProvider */ "a"]; } - var _this = _super.call(this) || this; - _this._bufferSize = _bufferSize; - _this._windowTime = _windowTime; - _this._timestampProvider = _timestampProvider; - _this._buffer = []; - _this._infiniteTimeWindow = true; - _this._infiniteTimeWindow = _windowTime === Infinity; - _this._bufferSize = Math.max(1, _bufferSize); - _this._windowTime = Math.max(1, _windowTime); - return _this; - } - ReplaySubject.prototype.next = function (value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - _super.prototype.next.call(this, value); - }; - ReplaySubject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; - var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - }; - ReplaySubject.prototype._trimBuffer = function () { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - var now = _timestampProvider.now(); - var last = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last = i; - } - last && _buffer.splice(0, last + 1); - } - }; - return ReplaySubject; -}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"])); - -//# sourceMappingURL=ReplaySubject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Scheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; }); -/* harmony import */ var _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js"); - -var Scheduler = (function () { - function Scheduler(schedulerActionCtor, now) { - if (now === void 0) { now = Scheduler.now; } - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - Scheduler.prototype.schedule = function (work, delay, state) { - if (delay === void 0) { delay = 0; } - return new this.schedulerActionCtor(this, work).schedule(state, delay); - }; - Scheduler.now = _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__[/* dateTimestampProvider */ "a"].now; - return Scheduler; -}()); - -//# sourceMappingURL=Scheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Subject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); -/* unused harmony export AnonymousSubject */ -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); -/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js"); - - - - - - -var Subject = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(Subject, _super); - function Subject() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject.prototype.lift = function (operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject.prototype._throwIfClosed = function () { - if (this.closed) { - throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__[/* ObjectUnsubscribedError */ "a"](); - } - }; - Subject.prototype.next = function (value) { - var _this = this; - Object(_util_errorContext__WEBPACK_IMPORTED_MODULE_5__[/* errorContext */ "b"])(function () { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - }; - Subject.prototype.error = function (err) { - var _this = this; - Object(_util_errorContext__WEBPACK_IMPORTED_MODULE_5__[/* errorContext */ "b"])(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject.prototype.complete = function () { - var _this = this; - Object(_util_errorContext__WEBPACK_IMPORTED_MODULE_5__[/* errorContext */ "b"])(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject.prototype.unsubscribe = function () { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject.prototype, "observed", { - get: function () { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject.prototype._trySubscribe = function (subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject.prototype._innerSubscribe = function (subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* EMPTY_SUBSCRIPTION */ "a"]; - } - this.currentObservers = null; - observers.push(subscriber); - return new _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"](function () { - _this.currentObservers = null; - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_4__[/* arrRemove */ "a"])(observers, subscriber); - }); - }; - Subject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped) { - subscriber.complete(); - } - }; - Subject.prototype.asObservable = function () { - var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"](); - observable.source = this; - return observable; - }; - Subject.create = function (destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject; -}(_Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"])); - -var AnonymousSubject = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AnonymousSubject, _super); - function AnonymousSubject(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject.prototype.next = function (value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject.prototype.error = function (err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject.prototype.complete = function () { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject.prototype._subscribe = function (subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* EMPTY_SUBSCRIPTION */ "a"]; - }; - return AnonymousSubject; -}(Subject)); - -//# sourceMappingURL=Subject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Subscriber.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Subscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SafeSubscriber; }); -/* unused harmony export EMPTY_OBSERVER */ -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/config.js"); -/* harmony import */ var _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _NotificationFactories__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/NotificationFactories.js"); -/* harmony import */ var _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js"); -/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js"); - - - - - - - - - -var Subscriber = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(Subscriber, _super); - function Subscriber(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (Object(_Subscription__WEBPACK_IMPORTED_MODULE_2__[/* isSubscription */ "c"])(destination)) { - destination.add(_this); - } - } - else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber.create = function (next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber.prototype.next = function (value) { - if (this.isStopped) { - handleStoppedNotification(Object(_NotificationFactories__WEBPACK_IMPORTED_MODULE_6__[/* nextNotification */ "c"])(value), this); - } - else { - this._next(value); - } - }; - Subscriber.prototype.error = function (err) { - if (this.isStopped) { - handleStoppedNotification(Object(_NotificationFactories__WEBPACK_IMPORTED_MODULE_6__[/* errorNotification */ "b"])(err), this); - } - else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber.prototype.complete = function () { - if (this.isStopped) { - handleStoppedNotification(_NotificationFactories__WEBPACK_IMPORTED_MODULE_6__[/* COMPLETE_NOTIFICATION */ "a"], this); - } - else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber.prototype.unsubscribe = function () { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber.prototype._next = function (value) { - this.destination.next(value); - }; - Subscriber.prototype._error = function (err) { - try { - this.destination.error(err); - } - finally { - this.unsubscribe(); - } - }; - Subscriber.prototype._complete = function () { - try { - this.destination.complete(); - } - finally { - this.unsubscribe(); - } - }; - return Subscriber; -}(_Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"])); - -var _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -var ConsumerObserver = (function () { - function ConsumerObserver(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver.prototype.next = function (value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver.prototype.error = function (err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } - catch (error) { - handleUnhandledError(error); - } - } - else { - handleUnhandledError(err); - } - }; - ConsumerObserver.prototype.complete = function () { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver; -}()); -var SafeSubscriber = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(SafeSubscriber, _super); - function SafeSubscriber(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(observerOrNext) || !observerOrNext) { - partialObserver = { - next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined, - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined, - }; - } - else { - var context_1; - if (_this && _config__WEBPACK_IMPORTED_MODULE_3__[/* config */ "a"].useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), - }; - } - else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber; -}(Subscriber)); - -function handleUnhandledError(error) { - if (_config__WEBPACK_IMPORTED_MODULE_3__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) { - Object(_util_errorContext__WEBPACK_IMPORTED_MODULE_8__[/* captureError */ "a"])(error); - } - else { - Object(_util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_4__[/* reportUnhandledError */ "a"])(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = _config__WEBPACK_IMPORTED_MODULE_3__[/* config */ "a"].onStoppedNotification; - onStoppedNotification && _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_7__[/* timeoutProvider */ "a"].setTimeout(function () { return onStoppedNotification(notification, subscriber); }); -} -var EMPTY_OBSERVER = { - closed: true, - next: _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"], - error: defaultErrorHandler, - complete: _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"], -}; -//# sourceMappingURL=Subscriber.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/Subscription.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Subscription; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EMPTY_SUBSCRIPTION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isSubscription; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); - - - - -var Subscription = (function () { - function Subscription(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription.prototype.unsubscribe = function () { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(initialFinalizer)) { - try { - initialFinalizer(); - } - catch (e) { - errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_2__[/* UnsubscriptionError */ "a"] ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_2__[/* UnsubscriptionError */ "a"]) { - errors = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(errors)), Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(err.errors)); - } - else { - errors.push(err); - } - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } - finally { if (e_2) throw e_2.error; } - } - } - if (errors) { - throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_2__[/* UnsubscriptionError */ "a"](errors); - } - } - }; - Subscription.prototype.add = function (teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } - else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription.prototype._hasParent = function (parent) { - var _parentage = this._parentage; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - }; - Subscription.prototype._addParent = function (parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription.prototype._removeParent = function (parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } - else if (Array.isArray(_parentage)) { - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_3__[/* arrRemove */ "a"])(_parentage, parent); - } - }; - Subscription.prototype.remove = function (teardown) { - var _finalizers = this._finalizers; - _finalizers && Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_3__[/* arrRemove */ "a"])(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - }; - Subscription.EMPTY = (function () { - var empty = new Subscription(); - empty.closed = true; - return empty; - })(); - return Subscription; -}()); - -var EMPTY_SUBSCRIPTION = Subscription.EMPTY; -function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(value.remove) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(value.add) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(value.unsubscribe))); -} -function execFinalizer(finalizer) { - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(finalizer)) { - finalizer(); - } - else { - finalizer.unsubscribe(); - } -} -//# sourceMappingURL=Subscription.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/config.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; }); -var config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, -}; -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/firstValueFrom.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return firstValueFrom; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscriber.js"); - - -function firstValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var subscriber = new _Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* SafeSubscriber */ "a"]({ - next: function (value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function () { - if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"]()); - } - }, - }); - source.subscribe(subscriber); - }); -} -//# sourceMappingURL=firstValueFrom.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/lastValueFrom.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lastValueFrom; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); - -function lastValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function (value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function () { - if (_hasValue) { - resolve(_value); - } - else if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"]()); - } - }, - }); - }); -} -//# sourceMappingURL=lastValueFrom.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConnectableObservable; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/refCount.js"); -/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - - - - - -var ConnectableObservable = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(ConnectableObservable, _super); - function ConnectableObservable(source, subjectFactory) { - var _this = _super.call(this) || this; - _this.source = source; - _this.subjectFactory = subjectFactory; - _this._subject = null; - _this._refCount = 0; - _this._connection = null; - if (Object(_util_lift__WEBPACK_IMPORTED_MODULE_5__[/* hasLift */ "a"])(source)) { - _this.lift = source.lift; - } - return _this; - } - ConnectableObservable.prototype._subscribe = function (subscriber) { - return this.getSubject().subscribe(subscriber); - }; - ConnectableObservable.prototype.getSubject = function () { - var subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - }; - ConnectableObservable.prototype._teardown = function () { - this._refCount = 0; - var _connection = this._connection; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - }; - ConnectableObservable.prototype.connect = function () { - var _this = this; - var connection = this._connection; - if (!connection) { - connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"](); - var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(Object(_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); - if (connection.closed) { - this._connection = null; - connection = _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"].EMPTY; - } - } - return connection; - }; - ConnectableObservable.prototype.refCount = function () { - return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_3__[/* refCount */ "a"])()(this); - }; - return ConnectableObservable; -}(_Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"])); - -//# sourceMappingURL=ConnectableObservable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bindCallback; }); -/* harmony import */ var _bindCallbackInternals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js"); - -function bindCallback(callbackFunc, resultSelector, scheduler) { - return Object(_bindCallbackInternals__WEBPACK_IMPORTED_MODULE_0__[/* bindCallbackInternals */ "a"])(false, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindCallback.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bindCallbackInternals; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _operators_subscribeOn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); -/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"); -/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/AsyncSubject.js"); - - - - - - - -function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__[/* isScheduler */ "a"])(resultSelector)) { - scheduler = resultSelector; - } - else { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) - .apply(this, args) - .pipe(Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__[/* mapOneOrManyArgs */ "a"])(resultSelector)); - }; - } - } - if (scheduler) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc) - .apply(this, args) - .pipe(Object(_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_3__[/* subscribeOn */ "a"])(scheduler), Object(_operators_observeOn__WEBPACK_IMPORTED_MODULE_5__[/* observeOn */ "a"])(scheduler)); - }; - } - return function () { - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_6__[/* AsyncSubject */ "a"](); - var uninitialized = true; - return new _Observable__WEBPACK_IMPORTED_MODULE_2__[/* Observable */ "a"](function (subscriber) { - var subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - var isAsync_1 = false; - var isComplete_1 = false; - callbackFunc.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args)), [ - function () { - var results = []; - for (var _i = 0; _i < arguments.length; _i++) { - results[_i] = arguments[_i]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - }, - ])); - if (isComplete_1) { - subject.complete(); - } - isAsync_1 = true; - } - return subs; - }); - }; -} -//# sourceMappingURL=bindCallbackInternals.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bindNodeCallback; }); -/* harmony import */ var _bindCallbackInternals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js"); - -function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return Object(_bindCallbackInternals__WEBPACK_IMPORTED_MODULE_0__[/* bindCallbackInternals */ "a"])(true, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindNodeCallback.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return combineLatest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return combineLatestInit; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _util_createObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createObject.js"); -/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - - - - - - - - -function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_5__[/* popScheduler */ "c"])(args); - var resultSelector = Object(_util_args__WEBPACK_IMPORTED_MODULE_5__[/* popResultSelector */ "b"])(args); - var _a = Object(_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__[/* argsArgArrayOrObject */ "a"])(args), observables = _a.args, keys = _a.keys; - if (observables.length === 0) { - return Object(_from__WEBPACK_IMPORTED_MODULE_2__[/* from */ "a"])([], scheduler); - } - var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](combineLatestInit(observables, scheduler, keys - ? - function (values) { return Object(_util_createObject__WEBPACK_IMPORTED_MODULE_6__[/* createObject */ "a"])(keys, values); } - : - _util_identity__WEBPACK_IMPORTED_MODULE_3__[/* identity */ "a"])); - return resultSelector ? result.pipe(Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__[/* mapOneOrManyArgs */ "a"])(resultSelector)) : result; -} -function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = _util_identity__WEBPACK_IMPORTED_MODULE_3__[/* identity */ "a"]; } - return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = Object(_from__WEBPACK_IMPORTED_MODULE_2__[/* from */ "a"])(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(Object(_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); - }; -} -function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__[/* executeSchedule */ "a"])(subscription, scheduler, execute); - } - else { - execute(); - } -} -//# sourceMappingURL=combineLatest.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/concat.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concat; }); -/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - - - -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_0__[/* concatAll */ "a"])()(Object(_from__WEBPACK_IMPORTED_MODULE_2__[/* from */ "a"])(args, Object(_util_args__WEBPACK_IMPORTED_MODULE_1__[/* popScheduler */ "c"])(args))); -} -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/connectable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return connectable; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/defer.js"); - - - -var DEFAULT_CONFIG = { - connector: function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); }, - resetOnDisconnect: true, -}; -function connectable(source, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connection = null; - var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; - var subject = connector(); - var result = new _Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"](function (subscriber) { - return subject.subscribe(subscriber); - }); - result.connect = function () { - if (!connection || connection.closed) { - connection = Object(_defer__WEBPACK_IMPORTED_MODULE_2__[/* defer */ "a"])(function () { return source; }).subscribe(subject); - if (resetOnDisconnect) { - connection.add(function () { return (subject = connector()); }); - } - } - return connection; - }; - return result; -} -//# sourceMappingURL=connectable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/defer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defer; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - -function defer(observableFactory) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(observableFactory()).subscribe(subscriber); - }); -} -//# sourceMappingURL=defer.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return animationFrames; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _scheduler_performanceTimestampProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js"); -/* harmony import */ var _scheduler_animationFrameProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js"); - - - - -function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} -function animationFramesFactory(timestampProvider) { - var schedule = _scheduler_animationFrameProvider__WEBPACK_IMPORTED_MODULE_3__[/* animationFrameProvider */ "a"].schedule; - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "b"](); - var provider = timestampProvider || _scheduler_performanceTimestampProvider__WEBPACK_IMPORTED_MODULE_2__[/* performanceTimestampProvider */ "a"]; - var start = provider.now(); - var run = function (timestamp) { - var now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - if (!subscriber.closed) { - subscription.add(schedule(run)); - } - }; - subscription.add(schedule(run)); - return subscription; - }); -} -var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); -//# sourceMappingURL=animationFrames.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/empty.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EMPTY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return empty; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); - -var EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return subscriber.complete(); }); -function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} -function emptyScheduled(scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); -} -//# sourceMappingURL=empty.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return forkJoin; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); -/* harmony import */ var _util_createObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createObject.js"); - - - - - - - -function forkJoin() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = Object(_util_args__WEBPACK_IMPORTED_MODULE_3__[/* popResultSelector */ "b"])(args); - var _a = Object(_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__[/* argsArgArrayOrObject */ "a"])(args), sources = _a.args, keys = _a.keys; - var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var length = sources.length; - if (!length) { - subscriber.complete(); - return; - } - var values = new Array(length); - var remainingCompletions = length; - var remainingEmissions = length; - var _loop_1 = function (sourceIndex) { - var hasValue = false; - Object(_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(sources[sourceIndex]).subscribe(Object(_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? Object(_util_createObject__WEBPACK_IMPORTED_MODULE_6__[/* createObject */ "a"])(keys, values) : values); - } - subscriber.complete(); - } - })); - }; - for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { - _loop_1(sourceIndex); - } - }); - return resultSelector ? result.pipe(Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_5__[/* mapOneOrManyArgs */ "a"])(resultSelector)) : result; -} -//# sourceMappingURL=forkJoin.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/from.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return from; }); -/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - -function from(input, scheduler) { - return scheduler ? Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_0__[/* scheduled */ "a"])(input, scheduler) : Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(input); -} -//# sourceMappingURL=from.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromEvent; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); - - - - - - - -var nodeEventEmitterMethods = ['addListener', 'removeListener']; -var eventTargetMethods = ['addEventListener', 'removeEventListener']; -var jqueryMethods = ['on', 'off']; -function fromEvent(target, eventName, options, resultSelector) { - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__[/* mapOneOrManyArgs */ "a"])(resultSelector)); - } - var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(isEventTarget(target) - ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__[/* isArrayLike */ "a"])(target)) { - return Object(_operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__[/* mergeMap */ "a"])(function (subTarget) { return fromEvent(subTarget, eventName, options); })(Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(target)); - } - } - if (!add) { - throw new TypeError('Invalid event target'); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_2__[/* Observable */ "a"](function (subscriber) { - var handler = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function () { return remove(handler); }; - }); -} -function toCommonHandlerRegistry(target, eventName) { - return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; -} -function isNodeStyleEventEmitter(target) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.addListener) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.on) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.off); -} -function isEventTarget(target) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.addEventListener) && Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_5__[/* isFunction */ "a"])(target.removeEventListener); -} -//# sourceMappingURL=fromEvent.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromEventPattern; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); - - - -function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_2__[/* mapOneOrManyArgs */ "a"])(resultSelector)); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var handler = function () { - var e = []; - for (var _i = 0; _i < arguments.length; _i++) { - e[_i] = arguments[_i]; - } - return subscriber.next(e.length === 1 ? e[0] : e); - }; - var retValue = addHandler(handler); - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; - }); -} -//# sourceMappingURL=fromEventPattern.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromSubscribable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); - -function fromSubscribable(subscribable) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return subscribable.subscribe(subscriber); }); -} -//# sourceMappingURL=fromSubscribable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/generate.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generate; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js"); -/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/defer.js"); -/* harmony import */ var _scheduled_scheduleIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js"); - - - - - -function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - var _a, _b; - var resultSelector; - var initialState; - if (arguments.length === 1) { - (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? _util_identity__WEBPACK_IMPORTED_MODULE_1__[/* identity */ "a"] : _b, scheduler = _a.scheduler); - } - else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__[/* isScheduler */ "a"])(resultSelectorOrScheduler)) { - resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__[/* identity */ "a"]; - scheduler = resultSelectorOrScheduler; - } - else { - resultSelector = resultSelectorOrScheduler; - } - } - function gen() { - var state; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "f"])(this, function (_a) { - switch (_a.label) { - case 0: - state = initialState; - _a.label = 1; - case 1: - if (!(!condition || condition(state))) return [3, 4]; - return [4, resultSelector(state)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - state = iterate(state); - return [3, 1]; - case 4: return [2]; - } - }); - } - return Object(_defer__WEBPACK_IMPORTED_MODULE_3__[/* defer */ "a"])((scheduler - ? - function () { return Object(_scheduled_scheduleIterable__WEBPACK_IMPORTED_MODULE_4__[/* scheduleIterable */ "a"])(gen(), scheduler); } - : - gen)); -} -//# sourceMappingURL=generate.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/iif.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iif; }); -/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/defer.js"); - -function iif(condition, trueResult, falseResult) { - return Object(_defer__WEBPACK_IMPORTED_MODULE_0__[/* defer */ "a"])(function () { return (condition() ? trueResult : falseResult); }); -} -//# sourceMappingURL=iif.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return innerFrom; }); -/* unused harmony export fromInteropObservable */ -/* unused harmony export fromArrayLike */ -/* unused harmony export fromPromise */ -/* unused harmony export fromIterable */ -/* unused harmony export fromAsyncIterable */ -/* unused harmony export fromReadableStreamLike */ -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"); -/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isPromise.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js"); -/* harmony import */ var _util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js"); -/* harmony import */ var _util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js"); -/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isIterable.js"); -/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js"); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js"); - - - - - - - - - - - - -function innerFrom(input) { - if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"]) { - return input; - } - if (input != null) { - if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__[/* isInteropObservable */ "a"])(input)) { - return fromInteropObservable(input); - } - if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_1__[/* isArrayLike */ "a"])(input)) { - return fromArrayLike(input); - } - if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_2__[/* isPromise */ "a"])(input)) { - return fromPromise(input); - } - if (Object(_util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_5__[/* isAsyncIterable */ "a"])(input)) { - return fromAsyncIterable(input); - } - if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__[/* isIterable */ "a"])(input)) { - return fromIterable(input); - } - if (Object(_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_8__[/* isReadableStreamLike */ "a"])(input)) { - return fromReadableStreamLike(input); - } - } - throw Object(_util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_6__[/* createInvalidObservableTypeError */ "a"])(input); -} -function fromInteropObservable(obj) { - return new _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"](function (subscriber) { - var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_11__[/* observable */ "a"]](); - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_9__[/* isFunction */ "a"])(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} -function fromArrayLike(array) { - return new _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"](function (subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -function fromPromise(promise) { - return new _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"](function (subscriber) { - promise - .then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { return subscriber.error(err); }) - .then(null, _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_10__[/* reportUnhandledError */ "a"]); - }); -} -function fromIterable(iterable) { - return new _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"](function (subscriber) { - var e_1, _a; - try { - for (var iterable_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }); -} -function fromAsyncIterable(asyncIterable) { - return new _Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"](function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); - }); -} -function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(Object(_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_8__[/* readableStreamLikeToAsyncGenerator */ "b"])(readableStream)); -} -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __awaiter */ "d"])(this, void 0, void 0, function () { - var value, e_2_1; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "f"])(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __asyncValues */ "b"])(asyncIterable); - _b.label = 1; - case 1: return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: return [3, 1]; - case 4: return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} -//# sourceMappingURL=innerFrom.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/interval.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return interval; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); - - -function interval(period, scheduler) { - if (period === void 0) { period = 0; } - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - if (period < 0) { - period = 0; - } - return Object(_timer__WEBPACK_IMPORTED_MODULE_1__[/* timer */ "a"])(period, period, scheduler); -} -//# sourceMappingURL=interval.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/merge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return merge; }); -/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - - - - - -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_3__[/* popScheduler */ "c"])(args); - var concurrent = Object(_util_args__WEBPACK_IMPORTED_MODULE_3__[/* popNumber */ "a"])(args, Infinity); - var sources = args; - return !sources.length - ? - _empty__WEBPACK_IMPORTED_MODULE_2__[/* EMPTY */ "a"] - : sources.length === 1 - ? - Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(sources[0]) - : - Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_0__[/* mergeAll */ "a"])(concurrent)(Object(_from__WEBPACK_IMPORTED_MODULE_4__[/* from */ "a"])(sources, scheduler)); -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/never.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NEVER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return never; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - -var NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](_util_noop__WEBPACK_IMPORTED_MODULE_1__[/* noop */ "a"]); -function never() { - return NEVER; -} -//# sourceMappingURL=never.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/of.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return of; }); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - - -function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_0__[/* popScheduler */ "c"])(args); - return Object(_from__WEBPACK_IMPORTED_MODULE_1__[/* from */ "a"])(args, scheduler); -} -//# sourceMappingURL=of.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return onErrorResumeNext; }); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); - - - -function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return Object(_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_1__[/* onErrorResumeNext */ "a"])(Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__[/* argsOrArgArray */ "a"])(sources))(_empty__WEBPACK_IMPORTED_MODULE_0__[/* EMPTY */ "a"]); -} -//# sourceMappingURL=onErrorResumeNext.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/pairs.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pairs; }); -/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - -function pairs(obj, scheduler) { - return Object(_from__WEBPACK_IMPORTED_MODULE_0__[/* from */ "a"])(Object.entries(obj), scheduler); -} -//# sourceMappingURL=pairs.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/partition.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return partition; }); -/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/not.js"); -/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - -function partition(source, predicate, thisArg) { - return [Object(_operators_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(predicate, thisArg)(Object(_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(source)), Object(_operators_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__[/* not */ "a"])(predicate, thisArg))(Object(_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(source))]; -} -//# sourceMappingURL=partition.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/race.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return race; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return raceInit; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - -function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__[/* argsOrArgArray */ "a"])(sources); - return sources.length === 1 ? Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(sources[0]) : new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](raceInit(sources)); -} -function raceInit(sources) { - return function (subscriber) { - var subscriptions = []; - var _loop_1 = function (i) { - subscriptions.push(Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(sources[i]).subscribe(Object(_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; -} -//# sourceMappingURL=race.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/range.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return range; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); - - -function range(start, count, scheduler) { - if (count == null) { - count = start; - start = 0; - } - if (count <= 0) { - return _empty__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY */ "a"]; - } - var end = count + start; - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](scheduler - ? - function (subscriber) { - var n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - function (subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); -} -//# sourceMappingURL=range.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/throwError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwError; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; - var init = function (subscriber) { return subscriber.error(errorFactory()); }; - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); -} -//# sourceMappingURL=throwError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/timer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timer; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js"); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isDate.js"); - - - - -function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { dueTime = 0; } - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__[/* async */ "a"]; } - var intervalDuration = -1; - if (intervalOrScheduler != null) { - if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__[/* isScheduler */ "a"])(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } - else { - intervalDuration = intervalOrScheduler; - } - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var due = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_3__[/* isValidDate */ "a"])(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function () { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(undefined, intervalDuration); - } - else { - subscriber.complete(); - } - } - }, due); - }); -} -//# sourceMappingURL=timer.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/using.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return using; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); - - - -function using(resourceFactory, observableFactory) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var resource = resourceFactory(); - var result = observableFactory(resource); - var source = result ? Object(_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__[/* EMPTY */ "a"]; - source.subscribe(subscriber); - return function () { - if (resource) { - resource.unsubscribe(); - } - }; - }); -} -//# sourceMappingURL=using.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/observable/zip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return zip; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); - - - - - - - -function zip() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = Object(_util_args__WEBPACK_IMPORTED_MODULE_6__[/* popResultSelector */ "b"])(args); - var sources = Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__[/* argsOrArgArray */ "a"])(args); - return sources.length - ? new _Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"](function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - Object(_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(sources[sourceIndex]).subscribe(Object(_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) - : _empty__WEBPACK_IMPORTED_MODULE_4__[/* EMPTY */ "a"]; -} -//# sourceMappingURL=zip.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createOperatorSubscriber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OperatorSubscriber; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscriber.js"); - - -function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -var OperatorSubscriber = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext - ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } - : _super.prototype._next; - _this._error = onError - ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._error; - _this._complete = onComplete - ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._complete; - return _this; - } - OperatorSubscriber.prototype.unsubscribe = function () { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber; -}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "b"])); - -//# sourceMappingURL=OperatorSubscriber.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/audit.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return audit; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function audit(durationSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var isComplete = false; - var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - var cleanupDuration = function () { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(durationSelector(value)).subscribe((durationSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=audit.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/auditTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return auditTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/audit.js"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); - - - -function auditTime(duration, scheduler) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - return Object(_audit__WEBPACK_IMPORTED_MODULE_1__[/* audit */ "a"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__[/* timer */ "a"])(duration, scheduler); }); -} -//# sourceMappingURL=auditTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/buffer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffer; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function buffer(closingNotifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var currentBuffer = []; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - closingNotifier.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, _util_noop__WEBPACK_IMPORTED_MODULE_1__[/* noop */ "a"])); - return function () { - currentBuffer = null; - }; - }); -} -//# sourceMappingURL=buffer.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bufferCount; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); - - - - -function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var buffers = []; - var count = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_3__[/* arrRemove */ "a"])(buffers, buffer); - subscriber.next(buffer); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); - } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); - } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); - }); -} -//# sourceMappingURL=bufferCount.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bufferTime; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - - - - - - - -function bufferTime(bufferTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = Object(_util_args__WEBPACK_IMPORTED_MODULE_6__[/* popScheduler */ "c"])(otherArgs)) !== null && _a !== void 0 ? _a : _scheduler_async__WEBPACK_IMPORTED_MODULE_5__[/* asyncScheduler */ "b"]; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxBufferSize = otherArgs[1] || Infinity; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var bufferRecords = []; - var restartOnEmit = false; - var emit = function (record) { - var buffer = record.buffer, subs = record.subs; - subs.unsubscribe(); - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_4__[/* arrRemove */ "a"])(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - var startBuffer = function () { - if (bufferRecords) { - var subs = new _Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "b"](); - subscriber.add(subs); - var buffer = []; - var record_1 = { - buffer: buffer, - subs: subs, - }; - bufferRecords.push(record_1); - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__[/* executeSchedule */ "a"])(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__[/* executeSchedule */ "a"])(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { - restartOnEmit = true; - } - startBuffer(); - var bufferTimeSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); - source.subscribe(bufferTimeSubscriber); - }); -} -//# sourceMappingURL=bufferTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bufferToggle; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); - - - - - - - -function bufferToggle(openings, closingSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var buffers = []; - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(openings).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "b"](); - var emitBuffer = function () { - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_6__[/* arrRemove */ "a"])(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(closingSelector(openValue)).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, emitBuffer, _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"]))); - }, _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"])); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=bufferToggle.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bufferWhen; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - - -function bufferWhen(closingSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var buffer = null; - var closingSubscriber = null; - var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - var b = buffer; - buffer = []; - b && subscriber.next(b); - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(closingSelector()).subscribe((closingSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, openBuffer, _util_noop__WEBPACK_IMPORTED_MODULE_1__[/* noop */ "a"]))); - }; - openBuffer(); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); - }); -} -//# sourceMappingURL=bufferWhen.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/catchError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return catchError; }); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - - -function catchError(selector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, undefined, function (err) { - handledResult = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__[/* innerFrom */ "a"])(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} -//# sourceMappingURL=catchError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/combineAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return combineAll; }); -/* harmony import */ var _combineLatestAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js"); - -var combineAll = _combineLatestAll__WEBPACK_IMPORTED_MODULE_0__[/* combineLatestAll */ "a"]; -//# sourceMappingURL=combineAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return combineLatest; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); -/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/pipe.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); - - - - - - - -function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = Object(_util_args__WEBPACK_IMPORTED_MODULE_6__[/* popResultSelector */ "b"])(args); - return resultSelector - ? Object(_util_pipe__WEBPACK_IMPORTED_MODULE_5__[/* pipe */ "a"])(combineLatest.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))), Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_4__[/* mapOneOrManyArgs */ "a"])(resultSelector)) - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - Object(_observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__[/* combineLatestInit */ "b"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__[/* argsOrArgArray */ "a"])(args))))(subscriber); - }); -} -//# sourceMappingURL=combineLatest.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return combineLatestAll; }); -/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js"); -/* harmony import */ var _joinAllInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js"); - - -function combineLatestAll(project) { - return Object(_joinAllInternals__WEBPACK_IMPORTED_MODULE_1__[/* joinAllInternals */ "a"])(_observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__[/* combineLatest */ "a"], project); -} -//# sourceMappingURL=combineLatestAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return combineLatestWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js"); - - -function combineLatestWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return _combineLatest__WEBPACK_IMPORTED_MODULE_1__[/* combineLatest */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherSources))); -} -//# sourceMappingURL=combineLatestWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/concat.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concat; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _concatAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - - - - - -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_3__[/* popScheduler */ "c"])(args); - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - Object(_concatAll__WEBPACK_IMPORTED_MODULE_2__[/* concatAll */ "a"])()(Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__[/* from */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args)), scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatAll; }); -/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"); - -function concatAll() { - return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__[/* mergeAll */ "a"])(1); -} -//# sourceMappingURL=concatAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/concatMap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatMap; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function concatMap(project, resultSelector) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(resultSelector) ? Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(project, resultSelector, 1) : Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(project, 1); -} -//# sourceMappingURL=concatMap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatMapTo; }); -/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatMap.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function concatMapTo(innerObservable, resultSelector) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(resultSelector) ? Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__[/* concatMap */ "a"])(function () { return innerObservable; }, resultSelector) : Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__[/* concatMap */ "a"])(function () { return innerObservable; }); -} -//# sourceMappingURL=concatMapTo.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/concatWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concat.js"); - - -function concatWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return _concat__WEBPACK_IMPORTED_MODULE_1__[/* concat */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherSources))); -} -//# sourceMappingURL=concatWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/connect.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return connect; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_fromSubscribable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js"); - - - - -var DEFAULT_CONFIG = { - connector: function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); }, -}; -function connect(selector, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connector = config.connector; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var subject = connector(); - Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__[/* from */ "a"])(selector(Object(_observable_fromSubscribable__WEBPACK_IMPORTED_MODULE_3__[/* fromSubscribable */ "a"])(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} -//# sourceMappingURL=connect.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/count.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return count; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); - -function count(predicate) { - return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__[/* reduce */ "a"])(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); -} -//# sourceMappingURL=count.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/debounce.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return debounce; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - - -function debounce(durationSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, emit, _util_noop__WEBPACK_IMPORTED_MODULE_1__[/* noop */ "a"]); - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); - }); -} -//# sourceMappingURL=debounce.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return debounceTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var activeTask = null; - var lastValue = null; - var lastTime = null; - var emit = function () { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - var targetTime = lastTime + dueTime; - var now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); - }); -} -//# sourceMappingURL=debounceTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defaultIfEmpty; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function defaultIfEmpty(defaultValue) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=defaultIfEmpty.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/delay.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return delay; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _delayWhen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); - - - -function delay(due, scheduler) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - var duration = Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__[/* timer */ "a"])(due, scheduler); - return Object(_delayWhen__WEBPACK_IMPORTED_MODULE_1__[/* delayWhen */ "a"])(function () { return duration; }); -} -//# sourceMappingURL=delay.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return delayWhen; }); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/concat.js"); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); -/* harmony import */ var _ignoreElements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"); -/* harmony import */ var _mapTo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mapTo.js"); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); - - - - - -function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return function (source) { - return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__[/* concat */ "a"])(subscriptionDelay.pipe(Object(_take__WEBPACK_IMPORTED_MODULE_1__[/* take */ "a"])(1), Object(_ignoreElements__WEBPACK_IMPORTED_MODULE_2__[/* ignoreElements */ "a"])()), source.pipe(delayWhen(delayDurationSelector))); - }; - } - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_4__[/* mergeMap */ "a"])(function (value, index) { return delayDurationSelector(value, index).pipe(Object(_take__WEBPACK_IMPORTED_MODULE_1__[/* take */ "a"])(1), Object(_mapTo__WEBPACK_IMPORTED_MODULE_3__[/* mapTo */ "a"])(value)); }); -} -//# sourceMappingURL=delayWhen.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dematerialize; }); -/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Notification.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function dematerialize() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (notification) { return Object(_Notification__WEBPACK_IMPORTED_MODULE_0__[/* observeNotification */ "c"])(notification, subscriber); })); - }); -} -//# sourceMappingURL=dematerialize.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/distinct.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return distinct; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - -function distinct(keySelector, flushes) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var distinctKeys = new Set(); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function () { return distinctKeys.clear(); }, _util_noop__WEBPACK_IMPORTED_MODULE_2__[/* noop */ "a"])); - }); -} -//# sourceMappingURL=distinct.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return distinctUntilChanged; }); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = _util_identity__WEBPACK_IMPORTED_MODULE_0__[/* identity */ "a"]; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var previousKey; - var first = true; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -function defaultCompare(a, b) { - return a === b; -} -//# sourceMappingURL=distinctUntilChanged.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return distinctUntilKeyChanged; }); -/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js"); - -function distinctUntilKeyChanged(key, compare) { - return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__[/* distinctUntilChanged */ "a"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); -} -//# sourceMappingURL=distinctUntilKeyChanged.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/elementAt.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return elementAt; }); -/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js"); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); - - - - - -function elementAt(index, defaultValue) { - if (index < 0) { - throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__[/* ArgumentOutOfRangeError */ "a"](); - } - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__[/* take */ "a"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__[/* defaultIfEmpty */ "a"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__[/* throwIfEmpty */ "a"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__[/* ArgumentOutOfRangeError */ "a"](); })); - }; -} -//# sourceMappingURL=elementAt.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/endWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return endWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/concat.js"); -/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/of.js"); - - - -function endWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_1__[/* concat */ "a"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_2__[/* of */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(values)))); }; -} -//# sourceMappingURL=endWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/every.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return every; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function every(predicate, thisArg) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=every.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/exhaust.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exhaust; }); -/* harmony import */ var _exhaustAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js"); - -var exhaust = _exhaustAll__WEBPACK_IMPORTED_MODULE_0__[/* exhaustAll */ "a"]; -//# sourceMappingURL=exhaust.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exhaustAll; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function exhaustAll() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var isComplete = false; - var innerSub = null; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (inner) { - if (!innerSub) { - innerSub = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(inner).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - })); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=exhaustAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exhaustMap; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - -function exhaustMap(project, resultSelector) { - if (resultSelector) { - return function (source) { - return source.pipe(exhaustMap(function (a, i) { return Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__[/* map */ "a"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); - }; - } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var index = 0; - var innerSub = null; - var isComplete = false; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=exhaustMap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/expand.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return expand; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _mergeInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js"); - - -function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { concurrent = Infinity; } - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - return Object(_mergeInternals__WEBPACK_IMPORTED_MODULE_1__[/* mergeInternals */ "a"])(source, subscriber, project, concurrent, undefined, true, scheduler); - }); -} -//# sourceMappingURL=expand.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/filter.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return filter; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function filter(predicate, thisArg) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); - }); -} -//# sourceMappingURL=filter.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/finalize.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return finalize; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - -function finalize(callback) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - try { - source.subscribe(subscriber); - } - finally { - subscriber.add(callback); - } - }); -} -//# sourceMappingURL=finalize.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/find.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return find; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createFind; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function find(predicate, thisArg) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(createFind(predicate, thisArg, 'value')); -} -function createFind(predicate, thisArg, emit) { - var findIndex = emit === 'index'; - return function (source, subscriber) { - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); - }; -} -//# sourceMappingURL=find.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/findIndex.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findIndex; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/find.js"); - - -function findIndex(predicate, thisArg) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(Object(_find__WEBPACK_IMPORTED_MODULE_1__[/* createFind */ "a"])(predicate, thisArg, 'index')); -} -//# sourceMappingURL=findIndex.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/first.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return first; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - - - - - -function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__[/* identity */ "a"], Object(_take__WEBPACK_IMPORTED_MODULE_2__[/* take */ "a"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__[/* defaultIfEmpty */ "a"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__[/* throwIfEmpty */ "a"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"](); })); - }; -} -//# sourceMappingURL=first.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/flatMap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return flatMap; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); - -var flatMap = _mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"]; -//# sourceMappingURL=flatMap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/groupBy.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return groupBy; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - - -function groupBy(keySelector, elementOrOptions, duration, connector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_3__[/* operate */ "b"])(function (source, subscriber) { - var element; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); - } - var groups = new Map(); - var notify = function (cb) { - groups.forEach(cb); - cb(subscriber); - }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var activeGroups = 0; - var teardownAttempted = false; - var groupBySourceSubscriber = new _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* OperatorSubscriber */ "a"](subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new _Subject__WEBPACK_IMPORTED_MODULE_2__[/* Subject */ "a"]())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(duration(grouped)).subscribe(durationSubscriber_1)); - } - } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (groupSubscriber) { - activeGroups++; - var innerSub = groupSubject.subscribe(groupSubscriber); - return function () { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} -//# sourceMappingURL=groupBy.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ignoreElements; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - -function ignoreElements() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, _util_noop__WEBPACK_IMPORTED_MODULE_2__[/* noop */ "a"])); - }); -} -//# sourceMappingURL=ignoreElements.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isEmpty; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function isEmpty() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=isEmpty.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return joinAllInternals; }); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"); -/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/pipe.js"); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony import */ var _toArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/toArray.js"); - - - - - -function joinAllInternals(joinFn, project) { - return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_2__[/* pipe */ "a"])(Object(_toArray__WEBPACK_IMPORTED_MODULE_4__[/* toArray */ "a"])(), Object(_mergeMap__WEBPACK_IMPORTED_MODULE_3__[/* mergeMap */ "a"])(function (sources) { return joinFn(sources); }), project ? Object(_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_1__[/* mapOneOrManyArgs */ "a"])(project) : _util_identity__WEBPACK_IMPORTED_MODULE_0__[/* identity */ "a"]); -} -//# sourceMappingURL=joinAllInternals.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/last.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return last; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeLast.js"); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js"); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - - - - - -function last(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__[/* identity */ "a"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__[/* takeLast */ "a"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__[/* defaultIfEmpty */ "a"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__[/* throwIfEmpty */ "a"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"](); })); - }; -} -//# sourceMappingURL=last.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function map(project, thisArg) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} -//# sourceMappingURL=map.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mapTo.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mapTo; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); - -function mapTo(value) { - return Object(_map__WEBPACK_IMPORTED_MODULE_0__[/* map */ "a"])(function () { return value; }); -} -//# sourceMappingURL=mapTo.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/materialize.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return materialize; }); -/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Notification.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function materialize() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - subscriber.next(_Notification__WEBPACK_IMPORTED_MODULE_0__[/* Notification */ "a"].createNext(value)); - }, function () { - subscriber.next(_Notification__WEBPACK_IMPORTED_MODULE_0__[/* Notification */ "a"].createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(_Notification__WEBPACK_IMPORTED_MODULE_0__[/* Notification */ "a"].createError(err)); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=materialize.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/max.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return max; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function max(comparer) { - return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__[/* reduce */ "a"])(Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); -} -//# sourceMappingURL=max.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/merge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return merge; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); - - - - - - -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_4__[/* popScheduler */ "c"])(args); - var concurrent = Object(_util_args__WEBPACK_IMPORTED_MODULE_4__[/* popNumber */ "a"])(args, Infinity); - args = Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_2__[/* argsOrArgArray */ "a"])(args); - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - Object(_mergeAll__WEBPACK_IMPORTED_MODULE_3__[/* mergeAll */ "a"])(concurrent)(Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__[/* from */ "a"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args)), scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeAll; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - -function mergeAll(concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__[/* identity */ "a"], concurrent); -} -//# sourceMappingURL=mergeAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeInternals; }); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - var buffer = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function () { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; - var doInnerSub = function (value) { - expand && subscriber.next(value); - active++; - var innerComplete = false; - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__[/* innerFrom */ "a"])(project(value, index++)).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__[/* executeSchedule */ "a"])(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); - } - }; - while (buffer.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } - catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); - return function () { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} -//# sourceMappingURL=mergeInternals.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeMap; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _mergeInternals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - - - - -function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_4__[/* isFunction */ "a"])(resultSelector)) { - return mergeMap(function (a, i) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__[/* map */ "a"])(function (b, ii) { return resultSelector(a, b, i, ii); })(Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__[/* innerFrom */ "a"])(project(a, i))); }, concurrent); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { return Object(_mergeInternals__WEBPACK_IMPORTED_MODULE_3__[/* mergeInternals */ "a"])(source, subscriber, project, concurrent); }); -} -//# sourceMappingURL=mergeMap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeMapTo; }); -/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(resultSelector)) { - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(function () { return innerObservable; }, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(function () { return innerObservable; }, concurrent); -} -//# sourceMappingURL=mergeMapTo.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeScan; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _mergeInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js"); - - -function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var state = seed; - return Object(_mergeInternals__WEBPACK_IMPORTED_MODULE_1__[/* mergeInternals */ "a"])(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { - state = value; - }, false, undefined, function () { return (state = null); }); - }); -} -//# sourceMappingURL=mergeScan.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/merge.js"); - - -function mergeWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return _merge__WEBPACK_IMPORTED_MODULE_1__[/* merge */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherSources))); -} -//# sourceMappingURL=mergeWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/min.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return min; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function min(comparer) { - return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__[/* reduce */ "a"])(Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); -} -//# sourceMappingURL=min.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/multicast.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return multicast; }); -/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _connect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/connect.js"); - - - -function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; - if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(selector)) { - return Object(_connect__WEBPACK_IMPORTED_MODULE_2__[/* connect */ "a"])(selector, { - connector: subjectFactory, - }); - } - return function (source) { return new _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__[/* ConnectableObservable */ "a"](source, subjectFactory); }; -} -//# sourceMappingURL=multicast.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return observeOn; }); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_0__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_0__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_0__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); - }); -} -//# sourceMappingURL=observeOn.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return onErrorResumeNext; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - - - - -function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_3__[/* argsOrArgArray */ "a"])(sources); - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var remaining = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(nextSources)); - var subscribeNext = function () { - if (!subscriber.closed) { - if (remaining.length > 0) { - var nextSource = void 0; - try { - nextSource = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(remaining.shift()); - } - catch (err) { - subscribeNext(); - return; - } - var innerSub = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"], _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"]); - nextSource.subscribe(innerSub); - innerSub.add(subscribeNext); - } - else { - subscriber.complete(); - } - } - }; - subscribeNext(); - }); -} -//# sourceMappingURL=onErrorResumeNext.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/pairwise.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pairwise; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function pairwise() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var prev; - var hasPrev = false; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); -} -//# sourceMappingURL=pairwise.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/partition.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return partition; }); -/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/not.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); - - -function partition(predicate, thisArg) { - return function (source) { - return [Object(_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(predicate, thisArg)(source), Object(_filter__WEBPACK_IMPORTED_MODULE_1__[/* filter */ "a"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__[/* not */ "a"])(predicate, thisArg))(source)]; - }; -} -//# sourceMappingURL=partition.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/pluck.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pluck; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); - -function pluck() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - var length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return Object(_map__WEBPACK_IMPORTED_MODULE_0__[/* map */ "a"])(function (x) { - var currentProp = x; - for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } - else { - return undefined; - } - } - return currentProp; - }); -} -//# sourceMappingURL=pluck.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/publish.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publish; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/multicast.js"); -/* harmony import */ var _connect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/connect.js"); - - - -function publish(selector) { - return selector ? function (source) { return Object(_connect__WEBPACK_IMPORTED_MODULE_2__[/* connect */ "a"])(selector)(source); } : function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__[/* multicast */ "a"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"]())(source); }; -} -//# sourceMappingURL=publish.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishBehavior; }); -/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js"); -/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js"); - - -function publishBehavior(initialValue) { - return function (source) { - var subject = new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__[/* BehaviorSubject */ "a"](initialValue); - return new _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__[/* ConnectableObservable */ "a"](source, function () { return subject; }); - }; -} -//# sourceMappingURL=publishBehavior.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/publishLast.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishLast; }); -/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/AsyncSubject.js"); -/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js"); - - -function publishLast() { - return function (source) { - var subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__[/* AsyncSubject */ "a"](); - return new _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__[/* ConnectableObservable */ "a"](source, function () { return subject; }); - }; -} -//# sourceMappingURL=publishLast.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishReplay; }); -/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/multicast.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - - -function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "a"])(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - var selector = Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "a"])(selectorOrScheduler) ? selectorOrScheduler : undefined; - return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__[/* multicast */ "a"])(new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__[/* ReplaySubject */ "a"](bufferSize, windowTime, timestampProvider), selector)(source); }; -} -//# sourceMappingURL=publishReplay.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/race.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return race; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js"); -/* harmony import */ var _raceWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/raceWith.js"); - - - -function race() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return _raceWith__WEBPACK_IMPORTED_MODULE_2__[/* raceWith */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(Object(_util_argsOrArgArray__WEBPACK_IMPORTED_MODULE_1__[/* argsOrArgArray */ "a"])(args)))); -} -//# sourceMappingURL=race.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/raceWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return raceWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/race.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - - - -function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length - ? _util_identity__WEBPACK_IMPORTED_MODULE_3__[/* identity */ "a"] - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - Object(_observable_race__WEBPACK_IMPORTED_MODULE_1__[/* raceInit */ "b"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherSources)))(subscriber); - }); -} -//# sourceMappingURL=raceWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return reduce; }); -/* harmony import */ var _scanInternals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - -function reduce(accumulator, seed) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(Object(_scanInternals__WEBPACK_IMPORTED_MODULE_0__[/* scanInternals */ "a"])(accumulator, seed, arguments.length >= 2, false, true)); -} -//# sourceMappingURL=reduce.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/refCount.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return refCount; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function refCount() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var connection = null; - source._refCount++; - var refCounter = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); -} -//# sourceMappingURL=refCount.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/repeat.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return repeat; }); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); - - - - - -function repeat(countOrConfig) { - var _a; - var count = Infinity; - var delay; - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { - count = countOrConfig; - } - } - return count <= 0 - ? function () { return _observable_empty__WEBPACK_IMPORTED_MODULE_0__[/* EMPTY */ "a"]; } - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? Object(_observable_timer__WEBPACK_IMPORTED_MODULE_4__[/* timer */ "a"])(delay) : Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(delay(soFar)); - var notifierSubscriber_1 = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); -} -//# sourceMappingURL=repeat.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return repeatWhen; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function repeatWhen(notifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var innerSub; - var syncResub = false; - var completions$; - var isNotifierComplete = false; - var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; - var getCompletionSubject = function () { - if (!completions$) { - completions$ = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); - notifier(completions$).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - var subscribeForRepeatWhen = function () { - isMainComplete = false; - innerSub = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); -} -//# sourceMappingURL=repeatWhen.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/retry.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return retry; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - - - -function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } - var config; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } - else { - config = { - count: configOrCount, - }; - } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count <= 0 - ? _util_identity__WEBPACK_IMPORTED_MODULE_2__[/* identity */ "a"] - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? Object(_observable_timer__WEBPACK_IMPORTED_MODULE_3__[/* timer */ "a"])(delay) : Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__[/* innerFrom */ "a"])(delay(err, soFar)); - var notifierSubscriber_1 = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} -//# sourceMappingURL=retry.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return retryWhen; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function retryWhen(notifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var innerSub; - var syncResub = false; - var errors$; - var subscribeForRetryWhen = function () { - innerSub = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); - notifier(errors$).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); -} -//# sourceMappingURL=retryWhen.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/sample.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return sample; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function sample(notifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); - notifier.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, _util_noop__WEBPACK_IMPORTED_MODULE_1__[/* noop */ "a"])); - }); -} -//# sourceMappingURL=sample.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return sampleTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _sample__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sample.js"); -/* harmony import */ var _observable_interval__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/interval.js"); - - - -function sampleTime(period, scheduler) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - return Object(_sample__WEBPACK_IMPORTED_MODULE_1__[/* sample */ "a"])(Object(_observable_interval__WEBPACK_IMPORTED_MODULE_2__[/* interval */ "a"])(period, scheduler)); -} -//# sourceMappingURL=sampleTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/scan.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scan; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _scanInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js"); - - -function scan(accumulator, seed) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(Object(_scanInternals__WEBPACK_IMPORTED_MODULE_1__[/* scanInternals */ "a"])(accumulator, seed, arguments.length >= 2, true)); -} -//# sourceMappingURL=scan.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scanInternals; }); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - -function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return function (source, subscriber) { - var hasState = hasSeed; - var state = seed; - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_0__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); - }; -} -//# sourceMappingURL=scanInternals.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return sequenceEqual; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var aState = createState(); - var bState = createState(); - var emit = function (isEqual) { - subscriber.next(isEqual); - subscriber.complete(); - }; - var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - compareTo.subscribe(createSubscriber(bState, aState)); - }); -} -function createState() { - return { - buffer: [], - complete: false, - }; -} -//# sourceMappingURL=sequenceEqual.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/share.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return share; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/from.js"); -/* harmony import */ var _operators_take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscriber.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - - - - - -function share(options) { - if (options === void 0) { options = {}; } - var _a = options.connector, connector = _a === void 0 ? function () { return new _Subject__WEBPACK_IMPORTED_MODULE_3__[/* Subject */ "a"](); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; - return function (wrapperSource) { - var connection = null; - var resetConnection = null; - var subject = null; - var refCount = 0; - var hasCompleted = false; - var hasErrored = false; - var cancelReset = function () { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = null; - }; - var reset = function () { - cancelReset(); - connection = subject = null; - hasCompleted = hasErrored = false; - }; - var resetAndUnsubscribe = function () { - var conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_5__[/* operate */ "b"])(function (source, subscriber) { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); - subscriber.add(function () { - refCount--; - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection) { - connection = new _Subscriber__WEBPACK_IMPORTED_MODULE_4__[/* SafeSubscriber */ "a"]({ - next: function (value) { return dest.next(value); }, - error: function (err) { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: function () { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__[/* from */ "a"])(source).subscribe(connection); - } - })(wrapperSource); - }; -} -function handleReset(reset, on) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - if (on === true) { - reset(); - return null; - } - if (on === false) { - return null; - } - return on.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))).pipe(Object(_operators_take__WEBPACK_IMPORTED_MODULE_2__[/* take */ "a"])(1)) - .subscribe(function () { return reset(); }); -} -//# sourceMappingURL=share.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return shareReplay; }); -/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"); -/* harmony import */ var _share__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/share.js"); - - -function shareReplay(configOrBufferSize, windowTime, scheduler) { - var _a, _b, _c; - var bufferSize; - var refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); - } - else { - bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; - } - return Object(_share__WEBPACK_IMPORTED_MODULE_1__[/* share */ "a"])({ - connector: function () { return new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__[/* ReplaySubject */ "a"](bufferSize, windowTime, scheduler); }, - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); -} -//# sourceMappingURL=shareReplay.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/single.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return single; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony import */ var _util_SequenceError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/SequenceError.js"); -/* harmony import */ var _util_NotFoundError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - - -function single(predicate) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_3__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - var singleValue; - var seenValue = false; - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new _util_SequenceError__WEBPACK_IMPORTED_MODULE_1__[/* SequenceError */ "a"]('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new _util_NotFoundError__WEBPACK_IMPORTED_MODULE_2__[/* NotFoundError */ "a"]('No matching values') : new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"]()); - } - })); - }); -} -//# sourceMappingURL=single.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/skip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return skip; }); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); - -function skip(count) { - return Object(_filter__WEBPACK_IMPORTED_MODULE_0__[/* filter */ "a"])(function (_, index) { return count <= index; }); -} -//# sourceMappingURL=skip.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/skipLast.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return skipLast; }); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function skipLast(skipCount) { - return skipCount <= 0 - ? - _util_identity__WEBPACK_IMPORTED_MODULE_0__[/* identity */ "a"] - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); -} -//# sourceMappingURL=skipLast.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return skipUntil; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - - -function skipUntil(notifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var taking = false; - var skipSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, _util_noop__WEBPACK_IMPORTED_MODULE_3__[/* noop */ "a"]); - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(notifier).subscribe(skipSubscriber); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return taking && subscriber.next(value); })); - }); -} -//# sourceMappingURL=skipUntil.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return skipWhile; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function skipWhile(predicate) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var taking = false; - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); - }); -} -//# sourceMappingURL=skipWhile.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/startWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return startWith; }); -/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/concat.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - - -function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = Object(_util_args__WEBPACK_IMPORTED_MODULE_1__[/* popScheduler */ "c"])(values); - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - (scheduler ? Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__[/* concat */ "a"])(values, source, scheduler) : Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__[/* concat */ "a"])(values, source)).subscribe(subscriber); - }); -} -//# sourceMappingURL=startWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeOn; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - -function subscribeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); - }); -} -//# sourceMappingURL=subscribeOn.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/switchAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return switchAll; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - -function switchAll() { - return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__[/* switchMap */ "a"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__[/* identity */ "a"]); -} -//# sourceMappingURL=switchAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return switchMap; }); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function switchMap(project, resultSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__[/* innerFrom */ "a"])(project(value, outerIndex)).subscribe((innerSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); - }); -} -//# sourceMappingURL=switchMap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return switchMapTo; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function switchMapTo(innerObservable, resultSelector) { - return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(resultSelector) ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__[/* switchMap */ "a"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__[/* switchMap */ "a"])(function () { return innerObservable; }); -} -//# sourceMappingURL=switchMapTo.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/switchScan.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return switchScan; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - -function switchScan(accumulator, seed) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var state = seed; - Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__[/* switchMap */ "a"])(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); - return function () { - state = null; - }; - }); -} -//# sourceMappingURL=switchScan.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/take.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return take; }); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function take(count) { - return count <= 0 - ? - function () { return _observable_empty__WEBPACK_IMPORTED_MODULE_0__[/* EMPTY */ "a"]; } - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var seen = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); -} -//# sourceMappingURL=take.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/takeLast.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return takeLast; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/empty.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - -function takeLast(count) { - return count <= 0 - ? function () { return _observable_empty__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY */ "a"]; } - : Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var buffer = []; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); -} -//# sourceMappingURL=takeLast.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return takeUntil; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - - -function takeUntil(notifier) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(notifier).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function () { return subscriber.complete(); }, _util_noop__WEBPACK_IMPORTED_MODULE_3__[/* noop */ "a"])); - !subscriber.closed && source.subscribe(subscriber); - }); -} -//# sourceMappingURL=takeUntil.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return takeWhile; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - -function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var index = 0; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=takeWhile.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/tap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tap; }); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - - - - -function tap(observerOrNext, error, complete) { - var tapObserver = Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; - return tapObserver - ? Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - _util_identity__WEBPACK_IMPORTED_MODULE_3__[/* identity */ "a"]; -} -//# sourceMappingURL=tap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/throttle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defaultThrottleConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return throttle; }); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - -var defaultThrottleConfig = { - leading: true, - trailing: false, -}; -function throttle(durationSelector, config) { - if (config === void 0) { config = defaultThrottleConfig; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_0__[/* operate */ "b"])(function (source, subscriber) { - var leading = config.leading, trailing = config.trailing; - var hasValue = false; - var sendValue = null; - var throttled = null; - var isComplete = false; - var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - var cleanupThrottling = function () { - throttled = null; - isComplete && subscriber.complete(); - }; - var startThrottle = function (value) { - return (throttled = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__[/* innerFrom */ "a"])(durationSelector(value)).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, endThrottling, cleanupThrottling))); - }; - var send = function () { - if (hasValue) { - hasValue = false; - var value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=throttle.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throttleTime; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throttle.js"); -/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/timer.js"); - - - -function throttleTime(duration, scheduler, config) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - if (config === void 0) { config = _throttle__WEBPACK_IMPORTED_MODULE_1__[/* defaultThrottleConfig */ "a"]; } - var duration$ = Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__[/* timer */ "a"])(duration, scheduler); - return Object(_throttle__WEBPACK_IMPORTED_MODULE_1__[/* throttle */ "b"])(function () { return duration$; }, config); -} -//# sourceMappingURL=throttleTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwIfEmpty; }); -/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var hasValue = false; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); - }); -} -function defaultErrorFactory() { - return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__[/* EmptyError */ "a"](); -} -//# sourceMappingURL=throwIfEmpty.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timeInterval; }); -/* unused harmony export TimeInterval */ -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - -function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"]; } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var last = scheduler.now(); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var now = scheduler.now(); - var interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - })); - }); -} -var TimeInterval = (function () { - function TimeInterval(value, interval) { - this.value = value; - this.interval = interval; - } - return TimeInterval; -}()); - -//# sourceMappingURL=timeInterval.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/timeout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TimeoutError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return timeout; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isDate.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_createErrorClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - - - - - - -var TimeoutError = Object(_util_createErrorClass__WEBPACK_IMPORTED_MODULE_4__[/* createErrorClass */ "a"])(function (_super) { - return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; - }; -}); -function timeout(config, schedulerArg) { - var _a = (Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__[/* isValidDate */ "a"])(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* asyncScheduler */ "b"] : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var originalSourceSubscription; - var timerSubscription; - var lastValue = null; - var seen = 0; - var startTimer = function (delay) { - timerSubscription = Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_6__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); - }; - originalSourceSubscription = source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); - }); -} -function timeoutErrorFactory(info) { - throw new TimeoutError(info); -} -//# sourceMappingURL=timeout.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timeoutWith; }); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isDate.js"); -/* harmony import */ var _timeout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeout.js"); - - - -function timeoutWith(due, withObservable, scheduler) { - var first; - var each; - var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__[/* async */ "a"]; - if (Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__[/* isValidDate */ "a"])(due)) { - first = due; - } - else if (typeof due === 'number') { - each = due; - } - if (withObservable) { - _with = function () { return withObservable; }; - } - else { - throw new TypeError('No observable provided to switch to'); - } - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return Object(_timeout__WEBPACK_IMPORTED_MODULE_2__[/* timeout */ "b"])({ - first: first, - each: each, - scheduler: scheduler, - with: _with, - }); -} -//# sourceMappingURL=timeoutWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/timestamp.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timestamp; }); -/* harmony import */ var _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js"); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); - - -function timestamp(timestampProvider) { - if (timestampProvider === void 0) { timestampProvider = _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__[/* dateTimestampProvider */ "a"]; } - return Object(_map__WEBPACK_IMPORTED_MODULE_1__[/* map */ "a"])(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); -} -//# sourceMappingURL=timestamp.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/toArray.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toArray; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - -var arrReducer = function (arr, value) { return (arr.push(value), arr); }; -function toArray() { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - Object(_reduce__WEBPACK_IMPORTED_MODULE_0__[/* reduce */ "a"])(arrReducer, [])(source).subscribe(subscriber); - }); -} -//# sourceMappingURL=toArray.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/window.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return window; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); - - - - -function window(windowBoundaries) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var windowSubject = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); - subscriber.next(windowSubject.asObservable()); - var errorHandler = function (err) { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - windowBoundaries.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"]())); - }, _util_noop__WEBPACK_IMPORTED_MODULE_3__[/* noop */ "a"], errorHandler)); - return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); -} -//# sourceMappingURL=window.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/windowCount.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return windowCount; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); - - - - -function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } - var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - var windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]()]; - var starts = []; - var count = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); - } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new _Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"](); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - starts = null; - windows = null; - })); - }); -} -//# sourceMappingURL=windowCount.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/windowTime.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return windowTime; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - - - - - - - -function windowTime(windowTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = Object(_util_args__WEBPACK_IMPORTED_MODULE_6__[/* popScheduler */ "c"])(otherArgs)) !== null && _a !== void 0 ? _a : _scheduler_async__WEBPACK_IMPORTED_MODULE_1__[/* asyncScheduler */ "b"]; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxWindowSize = otherArgs[1] || Infinity; - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_3__[/* operate */ "b"])(function (source, subscriber) { - var windowRecords = []; - var restartOnClose = false; - var closeWindow = function (record) { - var window = record.window, subs = record.subs; - window.complete(); - subs.unsubscribe(); - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_5__[/* arrRemove */ "a"])(windowRecords, record); - restartOnClose && startWindow(); - }; - var startWindow = function () { - if (windowRecords) { - var subs = new _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"](); - subscriber.add(subs); - var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); - var record_1 = { - window: window_1, - subs: subs, - seen: 0, - }; - windowRecords.push(record_1); - subscriber.next(window_1.asObservable()); - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__[/* executeSchedule */ "a"])(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_7__[/* executeSchedule */ "a"])(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { - restartOnClose = true; - } - startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; - var terminate = function (cb) { - loop(function (_a) { - var window = _a.window; - return cb(window); - }); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); - return function () { - windowRecords = null; - }; - }); -} -//# sourceMappingURL=windowTime.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return windowToggle; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); - - - - - - - - -function windowToggle(openings, closingSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_3__[/* operate */ "b"])(function (source, subscriber) { - var windows = []; - var handleError = function (err) { - while (0 < windows.length) { - windows.shift().error(err); - } - subscriber.error(err); - }; - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__[/* innerFrom */ "a"])(openings).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__[/* createOperatorSubscriber */ "b"])(subscriber, function (openValue) { - var window = new _Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"](); - windows.push(window); - var closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"](); - var closeWindow = function () { - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_7__[/* arrRemove */ "a"])(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__[/* innerFrom */ "a"])(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__[/* createOperatorSubscriber */ "b"])(subscriber, closeWindow, _util_noop__WEBPACK_IMPORTED_MODULE_6__[/* noop */ "a"], handleError))); - }, _util_noop__WEBPACK_IMPORTED_MODULE_6__[/* noop */ "a"])); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_5__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "i"])(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); - }); -} -//# sourceMappingURL=windowToggle.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return windowWhen; }); -/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subject.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); - - - - -function windowWhen(closingSelector) { - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var window; - var closingSubscriber; - var handleError = function (err) { - window.error(err); - subscriber.error(err); - }; - var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); - window = new _Subject__WEBPACK_IMPORTED_MODULE_0__[/* Subject */ "a"](); - subscriber.next(window.asObservable()); - var closingNotifier; - try { - closingNotifier = Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(closingSelector()); - } - catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe((closingSubscriber = Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, openWindow, openWindow, handleError))); - }; - openWindow(); - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); - }); -} -//# sourceMappingURL=windowWhen.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return withLatestFrom; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); -/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); -/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/noop.js"); -/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/args.js"); - - - - - - - -function withLatestFrom() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - var project = Object(_util_args__WEBPACK_IMPORTED_MODULE_6__[/* popResultSelector */ "b"])(inputs); - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_1__[/* operate */ "b"])(function (source, subscriber) { - var len = inputs.length; - var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); - var ready = false; - var _loop_1 = function (i) { - Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__[/* innerFrom */ "a"])(inputs[i]).subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(_util_identity__WEBPACK_IMPORTED_MODULE_4__[/* identity */ "a"])) && (hasValue = null); - } - }, _util_noop__WEBPACK_IMPORTED_MODULE_5__[/* noop */ "a"])); - }; - for (var i = 0; i < len; i++) { - _loop_1(i); - } - source.subscribe(Object(_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* createOperatorSubscriber */ "b"])(subscriber, function (value) { - if (ready) { - var values = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([value], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherValues)); - subscriber.next(project ? project.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(values))) : values); - } - })); - }); -} -//# sourceMappingURL=withLatestFrom.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/zip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return zip; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/zip.js"); -/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/lift.js"); - - - -function zip() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return Object(_util_lift__WEBPACK_IMPORTED_MODULE_2__[/* operate */ "b"])(function (source, subscriber) { - _observable_zip__WEBPACK_IMPORTED_MODULE_1__[/* zip */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([source], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(sources))).subscribe(subscriber); - }); -} -//# sourceMappingURL=zip.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/zipAll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return zipAll; }); -/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/zip.js"); -/* harmony import */ var _joinAllInternals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js"); - - -function zipAll(project) { - return Object(_joinAllInternals__WEBPACK_IMPORTED_MODULE_1__[/* joinAllInternals */ "a"])(_observable_zip__WEBPACK_IMPORTED_MODULE_0__[/* zip */ "a"], project); -} -//# sourceMappingURL=zipAll.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/operators/zipWith.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return zipWith; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zip.js"); - - -function zipWith() { - var otherInputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherInputs[_i] = arguments[_i]; - } - return _zip__WEBPACK_IMPORTED_MODULE_1__[/* zip */ "a"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(otherInputs))); -} -//# sourceMappingURL=zipWith.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleArray; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); - -function scheduleArray(input, scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } - else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -//# sourceMappingURL=scheduleArray.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleAsyncIterable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - -function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { - var iterator = input[Symbol.asyncIterator](); - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -//# sourceMappingURL=scheduleAsyncIterable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleIterable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js"); -/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js"); - - - - -function scheduleIterable(input, scheduler) { - return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { - var iterator; - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_3__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { - iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__[/* iterator */ "a"]](); - Object(_util_executeSchedule__WEBPACK_IMPORTED_MODULE_3__[/* executeSchedule */ "a"])(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - (_a = iterator.next(), value = _a.value, done = _a.done); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { return Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "a"])(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; - }); -} -//# sourceMappingURL=scheduleIterable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleObservable; }); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"); -/* harmony import */ var _operators_subscribeOn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"); - - - -function scheduleObservable(input, scheduler) { - return Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__[/* innerFrom */ "a"])(input).pipe(Object(_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_2__[/* subscribeOn */ "a"])(scheduler), Object(_operators_observeOn__WEBPACK_IMPORTED_MODULE_1__[/* observeOn */ "a"])(scheduler)); -} -//# sourceMappingURL=scheduleObservable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return schedulePromise; }); -/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"); -/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"); -/* harmony import */ var _operators_subscribeOn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"); - - - -function schedulePromise(input, scheduler) { - return Object(_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__[/* innerFrom */ "a"])(input).pipe(Object(_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_2__[/* subscribeOn */ "a"])(scheduler), Object(_operators_observeOn__WEBPACK_IMPORTED_MODULE_1__[/* observeOn */ "a"])(scheduler)); -} -//# sourceMappingURL=schedulePromise.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleReadableStreamLike; }); -/* harmony import */ var _scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js"); -/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js"); - - -function scheduleReadableStreamLike(input, scheduler) { - return Object(_scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_0__[/* scheduleAsyncIterable */ "a"])(Object(_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_1__[/* readableStreamLikeToAsyncGenerator */ "b"])(input), scheduler); -} -//# sourceMappingURL=scheduleReadableStreamLike.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduled; }); -/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js"); -/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js"); -/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js"); -/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js"); -/* harmony import */ var _scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js"); -/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js"); -/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isPromise.js"); -/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"); -/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isIterable.js"); -/* harmony import */ var _util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js"); -/* harmony import */ var _util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js"); -/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js"); -/* harmony import */ var _scheduleReadableStreamLike__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js"); - - - - - - - - - - - - - -function scheduled(input, scheduler) { - if (input != null) { - if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_5__[/* isInteropObservable */ "a"])(input)) { - return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__[/* scheduleObservable */ "a"])(input, scheduler); - } - if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_7__[/* isArrayLike */ "a"])(input)) { - return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__[/* scheduleArray */ "a"])(input, scheduler); - } - if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_6__[/* isPromise */ "a"])(input)) { - return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__[/* schedulePromise */ "a"])(input, scheduler); - } - if (Object(_util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_9__[/* isAsyncIterable */ "a"])(input)) { - return Object(_scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_4__[/* scheduleAsyncIterable */ "a"])(input, scheduler); - } - if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_8__[/* isIterable */ "a"])(input)) { - return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__[/* scheduleIterable */ "a"])(input, scheduler); - } - if (Object(_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_11__[/* isReadableStreamLike */ "a"])(input)) { - return Object(_scheduleReadableStreamLike__WEBPACK_IMPORTED_MODULE_12__[/* scheduleReadableStreamLike */ "a"])(input, scheduler); - } - } - throw Object(_util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_10__[/* createInvalidObservableTypeError */ "a"])(input); -} -//# sourceMappingURL=scheduled.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/Action.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Action; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); - - -var Action = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(Action, _super); - function Action(scheduler, work) { - return _super.call(this) || this; - } - Action.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - return this; - }; - return Action; -}(_Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "b"])); - -//# sourceMappingURL=Action.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameAction; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"); -/* harmony import */ var _animationFrameProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js"); - - - -var AnimationFrameAction = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AnimationFrameAction, _super); - function AnimationFrameAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = _animationFrameProvider__WEBPACK_IMPORTED_MODULE_2__[/* animationFrameProvider */ "a"].requestAnimationFrame(function () { return scheduler.flush(undefined); })); - }; - AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - if (!scheduler.actions.some(function (action) { return action.id === id; })) { - _animationFrameProvider__WEBPACK_IMPORTED_MODULE_2__[/* animationFrameProvider */ "a"].cancelAnimationFrame(id); - scheduler._scheduled = undefined; - } - return undefined; - }; - return AnimationFrameAction; -}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__[/* AsyncAction */ "a"])); - -//# sourceMappingURL=AnimationFrameAction.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameScheduler; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js"); - - -var AnimationFrameScheduler = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AnimationFrameScheduler, _super); - function AnimationFrameScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AnimationFrameScheduler.prototype.flush = function (action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = undefined; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AnimationFrameScheduler; -}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsyncScheduler */ "a"])); - -//# sourceMappingURL=AnimationFrameScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapAction; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"); -/* harmony import */ var _immediateProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js"); - - - -var AsapAction = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AsapAction, _super); - function AsapAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = _immediateProvider__WEBPACK_IMPORTED_MODULE_2__[/* immediateProvider */ "a"].setImmediate(scheduler.flush.bind(scheduler, undefined))); - }; - AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - if (!scheduler.actions.some(function (action) { return action.id === id; })) { - _immediateProvider__WEBPACK_IMPORTED_MODULE_2__[/* immediateProvider */ "a"].clearImmediate(id); - scheduler._scheduled = undefined; - } - return undefined; - }; - return AsapAction; -}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__[/* AsyncAction */ "a"])); - -//# sourceMappingURL=AsapAction.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapScheduler; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js"); - - -var AsapScheduler = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AsapScheduler, _super); - function AsapScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AsapScheduler.prototype.flush = function (action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = undefined; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsapScheduler; -}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsyncScheduler */ "a"])); - -//# sourceMappingURL=AsapScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncAction; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/Action.js"); -/* harmony import */ var _intervalProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js"); -/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js"); - - - - -var AsyncAction = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AsyncAction, _super); - function AsyncAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); - return this; - }; - AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { - if (delay === void 0) { delay = 0; } - return _intervalProvider__WEBPACK_IMPORTED_MODULE_2__[/* intervalProvider */ "a"].setInterval(scheduler.flush.bind(scheduler, this), delay); - }; - AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - _intervalProvider__WEBPACK_IMPORTED_MODULE_2__[/* intervalProvider */ "a"].clearInterval(id); - return undefined; - }; - AsyncAction.prototype.execute = function (state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - var error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction.prototype._execute = function (state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction.prototype.unsubscribe = function () { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - Object(_util_arrRemove__WEBPACK_IMPORTED_MODULE_3__[/* arrRemove */ "a"])(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction; -}(_Action__WEBPACK_IMPORTED_MODULE_1__[/* Action */ "a"])); - -//# sourceMappingURL=AsyncAction.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncScheduler; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Scheduler.js"); - - -var AsyncScheduler = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(AsyncScheduler, _super); - function AsyncScheduler(SchedulerAction, now) { - if (now === void 0) { now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__[/* Scheduler */ "a"].now; } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - _this._scheduled = undefined; - return _this; - } - AsyncScheduler.prototype.flush = function (action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift())); - this._active = false; - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler; -}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__[/* Scheduler */ "a"])); - -//# sourceMappingURL=AsyncScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueAction; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"); - - -var QueueAction = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(QueueAction, _super); - function QueueAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - QueueAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (delay > 0) { - return _super.prototype.schedule.call(this, state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - }; - QueueAction.prototype.execute = function (state, delay) { - return (delay > 0 || this.closed) ? - _super.prototype.execute.call(this, state, delay) : - this._execute(state, delay); - }; - QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - return scheduler.flush(this); - }; - return QueueAction; -}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__[/* AsyncAction */ "a"])); - -//# sourceMappingURL=QueueAction.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueScheduler; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js"); - - -var QueueScheduler = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(QueueScheduler, _super); - function QueueScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - return QueueScheduler; -}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsyncScheduler */ "a"])); - -//# sourceMappingURL=QueueScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return VirtualTimeScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VirtualAction; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js"); - - - - -var VirtualTimeScheduler = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(VirtualTimeScheduler, _super); - function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } - if (maxFrames === void 0) { maxFrames = Infinity; } - var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; - _this.maxFrames = maxFrames; - _this.frame = 0; - _this.index = -1; - return _this; - } - VirtualTimeScheduler.prototype.flush = function () { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; - var error; - var action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - VirtualTimeScheduler.frameTimeFactor = 10; - return VirtualTimeScheduler; -}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_3__[/* AsyncScheduler */ "a"])); - -var VirtualAction = (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "e"])(VirtualAction, _super); - function VirtualAction(scheduler, work, index) { - if (index === void 0) { index = (scheduler.index += 1); } - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.index = index; - _this.active = true; - _this.index = scheduler.index = index; - return _this; - } - VirtualAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (Number.isFinite(delay)) { - if (!this.id) { - return _super.prototype.schedule.call(this, state, delay); - } - this.active = false; - var action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } - else { - return _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "b"].EMPTY; - } - }; - VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - this.delay = scheduler.frame + delay; - var actions = scheduler.actions; - actions.push(this); - actions.sort(VirtualAction.sortActions); - return true; - }; - VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - return undefined; - }; - VirtualAction.prototype._execute = function (state, delay) { - if (this.active === true) { - return _super.prototype._execute.call(this, state, delay); - } - }; - VirtualAction.sortActions = function (a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } - else if (a.index > b.index) { - return 1; - } - else { - return -1; - } - } - else if (a.delay > b.delay) { - return 1; - } - else { - return -1; - } - }; - return VirtualAction; -}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__[/* AsyncAction */ "a"])); - -//# sourceMappingURL=VirtualTimeScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return animationFrameScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return animationFrame; }); -/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js"); -/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js"); - - -var animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AnimationFrameScheduler */ "a"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__[/* AnimationFrameAction */ "a"]); -var animationFrame = animationFrameScheduler; -//# sourceMappingURL=animationFrame.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return animationFrameProvider; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Subscription.js"); - - -var animationFrameProvider = { - schedule: function (callback) { - var request = requestAnimationFrame; - var cancel = cancelAnimationFrame; - var delegate = animationFrameProvider.delegate; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - var handle = request(function (timestamp) { - cancel = undefined; - callback(timestamp); - }); - return new _Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "b"](function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); - }, - requestAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - }, - cancelAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - }, - delegate: undefined, -}; -//# sourceMappingURL=animationFrameProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/asap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return asapScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asap; }); -/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js"); -/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js"); - - -var asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsapScheduler */ "a"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__[/* AsapAction */ "a"]); -var asap = asapScheduler; -//# sourceMappingURL=asap.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return asyncScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; }); -/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js"); -/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js"); - - -var asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsyncScheduler */ "a"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__[/* AsyncAction */ "a"]); -var async = asyncScheduler; -//# sourceMappingURL=async.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dateTimestampProvider; }); -var dateTimestampProvider = { - now: function () { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=dateTimestampProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return immediateProvider; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/Immediate.js"); - - -var setImmediate = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__[/* Immediate */ "a"].setImmediate, clearImmediate = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__[/* Immediate */ "a"].clearImmediate; -var immediateProvider = { - setImmediate: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - }, - clearImmediate: function (handle) { - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=immediateProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return intervalProvider; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); - -var intervalProvider = { - setInterval: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = intervalProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval.apply(delegate, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([handler, timeout], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - } - return setInterval.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([handler, timeout], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - }, - clearInterval: function (handle) { - var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=intervalProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return performanceTimestampProvider; }); -var performanceTimestampProvider = { - now: function () { - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=performanceTimestampProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/queue.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return queueScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return queue; }); -/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js"); -/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js"); - - -var queueScheduler = new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__[/* QueueScheduler */ "a"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__[/* QueueAction */ "a"]); -var queue = queueScheduler; -//# sourceMappingURL=queue.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timeoutProvider; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); - -var timeoutProvider = { - setTimeout: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([handler, timeout], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - } - return setTimeout.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([handler, timeout], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))); - }, - clearTimeout: function (handle) { - var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=timeoutProvider.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export getSymbolIterator */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iterator; }); -function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -var iterator = getSymbolIterator(); -//# sourceMappingURL=iterator.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return observable; }); -var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); -//# sourceMappingURL=observable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var ArgumentOutOfRangeError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { - return function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; - }; -}); -//# sourceMappingURL=ArgumentOutOfRangeError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/EmptyError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EmptyError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var EmptyError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { return function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; -}; }); -//# sourceMappingURL=EmptyError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/Immediate.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Immediate; }); -/* unused harmony export TestTools */ -var nextHandle = 1; -var resolved; -var activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -var Immediate = { - setImmediate: function (cb) { - var handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(function () { return findAndClearHandle(handle) && cb(); }); - return handle; - }, - clearImmediate: function (handle) { - findAndClearHandle(handle); - }, -}; -var TestTools = { - pending: function () { - return Object.keys(activeHandles).length; - } -}; -//# sourceMappingURL=Immediate.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NotFoundError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var NotFoundError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { - return function NotFoundErrorImpl(message) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; - }; -}); -//# sourceMappingURL=NotFoundError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObjectUnsubscribedError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var ObjectUnsubscribedError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; - }; -}); -//# sourceMappingURL=ObjectUnsubscribedError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/SequenceError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SequenceError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var SequenceError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { - return function SequenceErrorImpl(message) { - _super(this); - this.name = 'SequenceError'; - this.message = message; - }; -}); -//# sourceMappingURL=SequenceError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnsubscriptionError; }); -/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js"); - -var UnsubscriptionError = Object(_createErrorClass__WEBPACK_IMPORTED_MODULE_0__[/* createErrorClass */ "a"])(function (_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors - ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - }; -}); -//# sourceMappingURL=UnsubscriptionError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/args.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return popResultSelector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return popScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return popNumber; }); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); -/* harmony import */ var _isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js"); - - -function last(arr) { - return arr[arr.length - 1]; -} -function popResultSelector(args) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(last(args)) ? args.pop() : undefined; -} -function popScheduler(args) { - return Object(_isScheduler__WEBPACK_IMPORTED_MODULE_1__[/* isScheduler */ "a"])(last(args)) ? args.pop() : undefined; -} -function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; -} -//# sourceMappingURL=args.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return argsArgArrayOrObject; }); -var isArray = Array.isArray; -var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; -function argsArgArrayOrObject(args) { - if (args.length === 1) { - var first_1 = args[0]; - if (isArray(first_1)) { - return { args: first_1, keys: null }; - } - if (isPOJO(first_1)) { - var keys = getKeys(first_1); - return { - args: keys.map(function (key) { return first_1[key]; }), - keys: keys, - }; - } - } - return { args: args, keys: null }; -} -function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; -} -//# sourceMappingURL=argsArgArrayOrObject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return argsOrArgArray; }); -var isArray = Array.isArray; -function argsOrArgArray(args) { - return args.length === 1 && isArray(args[0]) ? args[0] : args; -} -//# sourceMappingURL=argsOrArgArray.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrRemove; }); -function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -//# sourceMappingURL=arrRemove.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createErrorClass; }); -function createErrorClass(createImpl) { - var _super = function (instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -//# sourceMappingURL=createErrorClass.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/createObject.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createObject; }); -function createObject(keys, values) { - return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); -} -//# sourceMappingURL=createObject.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return errorContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return captureError; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/config.js"); - -var context = null; -function errorContext(cb) { - if (_config__WEBPACK_IMPORTED_MODULE_0__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } - else { - cb(); - } -} -function captureError(err) { - if (_config__WEBPACK_IMPORTED_MODULE_0__[/* config */ "a"].useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} -//# sourceMappingURL=errorContext.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return executeSchedule; }); -function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { delay = 0; } - if (repeat === void 0) { repeat = false; } - var scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } - else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -//# sourceMappingURL=executeSchedule.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/identity.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return identity; }); -function identity(x) { - return x; -} -//# sourceMappingURL=identity.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArrayLike; }); -var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); -//# sourceMappingURL=isArrayLike.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isAsyncIterable; }); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - -function isAsyncIterable(obj) { - return Symbol.asyncIterator && Object(_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -//# sourceMappingURL=isAsyncIterable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isDate.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isValidDate; }); -function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} -//# sourceMappingURL=isDate.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isFunction; }); -function isFunction(value) { - return typeof value === 'function'; -} -//# sourceMappingURL=isFunction.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isInteropObservable; }); -/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js"); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function isInteropObservable(input) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* observable */ "a"]]); -} -//# sourceMappingURL=isInteropObservable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isIterable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isIterable; }); -/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js"); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function isIterable(input) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(input === null || input === void 0 ? void 0 : input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__[/* iterator */ "a"]]); -} -//# sourceMappingURL=isIterable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isObservable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObservable; }); -/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/Observable.js"); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function isObservable(obj) { - return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"] || (Object(_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(obj.lift) && Object(_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(obj.subscribe))); -} -//# sourceMappingURL=isObservable.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isPromise.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPromise; }); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - -function isPromise(value) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(value === null || value === void 0 ? void 0 : value.then); -} -//# sourceMappingURL=isPromise.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return readableStreamLikeToAsyncGenerator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isReadableStreamLike; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - - -function readableStreamLikeToAsyncGenerator(readableStream) { - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __asyncGenerator */ "a"])(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __generator */ "f"])(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (false) {} - return [4, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __await */ "c"])(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __await */ "c"])(void 0)]; - case 4: return [2, _b.sent()]; - case 5: return [4, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __await */ "c"])(value)]; - case 6: return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: return [2]; - } - }); - }); -} -function isReadableStreamLike(obj) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -//# sourceMappingURL=isReadableStreamLike.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isScheduler; }); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - -function isScheduler(value) { - return value && Object(_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(value.schedule); -} -//# sourceMappingURL=isScheduler.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/lift.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasLift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return operate; }); -/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js"); - -function hasLift(source) { - return Object(_isFunction__WEBPACK_IMPORTED_MODULE_0__[/* isFunction */ "a"])(source === null || source === void 0 ? void 0 : source.lift); -} -function operate(init) { - return function (source) { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } - catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; -} -//# sourceMappingURL=lift.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mapOneOrManyArgs; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); - - -var isArray = Array.isArray; -function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __spreadArray */ "h"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "g"])(args))) : fn(args); -} -function mapOneOrManyArgs(fn) { - return Object(_operators_map__WEBPACK_IMPORTED_MODULE_1__[/* map */ "a"])(function (args) { return callOrApply(fn, args); }); -} -//# sourceMappingURL=mapOneOrManyArgs.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/noop.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return noop; }); -function noop() { } -//# sourceMappingURL=noop.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/not.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return not; }); -function not(pred, thisArg) { - return function (value, index) { return !pred.call(thisArg, value, index); }; -} -//# sourceMappingURL=not.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/pipe.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pipe; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return pipeFromArray; }); -/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/util/identity.js"); - -function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -function pipeFromArray(fns) { - if (fns.length === 0) { - return _identity__WEBPACK_IMPORTED_MODULE_0__[/* identity */ "a"]; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function (prev, fn) { return fn(prev); }, input); - }; -} -//# sourceMappingURL=pipe.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return reportUnhandledError; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/config.js"); -/* harmony import */ var _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js"); - - -function reportUnhandledError(err) { - _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_1__[/* timeoutProvider */ "a"].setTimeout(function () { - var onUnhandledError = _config__WEBPACK_IMPORTED_MODULE_0__[/* config */ "a"].onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } - else { - throw err; - } - }); -} -//# sourceMappingURL=reportUnhandledError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createInvalidObservableTypeError; }); -function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} -//# sourceMappingURL=throwUnobservableError.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/dist/esm5/operators/index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/audit.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["a"]; }); - -/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/auditTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["a"]; }); - -/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/buffer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["a"]; }); - -/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["a"]; }); - -/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["a"]; }); - -/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["a"]; }); - -/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["a"]; }); - -/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/catchError.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["a"]; }); - -/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["a"]; }); - -/* harmony import */ var _internal_operators_combineLatestAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatestAll", function() { return _internal_operators_combineLatestAll__WEBPACK_IMPORTED_MODULE_9__["a"]; }); - -/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_10__["a"]; }); - -/* harmony import */ var _internal_operators_combineLatestWith__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatestWith", function() { return _internal_operators_combineLatestWith__WEBPACK_IMPORTED_MODULE_11__["a"]; }); - -/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_12__["a"]; }); - -/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_13__["a"]; }); - -/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_14__["a"]; }); - -/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_15__["a"]; }); - -/* harmony import */ var _internal_operators_concatWith__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/concatWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatWith", function() { return _internal_operators_concatWith__WEBPACK_IMPORTED_MODULE_16__["a"]; }); - -/* harmony import */ var _internal_operators_connect__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/connect.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _internal_operators_connect__WEBPACK_IMPORTED_MODULE_17__["a"]; }); - -/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/count.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_18__["a"]; }); - -/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/debounce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_19__["a"]; }); - -/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_20__["a"]; }); - -/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_21__["a"]; }); - -/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/delay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_22__["a"]; }); - -/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_23__["a"]; }); - -/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_24__["a"]; }); - -/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinct.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_25__["a"]; }); - -/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_26__["a"]; }); - -/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_27__["a"]; }); - -/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/elementAt.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_28__["a"]; }); - -/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/endWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_29__["a"]; }); - -/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/every.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_30__["a"]; }); - -/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaust.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_31__["a"]; }); - -/* harmony import */ var _internal_operators_exhaustAll__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustAll", function() { return _internal_operators_exhaustAll__WEBPACK_IMPORTED_MODULE_32__["a"]; }); - -/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_33__["a"]; }); - -/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/expand.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_34__["a"]; }); - -/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/filter.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_35__["a"]; }); - -/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/finalize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_36__["a"]; }); - -/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/find.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_37__["b"]; }); - -/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/findIndex.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_38__["a"]; }); - -/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/first.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_39__["a"]; }); - -/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/groupBy.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_40__["a"]; }); - -/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_41__["a"]; }); - -/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_42__["a"]; }); - -/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/last.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_43__["a"]; }); - -/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/map.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_44__["a"]; }); - -/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_45__["a"]; }); - -/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/materialize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_46__["a"]; }); - -/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/max.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_47__["a"]; }); - -/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/merge.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_48__["a"]; }); - -/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_49__["a"]; }); - -/* harmony import */ var _internal_operators_flatMap__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/flatMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_flatMap__WEBPACK_IMPORTED_MODULE_50__["a"]; }); - -/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_51__["a"]; }); - -/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_52__["a"]; }); - -/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_53__["a"]; }); - -/* harmony import */ var _internal_operators_mergeWith__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeWith", function() { return _internal_operators_mergeWith__WEBPACK_IMPORTED_MODULE_54__["a"]; }); - -/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/min.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_55__["a"]; }); - -/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/multicast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_56__["a"]; }); - -/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_57__["a"]; }); - -/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNext.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_58__["a"]; }); - -/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/pairwise.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_59__["a"]; }); - -/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/partition.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_60__["a"]; }); - -/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/pluck.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_61__["a"]; }); - -/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publish.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_62__["a"]; }); - -/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_63__["a"]; }); - -/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_64__["a"]; }); - -/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_65__["a"]; }); - -/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/race.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_66__["a"]; }); - -/* harmony import */ var _internal_operators_raceWith__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/raceWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "raceWith", function() { return _internal_operators_raceWith__WEBPACK_IMPORTED_MODULE_67__["a"]; }); - -/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/reduce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_68__["a"]; }); - -/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/repeat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_69__["a"]; }); - -/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_70__["a"]; }); - -/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/retry.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_71__["a"]; }); - -/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_72__["a"]; }); - -/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/refCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_73__["a"]; }); - -/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sample.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_74__["a"]; }); - -/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_75__["a"]; }); - -/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/scan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_76__["a"]; }); - -/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_77__["a"]; }); - -/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/share.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_78__["a"]; }); - -/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_79__["a"]; }); - -/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/single.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_80__["a"]; }); - -/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_81__["a"]; }); - -/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_82__["a"]; }); - -/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_83__["a"]; }); - -/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_84__["a"]; }); - -/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/startWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_85__["a"]; }); - -/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_86__["a"]; }); - -/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_87__["a"]; }); - -/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_88__["a"]; }); - -/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_89__["a"]; }); - -/* harmony import */ var _internal_operators_switchScan__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/switchScan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchScan", function() { return _internal_operators_switchScan__WEBPACK_IMPORTED_MODULE_90__["a"]; }); - -/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/take.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_91__["a"]; }); - -/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeLast.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_92__["a"]; }); - -/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_93__["a"]; }); - -/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_94__["a"]; }); - -/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/tap.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_95__["a"]; }); - -/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throttle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_96__["b"]; }); - -/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_97__["a"]; }); - -/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_98__["a"]; }); - -/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_99__["a"]; }); - -/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeout.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_100__["b"]; }); - -/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_101__["a"]; }); - -/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/timestamp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_102__["a"]; }); - -/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/toArray.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_103__["a"]; }); - -/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/window.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_104__["a"]; }); - -/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowCount.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_105__["a"]; }); - -/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_106__["a"]; }); - -/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_107__["a"]; }); - -/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_108__["a"]; }); - -/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_109__["a"]; }); - -/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_110__["a"]; }); - -/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zipAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_111__["a"]; }); - -/* harmony import */ var _internal_operators_zipWith__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__("../../node_modules/rxjs/dist/esm5/internal/operators/zipWith.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipWith", function() { return _internal_operators_zipWith__WEBPACK_IMPORTED_MODULE_112__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../node_modules/rxjs/node_modules/tslib/tslib.es6.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __extends; }); -/* unused harmony export __assign */ -/* unused harmony export __rest */ -/* unused harmony export __decorate */ -/* unused harmony export __param */ -/* unused harmony export __metadata */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __awaiter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __generator; }); -/* unused harmony export __createBinding */ -/* unused harmony export __exportStar */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __values; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __read; }); -/* unused harmony export __spread */ -/* unused harmony export __spreadArrays */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __spreadArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __await; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __asyncGenerator; }); -/* unused harmony export __asyncDelegator */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __asyncValues; }); -/* unused harmony export __makeTemplateObject */ -/* unused harmony export __importStar */ -/* unused harmony export __importDefault */ -/* unused harmony export __classPrivateFieldGet */ -/* unused harmony export __classPrivateFieldSet */ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } -} - -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -} - -function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - - -/***/ }), - -/***/ "../../node_modules/shebang-command/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const shebangRegex = __webpack_require__("../../node_modules/shebang-regex/index.js"); - -module.exports = (string = '') => { - const match = string.match(shebangRegex); - - if (!match) { - return null; - } - - const [path, argument] = match[0].replace(/#! ?/, '').split(' '); - const binary = path.split('/').pop(); - - if (binary === 'env') { - return argument; - } - - return argument ? `${binary} ${argument}` : binary; -}; - - -/***/ }), - -/***/ "../../node_modules/shebang-regex/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = /^#!(.*)/; - - -/***/ }), - -/***/ "../../node_modules/signal-exit/index.js": -/***/ (function(module, exports, __webpack_require__) { - -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -// grab a reference to node's real process object right away -var process = global.process - -const processOk = function (process) { - return process && - typeof process === 'object' && - typeof process.removeListener === 'function' && - typeof process.emit === 'function' && - typeof process.reallyExit === 'function' && - typeof process.listeners === 'function' && - typeof process.kill === 'function' && - typeof process.pid === 'number' && - typeof process.on === 'function' -} - -// some kind of non-node environment, just no-op -/* istanbul ignore if */ -if (!processOk(process)) { - module.exports = function () { - return function () {} - } -} else { - var assert = __webpack_require__("assert") - var signals = __webpack_require__("../../node_modules/signal-exit/signals.js") - var isWin = /^win/i.test(process.platform) - - var EE = __webpack_require__("events") - /* istanbul ignore if */ - if (typeof EE !== 'function') { - EE = EE.EventEmitter - } - - var emitter - if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ - } else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} - } - - // Because this emitter is a global, we have to check to see if a - // previous version of this library failed to enable infinite listeners. - // I know what you're about to say. But literally everything about - // signal-exit is a compromise with evil. Get used to it. - if (!emitter.infinite) { - emitter.setMaxListeners(Infinity) - emitter.infinite = true - } - - module.exports = function (cb, opts) { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return function () {} - } - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove - } - - var unload = function unload () { - if (!loaded || !processOk(global.process)) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 - } - module.exports.unload = unload - - var emit = function emit (event, code, signal) { - /* istanbul ignore if */ - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) - } - - // { : , ... } - var sigListeners = {} - signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return - } - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - if (isWin && sig === 'SIGHUP') { - // "SIGHUP" throws an `ENOSYS` error on Windows, - // so use a supported signal instead - sig = 'SIGINT' - } - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } - }) - - module.exports.signals = function () { - return signals - } - - var loaded = false - - var load = function load () { - if (loaded || !processOk(global.process)) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit - } - module.exports.load = load - - var originalProcessReallyExit = process.reallyExit - var processReallyExit = function processReallyExit (code) { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return - } - process.exitCode = code || /* istanbul ignore next */ 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) - } - - var originalProcessEmit = process.emit - var processEmit = function processEmit (ev, arg) { - if (ev === 'exit' && processOk(global.process)) { - /* istanbul ignore else */ - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - /* istanbul ignore next */ - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } - } -} - - -/***/ }), - -/***/ "../../node_modules/signal-exit/signals.js": -/***/ (function(module, exports) { - -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} - - -/***/ }), - -/***/ "../../node_modules/slash/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = path => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return path; - } - - return path.replace(/\\/g, '/'); -}; - - -/***/ }), - -/***/ "../../node_modules/sort-keys/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const isPlainObj = __webpack_require__("../../node_modules/sort-keys/node_modules/is-plain-obj/index.js"); - -module.exports = (obj, opts) => { - if (!isPlainObj(obj)) { - throw new TypeError('Expected a plain object'); - } - - opts = opts || {}; - - // DEPRECATED - if (typeof opts === 'function') { - throw new TypeError('Specify the compare function as an option instead'); - } - - const deep = opts.deep; - const seenInput = []; - const seenOutput = []; - - const sortKeys = x => { - const seenIndex = seenInput.indexOf(x); - - if (seenIndex !== -1) { - return seenOutput[seenIndex]; - } - - const ret = {}; - const keys = Object.keys(x).sort(opts.compare); - - seenInput.push(x); - seenOutput.push(ret); - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = x[key]; - - if (deep && Array.isArray(val)) { - const retArr = []; - - for (let j = 0; j < val.length; j++) { - retArr[j] = isPlainObj(val[j]) ? sortKeys(val[j]) : val[j]; - } - - ret[key] = retArr; - continue; - } - - ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val; - } - - return ret; - }; - - return sortKeys(obj); -}; - - -/***/ }), - -/***/ "../../node_modules/sort-keys/node_modules/is-plain-obj/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var toString = Object.prototype.toString; - -module.exports = function (x) { - var prototype; - return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); -}; - - -/***/ }), - -/***/ "../../node_modules/sort-object-keys/index.js": -/***/ (function(module, exports) { - -module.exports = function sortObjectByKeyNameList(object, sortWith) { - var keys; - var sortFn; - - if (typeof sortWith === 'function') { - sortFn = sortWith; - } else { - keys = sortWith; - } - - var objectKeys = Object.keys(object); - return (keys || []).concat(objectKeys.sort(sortFn)).reduce(function(total, key) { - if (objectKeys.indexOf(key) !== -1) { - total[key] = object[key]; - } - return total; - }, Object.create(null)); -} - - -/***/ }), - -/***/ "../../node_modules/sort-package-json/index.js": -/***/ (function(module, exports, __webpack_require__) { - -const sortObjectKeys = __webpack_require__("../../node_modules/sort-object-keys/index.js") -const detectIndent = __webpack_require__("../../node_modules/detect-indent/index.js") -const detectNewline = __webpack_require__("../../node_modules/detect-newline/index.js").graceful -const gitHooks = __webpack_require__("../../node_modules/git-hooks-list/index.json") -const isPlainObject = __webpack_require__("../../node_modules/is-plain-obj/index.js") - -const hasOwnProperty = (object, property) => - Object.prototype.hasOwnProperty.call(object, property) -const pipe = (fns) => (x, ...args) => - fns.reduce((result, fn) => fn(result, ...args), x) -const onArray = (fn) => (x) => (Array.isArray(x) ? fn(x) : x) -const onStringArray = (fn) => (x) => - Array.isArray(x) && x.every((item) => typeof item === 'string') ? fn(x) : x -const uniq = onStringArray((xs) => xs.filter((x, i) => i === xs.indexOf(x))) -const sortArray = onStringArray((array) => [...array].sort()) -const uniqAndSortArray = pipe([uniq, sortArray]) -const onObject = (fn) => (x, ...args) => (isPlainObject(x) ? fn(x, ...args) : x) -const sortObjectBy = (comparator, deep) => { - const over = onObject((object) => { - object = sortObjectKeys(object, comparator) - if (deep) { - for (const [key, value] of Object.entries(object)) { - object[key] = over(value) - } - } - return object - }) - - return over -} -const sortObject = sortObjectBy() -const sortURLObject = sortObjectBy(['type', 'url']) -const sortPeopleObject = sortObjectBy(['name', 'email', 'url']) -const sortDirectories = sortObjectBy([ - 'lib', - 'bin', - 'man', - 'doc', - 'example', - 'test', -]) -const overProperty = (property, over) => (object, ...args) => - hasOwnProperty(object, property) - ? Object.assign(object, { [property]: over(object[property], ...args) }) - : object -const sortGitHooks = sortObjectBy(gitHooks) - -// https://github.com/eslint/eslint/blob/acc0e47572a9390292b4e313b4a4bf360d236358/conf/config-schema.js -const eslintBaseConfigProperties = [ - // `files` and `excludedFiles` are only on `overrides[]` - // for easier sort `overrides[]`, - // add them to here, so we don't need sort `overrides[]` twice - 'files', - 'excludedFiles', - // baseConfig - 'env', - 'parser', - 'parserOptions', - 'settings', - 'plugins', - 'extends', - 'rules', - 'overrides', - 'globals', - 'processor', - 'noInlineConfig', - 'reportUnusedDisableDirectives', -] -const sortEslintConfig = onObject( - pipe([ - sortObjectBy(eslintBaseConfigProperties), - overProperty('env', sortObject), - overProperty('globals', sortObject), - overProperty( - 'overrides', - onArray((overrides) => overrides.map(sortEslintConfig)), - ), - overProperty('parserOptions', sortObject), - overProperty( - 'rules', - sortObjectBy( - (rule1, rule2) => - rule1.split('/').length - rule2.split('/').length || - rule1.localeCompare(rule2), - ), - ), - overProperty('settings', sortObject), - ]), -) -const sortVSCodeBadgeObject = sortObjectBy(['description', 'url', 'href']) - -const sortPrettierConfig = onObject( - pipe([ - // sort keys alphabetically, but put `overrides` at bottom - (config) => - sortObjectKeys(config, [ - ...Object.keys(config) - .filter((key) => key !== 'overrides') - .sort(), - 'overrides', - ]), - // if `config.overrides` exists - overProperty( - 'overrides', - // and `config.overrides` is an array - onArray((overrides) => - overrides.map( - pipe([ - // sort `config.overrides[]` alphabetically - sortObject, - // sort `config.overrides[].options` alphabetically - overProperty('options', sortObject), - ]), - ), - ), - ), - ]), -) - -// See https://docs.npmjs.com/misc/scripts -const defaultNpmScripts = new Set([ - 'install', - 'pack', - 'prepare', - 'publish', - 'restart', - 'shrinkwrap', - 'start', - 'stop', - 'test', - 'uninstall', - 'version', -]) - -const hasDevDependency = (dependency, packageJson) => { - return ( - 'devDependencies' in packageJson && - !!packageJson.devDependencies[dependency] - ) -} - -const sortScripts = onObject((scripts, packageJson) => { - const names = Object.keys(scripts) - const prefixable = new Set() - - const keys = names.map((name) => { - const omitted = name.replace(/^(?:pre|post)/, '') - if (defaultNpmScripts.has(omitted) || names.includes(omitted)) { - prefixable.add(omitted) - return omitted - } - return name - }) - - if (!hasDevDependency('npm-run-all', packageJson)) { - keys.sort() - } - - const order = keys.reduce( - (order, key) => - order.concat( - prefixable.has(key) ? [`pre${key}`, key, `post${key}`] : [key], - ), - [], - ) - - return sortObjectKeys(scripts, order) -}) - -// fields marked `vscode` are for `Visual Studio Code extension manifest` only -// https://code.visualstudio.com/api/references/extension-manifest -// Supported fields: -// publisher, displayName, categories, galleryBanner, preview, contributes, -// activationEvents, badges, markdown, qna, extensionPack, -// extensionDependencies, icon - -// field.key{string}: field name -// field.over{function}: sort field subKey -const fields = [ - { key: '$schema' }, - { key: 'name' }, - /* vscode */ { key: 'displayName' }, - { key: 'version' }, - { key: 'private' }, - { key: 'description' }, - /* vscode */ { key: 'categories', over: uniq }, - { key: 'keywords', over: uniq }, - { key: 'homepage' }, - { key: 'bugs', over: sortObjectBy(['url', 'email']) }, - { key: 'repository', over: sortURLObject }, - { key: 'funding', over: sortURLObject }, - { key: 'license', over: sortURLObject }, - /* vscode */ { key: 'qna' }, - { key: 'author', over: sortPeopleObject }, - { - key: 'maintainers', - over: onArray((maintainers) => maintainers.map(sortPeopleObject)), - }, - { - key: 'contributors', - over: onArray((contributors) => contributors.map(sortPeopleObject)), - }, - /* vscode */ { key: 'publisher' }, - { key: 'sideEffects' }, - { key: 'type' }, - { key: 'imports' }, - { key: 'exports' }, - { key: 'main' }, - { key: 'umd:main' }, - { key: 'jsdelivr' }, - { key: 'unpkg' }, - { key: 'module' }, - { key: 'source' }, - { key: 'jsnext:main' }, - { key: 'browser' }, - { key: 'types' }, - { key: 'typesVersions' }, - { key: 'typings' }, - { key: 'style' }, - { key: 'example' }, - { key: 'examplestyle' }, - { key: 'assets' }, - { key: 'bin', over: sortObject }, - { key: 'man' }, - { key: 'directories', over: sortDirectories }, - { key: 'files', over: uniq }, - { key: 'workspaces' }, - // node-pre-gyp https://www.npmjs.com/package/node-pre-gyp#1-add-new-entries-to-your-packagejson - { - key: 'binary', - over: sortObjectBy([ - 'module_name', - 'module_path', - 'remote_path', - 'package_name', - 'host', - ]), - }, - { key: 'scripts', over: sortScripts }, - { key: 'betterScripts', over: sortScripts }, - /* vscode */ { key: 'contributes', over: sortObject }, - /* vscode */ { key: 'activationEvents', over: uniq }, - { key: 'husky', over: overProperty('hooks', sortGitHooks) }, - { key: 'simple-git-hooks', over: sortGitHooks }, - { key: 'pre-commit' }, - { key: 'commitlint', over: sortObject }, - { key: 'lint-staged' }, - { key: 'config', over: sortObject }, - { key: 'nodemonConfig', over: sortObject }, - { key: 'browserify', over: sortObject }, - { key: 'babel', over: sortObject }, - { key: 'browserslist' }, - { key: 'xo', over: sortObject }, - { key: 'prettier', over: sortPrettierConfig }, - { key: 'eslintConfig', over: sortEslintConfig }, - { key: 'eslintIgnore' }, - { key: 'npmpkgjsonlint', over: sortObject }, - { key: 'npmPackageJsonLintConfig', over: sortObject }, - { key: 'npmpackagejsonlint', over: sortObject }, - { key: 'release', over: sortObject }, - { key: 'remarkConfig', over: sortObject }, - { key: 'stylelint' }, - { key: 'ava', over: sortObject }, - { key: 'jest', over: sortObject }, - { key: 'mocha', over: sortObject }, - { key: 'nyc', over: sortObject }, - { key: 'c8', over: sortObject }, - { key: 'tap', over: sortObject }, - { key: 'resolutions', over: sortObject }, - { key: 'dependencies', over: sortObject }, - { key: 'devDependencies', over: sortObject }, - { key: 'dependenciesMeta', over: sortObjectBy(undefined, true) }, - { key: 'peerDependencies', over: sortObject }, - // TODO: only sort depth = 2 - { key: 'peerDependenciesMeta', over: sortObjectBy(undefined, true) }, - { key: 'optionalDependencies', over: sortObject }, - { key: 'bundledDependencies', over: uniqAndSortArray }, - { key: 'bundleDependencies', over: uniqAndSortArray }, - /* vscode */ { key: 'extensionPack', over: uniqAndSortArray }, - /* vscode */ { key: 'extensionDependencies', over: uniqAndSortArray }, - { key: 'flat' }, - { key: 'engines', over: sortObject }, - { key: 'engineStrict', over: sortObject }, - { key: 'languageName' }, - { key: 'os' }, - { key: 'cpu' }, - { key: 'preferGlobal', over: sortObject }, - { key: 'publishConfig', over: sortObject }, - /* vscode */ { key: 'icon' }, - /* vscode */ { - key: 'badges', - over: onArray((badge) => badge.map(sortVSCodeBadgeObject)), - }, - /* vscode */ { key: 'galleryBanner', over: sortObject }, - /* vscode */ { key: 'preview' }, - /* vscode */ { key: 'markdown' }, -] - -const defaultSortOrder = fields.map(({ key }) => key) -const overFields = pipe( - fields.reduce((fns, { key, over }) => { - if (over) { - fns.push(overProperty(key, over)) - } - return fns - }, []), -) - -function editStringJSON(json, over) { - if (typeof json === 'string') { - const { indent } = detectIndent(json) - const endCharacters = json.slice(-1) === '\n' ? '\n' : '' - const newline = detectNewline(json) - json = JSON.parse(json) - - let result = JSON.stringify(over(json), null, indent) + endCharacters - if (newline === '\r\n') { - result = result.replace(/\n/g, newline) - } - return result - } - - return over(json) -} - -const isPrivateKey = (key) => key[0] === '_' -const partition = (array, predicate) => - array.reduce( - (result, value) => { - result[predicate(value) ? 0 : 1].push(value) - return result - }, - [[], []], - ) -function sortPackageJson(jsonIsh, options = {}) { - return editStringJSON( - jsonIsh, - onObject((json) => { - let sortOrder = options.sortOrder ? options.sortOrder : defaultSortOrder - - if (Array.isArray(sortOrder)) { - const keys = Object.keys(json) - const [privateKeys, publicKeys] = partition(keys, isPrivateKey) - sortOrder = [ - ...sortOrder, - ...defaultSortOrder, - ...publicKeys.sort(), - ...privateKeys.sort(), - ] - } - - return overFields(sortObjectKeys(json, sortOrder), json) - }), - ) -} - -module.exports = sortPackageJson -module.exports.sortPackageJson = sortPackageJson -module.exports.sortOrder = defaultSortOrder -module.exports.default = sortPackageJson - - -/***/ }), - -/***/ "../../node_modules/strip-ansi/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const ansiRegex = __webpack_require__("../../node_modules/ansi-regex/index.js"); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - - -/***/ }), - -/***/ "../../node_modules/strip-bom/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = string => { - if (typeof string !== 'string') { - throw new TypeError(`Expected a string, got ${typeof string}`); - } - - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (string.charCodeAt(0) === 0xFEFF) { - return string.slice(1); - } - - return string; -}; - - -/***/ }), - -/***/ "../../node_modules/strip-final-newline/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = input => { - const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt(); - const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt(); - - if (input[input.length - 1] === LF) { - input = input.slice(0, input.length - 1); - } - - if (input[input.length - 1] === CR) { - input = input.slice(0, input.length - 1); - } - - return input; -}; - - -/***/ }), - -/***/ "../../node_modules/strong-log-transformer/index.js": -/***/ (function(module, exports, __webpack_require__) { - -// Copyright IBM Corp. 2014,2018. All Rights Reserved. -// Node module: strong-log-transformer -// This file is licensed under the Apache License 2.0. -// License text available at https://opensource.org/licenses/Apache-2.0 - -module.exports = __webpack_require__("../../node_modules/strong-log-transformer/lib/logger.js"); -module.exports.cli = __webpack_require__("../../node_modules/strong-log-transformer/lib/cli.js"); - - -/***/ }), - -/***/ "../../node_modules/strong-log-transformer/lib/cli.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Copyright IBM Corp. 2014,2018. All Rights Reserved. -// Node module: strong-log-transformer -// This file is licensed under the Apache License 2.0. -// License text available at https://opensource.org/licenses/Apache-2.0 - - - -var minimist = __webpack_require__("../../node_modules/minimist/index.js"); -var path = __webpack_require__("path"); - -var Logger = __webpack_require__("../../node_modules/strong-log-transformer/lib/logger.js"); -var pkg = __webpack_require__("../../node_modules/strong-log-transformer/package.json"); - -module.exports = cli; - -function cli(args) { - var opts = minimist(args.slice(2)); - var $0 = path.basename(args[1]); - var p = console.log.bind(console); - if (opts.v || opts.version) { - version($0, p); - } else if (opts.h || opts.help) { - usage($0, p); - } else if (args.length < 3) { - process.stdin.pipe(Logger()).pipe(process.stdout); - } else { - process.stdin.pipe(Logger(opts)).pipe(process.stdout); - } -} - -function version($0, p) { - p('%s v%s', pkg.name, pkg.version); -} - -function usage($0, p) { - var PADDING = ' '; - var opt, def; - p('Usage: %s [options]', $0); - p(''); - p('%s', pkg.description); - p(''); - p('OPTIONS:'); - for (opt in Logger.DEFAULTS) { - def = Logger.DEFAULTS[opt]; - if (typeof def === 'boolean') - boolOpt(opt, Logger.DEFAULTS[opt]); - else - stdOpt(opt, Logger.DEFAULTS[opt]); - } - p(''); - - function boolOpt(name, def) { - name = name + PADDING.slice(0, 20-name.length); - p(' --%s default: %s', name, def); - } - - function stdOpt(name, def) { - var value = name.toUpperCase() + - PADDING.slice(0, 19 - name.length*2); - p(' --%s %s default: %j', name, value, def); - } -} - - -/***/ }), - -/***/ "../../node_modules/strong-log-transformer/lib/logger.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Copyright IBM Corp. 2014,2018. All Rights Reserved. -// Node module: strong-log-transformer -// This file is licensed under the Apache License 2.0. -// License text available at https://opensource.org/licenses/Apache-2.0 - - - -var stream = __webpack_require__("stream"); -var util = __webpack_require__("util"); -var fs = __webpack_require__("fs"); - -var through = __webpack_require__("../../node_modules/through/index.js"); -var duplexer = __webpack_require__("../../node_modules/duplexer/index.js"); -var StringDecoder = __webpack_require__("string_decoder").StringDecoder; - -module.exports = Logger; - -Logger.DEFAULTS = { - format: 'text', - tag: '', - mergeMultiline: false, - timeStamp: false, -}; - -var formatters = { - text: textFormatter, - json: jsonFormatter, -} - -function Logger(options) { - var defaults = JSON.parse(JSON.stringify(Logger.DEFAULTS)); - options = util._extend(defaults, options || {}); - var catcher = deLiner(); - var emitter = catcher; - var transforms = [ - objectifier(), - ]; - - if (options.tag) { - transforms.push(staticTagger(options.tag)); - } - - if (options.mergeMultiline) { - transforms.push(lineMerger()); - } - - // TODO - // if (options.pidStamp) { - // transforms.push(pidStamper(options.pid)); - // } - - // TODO - // if (options.workerStamp) { - // transforms.push(workerStamper(options.worker)); - // } - - transforms.push(formatters[options.format](options)); - - // restore line endings that were removed by line splitting - transforms.push(reLiner()); - - for (var t in transforms) { - emitter = emitter.pipe(transforms[t]); - } - - return duplexer(catcher, emitter); -} - -function deLiner() { - var decoder = new StringDecoder('utf8'); - var last = ''; - - return new stream.Transform({ - transform(chunk, _enc, callback) { - last += decoder.write(chunk); - var list = last.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); - last = list.pop(); - for (var i = 0; i < list.length; i++) { - // swallow empty lines - if (list[i]) { - this.push(list[i]); - } - } - callback(); - }, - flush(callback) { - // incomplete UTF8 sequences become UTF8 replacement characters - last += decoder.end(); - if (last) { - this.push(last); - } - callback(); - }, - }); -} - -function reLiner() { - return through(appendNewline); - - function appendNewline(line) { - this.emit('data', line + '\n'); - } -} - -function objectifier() { - return through(objectify, null, {autoDestroy: false}); - - function objectify(line) { - this.emit('data', { - msg: line, - time: Date.now(), - }); - } -} - -function staticTagger(tag) { - return through(tagger); - - function tagger(logEvent) { - logEvent.tag = tag; - this.emit('data', logEvent); - } -} - -function textFormatter(options) { - return through(textify); - - function textify(logEvent) { - var line = util.format('%s%s', textifyTags(logEvent.tag), - logEvent.msg.toString()); - if (options.timeStamp) { - line = util.format('%s %s', new Date(logEvent.time).toISOString(), line); - } - this.emit('data', line.replace(/\n/g, '\\n')); - } - - function textifyTags(tags) { - var str = ''; - if (typeof tags === 'string') { - str = tags + ' '; - } else if (typeof tags === 'object') { - for (var t in tags) { - str += t + ':' + tags[t] + ' '; - } - } - return str; - } -} - -function jsonFormatter(options) { - return through(jsonify); - - function jsonify(logEvent) { - if (options.timeStamp) { - logEvent.time = new Date(logEvent.time).toISOString(); - } else { - delete logEvent.time; - } - logEvent.msg = logEvent.msg.toString(); - this.emit('data', JSON.stringify(logEvent)); - } -} - -function lineMerger(host) { - var previousLine = null; - var flushTimer = null; - var stream = through(lineMergerWrite, lineMergerEnd); - var flush = _flush.bind(stream); - - return stream; - - function lineMergerWrite(line) { - if (/^\s+/.test(line.msg)) { - if (previousLine) { - previousLine.msg += '\n' + line.msg; - } else { - previousLine = line; - } - } else { - flush(); - previousLine = line; - } - // rolling timeout - clearTimeout(flushTimer); - flushTimer = setTimeout(flush.bind(this), 10); - } - - function _flush() { - if (previousLine) { - this.emit('data', previousLine); - previousLine = null; - } - } - - function lineMergerEnd() { - flush.call(this); - this.emit('end'); - } -} - - -/***/ }), - -/***/ "../../node_modules/strong-log-transformer/package.json": -/***/ (function(module) { - -module.exports = JSON.parse("{\"name\":\"strong-log-transformer\",\"version\":\"2.1.0\",\"description\":\"Stream transformer that prefixes lines with timestamps and other things.\",\"author\":\"Ryan Graham \",\"license\":\"Apache-2.0\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strongloop/strong-log-transformer\"},\"keywords\":[\"logging\",\"streams\"],\"bugs\":{\"url\":\"https://github.com/strongloop/strong-log-transformer/issues\"},\"homepage\":\"https://github.com/strongloop/strong-log-transformer\",\"directories\":{\"test\":\"test\"},\"bin\":{\"sl-log-transformer\":\"bin/sl-log-transformer.js\"},\"main\":\"index.js\",\"scripts\":{\"test\":\"tap --100 test/test-*\"},\"dependencies\":{\"duplexer\":\"^0.1.1\",\"minimist\":\"^1.2.0\",\"through\":\"^2.3.4\"},\"devDependencies\":{\"tap\":\"^12.0.1\"},\"engines\":{\"node\":\">=4\"}}"); - -/***/ }), - -/***/ "../../node_modules/supports-color/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__("os"); -const tty = __webpack_require__("tty"); -const hasFlag = __webpack_require__("../../node_modules/has-flag/index.js"); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if ('GITHUB_ACTIONS' in env) { - return 1; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; - - -/***/ }), - -/***/ "../../node_modules/through/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__("stream") - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - - - -/***/ }), - -/***/ "../../node_modules/to-regex-range/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -const isNumber = __webpack_require__("../../node_modules/to-regex-range/node_modules/is-number/index.js"); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; - - -/***/ }), - -/***/ "../../node_modules/to-regex-range/node_modules/is-number/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; - - -/***/ }), - -/***/ "../../node_modules/validate-npm-package-license/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var parse = __webpack_require__("../../node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js"); -var correct = __webpack_require__("../../node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js"); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; - - -/***/ }), - -/***/ "../../node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var licenseIDs = __webpack_require__("../../node_modules/validate-npm-package-license/node_modules/spdx-license-ids/spdx-license-ids.json"); - -function valid(string) { - return licenseIDs.indexOf(string) > -1; -} - -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['WTH', 'WTF'], - ['-License', ''] -]; - -var TRANSPOSED = 0; -var CORRECT = 1; - -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function(argument) { - return argument.toUpperCase(); - }, - // e.g. 'MIT ' - function(argument) { - return argument.trim(); - }, - // e.g. 'M.I.T.' - function(argument) { - return argument.replace(/\./g, ''); - }, - // e.g. 'Apache- 2.0' - function(argument) { - return argument.replace(/\s+/g, ''); - }, - // e.g. 'CC BY 4.0'' - function(argument) { - return argument.replace(/\s+/g, '-'); - }, - // e.g. 'LGPLv2.1' - function(argument) { - return argument.replace('v', '-'); - }, - // e.g. 'Apache 2.0' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1'); - }, - // e.g. 'GPL 2' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0'); - }, - // e.g. 'Apache Version 2.0' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); - }, - // e.g. 'Apache Version 2' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); - }, - // e.g. 'ZLIB' - function(argument) { - return argument[0].toUpperCase() + argument.slice(1); - }, - // e.g. 'MPL/2.0' - function(argument) { - return argument.replace('/', '-'); - }, - // e.g. 'Apache 2' - function(argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0'); - }, - // e.g. 'GPL-2.0-' - function(argument) { - return argument.slice(0, argument.length - 1); - }, - // e.g. 'GPL2' - function(argument) { - return argument.replace(/(\d)$/, '-$1.0'); - }, - // e.g. 'BSD 3' - function(argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); - }, - // e.g. 'BSD clause 3' - function(argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); - }, - // e.g. 'BY-NC-4.0' - function(argument) { - return 'CC-' + argument; - }, - // e.g. 'BY-NC' - function(argument) { - return 'CC-' + argument + '-4.0'; - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, ''); - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0'; - } -]; - -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0'], - ['AGPL', 'AGPL-3.0'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0'], - ['LGPL', 'LGPL-3.0'], - ['GPL', 'GPL-3.0'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -]; - -var SUBSTRING = 0; -var IDENTIFIER = 1; - -var validTransformation = function(identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier); - if (transformed !== identifier && valid(transformed)) { - return transformed; - } - } - return null; -}; - -var validLastResort = function(identifier) { - var upperCased = identifier.toUpperCase(); - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i]; - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER]; - } - } - return null; -}; - -var anyCorrection = function(identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i]; - var transposed = transposition[TRANSPOSED]; - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ); - var checked = check(corrected); - if (checked !== null) { - return checked; - } - } - } - return null; -}; - -module.exports = function(identifier) { - identifier = identifier.replace(/\+$/, ''); - if (valid(identifier)) { - return identifier; - } - var transformed = validTransformation(identifier); - if (transformed !== null) { - return transformed; - } - transformed = anyCorrection(identifier, function(argument) { - if (valid(argument)) { - return argument; - } - return validTransformation(argument); - }); - if (transformed !== null) { - return transformed; - } - transformed = validLastResort(identifier); - if (transformed !== null) { - return transformed; - } - transformed = anyCorrection(identifier, validLastResort); - if (transformed !== null) { - return transformed; - } - return null; -}; - - -/***/ }), - -/***/ "../../node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js": -/***/ (function(module, exports, __webpack_require__) { - -var parser = __webpack_require__("../../node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.js").parser - -module.exports = function (argument) { - return parser.parse(argument) -} - - -/***/ }), - -/***/ "../../node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var spdxparse = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, -productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: -return this.$ = $$[$0-1] -break; -case 2: case 4: case 5: -this.$ = {license: yytext} -break; -case 3: -this.$ = {license: $$[$0-1], plus: true} -break; -case 6: -this.$ = $$[$0] -break; -case 7: -this.$ = {exception: $$[$0]} -this.$.license = $$[$0-2].license -if ($$[$0-2].hasOwnProperty('plus')) { - this.$.plus = $$[$0-2].plus -} -break; -case 8: -this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]} -break; -case 9: -this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]} -break; -case 10: -this.$ = $$[$0-1] -break; -} -}, -table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], -defaultActions: {8:[2,1]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - function _parseError (msg, hash) { - this.message = msg; - this.hash = hash; - } - _parseError.prototype = Error; - - throw new _parseError(str, hash); - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - _token_stack: - var lex = function () { - var token; - token = lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - }; - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 5 -break; -case 1:/* skip whitespace */ -break; -case 2:return 8 -break; -case 3:return 16 -break; -case 4:return 17 -break; -case 5:return 11 -break; -case 6:return 10 -break; -case 7:return 9 -break; -case 8:return 14 -break; -case 9:return 15 -break; -case 10:return 12 -break; -case 11:return 7 -break; -case 12:return 7 -break; -case 13:return 7 -break; -case 14:return 7 -break; -case 15:return 7 -break; -case 16:return 7 -break; -case 17:return 7 -break; -case 18:return 7 -break; -case 19:return 7 -break; -case 20:return 7 -break; -case 21:return 7 -break; -case 22:return 7 -break; -case 23:return 7 -break; -case 24:return 13 -break; -case 25:return 13 -break; -case 26:return 13 -break; -case 27:return 13 -break; -case 28:return 13 -break; -case 29:return 13 -break; -case 30:return 13 -break; -case 31:return 13 -break; -case 32:return 7 -break; -case 33:return 13 -break; -case 34:return 7 -break; -case 35:return 13 -break; -case 36:return 7 -break; -case 37:return 13 -break; -case 38:return 13 -break; -case 39:return 7 -break; -case 40:return 13 -break; -case 41:return 13 -break; -case 42:return 13 -break; -case 43:return 13 -break; -case 44:return 13 -break; -case 45:return 7 -break; -case 46:return 13 -break; -case 47:return 7 -break; -case 48:return 7 -break; -case 49:return 7 -break; -case 50:return 7 -break; -case 51:return 7 -break; -case 52:return 7 -break; -case 53:return 7 -break; -case 54:return 7 -break; -case 55:return 7 -break; -case 56:return 7 -break; -case 57:return 7 -break; -case 58:return 7 -break; -case 59:return 7 -break; -case 60:return 7 -break; -case 61:return 7 -break; -case 62:return 7 -break; -case 63:return 13 -break; -case 64:return 7 -break; -case 65:return 7 -break; -case 66:return 13 -break; -case 67:return 7 -break; -case 68:return 7 -break; -case 69:return 7 -break; -case 70:return 7 -break; -case 71:return 7 -break; -case 72:return 7 -break; -case 73:return 13 -break; -case 74:return 7 -break; -case 75:return 13 -break; -case 76:return 7 -break; -case 77:return 7 -break; -case 78:return 7 -break; -case 79:return 7 -break; -case 80:return 7 -break; -case 81:return 7 -break; -case 82:return 7 -break; -case 83:return 7 -break; -case 84:return 7 -break; -case 85:return 7 -break; -case 86:return 7 -break; -case 87:return 7 -break; -case 88:return 7 -break; -case 89:return 7 -break; -case 90:return 7 -break; -case 91:return 7 -break; -case 92:return 7 -break; -case 93:return 7 -break; -case 94:return 7 -break; -case 95:return 7 -break; -case 96:return 7 -break; -case 97:return 7 -break; -case 98:return 7 -break; -case 99:return 7 -break; -case 100:return 7 -break; -case 101:return 7 -break; -case 102:return 7 -break; -case 103:return 7 -break; -case 104:return 7 -break; -case 105:return 7 -break; -case 106:return 7 -break; -case 107:return 7 -break; -case 108:return 7 -break; -case 109:return 7 -break; -case 110:return 7 -break; -case 111:return 7 -break; -case 112:return 7 -break; -case 113:return 7 -break; -case 114:return 7 -break; -case 115:return 7 -break; -case 116:return 7 -break; -case 117:return 7 -break; -case 118:return 7 -break; -case 119:return 7 -break; -case 120:return 7 -break; -case 121:return 7 -break; -case 122:return 7 -break; -case 123:return 7 -break; -case 124:return 7 -break; -case 125:return 7 -break; -case 126:return 7 -break; -case 127:return 7 -break; -case 128:return 7 -break; -case 129:return 7 -break; -case 130:return 7 -break; -case 131:return 7 -break; -case 132:return 7 -break; -case 133:return 7 -break; -case 134:return 7 -break; -case 135:return 7 -break; -case 136:return 7 -break; -case 137:return 7 -break; -case 138:return 7 -break; -case 139:return 7 -break; -case 140:return 7 -break; -case 141:return 7 -break; -case 142:return 7 -break; -case 143:return 7 -break; -case 144:return 7 -break; -case 145:return 7 -break; -case 146:return 7 -break; -case 147:return 7 -break; -case 148:return 7 -break; -case 149:return 7 -break; -case 150:return 7 -break; -case 151:return 7 -break; -case 152:return 7 -break; -case 153:return 7 -break; -case 154:return 7 -break; -case 155:return 7 -break; -case 156:return 7 -break; -case 157:return 7 -break; -case 158:return 7 -break; -case 159:return 7 -break; -case 160:return 7 -break; -case 161:return 7 -break; -case 162:return 7 -break; -case 163:return 7 -break; -case 164:return 7 -break; -case 165:return 7 -break; -case 166:return 7 -break; -case 167:return 7 -break; -case 168:return 7 -break; -case 169:return 7 -break; -case 170:return 7 -break; -case 171:return 7 -break; -case 172:return 7 -break; -case 173:return 7 -break; -case 174:return 7 -break; -case 175:return 7 -break; -case 176:return 7 -break; -case 177:return 7 -break; -case 178:return 7 -break; -case 179:return 7 -break; -case 180:return 7 -break; -case 181:return 7 -break; -case 182:return 7 -break; -case 183:return 7 -break; -case 184:return 7 -break; -case 185:return 7 -break; -case 186:return 7 -break; -case 187:return 7 -break; -case 188:return 7 -break; -case 189:return 7 -break; -case 190:return 7 -break; -case 191:return 7 -break; -case 192:return 7 -break; -case 193:return 7 -break; -case 194:return 7 -break; -case 195:return 7 -break; -case 196:return 7 -break; -case 197:return 7 -break; -case 198:return 7 -break; -case 199:return 7 -break; -case 200:return 7 -break; -case 201:return 7 -break; -case 202:return 7 -break; -case 203:return 7 -break; -case 204:return 7 -break; -case 205:return 7 -break; -case 206:return 7 -break; -case 207:return 7 -break; -case 208:return 7 -break; -case 209:return 7 -break; -case 210:return 7 -break; -case 211:return 7 -break; -case 212:return 7 -break; -case 213:return 7 -break; -case 214:return 7 -break; -case 215:return 7 -break; -case 216:return 7 -break; -case 217:return 7 -break; -case 218:return 7 -break; -case 219:return 7 -break; -case 220:return 7 -break; -case 221:return 7 -break; -case 222:return 7 -break; -case 223:return 7 -break; -case 224:return 7 -break; -case 225:return 7 -break; -case 226:return 7 -break; -case 227:return 7 -break; -case 228:return 7 -break; -case 229:return 7 -break; -case 230:return 7 -break; -case 231:return 7 -break; -case 232:return 7 -break; -case 233:return 7 -break; -case 234:return 7 -break; -case 235:return 7 -break; -case 236:return 7 -break; -case 237:return 7 -break; -case 238:return 7 -break; -case 239:return 7 -break; -case 240:return 7 -break; -case 241:return 7 -break; -case 242:return 7 -break; -case 243:return 7 -break; -case 244:return 7 -break; -case 245:return 7 -break; -case 246:return 7 -break; -case 247:return 7 -break; -case 248:return 7 -break; -case 249:return 7 -break; -case 250:return 7 -break; -case 251:return 7 -break; -case 252:return 7 -break; -case 253:return 7 -break; -case 254:return 7 -break; -case 255:return 7 -break; -case 256:return 7 -break; -case 257:return 7 -break; -case 258:return 7 -break; -case 259:return 7 -break; -case 260:return 7 -break; -case 261:return 7 -break; -case 262:return 7 -break; -case 263:return 7 -break; -case 264:return 7 -break; -case 265:return 7 -break; -case 266:return 7 -break; -case 267:return 7 -break; -case 268:return 7 -break; -case 269:return 7 -break; -case 270:return 7 -break; -case 271:return 7 -break; -case 272:return 7 -break; -case 273:return 7 -break; -case 274:return 7 -break; -case 275:return 7 -break; -case 276:return 7 -break; -case 277:return 7 -break; -case 278:return 7 -break; -case 279:return 7 -break; -case 280:return 7 -break; -case 281:return 7 -break; -case 282:return 7 -break; -case 283:return 7 -break; -case 284:return 7 -break; -case 285:return 7 -break; -case 286:return 7 -break; -case 287:return 7 -break; -case 288:return 7 -break; -case 289:return 7 -break; -case 290:return 7 -break; -case 291:return 7 -break; -case 292:return 7 -break; -case 293:return 7 -break; -case 294:return 7 -break; -case 295:return 7 -break; -case 296:return 7 -break; -case 297:return 7 -break; -case 298:return 7 -break; -case 299:return 7 -break; -case 300:return 7 -break; -case 301:return 7 -break; -case 302:return 7 -break; -case 303:return 7 -break; -case 304:return 7 -break; -case 305:return 7 -break; -case 306:return 7 -break; -case 307:return 7 -break; -case 308:return 7 -break; -case 309:return 7 -break; -case 310:return 7 -break; -case 311:return 7 -break; -case 312:return 7 -break; -case 313:return 7 -break; -case 314:return 7 -break; -case 315:return 7 -break; -case 316:return 7 -break; -case 317:return 7 -break; -case 318:return 7 -break; -case 319:return 7 -break; -case 320:return 7 -break; -case 321:return 7 -break; -case 322:return 7 -break; -case 323:return 7 -break; -case 324:return 7 -break; -case 325:return 7 -break; -case 326:return 7 -break; -case 327:return 7 -break; -case 328:return 7 -break; -case 329:return 7 -break; -case 330:return 7 -break; -case 331:return 7 -break; -case 332:return 7 -break; -case 333:return 7 -break; -case 334:return 7 -break; -case 335:return 7 -break; -case 336:return 7 -break; -case 337:return 7 -break; -case 338:return 7 -break; -case 339:return 7 -break; -case 340:return 7 -break; -case 341:return 7 -break; -case 342:return 7 -break; -case 343:return 7 -break; -case 344:return 7 -break; -case 345:return 7 -break; -case 346:return 7 -break; -case 347:return 7 -break; -case 348:return 7 -break; -case 349:return 7 -break; -case 350:return 7 -break; -case 351:return 7 -break; -case 352:return 7 -break; -case 353:return 7 -break; -case 354:return 7 -break; -case 355:return 7 -break; -case 356:return 7 -break; -case 357:return 7 -break; -case 358:return 7 -break; -case 359:return 7 -break; -case 360:return 7 -break; -case 361:return 7 -break; -case 362:return 7 -break; -case 363:return 7 -break; -case 364:return 7 -break; -} -}, -rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-4-Clause)/,/^(?:BSD-3-Clause)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-NC-1\.0)/,/^(?:bzip2-1\.0\.6)/,/^(?:Unicode-TOU)/,/^(?:CNRI-Jython)/,/^(?:ImageMagick)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:OLDAP-2\.2\.2)/,/^(?:LiLiQ-R-1\.1)/,/^(?:bzip2-1\.0\.5)/,/^(?:LiLiQ-P-1\.1)/,/^(?:OLDAP-2\.0\.1)/,/^(?:OLDAP-2\.2\.1)/,/^(?:CNRI-Python)/,/^(?:XFree86-1\.1)/,/^(?:OSET-PL-2\.1)/,/^(?:Apache-2\.0)/,/^(?:Watcom-1\.0)/,/^(?:PostgreSQL)/,/^(?:Python-2\.0)/,/^(?:RHeCos-1\.1)/,/^(?:EUDatagrid)/,/^(?:Spencer-99)/,/^(?:Intel-ACPI)/,/^(?:CECILL-1\.0)/,/^(?:CECILL-1\.1)/,/^(?:JasPer-2\.0)/,/^(?:CECILL-2\.0)/,/^(?:CECILL-2\.1)/,/^(?:gSOAP-1\.3b)/,/^(?:Spencer-94)/,/^(?:Apache-1\.1)/,/^(?:Spencer-86)/,/^(?:Apache-1\.0)/,/^(?:ClArtistic)/,/^(?:TORQUE-1\.1)/,/^(?:CATOSL-1\.1)/,/^(?:Adobe-2006)/,/^(?:Zimbra-1\.4)/,/^(?:Zimbra-1\.3)/,/^(?:Condor-1\.1)/,/^(?:CC-BY-3\.0)/,/^(?:CC-BY-2\.5)/,/^(?:OLDAP-2\.4)/,/^(?:SGI-B-1\.1)/,/^(?:SISSL-1\.2)/,/^(?:SGI-B-1\.0)/,/^(?:OLDAP-2\.3)/,/^(?:CC-BY-4\.0)/,/^(?:Crossword)/,/^(?:SimPL-2\.0)/,/^(?:OLDAP-2\.2)/,/^(?:OLDAP-2\.1)/,/^(?:ErlPL-1\.1)/,/^(?:LPPL-1\.3a)/,/^(?:LPPL-1\.3c)/,/^(?:OLDAP-2\.0)/,/^(?:Leptonica)/,/^(?:CPOL-1\.02)/,/^(?:OLDAP-1\.4)/,/^(?:OLDAP-1\.3)/,/^(?:CC-BY-2\.0)/,/^(?:Unlicense)/,/^(?:OLDAP-2\.8)/,/^(?:OLDAP-1\.2)/,/^(?:MakeIndex)/,/^(?:OLDAP-2\.7)/,/^(?:OLDAP-1\.1)/,/^(?:Sleepycat)/,/^(?:D-FSL-1\.0)/,/^(?:CC-BY-1\.0)/,/^(?:OLDAP-2\.6)/,/^(?:WXwindows)/,/^(?:NPOSL-3\.0)/,/^(?:FreeImage)/,/^(?:SGI-B-2\.0)/,/^(?:OLDAP-2\.5)/,/^(?:Beerware)/,/^(?:Newsletr)/,/^(?:NBPL-1\.0)/,/^(?:NASA-1\.3)/,/^(?:NLOD-1\.0)/,/^(?:AGPL-1\.0)/,/^(?:OCLC-2\.0)/,/^(?:ODbL-1\.0)/,/^(?:PDDL-1\.0)/,/^(?:Motosoto)/,/^(?:Afmparse)/,/^(?:ANTLR-PD)/,/^(?:LPL-1\.02)/,/^(?:Abstyles)/,/^(?:eCos-2\.0)/,/^(?:APSL-1\.0)/,/^(?:LPPL-1\.2)/,/^(?:LPPL-1\.1)/,/^(?:LPPL-1\.0)/,/^(?:APSL-1\.1)/,/^(?:APSL-2\.0)/,/^(?:Info-ZIP)/,/^(?:Zend-2\.0)/,/^(?:IBM-pibs)/,/^(?:LGPL-2\.0)/,/^(?:LGPL-3\.0)/,/^(?:LGPL-2\.1)/,/^(?:GFDL-1\.3)/,/^(?:PHP-3\.01)/,/^(?:GFDL-1\.2)/,/^(?:GFDL-1\.1)/,/^(?:AGPL-3\.0)/,/^(?:Giftware)/,/^(?:EUPL-1\.1)/,/^(?:RPSL-1\.0)/,/^(?:EUPL-1\.0)/,/^(?:MIT-enna)/,/^(?:CECILL-B)/,/^(?:diffmark)/,/^(?:CECILL-C)/,/^(?:CDDL-1\.0)/,/^(?:Sendmail)/,/^(?:CDDL-1\.1)/,/^(?:CPAL-1\.0)/,/^(?:APSL-1\.2)/,/^(?:NPL-1\.1)/,/^(?:AFL-1\.2)/,/^(?:Caldera)/,/^(?:AFL-2\.0)/,/^(?:FSFULLR)/,/^(?:AFL-2\.1)/,/^(?:VSL-1\.0)/,/^(?:VOSTROM)/,/^(?:UPL-1\.0)/,/^(?:Dotseqn)/,/^(?:CPL-1\.0)/,/^(?:dvipdfm)/,/^(?:EPL-1\.0)/,/^(?:OCCT-PL)/,/^(?:ECL-1\.0)/,/^(?:Latex2e)/,/^(?:ECL-2\.0)/,/^(?:GPL-1\.0)/,/^(?:GPL-2\.0)/,/^(?:GPL-3\.0)/,/^(?:AFL-3\.0)/,/^(?:LAL-1\.2)/,/^(?:LAL-1\.3)/,/^(?:EFL-1\.0)/,/^(?:EFL-2\.0)/,/^(?:gnuplot)/,/^(?:Aladdin)/,/^(?:LPL-1\.0)/,/^(?:libtiff)/,/^(?:Entessa)/,/^(?:AMDPLPA)/,/^(?:IPL-1\.0)/,/^(?:OPL-1\.0)/,/^(?:OSL-1\.0)/,/^(?:OSL-1\.1)/,/^(?:OSL-2\.0)/,/^(?:OSL-2\.1)/,/^(?:OSL-3\.0)/,/^(?:OpenSSL)/,/^(?:ZPL-2\.1)/,/^(?:PHP-3\.0)/,/^(?:ZPL-2\.0)/,/^(?:ZPL-1\.1)/,/^(?:CC0-1\.0)/,/^(?:SPL-1\.0)/,/^(?:psutils)/,/^(?:MPL-1\.0)/,/^(?:QPL-1\.0)/,/^(?:MPL-1\.1)/,/^(?:MPL-2\.0)/,/^(?:APL-1\.0)/,/^(?:RPL-1\.1)/,/^(?:RPL-1\.5)/,/^(?:MIT-CMU)/,/^(?:Multics)/,/^(?:Eurosym)/,/^(?:BSL-1\.0)/,/^(?:MIT-feh)/,/^(?:Saxpath)/,/^(?:Borceux)/,/^(?:OFL-1\.1)/,/^(?:OFL-1\.0)/,/^(?:AFL-1\.1)/,/^(?:YPL-1\.1)/,/^(?:YPL-1\.0)/,/^(?:NPL-1\.0)/,/^(?:iMatix)/,/^(?:mpich2)/,/^(?:APAFML)/,/^(?:Bahyph)/,/^(?:RSA-MD)/,/^(?:psfrag)/,/^(?:Plexus)/,/^(?:eGenix)/,/^(?:Glulxe)/,/^(?:SAX-PD)/,/^(?:Imlib2)/,/^(?:Wsuipa)/,/^(?:LGPLLR)/,/^(?:Libpng)/,/^(?:xinetd)/,/^(?:MITNFA)/,/^(?:NetCDF)/,/^(?:Naumen)/,/^(?:SMPPL)/,/^(?:Nunit)/,/^(?:FSFUL)/,/^(?:GL2PS)/,/^(?:SMLNJ)/,/^(?:Rdisc)/,/^(?:Noweb)/,/^(?:Nokia)/,/^(?:SISSL)/,/^(?:Qhull)/,/^(?:Intel)/,/^(?:Glide)/,/^(?:Xerox)/,/^(?:AMPAS)/,/^(?:WTFPL)/,/^(?:MS-PL)/,/^(?:XSkat)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:RSCPL)/,/^(?:TMate)/,/^(?:OGTSL)/,/^(?:FSFAP)/,/^(?:NCSA)/,/^(?:Zlib)/,/^(?:SCEA)/,/^(?:SNIA)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:ADSL)/,/^(?:MTLL)/,/^(?:NLPL)/,/^(?:Ruby)/,/^(?:JSON)/,/^(?:Barr)/,/^(?:0BSD)/,/^(?:Xnet)/,/^(?:Cube)/,/^(?:curl)/,/^(?:DSDP)/,/^(?:Fair)/,/^(?:HPND)/,/^(?:TOSL)/,/^(?:IJG)/,/^(?:SWL)/,/^(?:Vim)/,/^(?:FTL)/,/^(?:ICU)/,/^(?:OML)/,/^(?:NRL)/,/^(?:DOC)/,/^(?:TCL)/,/^(?:W3C)/,/^(?:NTP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = spdxparse; -exports.Parser = spdxparse.Parser; -exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__("fs").readFileSync(__webpack_require__("path").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("../../node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "../../node_modules/validate-npm-package-license/node_modules/spdx-license-ids/spdx-license-ids.json": -/***/ (function(module) { - -module.exports = JSON.parse("[\"Glide\",\"Abstyles\",\"AFL-1.1\",\"AFL-1.2\",\"AFL-2.0\",\"AFL-2.1\",\"AFL-3.0\",\"AMPAS\",\"APL-1.0\",\"Adobe-Glyph\",\"APAFML\",\"Adobe-2006\",\"AGPL-1.0\",\"Afmparse\",\"Aladdin\",\"ADSL\",\"AMDPLPA\",\"ANTLR-PD\",\"Apache-1.0\",\"Apache-1.1\",\"Apache-2.0\",\"AML\",\"APSL-1.0\",\"APSL-1.1\",\"APSL-1.2\",\"APSL-2.0\",\"Artistic-1.0\",\"Artistic-1.0-Perl\",\"Artistic-1.0-cl8\",\"Artistic-2.0\",\"AAL\",\"Bahyph\",\"Barr\",\"Beerware\",\"BitTorrent-1.0\",\"BitTorrent-1.1\",\"BSL-1.0\",\"Borceux\",\"BSD-2-Clause\",\"BSD-2-Clause-FreeBSD\",\"BSD-2-Clause-NetBSD\",\"BSD-3-Clause\",\"BSD-3-Clause-Clear\",\"BSD-4-Clause\",\"BSD-Protection\",\"BSD-Source-Code\",\"BSD-3-Clause-Attribution\",\"0BSD\",\"BSD-4-Clause-UC\",\"bzip2-1.0.5\",\"bzip2-1.0.6\",\"Caldera\",\"CECILL-1.0\",\"CECILL-1.1\",\"CECILL-2.0\",\"CECILL-2.1\",\"CECILL-B\",\"CECILL-C\",\"ClArtistic\",\"MIT-CMU\",\"CNRI-Jython\",\"CNRI-Python\",\"CNRI-Python-GPL-Compatible\",\"CPOL-1.02\",\"CDDL-1.0\",\"CDDL-1.1\",\"CPAL-1.0\",\"CPL-1.0\",\"CATOSL-1.1\",\"Condor-1.1\",\"CC-BY-1.0\",\"CC-BY-2.0\",\"CC-BY-2.5\",\"CC-BY-3.0\",\"CC-BY-4.0\",\"CC-BY-ND-1.0\",\"CC-BY-ND-2.0\",\"CC-BY-ND-2.5\",\"CC-BY-ND-3.0\",\"CC-BY-ND-4.0\",\"CC-BY-NC-1.0\",\"CC-BY-NC-2.0\",\"CC-BY-NC-2.5\",\"CC-BY-NC-3.0\",\"CC-BY-NC-4.0\",\"CC-BY-NC-ND-1.0\",\"CC-BY-NC-ND-2.0\",\"CC-BY-NC-ND-2.5\",\"CC-BY-NC-ND-3.0\",\"CC-BY-NC-ND-4.0\",\"CC-BY-NC-SA-1.0\",\"CC-BY-NC-SA-2.0\",\"CC-BY-NC-SA-2.5\",\"CC-BY-NC-SA-3.0\",\"CC-BY-NC-SA-4.0\",\"CC-BY-SA-1.0\",\"CC-BY-SA-2.0\",\"CC-BY-SA-2.5\",\"CC-BY-SA-3.0\",\"CC-BY-SA-4.0\",\"CC0-1.0\",\"Crossword\",\"CrystalStacker\",\"CUA-OPL-1.0\",\"Cube\",\"curl\",\"D-FSL-1.0\",\"diffmark\",\"WTFPL\",\"DOC\",\"Dotseqn\",\"DSDP\",\"dvipdfm\",\"EPL-1.0\",\"ECL-1.0\",\"ECL-2.0\",\"eGenix\",\"EFL-1.0\",\"EFL-2.0\",\"MIT-advertising\",\"MIT-enna\",\"Entessa\",\"ErlPL-1.1\",\"EUDatagrid\",\"EUPL-1.0\",\"EUPL-1.1\",\"Eurosym\",\"Fair\",\"MIT-feh\",\"Frameworx-1.0\",\"FreeImage\",\"FTL\",\"FSFAP\",\"FSFUL\",\"FSFULLR\",\"Giftware\",\"GL2PS\",\"Glulxe\",\"AGPL-3.0\",\"GFDL-1.1\",\"GFDL-1.2\",\"GFDL-1.3\",\"GPL-1.0\",\"GPL-2.0\",\"GPL-3.0\",\"LGPL-2.1\",\"LGPL-3.0\",\"LGPL-2.0\",\"gnuplot\",\"gSOAP-1.3b\",\"HaskellReport\",\"HPND\",\"IBM-pibs\",\"IPL-1.0\",\"ICU\",\"ImageMagick\",\"iMatix\",\"Imlib2\",\"IJG\",\"Info-ZIP\",\"Intel-ACPI\",\"Intel\",\"Interbase-1.0\",\"IPA\",\"ISC\",\"JasPer-2.0\",\"JSON\",\"LPPL-1.0\",\"LPPL-1.1\",\"LPPL-1.2\",\"LPPL-1.3a\",\"LPPL-1.3c\",\"Latex2e\",\"BSD-3-Clause-LBNL\",\"Leptonica\",\"LGPLLR\",\"Libpng\",\"libtiff\",\"LAL-1.2\",\"LAL-1.3\",\"LiLiQ-P-1.1\",\"LiLiQ-Rplus-1.1\",\"LiLiQ-R-1.1\",\"LPL-1.02\",\"LPL-1.0\",\"MakeIndex\",\"MTLL\",\"MS-PL\",\"MS-RL\",\"MirOS\",\"MITNFA\",\"MIT\",\"Motosoto\",\"MPL-1.0\",\"MPL-1.1\",\"MPL-2.0\",\"MPL-2.0-no-copyleft-exception\",\"mpich2\",\"Multics\",\"Mup\",\"NASA-1.3\",\"Naumen\",\"NBPL-1.0\",\"NetCDF\",\"NGPL\",\"NOSL\",\"NPL-1.0\",\"NPL-1.1\",\"Newsletr\",\"NLPL\",\"Nokia\",\"NPOSL-3.0\",\"NLOD-1.0\",\"Noweb\",\"NRL\",\"NTP\",\"Nunit\",\"OCLC-2.0\",\"ODbL-1.0\",\"PDDL-1.0\",\"OCCT-PL\",\"OGTSL\",\"OLDAP-2.2.2\",\"OLDAP-1.1\",\"OLDAP-1.2\",\"OLDAP-1.3\",\"OLDAP-1.4\",\"OLDAP-2.0\",\"OLDAP-2.0.1\",\"OLDAP-2.1\",\"OLDAP-2.2\",\"OLDAP-2.2.1\",\"OLDAP-2.3\",\"OLDAP-2.4\",\"OLDAP-2.5\",\"OLDAP-2.6\",\"OLDAP-2.7\",\"OLDAP-2.8\",\"OML\",\"OPL-1.0\",\"OSL-1.0\",\"OSL-1.1\",\"OSL-2.0\",\"OSL-2.1\",\"OSL-3.0\",\"OpenSSL\",\"OSET-PL-2.1\",\"PHP-3.0\",\"PHP-3.01\",\"Plexus\",\"PostgreSQL\",\"psfrag\",\"psutils\",\"Python-2.0\",\"QPL-1.0\",\"Qhull\",\"Rdisc\",\"RPSL-1.0\",\"RPL-1.1\",\"RPL-1.5\",\"RHeCos-1.1\",\"RSCPL\",\"RSA-MD\",\"Ruby\",\"SAX-PD\",\"Saxpath\",\"SCEA\",\"SWL\",\"SMPPL\",\"Sendmail\",\"SGI-B-1.0\",\"SGI-B-1.1\",\"SGI-B-2.0\",\"OFL-1.0\",\"OFL-1.1\",\"SimPL-2.0\",\"Sleepycat\",\"SNIA\",\"Spencer-86\",\"Spencer-94\",\"Spencer-99\",\"SMLNJ\",\"SugarCRM-1.1.3\",\"SISSL\",\"SISSL-1.2\",\"SPL-1.0\",\"Watcom-1.0\",\"TCL\",\"Unlicense\",\"TMate\",\"TORQUE-1.1\",\"TOSL\",\"Unicode-TOU\",\"UPL-1.0\",\"NCSA\",\"Vim\",\"VOSTROM\",\"VSL-1.0\",\"W3C-19980720\",\"W3C\",\"Wsuipa\",\"Xnet\",\"X11\",\"Xerox\",\"XFree86-1.1\",\"xinetd\",\"xpp\",\"XSkat\",\"YPL-1.0\",\"YPL-1.1\",\"Zed\",\"Zend-2.0\",\"Zimbra-1.3\",\"Zimbra-1.4\",\"Zlib\",\"zlib-acknowledgement\",\"ZPL-1.1\",\"ZPL-2.0\",\"ZPL-2.1\",\"BSD-3-Clause-No-Nuclear-License\",\"BSD-3-Clause-No-Nuclear-Warranty\",\"BSD-3-Clause-No-Nuclear-License-2014\",\"eCos-2.0\",\"GPL-2.0-with-autoconf-exception\",\"GPL-2.0-with-bison-exception\",\"GPL-2.0-with-classpath-exception\",\"GPL-2.0-with-font-exception\",\"GPL-2.0-with-GCC-exception\",\"GPL-3.0-with-autoconf-exception\",\"GPL-3.0-with-GCC-exception\",\"StandardML-NJ\",\"WXwindows\"]"); - -/***/ }), - -/***/ "../../node_modules/wcwidth/combining.js": -/***/ (function(module, exports) { - -module.exports = [ - [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ], - [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ], - [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ], - [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ], - [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ], - [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ], - [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ], - [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ], - [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ], - [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ], - [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ], - [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ], - [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ], - [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ], - [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ], - [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ], - [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ], - [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ], - [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ], - [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ], - [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ], - [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ], - [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ], - [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ], - [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ], - [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ], - [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ], - [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ], - [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ], - [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ], - [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ], - [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ], - [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ], - [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ], - [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ], - [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ], - [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ], - [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ], - [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ], - [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ], - [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ], - [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ], - [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ], - [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ], - [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ], - [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ], - [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ], - [ 0xE0100, 0xE01EF ] -] - - -/***/ }), - -/***/ "../../node_modules/wcwidth/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var defaults = __webpack_require__("../../node_modules/defaults/index.js") -var combining = __webpack_require__("../../node_modules/wcwidth/combining.js") - -var DEFAULTS = { - nul: 0, - control: 0 -} - -module.exports = function wcwidth(str) { - return wcswidth(str, DEFAULTS) -} - -module.exports.config = function(opts) { - opts = defaults(opts || {}, DEFAULTS) - return function wcwidth(str) { - return wcswidth(str, opts) - } -} - -/* - * The following functions define the column width of an ISO 10646 - * character as follows: - * - The null character (U+0000) has a column width of 0. - * - Other C0/C1 control characters and DEL will lead to a return value - * of -1. - * - Non-spacing and enclosing combining characters (general category - * code Mn or Me in the - * Unicode database) have a column width of 0. - * - SOFT HYPHEN (U+00AD) has a column width of 1. - * - Other format characters (general category code Cf in the Unicode - * database) and ZERO WIDTH - * SPACE (U+200B) have a column width of 0. - * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) - * have a column width of 0. - * - Spacing characters in the East Asian Wide (W) or East Asian - * Full-width (F) category as - * defined in Unicode Technical Report #11 have a column width of 2. - * - All remaining characters (including all printable ISO 8859-1 and - * WGL4 characters, Unicode control characters, etc.) have a column - * width of 1. - * This implementation assumes that characters are encoded in ISO 10646. -*/ - -function wcswidth(str, opts) { - if (typeof str !== 'string') return wcwidth(str, opts) - - var s = 0 - for (var i = 0; i < str.length; i++) { - var n = wcwidth(str.charCodeAt(i), opts) - if (n < 0) return -1 - s += n - } - - return s -} - -function wcwidth(ucs, opts) { - // test for 8-bit control characters - if (ucs === 0) return opts.nul - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return opts.control - - // binary search in table of non-spacing characters - if (bisearch(ucs)) return 0 - - // if we arrive here, ucs is not a combining or C0/C1 control character - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || // Hangul Jamo init. consonants - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || // CJK ... Yi - (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables - (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs - (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms - (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms - (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); -} - -function bisearch(ucs) { - var min = 0 - var max = combining.length - 1 - var mid - - if (ucs < combining[0][0] || ucs > combining[max][1]) return false - - while (max >= min) { - mid = Math.floor((min + max) / 2) - if (ucs > combining[mid][1]) min = mid + 1 - else if (ucs < combining[mid][0]) max = mid - 1 - else return true - } - - return false -} - - -/***/ }), - -/***/ "../../node_modules/webpack/buildin/module.js": -/***/ (function(module, exports) { - -module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if (!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), - -/***/ "../../node_modules/which/which.js": -/***/ (function(module, exports, __webpack_require__) { - -const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -const path = __webpack_require__("path") -const COLON = isWindows ? ';' : ':' -const isexe = __webpack_require__("../../node_modules/isexe/index.js") - -const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) - -const getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] - : ( - [ - // windows always checks the cwd first - ...(isWindows ? [process.cwd()] : []), - ...(opt.path || process.env.PATH || - /* istanbul ignore next: very unusual */ '').split(colon), - ] - ) - const pathExtExe = isWindows - ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' - : '' - const pathExt = isWindows ? pathExtExe.split(colon) : [''] - - if (isWindows) { - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - return { - pathEnv, - pathExt, - pathExtExe, - } -} - -const which = (cmd, opt, cb) => { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - if (!opt) - opt = {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - const step = i => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) - : reject(getNotFoundError(cmd)) - - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - resolve(subStep(p, i, 0)) - }) - - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)) - const ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return resolve(p + ext) - } - return resolve(subStep(p, i, ii + 1)) - }) - }) - - return cb ? step(0).then(res => cb(null, res), cb) : step(0) -} - -const whichSync = (cmd, opt) => { - opt = opt || {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (let i = 0; i < pathEnv.length; i ++) { - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - for (let j = 0; j < pathExt.length; j ++) { - const cur = p + pathExt[j] - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} - -module.exports = which -which.sync = whichSync - - -/***/ }), - -/***/ "../../node_modules/wrappy/wrappy.js": -/***/ (function(module, exports) { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} - - -/***/ }), - -/***/ "../../node_modules/write-json-file/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const fs = __webpack_require__("../../node_modules/graceful-fs/graceful-fs.js"); -const writeFileAtomic = __webpack_require__("../../node_modules/write-json-file/node_modules/write-file-atomic/index.js"); -const sortKeys = __webpack_require__("../../node_modules/sort-keys/index.js"); -const makeDir = __webpack_require__("../../node_modules/write-json-file/node_modules/make-dir/index.js"); -const pify = __webpack_require__("../../node_modules/write-json-file/node_modules/pify/index.js"); -const detectIndent = __webpack_require__("../../node_modules/write-json-file/node_modules/detect-indent/index.js"); - -const init = (fn, filePath, data, options) => { - if (!filePath) { - throw new TypeError('Expected a filepath'); - } - - if (data === undefined) { - throw new TypeError('Expected data to stringify'); - } - - options = Object.assign({ - indent: '\t', - sortKeys: false - }, options); - - if (options.sortKeys) { - data = sortKeys(data, { - deep: true, - compare: typeof options.sortKeys === 'function' ? options.sortKeys : undefined - }); - } - - return fn(filePath, data, options); -}; - -const readFile = filePath => pify(fs.readFile)(filePath, 'utf8').catch(() => {}); - -const main = (filePath, data, options) => { - return (options.detectIndent ? readFile(filePath) : Promise.resolve()) - .then(string => { - const indent = string ? detectIndent(string).indent : options.indent; - const json = JSON.stringify(data, options.replacer, indent); - - return pify(writeFileAtomic)(filePath, `${json}\n`, {mode: options.mode}); - }); -}; - -const mainSync = (filePath, data, options) => { - let {indent} = options; - - if (options.detectIndent) { - try { - const file = fs.readFileSync(filePath, 'utf8'); - indent = detectIndent(file).indent; - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - } - - const json = JSON.stringify(data, options.replacer, indent); - - return writeFileAtomic.sync(filePath, `${json}\n`, {mode: options.mode}); -}; - -const writeJsonFile = (filePath, data, options) => { - return makeDir(path.dirname(filePath), {fs}) - .then(() => init(main, filePath, data, options)); -}; - -module.exports = writeJsonFile; -// TODO: Remove this for the next major release -module.exports.default = writeJsonFile; -module.exports.sync = (filePath, data, options) => { - makeDir.sync(path.dirname(filePath), {fs}); - init(mainSync, filePath, data, options); -}; - - -/***/ }), - -/***/ "../../node_modules/write-json-file/node_modules/detect-indent/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// detect either spaces or tabs but not both to properly handle tabs -// for indentation and spaces for alignment -const INDENT_RE = /^(?:( )+|\t+)/; - -function getMostUsed(indents) { - let result = 0; - let maxUsed = 0; - let maxWeight = 0; - - for (const entry of indents) { - // TODO: use destructuring when targeting Node.js 6 - const key = entry[0]; - const val = entry[1]; - - const u = val[0]; - const w = val[1]; - - if (u > maxUsed || (u === maxUsed && w > maxWeight)) { - maxUsed = u; - maxWeight = w; - result = Number(key); - } - } - - return result; -} - -module.exports = str => { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - // used to see if tabs or spaces are the most used - let tabs = 0; - let spaces = 0; - - // remember the size of previous line's indentation - let prev = 0; - - // remember how many indents/unindents as occurred for a given size - // and how much lines follow a given indentation - // - // indents = { - // 3: [1, 0], - // 4: [1, 5], - // 5: [1, 0], - // 12: [1, 0], - // } - const indents = new Map(); - - // pointer to the array of last used indent - let current; - - // whether the last action was an indent (opposed to an unindent) - let isIndent; - - for (const line of str.split(/\n/g)) { - if (!line) { - // ignore empty lines - continue; - } - - let indent; - const matches = line.match(INDENT_RE); - - if (matches) { - indent = matches[0].length; - - if (matches[1]) { - spaces++; - } else { - tabs++; - } - } else { - indent = 0; - } - - const diff = indent - prev; - prev = indent; - - if (diff) { - // an indent or unindent has been detected - - isIndent = diff > 0; - - current = indents.get(isIndent ? diff : -diff); - - if (current) { - current[0]++; - } else { - current = [1, 0]; - indents.set(diff, current); - } - } else if (current) { - // if the last action was an indent, increment the weight - current[1] += Number(isIndent); - } - } - - const amount = getMostUsed(indents); - - let type; - let indent; - if (!amount) { - type = null; - indent = ''; - } else if (spaces >= tabs) { - type = 'space'; - indent = ' '.repeat(amount); - } else { - type = 'tab'; - indent = '\t'.repeat(amount); - } - - return { - amount, - type, - indent - }; -}; - - -/***/ }), - -/***/ "../../node_modules/write-json-file/node_modules/make-dir/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__("fs"); -const path = __webpack_require__("path"); -const pify = __webpack_require__("../../node_modules/write-json-file/node_modules/pify/index.js"); -const semver = __webpack_require__("../../node_modules/write-json-file/node_modules/semver/semver.js"); - -const defaults = { - mode: 0o777 & (~process.umask()), - fs -}; - -const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); - -// https://github.com/nodejs/node/issues/8987 -// https://github.com/libuv/libuv/pull/1088 -const checkPath = pth => { - if (process.platform === 'win32') { - const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')); - - if (pathHasInvalidWinCharacters) { - const error = new Error(`Path contains invalid characters: ${pth}`); - error.code = 'EINVAL'; - throw error; - } - } -}; - -const permissionError = pth => { - // This replicates the exception of `fs.mkdir` with native the - // `recusive` option when run on an invalid drive under Windows. - const error = new Error(`operation not permitted, mkdir '${pth}'`); - error.code = 'EPERM'; - error.errno = -4048; - error.path = pth; - error.syscall = 'mkdir'; - return error; -}; - -const makeDir = (input, options) => Promise.resolve().then(() => { - checkPath(input); - options = Object.assign({}, defaults, options); - - // TODO: Use util.promisify when targeting Node.js 8 - const mkdir = pify(options.fs.mkdir); - const stat = pify(options.fs.stat); - - if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) { - const pth = path.resolve(input); - - return mkdir(pth, { - mode: options.mode, - recursive: true - }).then(() => pth); - } - - const make = pth => { - return mkdir(pth, options.mode) - .then(() => pth) - .catch(error => { - if (error.code === 'EPERM') { - throw error; - } - - if (error.code === 'ENOENT') { - if (path.dirname(pth) === pth) { - throw permissionError(pth); - } - - if (error.message.includes('null bytes')) { - throw error; - } - - return make(path.dirname(pth)).then(() => make(pth)); - } - - return stat(pth) - .then(stats => stats.isDirectory() ? pth : Promise.reject()) - .catch(() => { - throw error; - }); - }); - }; - - return make(path.resolve(input)); -}); - -module.exports = makeDir; -module.exports.default = makeDir; - -module.exports.sync = (input, options) => { - checkPath(input); - options = Object.assign({}, defaults, options); - - if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) { - const pth = path.resolve(input); - - fs.mkdirSync(pth, { - mode: options.mode, - recursive: true - }); - - return pth; - } - - const make = pth => { - try { - options.fs.mkdirSync(pth, options.mode); - } catch (error) { - if (error.code === 'EPERM') { - throw error; - } - - if (error.code === 'ENOENT') { - if (path.dirname(pth) === pth) { - throw permissionError(pth); - } - - if (error.message.includes('null bytes')) { - throw error; - } - - make(path.dirname(pth)); - return make(pth); - } - - try { - if (!options.fs.statSync(pth).isDirectory()) { - throw new Error('The path is not a directory'); - } - } catch (_) { - throw error; - } - } - - return pth; - }; - - return make(path.resolve(input)); -}; - - -/***/ }), - -/***/ "../../node_modules/write-json-file/node_modules/pify/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const processFn = (fn, options) => function (...args) { - const P = options.promiseModule; - - return new P((resolve, reject) => { - if (options.multiArgs) { - args.push((...result) => { - if (options.errorFirst) { - if (result[0]) { - reject(result); - } else { - result.shift(); - resolve(result); - } - } else { - resolve(result); - } - }); - } else if (options.errorFirst) { - args.push((error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - } else { - args.push(resolve); - } - - fn.apply(this, args); - }); -}; - -module.exports = (input, options) => { - options = Object.assign({ - exclude: [/.+(Sync|Stream)$/], - errorFirst: true, - promiseModule: Promise - }, options); - - const objType = typeof input; - if (!(input !== null && (objType === 'object' || objType === 'function'))) { - throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? 'null' : objType}\``); - } - - const filter = key => { - const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); - return options.include ? options.include.some(match) : !options.exclude.some(match); - }; - - let ret; - if (objType === 'function') { - ret = function (...args) { - return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); - }; - } else { - ret = Object.create(Object.getPrototypeOf(input)); - } - - for (const key in input) { // eslint-disable-line guard-for-in - const property = input[key]; - ret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property; - } - - return ret; -}; - - -/***/ }), - -/***/ "../../node_modules/write-json-file/node_modules/semver/semver.js": -/***/ (function(module, exports) { - -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} - - -/***/ }), - -/***/ "../../node_modules/write-json-file/node_modules/write-file-atomic/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = writeFile -module.exports.sync = writeFileSync -module.exports._getTmpname = getTmpname // for testing -module.exports._cleanupOnExit = cleanupOnExit - -var fs = __webpack_require__("../../node_modules/graceful-fs/graceful-fs.js") -var MurmurHash3 = __webpack_require__("../../node_modules/imurmurhash/imurmurhash.js") -var onExit = __webpack_require__("../../node_modules/signal-exit/index.js") -var path = __webpack_require__("path") -var activeFiles = {} - -// if we run inside of a worker_thread, `process.pid` is not unique -/* istanbul ignore next */ -var threadId = (function getId () { - try { - var workerThreads = __webpack_require__("worker_threads") - - /// if we are in main thread, this is set to `0` - return workerThreads.threadId - } catch (e) { - // worker_threads are not available, fallback to 0 - return 0 - } -})() - -var invocations = 0 -function getTmpname (filename) { - return filename + '.' + - MurmurHash3(__filename) - .hash(String(process.pid)) - .hash(String(threadId)) - .hash(String(++invocations)) - .result() -} - -function cleanupOnExit (tmpfile) { - return function () { - try { - fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile) - } catch (_) {} - } -} - -function writeFile (filename, data, options, callback) { - if (options) { - if (options instanceof Function) { - callback = options - options = {} - } else if (typeof options === 'string') { - options = { encoding: options } - } - } else { - options = {} - } - - var Promise = options.Promise || global.Promise - var truename - var fd - var tmpfile - /* istanbul ignore next -- The closure only gets called when onExit triggers */ - var removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)) - var absoluteName = path.resolve(filename) - - new Promise(function serializeSameFile (resolve) { - // make a queue if it doesn't already exist - if (!activeFiles[absoluteName]) activeFiles[absoluteName] = [] - - activeFiles[absoluteName].push(resolve) // add this job to the queue - if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one - }).then(function getRealPath () { - return new Promise(function (resolve) { - fs.realpath(filename, function (_, realname) { - truename = realname || filename - tmpfile = getTmpname(truename) - resolve() - }) - }) - }).then(function stat () { - return new Promise(function stat (resolve) { - if (options.mode && options.chown) resolve() - else { - // Either mode or chown is not explicitly set - // Default behavior is to copy it from original file - fs.stat(truename, function (err, stats) { - if (err || !stats) resolve() - else { - options = Object.assign({}, options) - - if (options.mode == null) { - options.mode = stats.mode - } - if (options.chown == null && process.getuid) { - options.chown = { uid: stats.uid, gid: stats.gid } - } - resolve() - } - }) - } - }) - }).then(function thenWriteFile () { - return new Promise(function (resolve, reject) { - fs.open(tmpfile, 'w', options.mode, function (err, _fd) { - fd = _fd - if (err) reject(err) - else resolve() - }) - }) - }).then(function write () { - return new Promise(function (resolve, reject) { - if (Buffer.isBuffer(data)) { - fs.write(fd, data, 0, data.length, 0, function (err) { - if (err) reject(err) - else resolve() - }) - } else if (data != null) { - fs.write(fd, String(data), 0, String(options.encoding || 'utf8'), function (err) { - if (err) reject(err) - else resolve() - }) - } else resolve() - }) - }).then(function syncAndClose () { - return new Promise(function (resolve, reject) { - if (options.fsync !== false) { - fs.fsync(fd, function (err) { - if (err) fs.close(fd, () => reject(err)) - else fs.close(fd, resolve) - }) - } else { - fs.close(fd, resolve) - } - }) - }).then(function chown () { - fd = null - if (options.chown) { - return new Promise(function (resolve, reject) { - fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) { - if (err) reject(err) - else resolve() - }) - }) - } - }).then(function chmod () { - if (options.mode) { - return new Promise(function (resolve, reject) { - fs.chmod(tmpfile, options.mode, function (err) { - if (err) reject(err) - else resolve() - }) - }) - } - }).then(function rename () { - return new Promise(function (resolve, reject) { - fs.rename(tmpfile, truename, function (err) { - if (err) reject(err) - else resolve() - }) - }) - }).then(function success () { - removeOnExitHandler() - callback() - }, function fail (err) { - return new Promise(resolve => { - return fd ? fs.close(fd, resolve) : resolve() - }).then(() => { - removeOnExitHandler() - fs.unlink(tmpfile, function () { - callback(err) - }) - }) - }).then(function checkQueue () { - activeFiles[absoluteName].shift() // remove the element added by serializeSameFile - if (activeFiles[absoluteName].length > 0) { - activeFiles[absoluteName][0]() // start next job if one is pending - } else delete activeFiles[absoluteName] - }) -} - -function writeFileSync (filename, data, options) { - if (typeof options === 'string') options = { encoding: options } - else if (!options) options = {} - try { - filename = fs.realpathSync(filename) - } catch (ex) { - // it's ok, it'll happen on a not yet existing file - } - var tmpfile = getTmpname(filename) - - if (!options.mode || !options.chown) { - // Either mode or chown is not explicitly set - // Default behavior is to copy it from original file - try { - var stats = fs.statSync(filename) - options = Object.assign({}, options) - if (!options.mode) { - options.mode = stats.mode - } - if (!options.chown && process.getuid) { - options.chown = { uid: stats.uid, gid: stats.gid } - } - } catch (ex) { - // ignore stat errors - } - } - - var fd - var cleanup = cleanupOnExit(tmpfile) - var removeOnExitHandler = onExit(cleanup) - - try { - fd = fs.openSync(tmpfile, 'w', options.mode) - if (Buffer.isBuffer(data)) { - fs.writeSync(fd, data, 0, data.length, 0) - } else if (data != null) { - fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8')) - } - if (options.fsync !== false) { - fs.fsyncSync(fd) - } - fs.closeSync(fd) - if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) - if (options.mode) fs.chmodSync(tmpfile, options.mode) - fs.renameSync(tmpfile, filename) - removeOnExitHandler() - } catch (err) { - if (fd) { - try { - fs.closeSync(fd) - } catch (ex) { - // ignore close errors at this stage, error may have closed fd already. - } - } - removeOnExitHandler() - cleanup() - throw err - } -} - - -/***/ }), - -/***/ "../../node_modules/write-pkg/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__("path"); -const writeJsonFile = __webpack_require__("../../node_modules/write-json-file/index.js"); -const sortKeys = __webpack_require__("../../node_modules/sort-keys/index.js"); - -const dependencyKeys = new Set([ - 'dependencies', - 'devDependencies', - 'optionalDependencies', - 'peerDependencies' -]); - -function normalize(packageJson) { - const result = {}; - - for (const key of Object.keys(packageJson)) { - if (!dependencyKeys.has(key)) { - result[key] = packageJson[key]; - } else if (Object.keys(packageJson[key]).length !== 0) { - result[key] = sortKeys(packageJson[key]); - } - } - - return result; -} - -module.exports = async (filePath, data, options) => { - if (typeof filePath !== 'string') { - options = data; - data = filePath; - filePath = '.'; - } - - options = { - normalize: true, - ...options, - detectIndent: true - }; - - filePath = path.basename(filePath) === 'package.json' ? filePath : path.join(filePath, 'package.json'); - - data = options.normalize ? normalize(data) : data; - - return writeJsonFile(filePath, data, options); -}; - -module.exports.sync = (filePath, data, options) => { - if (typeof filePath !== 'string') { - options = data; - data = filePath; - filePath = '.'; - } - - options = { - normalize: true, - ...options, - detectIndent: true - }; - - filePath = path.basename(filePath) === 'package.json' ? filePath : path.join(filePath, 'package.json'); - - data = options.normalize ? normalize(data) : data; - - writeJsonFile.sync(filePath, data, options); -}; - - -/***/ }), - -/***/ "./src/cli.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return run; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var getopts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/getopts/index.js"); -/* harmony import */ var getopts__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(getopts__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/index.js"); -/* harmony import */ var _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_tooling_log__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/commands/index.ts"); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/run.ts"); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - - -function help() { - _utils_log__WEBPACK_IMPORTED_MODULE_6__[/* log */ "a"].info(dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - usage: kbn [] - - By default commands are run for Kibana itself, all packages in the 'packages/' - folder and for all plugins in './plugins' and '../kibana-extra'. - - Available commands: - - ${Object.values(_commands__WEBPACK_IMPORTED_MODULE_4__[/* commands */ "a"]).map(command => `${command.name} - ${command.description}`).join('\n ')} - - Global options: - - -e, --exclude Exclude specified project. Can be specified multiple times to exclude multiple projects, e.g. '-e kibana -e @kbn/pm'. - -i, --include Include only specified projects. If left unspecified, it defaults to including all projects. - --oss Do not include the x-pack when running command. - --skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command. - --no-cache Disable the kbn packages bootstrap cache - --no-validate Disable the bootstrap yarn.lock validation - --force-install Forces yarn install to run on bootstrap - --offline Run in offline mode - --verbose Set log level to verbose - --debug Set log level to debug - --quiet Set log level to error - --silent Disable log output - - "run" options: - --skip-missing Ignore packages which don't have the requested script - ` + '\n'); -} - -async function run(argv) { - _utils_log__WEBPACK_IMPORTED_MODULE_6__[/* log */ "a"].setLogLevel(Object(_kbn_tooling_log__WEBPACK_IMPORTED_MODULE_3__["pickLevelFromFlags"])(getopts__WEBPACK_IMPORTED_MODULE_1___default()(argv, { - boolean: ['verbose', 'debug', 'quiet', 'silent', 'skip-missing'] - }))); // We can simplify this setup (and remove this extra handling) once Yarn - // starts forwarding the `--` directly to this script, see - // https://github.com/yarnpkg/yarn/blob/b2d3e1a8fe45ef376b716d597cc79b38702a9320/src/cli/index.js#L174-L182 - - if (argv.includes('--')) { - _utils_log__WEBPACK_IMPORTED_MODULE_6__[/* log */ "a"].error(`Using "--" is not allowed, as it doesn't work with 'yarn kbn'.`); - process.exit(1); - } - - const options = getopts__WEBPACK_IMPORTED_MODULE_1___default()(argv, { - alias: { - e: 'exclude', - h: 'help', - i: 'include' - }, - default: { - cache: true, - 'force-install': false, - offline: false, - validate: true - }, - boolean: ['cache', 'force-install', 'offline', 'validate'] - }); - const args = options._; - - if (options.help || args.length === 0) { - help(); - return; - } // This `rootPath` is relative to `./dist/` as that's the location of the - // built version of this tool. - - - const rootPath = Object(path__WEBPACK_IMPORTED_MODULE_2__["resolve"])(__dirname, '../../../'); - const commandName = args[0]; - const extraArgs = args.slice(1); - const commandOptions = { - options, - extraArgs, - rootPath - }; - const command = _commands__WEBPACK_IMPORTED_MODULE_4__[/* commands */ "a"][commandName]; - - if (command === undefined) { - _utils_log__WEBPACK_IMPORTED_MODULE_6__[/* log */ "a"].error(`[${commandName}] is not a valid command, see 'kbn --help'`); - process.exit(1); - } - - await Object(_run__WEBPACK_IMPORTED_MODULE_5__[/* runCommand */ "a"])(command, commandOptions); -} - -/***/ }), - -/***/ "./src/commands/bootstrap.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BootstrapCommand; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node/index.js"); -/* harmony import */ var _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/index.js"); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _utils_child_process__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/child_process.ts"); -/* harmony import */ var _utils_link_project_executables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/link_project_executables.ts"); -/* harmony import */ var _utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/yarn_lock.ts"); -/* harmony import */ var _utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/utils/validate_dependencies.ts"); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./src/utils/bazel/index.ts"); -/* harmony import */ var _utils_bazel_setup_remote_cache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./src/utils/bazel/setup_remote_cache.ts"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - - - - -const BootstrapCommand = { - description: 'Install dependencies and crosslink projects', - name: 'bootstrap', - reportTiming: { - group: 'scripts/kbn bootstrap', - id: 'total' - }, - - async run(projects, projectGraph, { - options, - kbn, - rootPath - }) { - var _projects$get; - - const kibanaProjectPath = ((_projects$get = projects.get('kibana')) === null || _projects$get === void 0 ? void 0 : _projects$get.path) || ''; - const offline = (options === null || options === void 0 ? void 0 : options.offline) === true; - const reporter = _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_1__["CiStatsReporter"].fromEnv(_utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"]); - const timings = []; - - const time = async (id, body) => { - const start = Date.now(); - - try { - return await body(); - } finally { - timings.push({ - id, - ms: Date.now() - start - }); - } - }; // Force install is set in case a flag is passed into yarn kbn bootstrap or - // our custom logic have determined there is a chance node_modules have been manually deleted and as such bazel - // tracking mechanism is no longer valid - - - const forceInstall = !!options && options['force-install'] === true || (await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_8__[/* haveNodeModulesBeenManuallyDeleted */ "c"])(kibanaProjectPath)); // Install bazel machinery tools if needed - - await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_8__[/* installBazelTools */ "d"])(rootPath); // Setup remote cache settings in .bazelrc.cache if needed - - await Object(_utils_bazel_setup_remote_cache__WEBPACK_IMPORTED_MODULE_9__[/* setupRemoteCache */ "a"])(rootPath); // Bootstrap process for Bazel packages - // Bazel is now managing dependencies so yarn install - // will happen as part of this - // - // NOTE: Bazel projects will be introduced incrementally - // And should begin from the ones with none dependencies forward. - // That way non bazel projects could depend on bazel projects but not the other way around - // That is only intended during the migration process while non Bazel projects are not removed at all. - // - - if (forceInstall) { - await time('force install dependencies', async () => { - await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_8__[/* removeYarnIntegrityFileIfExists */ "f"])(path__WEBPACK_IMPORTED_MODULE_0___default.a.resolve(kibanaProjectPath, 'node_modules')); - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2__["runBazel"])({ - bazelArgs: ['clean', '--expunge'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"] - }); - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2__["runBazel"])({ - bazelArgs: ['run', '@nodejs//:yarn'], - offline, - log: _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"], - execaOpts: { - env: { - SASS_BINARY_SITE: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass', - RE2_DOWNLOAD_MIRROR: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2' - } - } - }); - }); - } // build packages - - - await time('build packages', async () => { - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_2__["runBazel"])({ - bazelArgs: ['build', '//packages:build', '--show_result=1'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"], - offline - }); - }); - const yarnLock = await time('read yarn.lock', async () => await Object(_utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__[/* readYarnLock */ "a"])(kbn)); - - if (options.validate) { - await time('validate dependencies', async () => { - await Object(_utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_7__[/* validateDependencies */ "a"])(kbn, yarnLock); - }); - } // Assure all kbn projects with bin defined scripts - // copy those scripts into the top level node_modules folder - // - // NOTE: We don't probably need this anymore, is actually not being used - - - await time('link project executables', async () => { - await Object(_utils_link_project_executables__WEBPACK_IMPORTED_MODULE_5__[/* linkProjectExecutables */ "a"])(projects, projectGraph); - }); - await time('update vscode config', async () => { - // Update vscode settings - await Object(_utils_child_process__WEBPACK_IMPORTED_MODULE_4__[/* spawnStreaming */ "b"])(process.execPath, ['scripts/update_vscode_config'], { - cwd: kbn.getAbsolute(), - env: process.env - }, { - prefix: '[vscode]', - debug: false - }); - }); // send timings - - await reporter.timings({ - upstreamBranch: kbn.kibanaProject.json.branch, - // prevent loading @kbn/utils by passing null - kibanaUuid: kbn.getUuid() || null, - timings: timings.map(t => _objectSpread({ - group: 'scripts/kbn bootstrap' - }, t)) - }); - } - -}; - -/***/ }), - -/***/ "./src/commands/build.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BuildCommand; }); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/index.js"); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -const BuildCommand = { - description: 'Runs a build in the Bazel built packages', - name: 'build', - reportTiming: { - group: 'scripts/kbn build', - id: 'total' - }, - - async run(projects, projectGraph, { - options - }) { - // Call bazel with the target to build all available packages - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__["runBazel"])({ - bazelArgs: ['build', '//packages:build', '--show_result=1'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_1__[/* log */ "a"], - offline: (options === null || options === void 0 ? void 0 : options.offline) === true - }); - } - -}; - -/***/ }), - -/***/ "./src/commands/clean.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CleanCommand; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/del/index.js"); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/ora/index.js"); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/index.js"); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/bazel/index.ts"); -/* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/fs.ts"); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - - -const CleanCommand = { - description: 'Deletes output directories and resets internal caches.', - name: 'clean', - reportTiming: { - group: 'scripts/kbn clean', - id: 'total' - }, - - async run(projects, projectGraph, { - kbn - }) { - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].warning(dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - This command is only necessary for the circumstance where you need to recover a consistent - state when problems arise. If you need to run this command often, please let us know by - filling out this form: https://ela.st/yarn-kbn-clean. - Please not it might not solve problems with node_modules. To solve problems around node_modules - you might need to run 'yarn kbn reset'. - `); - const toDelete = []; - - for (const project of projects.values()) { - if (await Object(_utils_fs__WEBPACK_IMPORTED_MODULE_6__[/* isDirectory */ "c"])(project.targetLocation)) { - toDelete.push({ - cwd: project.path, - pattern: Object(path__WEBPACK_IMPORTED_MODULE_3__["relative"])(project.path, project.targetLocation) - }); - } - - const { - extraPatterns - } = project.getCleanConfig(); - - if (extraPatterns) { - toDelete.push({ - cwd: project.path, - pattern: extraPatterns - }); - } - } // Runs Bazel soft clean - - - if (await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_5__[/* isBazelBinAvailable */ "e"])(kbn.getAbsolute())) { - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__["runBazel"])({ - bazelArgs: ['clean'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"] - }); - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].success('Soft cleaned bazel'); - } - - if (toDelete.length === 0) { - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].success('Nothing to delete'); - } else { - /** - * In order to avoid patterns like `/build` in packages from accidentally - * impacting files outside the package we use `process.chdir()` to change - * the cwd to the package and execute `del()` without the `force` option - * so it will check that each file being deleted is within the package. - * - * `del()` does support a `cwd` option, but it's only for resolving the - * patterns and does not impact the cwd check. - */ - const originalCwd = process.cwd(); - - try { - for (const { - pattern, - cwd - } of toDelete) { - process.chdir(cwd); - const promise = del__WEBPACK_IMPORTED_MODULE_1___default()(pattern); - - if (_utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].wouldLogLevel('info')) { - ora__WEBPACK_IMPORTED_MODULE_2___default.a.promise(promise, Object(path__WEBPACK_IMPORTED_MODULE_3__["relative"])(originalCwd, Object(path__WEBPACK_IMPORTED_MODULE_3__["join"])(cwd, String(pattern)))); - } - - await promise; - } - } finally { - process.chdir(originalCwd); - } - } - } - -}; - -/***/ }), - -/***/ "./src/commands/index.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return commands; }); -/* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/commands/bootstrap.ts"); -/* harmony import */ var _build__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/commands/build.ts"); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/commands/clean.ts"); -/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/commands/reset.ts"); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/commands/run.ts"); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/commands/watch.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - -const commands = { - bootstrap: _bootstrap__WEBPACK_IMPORTED_MODULE_0__[/* BootstrapCommand */ "a"], - build: _build__WEBPACK_IMPORTED_MODULE_1__[/* BuildCommand */ "a"], - clean: _clean__WEBPACK_IMPORTED_MODULE_2__[/* CleanCommand */ "a"], - reset: _reset__WEBPACK_IMPORTED_MODULE_3__[/* ResetCommand */ "a"], - run: _run__WEBPACK_IMPORTED_MODULE_4__[/* RunCommand */ "a"], - watch: _watch__WEBPACK_IMPORTED_MODULE_5__[/* WatchCommand */ "a"] -}; - -/***/ }), - -/***/ "./src/commands/reset.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResetCommand; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/del/index.js"); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/ora/index.js"); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/index.js"); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/bazel/index.ts"); -/* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/fs.ts"); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - - -const ResetCommand = { - description: 'Deletes node_modules and output directories, resets internal and disk caches, and stops Bazel server', - name: 'reset', - reportTiming: { - group: 'scripts/kbn reset', - id: 'total' - }, - - async run(projects, projectGraph, { - kbn - }) { - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].warning(dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - In most cases, 'yarn kbn clean' is all that should be needed to recover a consistent state when - problems arise. However for the rare cases where something get corrupt on node_modules you might need this command. - If you think you need to use this command very often (which is not normal), please let us know. - `); - const toDelete = []; - - for (const project of projects.values()) { - if (await Object(_utils_fs__WEBPACK_IMPORTED_MODULE_6__[/* isDirectory */ "c"])(project.nodeModulesLocation)) { - toDelete.push({ - cwd: project.path, - pattern: Object(path__WEBPACK_IMPORTED_MODULE_3__["relative"])(project.path, project.nodeModulesLocation) - }); - } - - if (await Object(_utils_fs__WEBPACK_IMPORTED_MODULE_6__[/* isDirectory */ "c"])(project.targetLocation)) { - toDelete.push({ - cwd: project.path, - pattern: Object(path__WEBPACK_IMPORTED_MODULE_3__["relative"])(project.path, project.targetLocation) - }); - } - - const { - extraPatterns - } = project.getCleanConfig(); - - if (extraPatterns) { - toDelete.push({ - cwd: project.path, - pattern: extraPatterns - }); - } - } // Runs Bazel hard clean and deletes Bazel Cache Folders - - - if (await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_5__[/* isBazelBinAvailable */ "e"])(kbn.getAbsolute())) { - // Hard cleaning bazel - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_4__["runBazel"])({ - bazelArgs: ['clean', '--expunge'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"] - }); - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].success('Hard cleaned bazel'); // Deletes Bazel Cache Folders - - await del__WEBPACK_IMPORTED_MODULE_1___default()([await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_5__[/* getBazelDiskCacheFolder */ "a"])(), await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_5__[/* getBazelRepositoryCacheFolder */ "b"])()], { - force: true - }); - _utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].success('Removed disk caches'); - } - - if (toDelete.length === 0) { - return; - } - /** - * In order to avoid patterns like `/build` in packages from accidentally - * impacting files outside the package we use `process.chdir()` to change - * the cwd to the package and execute `del()` without the `force` option - * so it will check that each file being deleted is within the package. - * - * `del()` does support a `cwd` option, but it's only for resolving the - * patterns and does not impact the cwd check. - */ - - - const originalCwd = process.cwd(); - - try { - for (const { - pattern, - cwd - } of toDelete) { - process.chdir(cwd); - const promise = del__WEBPACK_IMPORTED_MODULE_1___default()(pattern); - - if (_utils_log__WEBPACK_IMPORTED_MODULE_7__[/* log */ "a"].wouldLogLevel('info')) { - ora__WEBPACK_IMPORTED_MODULE_2___default.a.promise(promise, Object(path__WEBPACK_IMPORTED_MODULE_3__["relative"])(originalCwd, Object(path__WEBPACK_IMPORTED_MODULE_3__["join"])(cwd, String(pattern)))); - } - - await promise; - } - } finally { - process.chdir(originalCwd); - } - } - -}; - -/***/ }), - -/***/ "./src/commands/run.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RunCommand; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/errors.ts"); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/parallelize.ts"); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/projects.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - -const RunCommand = { - description: 'Run script defined in package.json in each package that contains that script (only works on packages not using Bazel yet)', - name: 'run', - reportTiming: { - group: 'scripts/kbn run', - id: 'total' - }, - - async run(projects, projectGraph, { - extraArgs, - options - }) { - _utils_log__WEBPACK_IMPORTED_MODULE_2__[/* log */ "a"].warning(dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - We are migrating packages into the Bazel build system and we will no longer support running npm scripts on - packages using 'yarn kbn run' on Bazel built packages. If the package you are trying to act on contains a - BUILD.bazel file please just use 'yarn kbn build' to build it or 'yarn kbn watch' to watch it - `); - const batchedProjects = Object(_utils_projects__WEBPACK_IMPORTED_MODULE_4__[/* topologicallyBatchProjects */ "d"])(projects, projectGraph); - - if (extraArgs.length === 0) { - throw new _utils_errors__WEBPACK_IMPORTED_MODULE_1__[/* CliError */ "a"]('No script specified'); - } - - const scriptName = extraArgs[0]; - const scriptArgs = extraArgs.slice(1); - await Object(_utils_parallelize__WEBPACK_IMPORTED_MODULE_3__[/* parallelizeBatches */ "a"])(batchedProjects, async project => { - if (!project.hasScript(scriptName)) { - if (!!options['skip-missing']) { - return; - } - - throw new _utils_errors__WEBPACK_IMPORTED_MODULE_1__[/* CliError */ "a"](`[${project.name}] no "${scriptName}" script defined. To skip packages without the "${scriptName}" script pass --skip-missing`); - } - - _utils_log__WEBPACK_IMPORTED_MODULE_2__[/* log */ "a"].info(`[${project.name}] running "${scriptName}" script`); - await project.runScriptStreaming(scriptName, { - args: scriptArgs - }); - _utils_log__WEBPACK_IMPORTED_MODULE_2__[/* log */ "a"].success(`[${project.name}] complete`); - }); - } - -}; - -/***/ }), - -/***/ "./src/commands/watch.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WatchCommand; }); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@kbn/bazel-runner/target_node/index.js"); -/* harmony import */ var _kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -const WatchCommand = { - description: 'Runs a build in the Bazel built packages and keeps watching them for changes', - name: 'watch', - reportTiming: { - group: 'scripts/kbn watch', - id: 'total' - }, - - async run(projects, projectGraph, { - options - }) { - const runOffline = (options === null || options === void 0 ? void 0 : options.offline) === true; // Call bazel with the target to build all available packages and run it through iBazel to watch it for changes - // - // Note: --run_output=false arg will disable the iBazel notifications about gazelle and buildozer when running it - // Can also be solved by adding a root `.bazel_fix_commands.json` but its not needed at the moment - - await Object(_kbn_bazel_runner__WEBPACK_IMPORTED_MODULE_0__["runIBazel"])({ - bazelArgs: ['--run_output=false', 'build', '//packages:build', '--show_result=1'], - log: _utils_log__WEBPACK_IMPORTED_MODULE_1__[/* log */ "a"], - offline: runOffline - }); - } - -}; - -/***/ }), - -/***/ "./src/config.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getProjectPaths; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -/** - * Returns all the paths where plugins are located - */ -function getProjectPaths({ - rootPath, - ossOnly, - skipKibanaPlugins -}) { - const projectPaths = [rootPath, Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'packages/*')]; // This is needed in order to install the dependencies for the declared - // plugin functional used in the selenium functional tests. - // As we are now using the webpack dll for the client vendors dependencies - // when we run the plugin functional tests against the distributable - // dependencies used by such plugins like @eui, react and react-dom can't - // be loaded from the dll as the context is different from the one declared - // into the webpack dll reference plugin. - // In anyway, have a plugin declaring their own dependencies is the - // correct and the expect behavior. - - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'test/plugin_functional/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'test/interpreter_functional/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'test/server_integration/__fixtures__/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'examples/*')); - - if (!ossOnly) { - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack/legacy/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack/test/functional_with_es_ssl/fixtures/plugins/*')); - } - - if (!skipKibanaPlugins) { - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, '../kibana-extra/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, '../kibana-extra/*/packages/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, '../kibana-extra/*/plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'plugins/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'plugins/*/packages/*')); - projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'plugins/*/plugins/*')); - } - - return projectPaths; -} - -/***/ }), - -/***/ "./src/index.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cli__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/cli.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "run", function() { return _cli__WEBPACK_IMPORTED_MODULE_0__["a"]; }); - -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/projects.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjects", function() { return _utils_projects__WEBPACK_IMPORTED_MODULE_1__["b"]; }); - -/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/project.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Project", function() { return _utils_project__WEBPACK_IMPORTED_MODULE_2__["a"]; }); - -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/config.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_3__["a"]; }); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - -/***/ }), - -/***/ "./src/run.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return runCommand; }); -/* harmony import */ var _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@kbn/ci-stats-reporter/target_node/index.js"); -/* harmony import */ var _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _kbn_plugin_discovery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/@kbn/plugin-discovery/target_node/index.js"); -/* harmony import */ var _kbn_plugin_discovery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_kbn_plugin_discovery__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/errors.ts"); -/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/projects.ts"); -/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/projects_tree.ts"); -/* harmony import */ var _utils_regenerate_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/regenerate_package_json.ts"); -/* harmony import */ var _utils_regenerate_synthetic_package_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/utils/regenerate_synthetic_package_map.ts"); -/* harmony import */ var _utils_regenerate_base_tsconfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./src/utils/regenerate_base_tsconfig.ts"); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./src/utils/kibana.ts"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - - - - -process.env.CI_STATS_NESTED_TIMING = 'true'; -async function runCommand(command, config) { - const runStartTime = Date.now(); - let kbn; - const timings = []; - - async function time(id, block) { - const start = Date.now(); - let success = true; - - try { - return await block(); - } catch (error) { - success = false; - throw error; - } finally { - timings.push({ - id, - ms: Date.now() - start, - meta: { - success - } - }); - } - } - - async function reportTimes(timingConfig, error) { - if (!kbn) { - // things are too broken to report remotely - return; - } - - const reporter = _kbn_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0__["CiStatsReporter"].fromEnv(_utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"]); - - try { - await reporter.timings({ - upstreamBranch: kbn.kibanaProject.json.branch, - // prevent loading @kbn/utils by passing null - kibanaUuid: kbn.getUuid() || null, - timings: [...timings.map(t => _objectSpread(_objectSpread({}, timingConfig), t)), { - group: timingConfig.group, - id: timingConfig.id, - ms: Date.now() - runStartTime, - meta: { - success: !error - } - }] - }); - } catch (e) { - // prevent hiding bootstrap errors - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error('failed to report timings:'); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error(e); - } - } - - try { - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].debug(`Running [${command.name}] command from [${config.rootPath}]`); - await time('regenerate package.json, synthetic-package map and tsconfig', async () => { - const plugins = Object(_kbn_plugin_discovery__WEBPACK_IMPORTED_MODULE_1__["simpleKibanaPlatformPluginDiscovery"])(Object(_kbn_plugin_discovery__WEBPACK_IMPORTED_MODULE_1__["getPluginSearchPaths"])({ - rootDir: config.rootPath, - oss: false, - examples: true, - testPlugins: true - }), []); - await Promise.all([Object(_utils_regenerate_package_json__WEBPACK_IMPORTED_MODULE_6__[/* regeneratePackageJson */ "a"])(config.rootPath), Object(_utils_regenerate_synthetic_package_map__WEBPACK_IMPORTED_MODULE_7__[/* regenerateSyntheticPackageMap */ "a"])(plugins, config.rootPath), Object(_utils_regenerate_base_tsconfig__WEBPACK_IMPORTED_MODULE_8__[/* regenerateBaseTsconfig */ "a"])(plugins, config.rootPath)]); - }); - kbn = await time('load Kibana project', async () => await _utils_kibana__WEBPACK_IMPORTED_MODULE_9__[/* Kibana */ "a"].loadFrom(config.rootPath)); - const projects = kbn.getFilteredProjects({ - skipKibanaPlugins: Boolean(config.options['skip-kibana-plugins']), - ossOnly: Boolean(config.options.oss), - exclude: toArray(config.options.exclude), - include: toArray(config.options.include) - }); - - if (projects.size === 0) { - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error(`There are no projects found. Double check project name(s) in '-i/--include' and '-e/--exclude' filters.`); - return process.exit(1); - } - - const projectGraph = Object(_utils_projects__WEBPACK_IMPORTED_MODULE_4__[/* buildProjectGraph */ "a"])(projects); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].debug(`Found ${projects.size.toString()} projects`); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].debug(Object(_utils_projects_tree__WEBPACK_IMPORTED_MODULE_5__[/* renderProjectsTree */ "a"])(config.rootPath, projects)); - await command.run(projects, projectGraph, _objectSpread(_objectSpread({}, config), {}, { - kbn - })); - - if (command.reportTiming) { - await reportTimes(command.reportTiming); - } - } catch (error) { - if (command.reportTiming) { - await reportTimes(command.reportTiming, error); - } - - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error(`[${command.name}] failed:`); - - if (error instanceof _utils_errors__WEBPACK_IMPORTED_MODULE_2__[/* CliError */ "a"]) { - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error(error.message); - const metaOutput = Object.entries(error.meta).map(([key, value]) => `${key}: ${value}`).join('\n'); - - if (metaOutput) { - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].info('Additional debugging info:\n'); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].indent(2); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].info(metaOutput); - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].indent(-2); - } - } else { - _utils_log__WEBPACK_IMPORTED_MODULE_3__[/* log */ "a"].error(error); - } - - process.exit(1); - } -} - -function toArray(value) { - if (value == null) { - return []; - } - - return Array.isArray(value) ? value : [value]; -} - -/***/ }), - -/***/ "./src/utils/bazel/get_cache_folders.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getBazelDiskCacheFolder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getBazelRepositoryCacheFolder; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/child_process.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - -async function rawRunBazelInfoRepoCache() { - const { - stdout: bazelRepositoryCachePath - } = await Object(_child_process__WEBPACK_IMPORTED_MODULE_1__[/* spawn */ "a"])('bazel', ['info', 'repository_cache'], { - stdio: 'pipe' - }); - return bazelRepositoryCachePath; -} - -async function getBazelDiskCacheFolder() { - return Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["dirname"])(await rawRunBazelInfoRepoCache()), 'disk-cache'); -} -async function getBazelRepositoryCacheFolder() { - return await rawRunBazelInfoRepoCache(); -} - -/***/ }), - -/***/ "./src/utils/bazel/index.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/bazel/get_cache_folders.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__["b"]; }); - -/* harmony import */ var _install_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/bazel/install_tools.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_1__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_1__["b"]; }); - -/* harmony import */ var _yarn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/bazel/yarn.ts"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _yarn__WEBPACK_IMPORTED_MODULE_2__["a"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _yarn__WEBPACK_IMPORTED_MODULE_2__["b"]; }); - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - -/***/ }), - -/***/ "./src/utils/bazel/install_tools.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isBazelBinAvailable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return installBazelTools; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/child_process.ts"); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/fs.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - -async function readBazelToolsVersionFile(repoRootPath, versionFilename) { - const version = (await Object(_fs__WEBPACK_IMPORTED_MODULE_3__[/* readFile */ "f"])(Object(path__WEBPACK_IMPORTED_MODULE_1__["resolve"])(repoRootPath, versionFilename))).toString().trim(); - - if (!version) { - throw new Error(`[bazel_tools] Failed on reading bazel tools versions\n ${versionFilename} file do not contain any version set`); - } - - return version; -} - -async function isBazelBinAvailable(repoRootPath) { - try { - const installedVersion = await Object(_child_process__WEBPACK_IMPORTED_MODULE_2__[/* spawn */ "a"])('bazel', ['--version'], { - stdio: 'pipe' - }); - const bazelVersion = await readBazelToolsVersionFile(repoRootPath, '.bazelversion'); - - if (installedVersion.stdout === `bazel ${bazelVersion}`) { - return true; - } else { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].info(`[bazel_tools] Bazel is installed (${installedVersion.stdout}), but was expecting ${bazelVersion}`); - return false; - } - } catch { - return false; - } -} - -async function tryRemoveBazeliskFromYarnGlobal() { - try { - // Check if Bazelisk is installed on the yarn global scope - const { - stdout: bazeliskPkgInstallStdout - } = await Object(_child_process__WEBPACK_IMPORTED_MODULE_2__[/* spawn */ "a"])('yarn', ['global', 'list'], { - stdio: 'pipe' - }); // Bazelisk was found on yarn global scope so lets remove it - - if (bazeliskPkgInstallStdout.includes(`@bazel/bazelisk@`)) { - await Object(_child_process__WEBPACK_IMPORTED_MODULE_2__[/* spawn */ "a"])('yarn', ['global', 'remove', `@bazel/bazelisk`], { - stdio: 'pipe' - }); - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].info(`[bazel_tools] bazelisk was installed on Yarn global packages and is now removed`); - return true; - } - - return false; - } catch { - return false; - } -} - -async function installBazelTools(repoRootPath) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].debug(`[bazel_tools] reading bazel tools versions from version files`); - const bazeliskVersion = await readBazelToolsVersionFile(repoRootPath, '.bazeliskversion'); - const bazelVersion = await readBazelToolsVersionFile(repoRootPath, '.bazelversion'); // Check what globals are installed - - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].debug(`[bazel_tools] verify if bazelisk is installed`); // Check if we need to remove bazelisk from yarn - - await tryRemoveBazeliskFromYarnGlobal(); // Test if bazel bin is available - - const isBazelBinAlreadyAvailable = await isBazelBinAvailable(repoRootPath); // Install bazelisk if not installed - - if (!isBazelBinAlreadyAvailable) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].info(`[bazel_tools] installing Bazel tools`); - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].debug(`[bazel_tools] bazelisk is not installed. Installing @bazel/bazelisk@${bazeliskVersion} and bazel@${bazelVersion}`); - await Object(_child_process__WEBPACK_IMPORTED_MODULE_2__[/* spawn */ "a"])('npm', ['install', '--global', `@bazel/bazelisk@${bazeliskVersion}`], { - env: { - USE_BAZEL_VERSION: bazelVersion - }, - stdio: 'pipe' - }); - const isBazelBinAvailableAfterInstall = await isBazelBinAvailable(repoRootPath); - - if (!isBazelBinAvailableAfterInstall) { - throw new Error(dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - [bazel_tools] an error occurred when installing the Bazel tools. Please make sure you have access to npm globally installed modules on your $PATH - `); - } - } - - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].success(`[bazel_tools] all bazel tools are correctly installed`); -} - -/***/ }), - -/***/ "./src/utils/bazel/setup_remote_cache.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setupRemoteCache; }); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fs"); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/child_process.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/fs.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - -async function isElasticCommitter() { - try { - const { - stdout: email - } = await Object(_child_process__WEBPACK_IMPORTED_MODULE_3__[/* spawn */ "a"])('git', ['config', 'user.email'], { - stdio: 'pipe' - }); - return email.trim().endsWith('@elastic.co'); - } catch { - return false; - } -} - -async function upToDate(settingsPath) { - if (!(await Object(_fs__WEBPACK_IMPORTED_MODULE_5__[/* isFile */ "d"])(settingsPath))) { - return false; - } - - const readSettingsFile = await Object(_fs__WEBPACK_IMPORTED_MODULE_5__[/* readFile */ "f"])(settingsPath, 'utf8'); - return readSettingsFile.startsWith('# V2 '); -} - -async function setupRemoteCache(repoRootPath) { - // The remote cache is only for Elastic employees working locally (CI cache settings are handled elsewhere) - if (process.env.FORCE_BOOTSTRAP_REMOTE_CACHE !== 'true' && (process.env.CI || !(await isElasticCommitter()))) { - return; - } - - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].debug(`[bazel_tools] setting up remote cache settings if necessary`); - const settingsPath = Object(path__WEBPACK_IMPORTED_MODULE_2__["resolve"])(repoRootPath, '.bazelrc.cache'); // Checks if we should upgrade or install the config file - - if (await upToDate(settingsPath)) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].debug(`[bazel_tools] remote cache config already exists and is up-to-date, skipping`); - return; - } - - const contents = dedent__WEBPACK_IMPORTED_MODULE_0___default.a` - # V2 - This file is automatically generated by 'yarn kbn bootstrap' - # To regenerate this file, delete it and run 'yarn kbn bootstrap' again. - build --remote_cache=https://storage.googleapis.com/kibana-local-bazel-remote-cache - build --noremote_upload_local_results - build --incompatible_remote_results_ignore_disk - `; - Object(fs__WEBPACK_IMPORTED_MODULE_1__["writeFileSync"])(settingsPath, contents); - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].info(`[bazel_tools] remote cache settings written to ${settingsPath}`); -} - -/***/ }), - -/***/ "./src/utils/bazel/yarn.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeYarnIntegrityFileIfExists; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return haveNodeModulesBeenManuallyDeleted; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/fs.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - // yarn integrity file checker - -async function removeYarnIntegrityFileIfExists(nodeModulesPath) { - try { - const nodeModulesRealPath = await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* tryRealpath */ "g"])(nodeModulesPath); - const yarnIntegrityFilePath = Object(path__WEBPACK_IMPORTED_MODULE_0__["join"])(nodeModulesRealPath, '.yarn-integrity'); // check if the file exists and delete it in that case - - if (await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isFile */ "d"])(yarnIntegrityFilePath)) { - await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* unlink */ "h"])(yarnIntegrityFilePath); - } - } catch {// no-op - } -} // yarn and bazel integration checkers - -async function areNodeModulesPresent(kbnRootPath) { - try { - return await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isDirectory */ "c"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kbnRootPath, 'node_modules')); - } catch { - return false; - } -} - -async function haveBazelFoldersBeenCreatedBefore(kbnRootPath) { - try { - return (await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isDirectory */ "c"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kbnRootPath, 'bazel-bin', 'packages'))) || (await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isDirectory */ "c"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kbnRootPath, 'bazel-kibana', 'packages'))) || (await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isDirectory */ "c"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kbnRootPath, 'bazel-out', 'host'))); - } catch { - return false; - } -} - -async function haveNodeModulesBeenManuallyDeleted(kbnRootPath) { - return !(await areNodeModulesPresent(kbnRootPath)) && (await haveBazelFoldersBeenCreatedBefore(kbnRootPath)); -} - -/***/ }), - -/***/ "./src/utils/child_process.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return spawn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return spawnStreaming; }); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("stream"); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stream__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/chalk/source/index.js"); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/execa/index.js"); -/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/strong-log-transformer/index.js"); -/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/log.ts"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - -const colorWheel = [chalk__WEBPACK_IMPORTED_MODULE_1___default.a.cyan, chalk__WEBPACK_IMPORTED_MODULE_1___default.a.magenta, chalk__WEBPACK_IMPORTED_MODULE_1___default.a.blue, chalk__WEBPACK_IMPORTED_MODULE_1___default.a.yellow, chalk__WEBPACK_IMPORTED_MODULE_1___default.a.green]; - -const getColor = () => { - const color = colorWheel.shift(); - colorWheel.push(color); - return color; -}; - -function spawn(command, args, opts) { - return execa__WEBPACK_IMPORTED_MODULE_2___default()(command, args, _objectSpread({ - stdio: 'inherit', - preferLocal: true - }, opts)); -} - -function streamToLog(debug = true) { - return new stream__WEBPACK_IMPORTED_MODULE_0__["Writable"]({ - objectMode: true, - - write(line, _, cb) { - if (line.endsWith('\n')) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"][debug ? 'debug' : 'write'](line.slice(0, -1)); - } else { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"][debug ? 'debug' : 'write'](line); - } - - cb(); - } - - }); -} - -function spawnStreaming(command, args, opts, { - prefix, - debug -}) { - const spawned = execa__WEBPACK_IMPORTED_MODULE_2___default()(command, args, _objectSpread({ - stdio: ['ignore', 'pipe', 'pipe'], - preferLocal: true - }, opts)); - const color = getColor(); - const prefixedStdout = strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default()({ - tag: color.bold(prefix) - }); - const prefixedStderr = strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default()({ - mergeMultiline: true, - tag: color.bold(prefix) - }); - spawned.stdout.pipe(prefixedStdout).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null - - spawned.stderr.pipe(prefixedStderr).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null - - return spawned; -} - -/***/ }), - -/***/ "./src/utils/convert_plugin_id_to_package_id.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return convertPluginIdToPackageId; }); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -function convertPluginIdToPackageId(pluginId) { - if (pluginId === 'core') { - // core is the only non-plugin - return `@kbn/core`; - } - - return `@kbn/${pluginId.split('').flatMap(c => c.toUpperCase() === c ? `-${c.toLowerCase()}` : c).join('')}-plugin`.replace(/-\w(-\w)+-/g, match => `-${match.split('-').join('')}-`).replace(/-plugin-plugin$/, '-plugin'); -} - -/***/ }), - -/***/ "./src/utils/errors.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CliError; }); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -class CliError extends Error { - constructor(message, meta = {}) { - super(message); - this.meta = meta; - } - -} - -/***/ }), - -/***/ "./src/utils/fs.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return readFile; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return writeFile; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return chmod; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return mkdirp; }); -/* unused harmony export rmdirp */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return unlink; }); -/* unused harmony export copyDirectory */ -/* unused harmony export isSymlink */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isDirectory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isFile; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createSymlink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return tryRealpath; }); -/* harmony import */ var cmd_shim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/cmd-shim/index.js"); -/* harmony import */ var cmd_shim__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cmd_shim__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/del/index.js"); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("fs"); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ncp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/ncp/lib/ncp.js"); -/* harmony import */ var ncp__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ncp__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("util"); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_5__); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - -const lstat = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.lstat); -const readFile = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.readFile); -const writeFile = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.writeFile); -const symlink = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.symlink); -const chmod = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.chmod); -const cmdShim = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(cmd_shim__WEBPACK_IMPORTED_MODULE_0___default.a); -const mkdir = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.mkdir); -const realpathNative = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.realpath.native); -const mkdirp = async path => await mkdir(path, { - recursive: true -}); -const rmdirp = async path => await del__WEBPACK_IMPORTED_MODULE_1___default()(path, { - force: true -}); -const unlink = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(fs__WEBPACK_IMPORTED_MODULE_2___default.a.unlink); -const copyDirectory = Object(util__WEBPACK_IMPORTED_MODULE_5__["promisify"])(ncp__WEBPACK_IMPORTED_MODULE_3__["ncp"]); - -async function statTest(path, block) { - try { - return block(await lstat(path)); - } catch (e) { - if (e.code === 'ENOENT') { - return false; - } - - throw e; - } -} -/** - * Test if a path points to a symlink. - * @param path - */ - - -async function isSymlink(path) { - return await statTest(path, stats => stats.isSymbolicLink()); -} -/** - * Test if a path points to a directory. - * @param path - */ - -async function isDirectory(path) { - return await statTest(path, stats => stats.isDirectory()); -} -/** - * Test if a path points to a regular file. - * @param path - */ - -async function isFile(path) { - return await statTest(path, stats => stats.isFile()); -} -/** - * Create a symlink at dest that points to src. Adapted from - * https://github.com/lerna/lerna/blob/2f1b87d9e2295f587e4ac74269f714271d8ed428/src/FileSystemUtilities.js#L103. - * - * @param src - * @param dest - * @param type 'dir', 'file', 'junction', or 'exec'. 'exec' on - * windows will use the `cmd-shim` module since symlinks can't be used - * for executable files on windows. - */ - -async function createSymlink(src, dest, type) { - if (process.platform === 'win32') { - if (type === 'exec') { - await cmdShim(src, dest); - } else { - await forceCreate(src, dest, type); - } - } else { - const posixType = type === 'exec' ? 'file' : type; - const relativeSource = Object(path__WEBPACK_IMPORTED_MODULE_4__["relative"])(Object(path__WEBPACK_IMPORTED_MODULE_4__["dirname"])(dest), src); - await forceCreate(relativeSource, dest, posixType); - } -} - -async function forceCreate(src, dest, type) { - try { - // If something exists at `dest` we need to remove it first. - await unlink(dest); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - await symlink(src, dest, type); -} - -async function tryRealpath(path) { - let calculatedPath = path; - - try { - calculatedPath = await realpathNative(path); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - return calculatedPath; -} - -/***/ }), - -/***/ "./src/utils/kibana.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Kibana; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fs"); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/multimatch/index.js"); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/is-path-inside/index.js"); -/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/yarn_lock.ts"); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/projects.ts"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/config.ts"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - -/** - * Helper class for dealing with a set of projects as children of - * the Kibana project. The kbn/pm is currently implemented to be - * more generic, where everything is an operation of generic projects, - * but that leads to exceptions where we need the kibana project and - * do things like `project.get('kibana')!`. - * - * Using this helper we can restructre the generic list of projects - * as a Kibana object which encapulates all the projects in the - * workspace and knows about the root Kibana project. - */ - -class Kibana { - static async loadFrom(rootPath) { - return new Kibana(await Object(_projects__WEBPACK_IMPORTED_MODULE_5__[/* getProjects */ "b"])(rootPath, Object(_config__WEBPACK_IMPORTED_MODULE_6__[/* getProjectPaths */ "a"])({ - rootPath - }))); - } - - constructor(allWorkspaceProjects) { - this.allWorkspaceProjects = allWorkspaceProjects; - - _defineProperty(this, "kibanaProject", void 0); - - const kibanaProject = allWorkspaceProjects.get('kibana'); - - if (!kibanaProject) { - throw new TypeError('Unable to create Kibana object without all projects, including the Kibana project.'); - } - - this.kibanaProject = kibanaProject; - } - /** make an absolute path by resolving subPath relative to the kibana repo */ - - - getAbsolute(...subPath) { - return path__WEBPACK_IMPORTED_MODULE_0___default.a.resolve(this.kibanaProject.path, ...subPath); - } - /** convert an absolute path to a relative path, relative to the kibana repo */ - - - getRelative(absolute) { - return path__WEBPACK_IMPORTED_MODULE_0___default.a.relative(this.kibanaProject.path, absolute); - } - /** get a copy of the map of all projects in the kibana workspace */ - - - getAllProjects() { - return new Map(this.allWorkspaceProjects); - } - /** determine if a project with the given name exists */ - - - hasProject(name) { - return this.allWorkspaceProjects.has(name); - } - /** get a specific project, throws if the name is not known (use hasProject() first) */ - - - getProject(name) { - const project = this.allWorkspaceProjects.get(name); - - if (!project) { - throw new Error(`No package with name "${name}" in the workspace`); - } - - return project; - } - /** get a project and all of the projects it depends on in a ProjectMap */ - - - getProjectAndDeps(name) { - const project = this.getProject(name); - return Object(_projects__WEBPACK_IMPORTED_MODULE_5__[/* includeTransitiveProjects */ "c"])([project], this.allWorkspaceProjects); - } - /** filter the projects to just those matching certain paths/include/exclude tags */ - - - getFilteredProjects(options) { - const allProjects = this.getAllProjects(); - const filteredProjects = new Map(); - const pkgJsonPaths = Array.from(allProjects.values()).map(p => p.packageJsonLocation); - const filteredPkgJsonGlobs = Object(_config__WEBPACK_IMPORTED_MODULE_6__[/* getProjectPaths */ "a"])(_objectSpread(_objectSpread({}, options), {}, { - rootPath: this.kibanaProject.path - })).map(g => path__WEBPACK_IMPORTED_MODULE_0___default.a.resolve(g, 'package.json')); - const matchingPkgJsonPaths = multimatch__WEBPACK_IMPORTED_MODULE_2___default()(pkgJsonPaths, filteredPkgJsonGlobs); - - for (const project of allProjects.values()) { - const pathMatches = matchingPkgJsonPaths.includes(project.packageJsonLocation); - const notExcluded = !options.exclude.includes(project.name); - const isIncluded = !options.include.length || options.include.includes(project.name); - - if (pathMatches && notExcluded && isIncluded) { - filteredProjects.set(project.name, project); - } - } - - return filteredProjects; - } - - isPartOfRepo(project) { - return project.path === this.kibanaProject.path || is_path_inside__WEBPACK_IMPORTED_MODULE_3___default()(project.path, this.kibanaProject.path); - } - - isOutsideRepo(project) { - return !this.isPartOfRepo(project); - } - - resolveAllProductionDependencies(yarnLock, log) { - const kibanaDeps = Object(_yarn_lock__WEBPACK_IMPORTED_MODULE_4__[/* resolveDepsForProject */ "b"])({ - project: this.kibanaProject, - yarnLock, - kbn: this, - includeDependentProject: true, - productionDepsOnly: true, - log - }); - const xpackDeps = Object(_yarn_lock__WEBPACK_IMPORTED_MODULE_4__[/* resolveDepsForProject */ "b"])({ - project: this.getProject('x-pack'), - yarnLock, - kbn: this, - includeDependentProject: true, - productionDepsOnly: true, - log - }); - return new Map([...kibanaDeps.entries(), ...xpackDeps.entries()]); - } - - getUuid() { - try { - return fs__WEBPACK_IMPORTED_MODULE_1___default.a.readFileSync(this.getAbsolute('data/uuid'), 'utf-8').trim(); - } catch (error) { - if (error.code === 'ENOENT') { - return undefined; - } - - throw error; - } - } - -} - -/***/ }), - -/***/ "./src/utils/link_project_executables.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return linkProjectExecutables; }); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/fs.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/log.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - -/** - * Yarn does not link the executables from dependencies that are installed - * using `link:` https://github.com/yarnpkg/yarn/pull/5046 - * - * We simulate this functionality by walking through each project's project - * dependencies, and manually linking their executables if defined. The logic - * for linking was mostly adapted from lerna: https://github.com/lerna/lerna/blob/1d7eb9eeff65d5a7de64dea73613b1bf6bfa8d57/src/PackageUtilities.js#L348 - */ -async function linkProjectExecutables(projectsByName, projectGraph) { - _log__WEBPACK_IMPORTED_MODULE_2__[/* log */ "a"].debug(`Linking package executables`); // Find root and generate executables from dependencies for it - - let rootProject = null; - let rootProjectDeps = []; - - for (const [projectName, projectDeps] of projectGraph) { - const project = projectsByName.get(projectName); - - if (project.isSinglePackageJsonProject) { - rootProject = projectsByName.get(projectName); - rootProjectDeps = projectDeps; - break; - } - } - - if (!rootProject) { - throw new Error('Could not finding root project while linking package executables'); - } // Prepare root project node_modules/.bin - - - const rootBinsDir = Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootProject.nodeModulesLocation, '.bin'); - - for (const rootProjectDep of rootProjectDeps) { - const executables = rootProjectDep.getExecutables(); - - for (const name of Object.keys(executables)) { - const srcPath = executables[name]; // existing logic from lerna -- ensure that the bin we are going to - // point to exists or ignore it - - if (!(await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* isFile */ "d"])(srcPath))) { - continue; - } - - const dest = Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootBinsDir, name); // Get relative project path with normalized path separators. - - const rootProjectRelativePath = Object(path__WEBPACK_IMPORTED_MODULE_0__["relative"])(rootProject.path, srcPath).split(path__WEBPACK_IMPORTED_MODULE_0__["sep"]).join('/'); - _log__WEBPACK_IMPORTED_MODULE_2__[/* log */ "a"].debug(`[${rootProject.name}] ${name} -> ${rootProjectRelativePath}`); - await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* mkdirp */ "e"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["dirname"])(dest)); - await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* createSymlink */ "b"])(srcPath, dest, 'exec'); - await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* chmod */ "a"])(dest, '755'); - } - } -} - -/***/ }), - -/***/ "./src/utils/log.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return log; }); -/* unused harmony export Log */ -/* harmony import */ var _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@kbn/tooling-log/target_node/index.js"); -/* harmony import */ var _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0__); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -class Log extends _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0__["ToolingLog"] { - constructor() { - super(); - - _defineProperty(this, "logLevel", void 0); - - this.setLogLevel('info'); - } - - setLogLevel(level) { - this.logLevel = Object(_kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0__["parseLogLevel"])(level); - this.setWriters([new _kbn_tooling_log__WEBPACK_IMPORTED_MODULE_0__["ToolingLogTextWriter"]({ - level: this.logLevel.name, - writeTo: process.stdout - })]); - } - - wouldLogLevel(level) { - return this.logLevel.flags[level]; - } - -} - -const log = new Log(); - - -/***/ }), - -/***/ "./src/utils/package_json.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return readPackageJson; }); -/* unused harmony export writePackageJson */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isLinkDependency; }); -/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/read-pkg/index.js"); -/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(read_pkg__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/write-pkg/index.js"); -/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(write_pkg__WEBPACK_IMPORTED_MODULE_1__); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -function readPackageJson(cwd) { - return read_pkg__WEBPACK_IMPORTED_MODULE_0___default()({ - cwd, - normalize: false - }); -} -function writePackageJson(path, json) { - return write_pkg__WEBPACK_IMPORTED_MODULE_1___default()(path, json); -} -const isLinkDependency = depVersion => depVersion.startsWith('link:'); - -/***/ }), - -/***/ "./src/utils/parallelize.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return parallelizeBatches; }); -/* unused harmony export parallelize */ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -async function parallelizeBatches(batches, fn) { - for (const batch of batches) { - // We need to make sure the entire batch has completed before we can move on - // to the next batch - await parallelize(batch, fn); - } -} -async function parallelize(items, fn, concurrency = 4) { - if (items.length === 0) { - return; - } - - return new Promise((resolve, reject) => { - let activePromises = 0; - const values = items.slice(0); - - async function scheduleItem(item) { - activePromises++; - - try { - await fn(item); - activePromises--; - - if (values.length > 0) { - // We have more work to do, so we schedule the next promise - scheduleItem(values.shift()); - } else if (activePromises === 0) { - // We have no more values left, and all items have completed, so we've - // completed all the work. - resolve(); - } - } catch (error) { - reject(error); - } - } - - values.splice(0, concurrency).map(scheduleItem); - }); -} - -/***/ }), - -/***/ "./src/utils/project.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Project; }); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs"); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("util"); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/errors.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/package_json.ts"); -/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/scripts.ts"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - - -class Project { - static async fromPath(path) { - const pkgJson = await Object(_package_json__WEBPACK_IMPORTED_MODULE_5__[/* readPackageJson */ "b"])(path); - return new Project(pkgJson, path); - } - /** parsed package.json */ - - - constructor(packageJson, projectPath) { - _defineProperty(this, "json", void 0); - - _defineProperty(this, "packageJsonLocation", void 0); - - _defineProperty(this, "nodeModulesLocation", void 0); - - _defineProperty(this, "targetLocation", void 0); - - _defineProperty(this, "path", void 0); - - _defineProperty(this, "version", void 0); - - _defineProperty(this, "allDependencies", void 0); - - _defineProperty(this, "productionDependencies", void 0); - - _defineProperty(this, "devDependencies", void 0); - - _defineProperty(this, "scripts", void 0); - - _defineProperty(this, "bazelPackage", void 0); - - _defineProperty(this, "isSinglePackageJsonProject", false); - - this.json = Object.freeze(packageJson); - this.path = projectPath; - this.packageJsonLocation = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, 'package.json'); - this.nodeModulesLocation = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, 'node_modules'); - this.targetLocation = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, 'target'); - this.version = this.json.version; - this.productionDependencies = this.json.dependencies || {}; - this.devDependencies = this.json.devDependencies || {}; - this.allDependencies = _objectSpread(_objectSpread({}, this.devDependencies), this.productionDependencies); - this.isSinglePackageJsonProject = this.json.name === 'kibana'; - this.scripts = this.json.scripts || {}; - this.bazelPackage = !this.isSinglePackageJsonProject && fs__WEBPACK_IMPORTED_MODULE_0___default.a.existsSync(path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, 'BUILD.bazel')); - } - - get name() { - return this.json.name; - } - - getBuildConfig() { - return this.json.kibana && this.json.kibana.build || {}; - } - - getCleanConfig() { - return this.json.kibana && this.json.kibana.clean || {}; - } - - isBazelPackage() { - return this.bazelPackage; - } - - isFlaggedAsDevOnly() { - return !!(this.json.kibana && this.json.kibana.devOnly); - } - - hasScript(name) { - return name in this.scripts; - } - - getExecutables() { - const raw = this.json.bin; - - if (!raw) { - return {}; - } - - if (typeof raw === 'string') { - return { - [this.name]: path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, raw) - }; - } - - if (typeof raw === 'object') { - const binsConfig = {}; - - for (const binName of Object.keys(raw)) { - binsConfig[binName] = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(this.path, raw[binName]); - } - - return binsConfig; - } - - throw new _errors__WEBPACK_IMPORTED_MODULE_3__[/* CliError */ "a"](`[${this.name}] has an invalid "bin" field in its package.json, ` + `expected an object or a string`, { - binConfig: Object(util__WEBPACK_IMPORTED_MODULE_2__["inspect"])(raw), - package: `${this.name} (${this.packageJsonLocation})` - }); - } - - async runScript(scriptName, args = []) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].info(`Running script [${scriptName}] in [${this.name}]:`); - return Object(_scripts__WEBPACK_IMPORTED_MODULE_6__[/* runScriptInPackage */ "a"])(scriptName, args, this); - } - - runScriptStreaming(scriptName, options = {}) { - return Object(_scripts__WEBPACK_IMPORTED_MODULE_6__[/* runScriptInPackageStreaming */ "b"])({ - script: scriptName, - args: options.args || [], - pkg: this, - debug: options.debug - }); - } - - hasDependencies() { - return Object.keys(this.allDependencies).length > 0; - } - - isEveryDependencyLocal() { - return Object.values(this.allDependencies).every(dep => Object(_package_json__WEBPACK_IMPORTED_MODULE_5__[/* isLinkDependency */ "a"])(dep)); - } - -} - -/***/ }), - -/***/ "./src/utils/projects.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getProjects; }); -/* unused harmony export getNonBazelProjectsOnly */ -/* unused harmony export getBazelProjectsOnly */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buildProjectGraph; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return topologicallyBatchProjects; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return includeTransitiveProjects; }); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/glob/glob.js"); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(glob__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("util"); -/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/errors.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/project.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - - - -const glob = Object(util__WEBPACK_IMPORTED_MODULE_2__["promisify"])(glob__WEBPACK_IMPORTED_MODULE_0___default.a); -/** a Map of project names to Project instances */ - -async function getProjects(rootPath, projectsPathsPatterns, { - include = [], - exclude = [] -} = {}, bazelOnly = false) { - const projects = new Map(); - - for (const pattern of projectsPathsPatterns) { - const pathsToProcess = await packagesFromGlobPattern({ - pattern, - rootPath - }); - - for (const filePath of pathsToProcess) { - const projectConfigPath = normalize(filePath); - const projectDir = path__WEBPACK_IMPORTED_MODULE_1___default.a.dirname(projectConfigPath); - const project = await _project__WEBPACK_IMPORTED_MODULE_5__[/* Project */ "a"].fromPath(projectDir); - const excludeProject = exclude.includes(project.name) || include.length > 0 && !include.includes(project.name) || bazelOnly && !project.isBazelPackage(); - - if (excludeProject) { - continue; - } - - if (projects.has(project.name)) { - throw new _errors__WEBPACK_IMPORTED_MODULE_3__[/* CliError */ "a"](`There are multiple projects with the same name [${project.name}]`, { - name: project.name, - paths: [project.path, projects.get(project.name).path] - }); - } - - projects.set(project.name, project); - } - } - - return projects; -} -async function getNonBazelProjectsOnly(projects) { - const bazelProjectsOnly = new Map(); - - for (const project of projects.values()) { - if (!project.isBazelPackage()) { - bazelProjectsOnly.set(project.name, project); - } - } - - return bazelProjectsOnly; -} -async function getBazelProjectsOnly(projects) { - const bazelProjectsOnly = new Map(); - - for (const project of projects.values()) { - if (project.isBazelPackage()) { - bazelProjectsOnly.set(project.name, project); - } - } - - return bazelProjectsOnly; -} - -function packagesFromGlobPattern({ - pattern, - rootPath -}) { - const globOptions = { - cwd: rootPath, - // Should throw in case of unusual errors when reading the file system - strict: true, - // Always returns absolute paths for matched files - absolute: true, - // Do not match ** against multiple filenames - // (This is only specified because we currently don't have a need for it.) - noglobstar: true - }; - return glob(path__WEBPACK_IMPORTED_MODULE_1___default.a.join(pattern, 'package.json'), globOptions); -} // https://github.com/isaacs/node-glob/blob/master/common.js#L104 -// glob always returns "\\" as "/" in windows, so everyone -// gets normalized because we can't have nice things. - - -function normalize(dir) { - return path__WEBPACK_IMPORTED_MODULE_1___default.a.normalize(dir); -} - -function buildProjectGraph(projects) { - const projectGraph = new Map(); - - for (const project of projects.values()) { - const projectDeps = []; - const dependencies = project.allDependencies; - - if (!project.isSinglePackageJsonProject && Object.keys(dependencies).length > 0) { - _log__WEBPACK_IMPORTED_MODULE_4__[/* log */ "a"].warning(`${project.name} is not allowed to hold local dependencies and they will be discarded. Please declare them at the root package.json`); - } - - if (!project.isSinglePackageJsonProject) { - projectGraph.set(project.name, projectDeps); - continue; - } - - for (const depName of Object.keys(dependencies)) { - if (projects.has(depName)) { - const dep = projects.get(depName); - projectDeps.push(dep); - } - } - - projectGraph.set(project.name, projectDeps); - } - - return projectGraph; -} -function topologicallyBatchProjects(projectsToBatch, projectGraph) { - // We're going to be chopping stuff out of this list, so copy it. - const projectsLeftToBatch = new Set(projectsToBatch.keys()); - const batches = []; - - while (projectsLeftToBatch.size > 0) { - // Get all projects that have no remaining dependencies within the repo - // that haven't yet been picked. - const batch = []; - - for (const projectName of projectsLeftToBatch) { - const projectDeps = projectGraph.get(projectName); - const needsDependenciesBatched = projectDeps.some(dep => projectsLeftToBatch.has(dep.name)); - - if (!needsDependenciesBatched) { - batch.push(projectsToBatch.get(projectName)); - } - } // If we weren't able to find a project with no remaining dependencies, - // then we've encountered a cycle in the dependency graph. - - - const hasCycles = batch.length === 0; - - if (hasCycles) { - const cycleProjectNames = [...projectsLeftToBatch]; - const message = 'Encountered a cycle in the dependency graph. Projects in cycle are:\n' + cycleProjectNames.join(', '); - throw new _errors__WEBPACK_IMPORTED_MODULE_3__[/* CliError */ "a"](message); - } - - batches.push(batch); - batch.forEach(project => projectsLeftToBatch.delete(project.name)); - } - - return batches; -} -function includeTransitiveProjects(subsetOfProjects, allProjects, { - onlyProductionDependencies = false -} = {}) { - const projectsWithDependents = new Map(); // the current list of packages we are expanding using breadth-first-search - - const toProcess = [...subsetOfProjects]; - - while (toProcess.length > 0) { - const project = toProcess.shift(); - const dependencies = onlyProductionDependencies ? project.productionDependencies : project.allDependencies; - Object.keys(dependencies).forEach(dep => { - if (allProjects.has(dep)) { - toProcess.push(allProjects.get(dep)); - } - }); - projectsWithDependents.set(project.name, project); - } - - return projectsWithDependents; -} - -/***/ }), - -/***/ "./src/utils/projects_tree.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return renderProjectsTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return treeToString; }); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/chalk/source/index.js"); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - -const projectKey = Symbol('__project'); -function renderProjectsTree(rootPath, projects) { - const projectsTree = buildProjectsTree(rootPath, projects); - return treeToString(createTreeStructure(projectsTree)); -} -function treeToString(tree) { - return [tree.name].concat(childrenToStrings(tree.children, '')).join('\n'); -} - -function childrenToStrings(tree, treePrefix) { - if (tree === undefined) { - return []; - } - - let strings = []; - tree.forEach((node, index) => { - const isLastNode = tree.length - 1 === index; - const nodePrefix = isLastNode ? '└── ' : '├── '; - const childPrefix = isLastNode ? ' ' : '│ '; - const childrenPrefix = treePrefix + childPrefix; - strings.push(`${treePrefix}${nodePrefix}${node.name}`); - strings = strings.concat(childrenToStrings(node.children, childrenPrefix)); - }); - return strings; -} - -function createTreeStructure(tree) { - let name; - const children = []; - - for (const [dir, project] of tree.entries()) { - // This is a leaf node (aka a project) - if (typeof project === 'string') { - name = chalk__WEBPACK_IMPORTED_MODULE_0___default.a.green(project); - continue; - } // If there's only one project and the key indicates it's a leaf node, we - // know that we're at a package folder that contains a package.json, so we - // "inline it" so we don't get unnecessary levels, i.e. we'll just see - // `foo` instead of `foo -> foo`. - - - if (project.size === 1 && project.has(projectKey)) { - const projectName = project.get(projectKey); - children.push({ - children: [], - name: dirOrProjectName(dir, projectName) - }); - continue; - } - - const subtree = createTreeStructure(project); // If the name is specified, we know there's a package at the "root" of the - // subtree itself. - - if (subtree.name !== undefined) { - const projectName = subtree.name; - children.push({ - children: subtree.children, - name: dirOrProjectName(dir, projectName) - }); - continue; - } // Special-case whenever we have one child, so we don't get unnecessary - // folders in the output. E.g. instead of `foo -> bar -> baz` we get - // `foo/bar/baz` instead. - - - if (subtree.children && subtree.children.length === 1) { - const child = subtree.children[0]; - const newName = chalk__WEBPACK_IMPORTED_MODULE_0___default.a.dim(path__WEBPACK_IMPORTED_MODULE_1___default.a.join(dir.toString(), child.name)); - children.push({ - children: child.children, - name: newName - }); - continue; - } - - children.push({ - children: subtree.children, - name: chalk__WEBPACK_IMPORTED_MODULE_0___default.a.dim(dir.toString()) - }); - } - - return { - name, - children - }; -} - -function dirOrProjectName(dir, projectName) { - return dir === projectName ? chalk__WEBPACK_IMPORTED_MODULE_0___default.a.green(dir) : chalk__WEBPACK_IMPORTED_MODULE_0___default.a`{dim ${dir.toString()} ({reset.green ${projectName}})}`; -} - -function buildProjectsTree(rootPath, projects) { - const tree = new Map(); - - for (const project of projects.values()) { - if (rootPath === project.path) { - tree.set(projectKey, project.name); - } else { - const relativeProjectPath = path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(rootPath, project.path); - addProjectToTree(tree, relativeProjectPath.split(path__WEBPACK_IMPORTED_MODULE_1___default.a.sep), project); - } - } - - return tree; -} - -function addProjectToTree(tree, pathParts, project) { - if (pathParts.length === 0) { - tree.set(projectKey, project.name); - } else { - const [currentDir, ...rest] = pathParts; - - if (!tree.has(currentDir)) { - tree.set(currentDir, new Map()); - } - - const subtree = tree.get(currentDir); - addProjectToTree(subtree, rest, project); - } -} - -/***/ }), - -/***/ "./src/utils/regenerate_base_tsconfig.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return regenerateBaseTsconfig; }); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs/promises"); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var normalize_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/normalize-path/index.js"); -/* harmony import */ var normalize_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(normalize_path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _convert_plugin_id_to_package_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/convert_plugin_id_to_package_id.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - -async function regenerateBaseTsconfig(plugins, repoRoot) { - const tsconfigPath = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(repoRoot, 'tsconfig.base.json'); - const lines = (await fs_promises__WEBPACK_IMPORTED_MODULE_0___default.a.readFile(tsconfigPath, 'utf-8')).split('\n'); - const packageMap = plugins.slice().sort((a, b) => a.manifestPath.localeCompare(b.manifestPath)).flatMap(p => { - const id = Object(_convert_plugin_id_to_package_id__WEBPACK_IMPORTED_MODULE_3__[/* convertPluginIdToPackageId */ "a"])(p.manifest.id); - const path = normalize_path__WEBPACK_IMPORTED_MODULE_2___default()(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(repoRoot, p.directory)); - return [` "${id}": ["${path}"],`, ` "${id}/*": ["${path}/*"],`]; - }); - const start = lines.findIndex(l => l.trim() === '// START AUTOMATED PACKAGE LISTING'); - const end = lines.findIndex(l => l.trim() === '// END AUTOMATED PACKAGE LISTING'); - await fs_promises__WEBPACK_IMPORTED_MODULE_0___default.a.writeFile(tsconfigPath, [...lines.slice(0, start + 1), ...packageMap, ...lines.slice(end)].join('\n')); -} - -/***/ }), - -/***/ "./src/utils/regenerate_package_json.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return regeneratePackageJson; }); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs/promises"); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _kbn_sort_package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/@kbn/sort-package-json/target_node/index.js"); -/* harmony import */ var _kbn_sort_package_json__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kbn_sort_package_json__WEBPACK_IMPORTED_MODULE_2__); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - -async function regeneratePackageJson(rootPath) { - const path = path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(rootPath, 'package.json'); - const json = await fs_promises__WEBPACK_IMPORTED_MODULE_0___default.a.readFile(path, 'utf8'); - await fs_promises__WEBPACK_IMPORTED_MODULE_0___default.a.writeFile(path, Object(_kbn_sort_package_json__WEBPACK_IMPORTED_MODULE_2__["sortPackageJson"])(json)); -} - -/***/ }), - -/***/ "./src/utils/regenerate_synthetic_package_map.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return regenerateSyntheticPackageMap; }); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs/promises"); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var normalize_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/normalize-path/index.js"); -/* harmony import */ var normalize_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(normalize_path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _convert_plugin_id_to_package_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/convert_plugin_id_to_package_id.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - - - - -async function regenerateSyntheticPackageMap(plugins, repoRoot) { - const entries = [['@kbn/core', 'src/core']]; - - for (const plugin of plugins) { - entries.push([Object(_convert_plugin_id_to_package_id__WEBPACK_IMPORTED_MODULE_3__[/* convertPluginIdToPackageId */ "a"])(plugin.manifest.id), normalize_path__WEBPACK_IMPORTED_MODULE_2___default()(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(repoRoot, plugin.directory))]); - } - - await fs_promises__WEBPACK_IMPORTED_MODULE_0___default.a.writeFile(path__WEBPACK_IMPORTED_MODULE_1___default.a.resolve(repoRoot, 'packages/kbn-synthetic-package-map/synthetic-packages.json'), JSON.stringify(entries, null, 2)); -} - -/***/ }), - -/***/ "./src/utils/scripts.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return runScriptInPackage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return runScriptInPackageStreaming; }); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/child_process.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -const YARN_EXEC = process.env.npm_execpath || 'yarn'; -/** - * Run script in the given directory - */ - -async function runScriptInPackage(script, args, pkg) { - const execOpts = { - cwd: pkg.path - }; - await Object(_child_process__WEBPACK_IMPORTED_MODULE_0__[/* spawn */ "a"])(YARN_EXEC, ['run', script, ...args], execOpts); -} -/** - * Run script in the given directory - */ - -function runScriptInPackageStreaming({ - script, - args, - pkg, - debug -}) { - const execOpts = { - cwd: pkg.path - }; - return Object(_child_process__WEBPACK_IMPORTED_MODULE_0__[/* spawnStreaming */ "b"])(YARN_EXEC, ['run', script, ...args], execOpts, { - prefix: pkg.name, - debug - }); -} - -/***/ }), - -/***/ "./src/utils/validate_dependencies.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return validateDependencies; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@yarnpkg/lockfile/index.js"); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/dedent/dist/dedent.js"); -/* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/chalk/source/index.js"); -/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/utils/fs.ts"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/utils/log.ts"); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/package_json.ts"); -/* harmony import */ var _projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/utils/projects_tree.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -// @ts-expect-error published types are useless - - - - - - - - -async function validateDependencies(kbn, yarnLock) { - // look through all of the packages in the yarn.lock file to see if - // we have accidentally installed multiple lodash v4 versions - const lodash4Versions = new Set(); - const lodash4Reqs = new Set(); - - for (const [req, dep] of Object.entries(yarnLock)) { - if (req.startsWith('lodash@') && dep.version.startsWith('4.')) { - lodash4Reqs.add(req); - lodash4Versions.add(dep.version); - } - } // if we find more than one lodash v4 version installed then delete - // lodash v4 requests from the yarn.lock file and prompt the user to - // retry bootstrap so that a single v4 version will be installed - - - if (lodash4Versions.size > 1) { - for (const req of lodash4Reqs) { - delete yarnLock[req]; - } - - await Object(_fs__WEBPACK_IMPORTED_MODULE_4__[/* writeFile */ "i"])(kbn.getAbsolute('yarn.lock'), Object(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__["stringify"])(yarnLock), 'utf8'); - _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"].error(dedent__WEBPACK_IMPORTED_MODULE_1___default.a` - - Multiple version of lodash v4 were detected, so they have been removed - from the yarn.lock file. Please rerun yarn kbn bootstrap to coalese the - lodash versions installed. - - If you still see this error when you re-bootstrap then you might need - to force a new dependency to use the latest version of lodash via the - "resolutions" field in package.json. - - If you have questions about this please reach out to the operations team. - - `); - process.exit(1); - } // look through all the dependencies of production packages and production - // dependencies of those packages to determine if we're shipping any versions - // of lodash v3 in the distributable - - - const prodDependencies = kbn.resolveAllProductionDependencies(yarnLock, _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"]); - const lodash3Versions = new Set(); - - for (const dep of prodDependencies.values()) { - if (dep.name === 'lodash' && dep.version.startsWith('3.')) { - lodash3Versions.add(dep.version); - } - } // if any lodash v3 packages were found we abort and tell the user to fix things - - - if (lodash3Versions.size) { - _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"].error(dedent__WEBPACK_IMPORTED_MODULE_1___default.a` - - Due to changes in the yarn.lock file and/or package.json files a version of - lodash 3 is now included in the production dependencies. To reduce the size of - our distributable and especially our front-end bundles we have decided to - prevent adding any new instances of lodash 3. - - Please inspect the changes to yarn.lock or package.json files to identify where - the lodash 3 version is coming from and remove it. - - If you have questions about this please reack out to the operations team. - - `); - process.exit(1); - } // TODO: remove this once we move into a single package.json - // look through all the package.json files to find packages which have mismatched version ranges - - - const depRanges = new Map(); - - for (const project of kbn.getAllProjects().values()) { - var _kbn$kibanaProject; - - // Skip if this is an external plugin - if (project.path.includes(`${(_kbn$kibanaProject = kbn.kibanaProject) === null || _kbn$kibanaProject === void 0 ? void 0 : _kbn$kibanaProject.path}${path__WEBPACK_IMPORTED_MODULE_3__["sep"]}plugins`)) { - continue; - } - - for (const [dep, range] of Object.entries(project.allDependencies)) { - const existingDep = depRanges.get(dep); - - if (!existingDep) { - depRanges.set(dep, [{ - range, - projects: [project] - }]); - continue; - } - - const existingRange = existingDep.find(existing => existing.range === range); - - if (!existingRange) { - existingDep.push({ - range, - projects: [project] - }); - continue; - } - - existingRange.projects.push(project); - } - } - - const duplicateRanges = Array.from(depRanges.entries()).filter(([, ranges]) => ranges.length > 1 && !ranges.every(rng => Object(_package_json__WEBPACK_IMPORTED_MODULE_6__[/* isLinkDependency */ "a"])(rng.range))).reduce((acc, [dep, ranges]) => [...acc, dep, ...ranges.map(({ - range, - projects - }) => ` ${range} => ${projects.map(p => p.name).join(', ')}`)], []).join('\n '); - - if (duplicateRanges) { - _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"].error(dedent__WEBPACK_IMPORTED_MODULE_1___default.a` - - [single_version_dependencies] Multiple version ranges for the same dependency - were found declared across different package.json files. Please consolidate - those to match across all package.json files. Different versions for the - same dependency is not supported. - - If you have questions about this please reach out to the operations team. - - The conflicting dependencies are: - - ${duplicateRanges} - `); - process.exit(1); - } // look for packages that have the the `kibana.devOnly` flag in their package.json - // and make sure they aren't included in the production dependencies of Kibana - - - const devOnlyProjectsInProduction = getDevOnlyProductionDepsTree(kbn, 'kibana'); - - if (devOnlyProjectsInProduction) { - _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"].error(dedent__WEBPACK_IMPORTED_MODULE_1___default.a` - Some of the packages in the production dependency chain for Kibana and X-Pack are - flagged with "kibana.devOnly" in their package.json. Please check changes made to - packages and their dependencies to ensure they don't end up in production. - - The devOnly dependencies that are being dependend on in production are: - - ${Object(_projects_tree__WEBPACK_IMPORTED_MODULE_7__[/* treeToString */ "b"])(devOnlyProjectsInProduction).split('\n').join('\n ')} - `); - process.exit(1); - } - - _log__WEBPACK_IMPORTED_MODULE_5__[/* log */ "a"].success('yarn.lock analysis completed without any issues'); -} - -function getDevOnlyProductionDepsTree(kbn, projectName) { - const project = kbn.getProject(projectName); - const childProjectNames = [...Object.keys(project.productionDependencies).filter(name => kbn.hasProject(name)), ...(projectName === 'kibana' ? ['x-pack'] : [])]; - const children = childProjectNames.map(n => getDevOnlyProductionDepsTree(kbn, n)).filter(t => !!t); - - if (!children.length && !project.isFlaggedAsDevOnly()) { - return; - } - - const tree = { - name: project.isFlaggedAsDevOnly() ? chalk__WEBPACK_IMPORTED_MODULE_2___default.a.red.bold(projectName) : projectName, - children - }; - return tree; -} - -/***/ }), - -/***/ "./src/utils/yarn_lock.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return readYarnLock; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return resolveDepsForProject; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/@yarnpkg/lockfile/index.js"); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/fs.ts"); -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ -// @ts-expect-error published types are worthless - - -async function readYarnLock(kbn) { - try { - const contents = await Object(_fs__WEBPACK_IMPORTED_MODULE_1__[/* readFile */ "f"])(kbn.getAbsolute('yarn.lock'), 'utf8'); - const yarnLock = Object(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__["parse"])(contents); - - if (yarnLock.type === 'success') { - return yarnLock.object; - } - - throw new Error('unable to read yarn.lock file, please run `yarn kbn bootstrap`'); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - return {}; -} -/** - * Get a list of the absolute dependencies of this project, as resolved - * in the yarn.lock file, does not include other projects in the workspace - * or their dependencies - */ - -function resolveDepsForProject({ - project: rootProject, - yarnLock, - kbn, - log, - productionDepsOnly, - includeDependentProject -}) { - /** map of [name@range, { name, version }] */ - const resolved = new Map(); - const seenProjects = new Set(); - const projectQueue = [rootProject]; - const depQueue = []; - - while (projectQueue.length) { - const project = projectQueue.shift(); - - if (seenProjects.has(project)) { - continue; - } - - seenProjects.add(project); - const projectDeps = Object.entries(productionDepsOnly ? project.productionDependencies : project.allDependencies); - - for (const [name, versionRange] of projectDeps) { - depQueue.push([name, versionRange]); - } - - while (depQueue.length) { - const [name, versionRange] = depQueue.shift(); - const req = `${name}@${versionRange}`; - - if (resolved.has(req)) { - continue; - } - - if (includeDependentProject && kbn.hasProject(name)) { - projectQueue.push(kbn.getProject(name)); - } - - if (!kbn.hasProject(name)) { - const pkg = yarnLock[req]; - - if (!pkg) { - log.warning('yarn.lock file is out of date, please run `yarn kbn bootstrap` to re-enable caching'); - return; - } - - resolved.set(req, { - name, - version: pkg.version - }); - const allDepsEntries = [...Object.entries(pkg.dependencies || {}), ...Object.entries(pkg.optionalDependencies || {})]; - - for (const [childName, childVersionRange] of allDepsEntries) { - depQueue.push([childName, childVersionRange]); - } - } - } - } - - return resolved; -} - -/***/ }), - -/***/ "assert": -/***/ (function(module, exports) { - -module.exports = require("assert"); - -/***/ }), - -/***/ "buffer": -/***/ (function(module, exports) { - -module.exports = require("buffer"); - -/***/ }), - -/***/ "child_process": -/***/ (function(module, exports) { - -module.exports = require("child_process"); - -/***/ }), - -/***/ "constants": -/***/ (function(module, exports) { - -module.exports = require("constants"); - -/***/ }), - -/***/ "crypto": -/***/ (function(module, exports) { - -module.exports = require("crypto"); - -/***/ }), - -/***/ "events": -/***/ (function(module, exports) { - -module.exports = require("events"); - -/***/ }), - -/***/ "fs": -/***/ (function(module, exports) { - -module.exports = require("fs"); - -/***/ }), - -/***/ "fs/promises": -/***/ (function(module, exports) { - -module.exports = require("fs/promises"); - -/***/ }), - -/***/ "http": -/***/ (function(module, exports) { - -module.exports = require("http"); - -/***/ }), - -/***/ "https": -/***/ (function(module, exports) { - -module.exports = require("https"); - -/***/ }), - -/***/ "net": -/***/ (function(module, exports) { - -module.exports = require("net"); - -/***/ }), - -/***/ "os": -/***/ (function(module, exports) { - -module.exports = require("os"); - -/***/ }), - -/***/ "path": -/***/ (function(module, exports) { - -module.exports = require("path"); - -/***/ }), - -/***/ "readline": -/***/ (function(module, exports) { - -module.exports = require("readline"); - -/***/ }), - -/***/ "stream": -/***/ (function(module, exports) { - -module.exports = require("stream"); - -/***/ }), - -/***/ "string_decoder": -/***/ (function(module, exports) { - -module.exports = require("string_decoder"); - -/***/ }), - -/***/ "tty": -/***/ (function(module, exports) { - -module.exports = require("tty"); - -/***/ }), - -/***/ "url": -/***/ (function(module, exports) { - -module.exports = require("url"); - -/***/ }), - -/***/ "util": -/***/ (function(module, exports) { - -module.exports = require("util"); - -/***/ }), - -/***/ "worker_threads": -/***/ (function(module, exports) { - -module.exports = require(undefined); - -/***/ }), - -/***/ "zlib": -/***/ (function(module, exports) { - -module.exports = require("zlib"); - -/***/ }) - -/******/ }); \ No newline at end of file diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json deleted file mode 100644 index 72061c9625b09..0000000000000 --- a/packages/kbn-pm/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@kbn/pm", - "main": "./dist/index.js", - "version": "1.0.0", - "license": "SSPL-1.0 OR Elastic License 2.0", - "private": true, - "kibana": { - "devOnly": true - }, - "scripts": { - "build": "../../node_modules/.bin/webpack", - "kbn:watch": "../../node_modules/.bin/webpack --watch", - "prettier": "../../node_modules/.bin/prettier --write './src/**/*.ts'" - } -} \ No newline at end of file diff --git a/packages/kbn-pm/src/__snapshots__/run.test.ts.snap b/packages/kbn-pm/src/__snapshots__/run.test.ts.snap deleted file mode 100644 index 28e1b98e0fcd9..0000000000000 --- a/packages/kbn-pm/src/__snapshots__/run.test.ts.snap +++ /dev/null @@ -1,97 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`excludes project if single \`exclude\` filter is specified 1`] = ` -Object { - "graph": Object { - "bar": Array [], - "baz": Array [], - "kibana": Array [], - "quux": Array [], - "with-additional-projects": Array [], - }, - "projects": Array [ - "bar", - "baz", - "kibana", - "quux", - "with-additional-projects", - ], -} -`; - -exports[`excludes projects if multiple \`exclude\` filter are specified 1`] = ` -Object { - "graph": Object { - "kibana": Array [], - "quux": Array [], - "with-additional-projects": Array [], - }, - "projects": Array [ - "kibana", - "quux", - "with-additional-projects", - ], -} -`; - -exports[`includes only projects specified in multiple \`include\` filters 1`] = ` -Object { - "graph": Object { - "bar": Array [], - "baz": Array [], - "foo": Array [], - }, - "projects": Array [ - "bar", - "baz", - "foo", - ], -} -`; - -exports[`includes single project if single \`include\` filter is specified 1`] = ` -Object { - "graph": Object { - "foo": Array [], - }, - "projects": Array [ - "foo", - ], -} -`; - -exports[`passes all found projects to the command if no filter is specified 1`] = ` -Object { - "graph": Object { - "bar": Array [], - "baz": Array [], - "foo": Array [], - "kibana": Array [ - "foo", - ], - "quux": Array [], - "with-additional-projects": Array [], - }, - "projects": Array [ - "bar", - "baz", - "foo", - "kibana", - "quux", - "with-additional-projects", - ], -} -`; - -exports[`respects both \`include\` and \`exclude\` filters if specified at the same time 1`] = ` -Object { - "graph": Object { - "baz": Array [], - "foo": Array [], - }, - "projects": Array [ - "baz", - "foo", - ], -} -`; diff --git a/packages/kbn-pm/src/cli.ts b/packages/kbn-pm/src/cli.ts deleted file mode 100644 index 8b313be500841..0000000000000 --- a/packages/kbn-pm/src/cli.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import dedent from 'dedent'; -import getopts from 'getopts'; -import { resolve } from 'path'; -import { pickLevelFromFlags } from '@kbn/tooling-log'; - -import { commands } from './commands'; -import { runCommand } from './run'; -import { log } from './utils/log'; - -function help() { - log.info( - dedent` - usage: kbn [] - - By default commands are run for Kibana itself, all packages in the 'packages/' - folder and for all plugins in './plugins' and '../kibana-extra'. - - Available commands: - - ${Object.values(commands) - .map((command) => `${command.name} - ${command.description}`) - .join('\n ')} - - Global options: - - -e, --exclude Exclude specified project. Can be specified multiple times to exclude multiple projects, e.g. '-e kibana -e @kbn/pm'. - -i, --include Include only specified projects. If left unspecified, it defaults to including all projects. - --oss Do not include the x-pack when running command. - --skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command. - --no-cache Disable the kbn packages bootstrap cache - --no-validate Disable the bootstrap yarn.lock validation - --force-install Forces yarn install to run on bootstrap - --offline Run in offline mode - --verbose Set log level to verbose - --debug Set log level to debug - --quiet Set log level to error - --silent Disable log output - - "run" options: - --skip-missing Ignore packages which don't have the requested script - ` + '\n' - ); -} - -export async function run(argv: string[]) { - log.setLogLevel( - pickLevelFromFlags( - getopts(argv, { - boolean: ['verbose', 'debug', 'quiet', 'silent', 'skip-missing'], - }) - ) - ); - - // We can simplify this setup (and remove this extra handling) once Yarn - // starts forwarding the `--` directly to this script, see - // https://github.com/yarnpkg/yarn/blob/b2d3e1a8fe45ef376b716d597cc79b38702a9320/src/cli/index.js#L174-L182 - if (argv.includes('--')) { - log.error(`Using "--" is not allowed, as it doesn't work with 'yarn kbn'.`); - process.exit(1); - } - - const options = getopts(argv, { - alias: { - e: 'exclude', - h: 'help', - i: 'include', - }, - default: { - cache: true, - 'force-install': false, - offline: false, - validate: true, - }, - boolean: ['cache', 'force-install', 'offline', 'validate'], - }); - - const args = options._; - - if (options.help || args.length === 0) { - help(); - return; - } - - // This `rootPath` is relative to `./dist/` as that's the location of the - // built version of this tool. - const rootPath = resolve(__dirname, '../../../'); - - const commandName = args[0]; - const extraArgs = args.slice(1); - - const commandOptions = { options, extraArgs, rootPath }; - - const command = commands[commandName]; - if (command === undefined) { - log.error(`[${commandName}] is not a valid command, see 'kbn --help'`); - process.exit(1); - } - - await runCommand(command, commandOptions); -} diff --git a/packages/kbn-pm/src/commands/bootstrap.ts b/packages/kbn-pm/src/commands/bootstrap.ts deleted file mode 100644 index 8ac55b3478363..0000000000000 --- a/packages/kbn-pm/src/commands/bootstrap.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import Path from 'path'; -import { CiStatsReporter } from '@kbn/ci-stats-reporter'; -import { runBazel } from '@kbn/bazel-runner'; - -import { log } from '../utils/log'; -import { spawnStreaming } from '../utils/child_process'; -import { linkProjectExecutables } from '../utils/link_project_executables'; -import { ICommand } from '.'; -import { readYarnLock } from '../utils/yarn_lock'; -import { validateDependencies } from '../utils/validate_dependencies'; -import { - installBazelTools, - haveNodeModulesBeenManuallyDeleted, - removeYarnIntegrityFileIfExists, -} from '../utils/bazel'; -import { setupRemoteCache } from '../utils/bazel/setup_remote_cache'; - -export const BootstrapCommand: ICommand = { - description: 'Install dependencies and crosslink projects', - name: 'bootstrap', - - reportTiming: { - group: 'scripts/kbn bootstrap', - id: 'total', - }, - - async run(projects, projectGraph, { options, kbn, rootPath }) { - const kibanaProjectPath = projects.get('kibana')?.path || ''; - const offline = options?.offline === true; - const reporter = CiStatsReporter.fromEnv(log); - - const timings: Array<{ id: string; ms: number }> = []; - const time = async (id: string, body: () => Promise): Promise => { - const start = Date.now(); - try { - return await body(); - } finally { - timings.push({ - id, - ms: Date.now() - start, - }); - } - }; - - // Force install is set in case a flag is passed into yarn kbn bootstrap or - // our custom logic have determined there is a chance node_modules have been manually deleted and as such bazel - // tracking mechanism is no longer valid - const forceInstall = - (!!options && options['force-install'] === true) || - (await haveNodeModulesBeenManuallyDeleted(kibanaProjectPath)); - - // Install bazel machinery tools if needed - await installBazelTools(rootPath); - - // Setup remote cache settings in .bazelrc.cache if needed - await setupRemoteCache(rootPath); - - // Bootstrap process for Bazel packages - // Bazel is now managing dependencies so yarn install - // will happen as part of this - // - // NOTE: Bazel projects will be introduced incrementally - // And should begin from the ones with none dependencies forward. - // That way non bazel projects could depend on bazel projects but not the other way around - // That is only intended during the migration process while non Bazel projects are not removed at all. - // - - if (forceInstall) { - await time('force install dependencies', async () => { - await removeYarnIntegrityFileIfExists(Path.resolve(kibanaProjectPath, 'node_modules')); - await runBazel({ - bazelArgs: ['clean', '--expunge'], - log, - }); - await runBazel({ - bazelArgs: ['run', '@nodejs//:yarn'], - offline, - log, - execaOpts: { - env: { - SASS_BINARY_SITE: - 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass', - RE2_DOWNLOAD_MIRROR: - 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2', - }, - }, - }); - }); - } - - // build packages - await time('build packages', async () => { - await runBazel({ - bazelArgs: ['build', '//packages:build', '--show_result=1'], - log, - offline, - }); - }); - - const yarnLock = await time('read yarn.lock', async () => await readYarnLock(kbn)); - - if (options.validate) { - await time('validate dependencies', async () => { - await validateDependencies(kbn, yarnLock); - }); - } - - // Assure all kbn projects with bin defined scripts - // copy those scripts into the top level node_modules folder - // - // NOTE: We don't probably need this anymore, is actually not being used - await time('link project executables', async () => { - await linkProjectExecutables(projects, projectGraph); - }); - - await time('update vscode config', async () => { - // Update vscode settings - await spawnStreaming( - process.execPath, - ['scripts/update_vscode_config'], - { - cwd: kbn.getAbsolute(), - env: process.env, - }, - { prefix: '[vscode]', debug: false } - ); - }); - - // send timings - await reporter.timings({ - upstreamBranch: kbn.kibanaProject.json.branch, - // prevent loading @kbn/utils by passing null - kibanaUuid: kbn.getUuid() || null, - timings: timings.map((t) => ({ - group: 'scripts/kbn bootstrap', - ...t, - })), - }); - }, -}; diff --git a/packages/kbn-pm/src/commands/build.ts b/packages/kbn-pm/src/commands/build.ts deleted file mode 100644 index 567b4addddee7..0000000000000 --- a/packages/kbn-pm/src/commands/build.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { runBazel } from '@kbn/bazel-runner'; -import { ICommand } from '.'; -import { log } from '../utils/log'; - -export const BuildCommand: ICommand = { - description: 'Runs a build in the Bazel built packages', - name: 'build', - - reportTiming: { - group: 'scripts/kbn build', - id: 'total', - }, - - async run(projects, projectGraph, { options }) { - // Call bazel with the target to build all available packages - await runBazel({ - bazelArgs: ['build', '//packages:build', '--show_result=1'], - log, - offline: options?.offline === true, - }); - }, -}; diff --git a/packages/kbn-pm/src/commands/clean.ts b/packages/kbn-pm/src/commands/clean.ts deleted file mode 100644 index 8f8564add2096..0000000000000 --- a/packages/kbn-pm/src/commands/clean.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import dedent from 'dedent'; -import del from 'del'; -import ora from 'ora'; -import { join, relative } from 'path'; -import { runBazel } from '@kbn/bazel-runner'; - -import { isBazelBinAvailable } from '../utils/bazel'; -import { isDirectory } from '../utils/fs'; -import { log } from '../utils/log'; -import { ICommand } from '.'; - -export const CleanCommand: ICommand = { - description: 'Deletes output directories and resets internal caches.', - name: 'clean', - - reportTiming: { - group: 'scripts/kbn clean', - id: 'total', - }, - - async run(projects, projectGraph, { kbn }) { - log.warning(dedent` - This command is only necessary for the circumstance where you need to recover a consistent - state when problems arise. If you need to run this command often, please let us know by - filling out this form: https://ela.st/yarn-kbn-clean. - Please not it might not solve problems with node_modules. To solve problems around node_modules - you might need to run 'yarn kbn reset'. - `); - - const toDelete = []; - for (const project of projects.values()) { - if (await isDirectory(project.targetLocation)) { - toDelete.push({ - cwd: project.path, - pattern: relative(project.path, project.targetLocation), - }); - } - - const { extraPatterns } = project.getCleanConfig(); - if (extraPatterns) { - toDelete.push({ - cwd: project.path, - pattern: extraPatterns, - }); - } - } - - // Runs Bazel soft clean - if (await isBazelBinAvailable(kbn.getAbsolute())) { - await runBazel({ - bazelArgs: ['clean'], - log, - }); - log.success('Soft cleaned bazel'); - } - - if (toDelete.length === 0) { - log.success('Nothing to delete'); - } else { - /** - * In order to avoid patterns like `/build` in packages from accidentally - * impacting files outside the package we use `process.chdir()` to change - * the cwd to the package and execute `del()` without the `force` option - * so it will check that each file being deleted is within the package. - * - * `del()` does support a `cwd` option, but it's only for resolving the - * patterns and does not impact the cwd check. - */ - const originalCwd = process.cwd(); - try { - for (const { pattern, cwd } of toDelete) { - process.chdir(cwd); - const promise = del(pattern); - - if (log.wouldLogLevel('info')) { - ora.promise(promise, relative(originalCwd, join(cwd, String(pattern)))); - } - - await promise; - } - } finally { - process.chdir(originalCwd); - } - } - }, -}; diff --git a/packages/kbn-pm/src/commands/index.ts b/packages/kbn-pm/src/commands/index.ts deleted file mode 100644 index 4c7992859ebdd..0000000000000 --- a/packages/kbn-pm/src/commands/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { ProjectGraph, ProjectMap } from '../utils/projects'; - -export interface ICommandConfig { - extraArgs: string[]; - options: { [key: string]: any }; - rootPath: string; - kbn: Kibana; -} - -export interface ICommand { - name: string; - description: string; - reportTiming?: { - group: string; - id: string; - }; - - run: (projects: ProjectMap, projectGraph: ProjectGraph, config: ICommandConfig) => Promise; -} - -import { BootstrapCommand } from './bootstrap'; -import { BuildCommand } from './build'; -import { CleanCommand } from './clean'; -import { ResetCommand } from './reset'; -import { RunCommand } from './run'; -import { WatchCommand } from './watch'; -import { Kibana } from '../utils/kibana'; - -export const commands: { [key: string]: ICommand } = { - bootstrap: BootstrapCommand, - build: BuildCommand, - clean: CleanCommand, - reset: ResetCommand, - run: RunCommand, - watch: WatchCommand, -}; diff --git a/packages/kbn-pm/src/commands/reset.ts b/packages/kbn-pm/src/commands/reset.ts deleted file mode 100644 index 5b6aac40149c2..0000000000000 --- a/packages/kbn-pm/src/commands/reset.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import dedent from 'dedent'; -import del from 'del'; -import ora from 'ora'; -import { join, relative } from 'path'; - -import { runBazel } from '@kbn/bazel-runner'; - -import { - getBazelDiskCacheFolder, - getBazelRepositoryCacheFolder, - isBazelBinAvailable, -} from '../utils/bazel'; -import { isDirectory } from '../utils/fs'; -import { log } from '../utils/log'; -import { ICommand } from '.'; - -export const ResetCommand: ICommand = { - description: - 'Deletes node_modules and output directories, resets internal and disk caches, and stops Bazel server', - name: 'reset', - - reportTiming: { - group: 'scripts/kbn reset', - id: 'total', - }, - - async run(projects, projectGraph, { kbn }) { - log.warning(dedent` - In most cases, 'yarn kbn clean' is all that should be needed to recover a consistent state when - problems arise. However for the rare cases where something get corrupt on node_modules you might need this command. - If you think you need to use this command very often (which is not normal), please let us know. - `); - - const toDelete = []; - for (const project of projects.values()) { - if (await isDirectory(project.nodeModulesLocation)) { - toDelete.push({ - cwd: project.path, - pattern: relative(project.path, project.nodeModulesLocation), - }); - } - - if (await isDirectory(project.targetLocation)) { - toDelete.push({ - cwd: project.path, - pattern: relative(project.path, project.targetLocation), - }); - } - - const { extraPatterns } = project.getCleanConfig(); - if (extraPatterns) { - toDelete.push({ - cwd: project.path, - pattern: extraPatterns, - }); - } - } - - // Runs Bazel hard clean and deletes Bazel Cache Folders - if (await isBazelBinAvailable(kbn.getAbsolute())) { - // Hard cleaning bazel - await runBazel({ - bazelArgs: ['clean', '--expunge'], - log, - }); - log.success('Hard cleaned bazel'); - - // Deletes Bazel Cache Folders - await del([await getBazelDiskCacheFolder(), await getBazelRepositoryCacheFolder()], { - force: true, - }); - log.success('Removed disk caches'); - } - - if (toDelete.length === 0) { - return; - } - - /** - * In order to avoid patterns like `/build` in packages from accidentally - * impacting files outside the package we use `process.chdir()` to change - * the cwd to the package and execute `del()` without the `force` option - * so it will check that each file being deleted is within the package. - * - * `del()` does support a `cwd` option, but it's only for resolving the - * patterns and does not impact the cwd check. - */ - const originalCwd = process.cwd(); - try { - for (const { pattern, cwd } of toDelete) { - process.chdir(cwd); - const promise = del(pattern); - - if (log.wouldLogLevel('info')) { - ora.promise(promise, relative(originalCwd, join(cwd, String(pattern)))); - } - - await promise; - } - } finally { - process.chdir(originalCwd); - } - }, -}; diff --git a/packages/kbn-pm/src/commands/run.ts b/packages/kbn-pm/src/commands/run.ts deleted file mode 100644 index 67cc7855d8e19..0000000000000 --- a/packages/kbn-pm/src/commands/run.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import dedent from 'dedent'; -import { CliError } from '../utils/errors'; -import { log } from '../utils/log'; -import { parallelizeBatches } from '../utils/parallelize'; -import { topologicallyBatchProjects } from '../utils/projects'; -import { ICommand } from '.'; - -export const RunCommand: ICommand = { - description: - 'Run script defined in package.json in each package that contains that script (only works on packages not using Bazel yet)', - name: 'run', - - reportTiming: { - group: 'scripts/kbn run', - id: 'total', - }, - - async run(projects, projectGraph, { extraArgs, options }) { - log.warning(dedent` - We are migrating packages into the Bazel build system and we will no longer support running npm scripts on - packages using 'yarn kbn run' on Bazel built packages. If the package you are trying to act on contains a - BUILD.bazel file please just use 'yarn kbn build' to build it or 'yarn kbn watch' to watch it - `); - - const batchedProjects = topologicallyBatchProjects(projects, projectGraph); - - if (extraArgs.length === 0) { - throw new CliError('No script specified'); - } - - const scriptName = extraArgs[0]; - const scriptArgs = extraArgs.slice(1); - - await parallelizeBatches(batchedProjects, async (project) => { - if (!project.hasScript(scriptName)) { - if (!!options['skip-missing']) { - return; - } - - throw new CliError( - `[${project.name}] no "${scriptName}" script defined. To skip packages without the "${scriptName}" script pass --skip-missing` - ); - } - - log.info(`[${project.name}] running "${scriptName}" script`); - await project.runScriptStreaming(scriptName, { - args: scriptArgs, - }); - log.success(`[${project.name}] complete`); - }); - }, -}; diff --git a/packages/kbn-pm/src/commands/watch.ts b/packages/kbn-pm/src/commands/watch.ts deleted file mode 100644 index 2bae2ddc66235..0000000000000 --- a/packages/kbn-pm/src/commands/watch.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { runIBazel } from '@kbn/bazel-runner'; -import { ICommand } from '.'; -import { log } from '../utils/log'; - -export const WatchCommand: ICommand = { - description: 'Runs a build in the Bazel built packages and keeps watching them for changes', - name: 'watch', - - reportTiming: { - group: 'scripts/kbn watch', - id: 'total', - }, - - async run(projects, projectGraph, { options }) { - const runOffline = options?.offline === true; - - // Call bazel with the target to build all available packages and run it through iBazel to watch it for changes - // - // Note: --run_output=false arg will disable the iBazel notifications about gazelle and buildozer when running it - // Can also be solved by adding a root `.bazel_fix_commands.json` but its not needed at the moment - await runIBazel({ - bazelArgs: ['--run_output=false', 'build', '//packages:build', '--show_result=1'], - log, - offline: runOffline, - }); - }, -}; diff --git a/packages/kbn-pm/src/config.ts b/packages/kbn-pm/src/config.ts deleted file mode 100644 index 666a2fed7a33c..0000000000000 --- a/packages/kbn-pm/src/config.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { resolve } from 'path'; - -interface Options { - rootPath: string; - skipKibanaPlugins?: boolean; - ossOnly?: boolean; -} - -/** - * Returns all the paths where plugins are located - */ -export function getProjectPaths({ rootPath, ossOnly, skipKibanaPlugins }: Options) { - const projectPaths = [rootPath, resolve(rootPath, 'packages/*')]; - - // This is needed in order to install the dependencies for the declared - // plugin functional used in the selenium functional tests. - // As we are now using the webpack dll for the client vendors dependencies - // when we run the plugin functional tests against the distributable - // dependencies used by such plugins like @eui, react and react-dom can't - // be loaded from the dll as the context is different from the one declared - // into the webpack dll reference plugin. - // In anyway, have a plugin declaring their own dependencies is the - // correct and the expect behavior. - projectPaths.push(resolve(rootPath, 'test/plugin_functional/plugins/*')); - projectPaths.push(resolve(rootPath, 'test/interpreter_functional/plugins/*')); - projectPaths.push(resolve(rootPath, 'test/server_integration/__fixtures__/plugins/*')); - projectPaths.push(resolve(rootPath, 'examples/*')); - - if (!ossOnly) { - projectPaths.push(resolve(rootPath, 'x-pack')); - projectPaths.push(resolve(rootPath, 'x-pack/plugins/*')); - projectPaths.push(resolve(rootPath, 'x-pack/legacy/plugins/*')); - projectPaths.push(resolve(rootPath, 'x-pack/test/functional_with_es_ssl/fixtures/plugins/*')); - } - - if (!skipKibanaPlugins) { - projectPaths.push(resolve(rootPath, '../kibana-extra/*')); - projectPaths.push(resolve(rootPath, '../kibana-extra/*/packages/*')); - projectPaths.push(resolve(rootPath, '../kibana-extra/*/plugins/*')); - projectPaths.push(resolve(rootPath, 'plugins/*')); - projectPaths.push(resolve(rootPath, 'plugins/*/packages/*')); - projectPaths.push(resolve(rootPath, 'plugins/*/plugins/*')); - } - - return projectPaths; -} diff --git a/packages/kbn-pm/src/run.test.ts b/packages/kbn-pm/src/run.test.ts deleted file mode 100644 index 5584c35619ba9..0000000000000 --- a/packages/kbn-pm/src/run.test.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { resolve } from 'path'; - -import { ICommand, ICommandConfig } from './commands'; -import { runCommand } from './run'; -import { Project } from './utils/project'; -import { log } from './utils/log'; - -log.setLogLevel('silent'); - -const rootPath = resolve(__dirname, 'utils/__fixtures__/kibana'); - -jest.mock('./utils/regenerate_package_json'); -jest.mock('./utils/regenerate_synthetic_package_map'); -jest.mock('./utils/regenerate_base_tsconfig'); - -function getExpectedProjectsAndGraph(runMock: any) { - const [fullProjects, fullProjectGraph] = (runMock as jest.Mock).mock.calls[0]; - - const projects = [...fullProjects.keys()].sort(); - - const graph = [...fullProjectGraph.entries()].reduce((expected, [projectName, dependencies]) => { - expected[projectName] = dependencies.map((project: Project) => project.name); - return expected; - }, {}); - - return { projects, graph }; -} - -let command: ICommand; -let config: Omit; -beforeEach(() => { - command = { - description: 'test description', - name: 'test name', - run: jest.fn(), - }; - - config = { - extraArgs: [], - options: {}, - rootPath, - }; -}); - -test('passes all found projects to the command if no filter is specified', async () => { - await runCommand(command, config); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('excludes project if single `exclude` filter is specified', async () => { - await runCommand(command, { - ...config, - options: { exclude: 'foo' }, - }); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('excludes projects if multiple `exclude` filter are specified', async () => { - await runCommand(command, { - ...config, - options: { exclude: ['foo', 'bar', 'baz'] }, - }); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('includes single project if single `include` filter is specified', async () => { - await runCommand(command, { - ...config, - options: { include: 'foo' }, - }); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('includes only projects specified in multiple `include` filters', async () => { - await runCommand(command, { - ...config, - options: { include: ['foo', 'bar', 'baz'] }, - }); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('respects both `include` and `exclude` filters if specified at the same time', async () => { - await runCommand(command, { - ...config, - options: { include: ['foo', 'bar', 'baz'], exclude: 'bar' }, - }); - - expect(command.run).toHaveBeenCalledTimes(1); - expect(getExpectedProjectsAndGraph(command.run)).toMatchSnapshot(); -}); - -test('does not run command if all projects are filtered out', async () => { - const mockProcessExit = jest.spyOn(process, 'exit').mockReturnValue(undefined as never); - - await runCommand(command, { - ...config, - // Including and excluding the same project will result in 0 projects selected. - options: { include: ['foo'], exclude: ['foo'] }, - }); - - expect(command.run).not.toHaveBeenCalled(); - expect(mockProcessExit).toHaveBeenCalledWith(1); -}); diff --git a/packages/kbn-pm/src/run.ts b/packages/kbn-pm/src/run.ts deleted file mode 100644 index 0529ebd6425ca..0000000000000 --- a/packages/kbn-pm/src/run.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { CiStatsReporter, CiStatsTiming } from '@kbn/ci-stats-reporter'; - -import { simpleKibanaPlatformPluginDiscovery, getPluginSearchPaths } from '@kbn/plugin-discovery'; -import { ICommand, ICommandConfig } from './commands'; -import { CliError } from './utils/errors'; -import { log } from './utils/log'; -import { buildProjectGraph } from './utils/projects'; -import { renderProjectsTree } from './utils/projects_tree'; -import { regeneratePackageJson } from './utils/regenerate_package_json'; -import { regenerateSyntheticPackageMap } from './utils/regenerate_synthetic_package_map'; -import { regenerateBaseTsconfig } from './utils/regenerate_base_tsconfig'; -import { Kibana } from './utils/kibana'; - -process.env.CI_STATS_NESTED_TIMING = 'true'; - -export async function runCommand(command: ICommand, config: Omit) { - const runStartTime = Date.now(); - let kbn: undefined | Kibana; - const timings: Array> = []; - async function time(id: string, block: () => Promise): Promise { - const start = Date.now(); - let success = true; - try { - return await block(); - } catch (error) { - success = false; - throw error; - } finally { - timings.push({ - id, - ms: Date.now() - start, - meta: { - success, - }, - }); - } - } - - async function reportTimes(timingConfig: { group: string; id: string }, error?: Error) { - if (!kbn) { - // things are too broken to report remotely - return; - } - - const reporter = CiStatsReporter.fromEnv(log); - - try { - await reporter.timings({ - upstreamBranch: kbn.kibanaProject.json.branch, - // prevent loading @kbn/utils by passing null - kibanaUuid: kbn.getUuid() || null, - timings: [ - ...timings.map((t) => ({ ...timingConfig, ...t })), - { - group: timingConfig.group, - id: timingConfig.id, - ms: Date.now() - runStartTime, - meta: { - success: !error, - }, - }, - ], - }); - } catch (e) { - // prevent hiding bootstrap errors - log.error('failed to report timings:'); - log.error(e); - } - } - - try { - log.debug(`Running [${command.name}] command from [${config.rootPath}]`); - - await time('regenerate package.json, synthetic-package map and tsconfig', async () => { - const plugins = simpleKibanaPlatformPluginDiscovery( - getPluginSearchPaths({ - rootDir: config.rootPath, - oss: false, - examples: true, - testPlugins: true, - }), - [] - ); - - await Promise.all([ - regeneratePackageJson(config.rootPath), - regenerateSyntheticPackageMap(plugins, config.rootPath), - regenerateBaseTsconfig(plugins, config.rootPath), - ]); - }); - - kbn = await time('load Kibana project', async () => await Kibana.loadFrom(config.rootPath)); - const projects = kbn.getFilteredProjects({ - skipKibanaPlugins: Boolean(config.options['skip-kibana-plugins']), - ossOnly: Boolean(config.options.oss), - exclude: toArray(config.options.exclude), - include: toArray(config.options.include), - }); - - if (projects.size === 0) { - log.error( - `There are no projects found. Double check project name(s) in '-i/--include' and '-e/--exclude' filters.` - ); - return process.exit(1); - } - - const projectGraph = buildProjectGraph(projects); - - log.debug(`Found ${projects.size.toString()} projects`); - log.debug(renderProjectsTree(config.rootPath, projects)); - - await command.run(projects, projectGraph, { - ...config, - kbn, - }); - - if (command.reportTiming) { - await reportTimes(command.reportTiming); - } - } catch (error) { - if (command.reportTiming) { - await reportTimes(command.reportTiming, error); - } - - log.error(`[${command.name}] failed:`); - - if (error instanceof CliError) { - log.error(error.message); - - const metaOutput = Object.entries(error.meta) - .map(([key, value]) => `${key}: ${value}`) - .join('\n'); - - if (metaOutput) { - log.info('Additional debugging info:\n'); - log.indent(2); - log.info(metaOutput); - log.indent(-2); - } - } else { - log.error(error); - } - - process.exit(1); - } -} - -function toArray(value?: T | T[]) { - if (value == null) { - return []; - } - - return Array.isArray(value) ? value : [value]; -} diff --git a/packages/kbn-pm/src/test_helpers/absolute_path_snapshot_serializer.ts b/packages/kbn-pm/src/test_helpers/absolute_path_snapshot_serializer.ts deleted file mode 100644 index b220d7073a5aa..0000000000000 --- a/packages/kbn-pm/src/test_helpers/absolute_path_snapshot_serializer.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { cloneDeepWith } from 'lodash'; -import { resolve, sep as pathSep } from 'path'; - -const repoRoot = resolve(__dirname, '../../../../'); - -const normalizePaths = (value: any) => { - let didReplacement = false; - const clone = cloneDeepWith(value, (v: any) => { - if (typeof v === 'string' && v.startsWith(repoRoot)) { - didReplacement = true; - return v - .replace(repoRoot, '') - .split(pathSep) // normalize path separators - .join('/'); - } - }); - - return { - clone, - didReplacement, - }; -}; - -export const absolutePathSnapshotSerializer = { - print(value: any, serialize: (val: any) => string) { - return serialize(normalizePaths(value).clone); - }, - - test(value: any) { - return normalizePaths(value).didReplacement; - }, -}; diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/package.json deleted file mode 100644 index a9fd807525091..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "with-additional-projects", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/packages/baz/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/packages/baz/package.json deleted file mode 100644 index 7a2708cb51d4e..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/packages/baz/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "baz", - "version": "1.0.0", - "dependencies": { - "bar": "link:../../../../kibana/packages/bar" - } -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/plugins/quux/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/plugins/quux/package.json deleted file mode 100644 index abe001edaa6be..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana-extra/additional_projects/plugins/quux/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "quux", - "version": "1.0.0", - "dependencies": { - "bar": "link:../../../../kibana/packages/bar", - "baz": "link:../../packages/baz" - } -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana/package.json deleted file mode 100644 index 98bc15383f844..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "kibana", - "version": "1.0.0", - "dependencies": { - "foo": "link:packages/foo" - } -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/bar/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/bar/package.json deleted file mode 100644 index 06a8b8dcc6aa8..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/bar/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "bar", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/foo/package.json b/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/foo/package.json deleted file mode 100644 index da86787ad3ecc..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/kibana/packages/foo/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "foo", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/other-plugins/baz/package.json b/packages/kbn-pm/src/utils/__fixtures__/other-plugins/baz/package.json deleted file mode 100644 index d689f6bc97070..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/other-plugins/baz/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "baz", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/plugins/baz/package.json b/packages/kbn-pm/src/utils/__fixtures__/plugins/baz/package.json deleted file mode 100644 index d689f6bc97070..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/plugins/baz/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "baz", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/plugins/quux/package.json b/packages/kbn-pm/src/utils/__fixtures__/plugins/quux/package.json deleted file mode 100644 index f2a3062454509..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/plugins/quux/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "quux", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/plugins/zorge/package.json b/packages/kbn-pm/src/utils/__fixtures__/plugins/zorge/package.json deleted file mode 100644 index 3f22a1845b66a..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/plugins/zorge/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "zorge", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__fixtures__/symlinked-plugins/corge/package.json b/packages/kbn-pm/src/utils/__fixtures__/symlinked-plugins/corge/package.json deleted file mode 100644 index 20484e93d285d..0000000000000 --- a/packages/kbn-pm/src/utils/__fixtures__/symlinked-plugins/corge/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "corge", - "version": "1.0.0" -} diff --git a/packages/kbn-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap b/packages/kbn-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap deleted file mode 100644 index 8aeae04c265cf..0000000000000 --- a/packages/kbn-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`bin script points nowhere does not try to create symlink on node_modules/.bin for that bin script: fs module calls 1`] = ` -Object { - "chmod": Array [], - "copyDirectory": Array [], - "createSymlink": Array [], - "isDirectory": Array [], - "isFile": Array [], - "isSymlink": Array [], - "mkdirp": Array [], - "readFile": Array [], - "rmdirp": Array [], - "tryRealpath": Array [], - "unlink": Array [], - "writeFile": Array [], -} -`; - -exports[`bin script points to a file creates a symlink for the project bin into the roots project node_modules/.bin directory as well as node_modules/.bin directory symlink into the roots one: fs module calls 1`] = ` -Object { - "chmod": Array [], - "copyDirectory": Array [], - "createSymlink": Array [], - "isDirectory": Array [], - "isFile": Array [], - "isSymlink": Array [], - "mkdirp": Array [], - "readFile": Array [], - "rmdirp": Array [], - "tryRealpath": Array [], - "unlink": Array [], - "writeFile": Array [], -} -`; diff --git a/packages/kbn-pm/src/utils/__snapshots__/project.test.ts.snap b/packages/kbn-pm/src/utils/__snapshots__/project.test.ts.snap deleted file mode 100644 index d4a4e5ca23452..0000000000000 --- a/packages/kbn-pm/src/utils/__snapshots__/project.test.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`#getExecutables() throws CliError when bin is something strange 1`] = `"[kibana] has an invalid \\"bin\\" field in its package.json, expected an object or a string"`; diff --git a/packages/kbn-pm/src/utils/__snapshots__/projects.test.ts.snap b/packages/kbn-pm/src/utils/__snapshots__/projects.test.ts.snap deleted file mode 100644 index a716b9fab4e5b..0000000000000 --- a/packages/kbn-pm/src/utils/__snapshots__/projects.test.ts.snap +++ /dev/null @@ -1,41 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`#buildProjectGraph builds full project graph 1`] = ` -Object { - "bar": Array [], - "baz": Array [], - "foo": Array [], - "kibana": Array [ - "foo", - ], - "quux": Array [], - "zorge": Array [], -} -`; - -exports[`#topologicallyBatchProjects batches projects topologically based on their project dependencies 1`] = ` -Array [ - Array [ - "bar", - "foo", - "baz", - "quux", - "zorge", - ], - Array [ - "kibana", - ], -] -`; - -exports[`#topologicallyBatchProjects batches projects topologically even if graph contains projects not presented in the project map 1`] = ` -Array [ - Array [ - "kibana", - "bar", - "baz", - "quux", - "zorge", - ], -] -`; diff --git a/packages/kbn-pm/src/utils/__snapshots__/projects_tree.test.ts.snap b/packages/kbn-pm/src/utils/__snapshots__/projects_tree.test.ts.snap deleted file mode 100644 index 9993e2eaf377a..0000000000000 --- a/packages/kbn-pm/src/utils/__snapshots__/projects_tree.test.ts.snap +++ /dev/null @@ -1,29 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`handles projects outside root folder 1`] = ` -kibana -├── packages -│ ├── bar -│ └── foo -└── ../plugins - ├── baz - ├── quux - └── zorge -`; - -exports[`handles projects with root folder 1`] = ` -kibana -└── packages - ├── bar - └── foo -`; - -exports[`handles projects within projects outside root folder 1`] = ` -kibana -├── packages -│ ├── bar -│ └── foo -└── ../kibana-extra/additional_projects (with-additional-projects) - ├── packages/baz - └── plugins/quux -`; diff --git a/packages/kbn-pm/src/utils/bazel/get_cache_folders.ts b/packages/kbn-pm/src/utils/bazel/get_cache_folders.ts deleted file mode 100644 index 8426bfd58296c..0000000000000 --- a/packages/kbn-pm/src/utils/bazel/get_cache_folders.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { dirname, resolve } from 'path'; -import { spawn } from '../child_process'; - -async function rawRunBazelInfoRepoCache() { - const { stdout: bazelRepositoryCachePath } = await spawn('bazel', ['info', 'repository_cache'], { - stdio: 'pipe', - }); - return bazelRepositoryCachePath; -} - -export async function getBazelDiskCacheFolder() { - return resolve(dirname(await rawRunBazelInfoRepoCache()), 'disk-cache'); -} - -export async function getBazelRepositoryCacheFolder() { - return await rawRunBazelInfoRepoCache(); -} diff --git a/packages/kbn-pm/src/utils/bazel/install_tools.ts b/packages/kbn-pm/src/utils/bazel/install_tools.ts deleted file mode 100644 index e5d07748fdccf..0000000000000 --- a/packages/kbn-pm/src/utils/bazel/install_tools.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import dedent from 'dedent'; -import { resolve } from 'path'; -import { spawn } from '../child_process'; -import { readFile } from '../fs'; -import { log } from '../log'; - -async function readBazelToolsVersionFile(repoRootPath: string, versionFilename: string) { - const version = (await readFile(resolve(repoRootPath, versionFilename))).toString().trim(); - - if (!version) { - throw new Error( - `[bazel_tools] Failed on reading bazel tools versions\n ${versionFilename} file do not contain any version set` - ); - } - - return version; -} - -export async function isBazelBinAvailable(repoRootPath: string) { - try { - const installedVersion = await spawn('bazel', ['--version'], { stdio: 'pipe' }); - const bazelVersion = await readBazelToolsVersionFile(repoRootPath, '.bazelversion'); - - if (installedVersion.stdout === `bazel ${bazelVersion}`) { - return true; - } else { - log.info( - `[bazel_tools] Bazel is installed (${installedVersion.stdout}), but was expecting ${bazelVersion}` - ); - return false; - } - } catch { - return false; - } -} - -async function tryRemoveBazeliskFromYarnGlobal() { - try { - // Check if Bazelisk is installed on the yarn global scope - const { stdout: bazeliskPkgInstallStdout } = await spawn('yarn', ['global', 'list'], { - stdio: 'pipe', - }); - - // Bazelisk was found on yarn global scope so lets remove it - if (bazeliskPkgInstallStdout.includes(`@bazel/bazelisk@`)) { - await spawn('yarn', ['global', 'remove', `@bazel/bazelisk`], { - stdio: 'pipe', - }); - - log.info(`[bazel_tools] bazelisk was installed on Yarn global packages and is now removed`); - return true; - } - - return false; - } catch { - return false; - } -} - -export async function installBazelTools(repoRootPath: string) { - log.debug(`[bazel_tools] reading bazel tools versions from version files`); - const bazeliskVersion = await readBazelToolsVersionFile(repoRootPath, '.bazeliskversion'); - const bazelVersion = await readBazelToolsVersionFile(repoRootPath, '.bazelversion'); - - // Check what globals are installed - log.debug(`[bazel_tools] verify if bazelisk is installed`); - - // Check if we need to remove bazelisk from yarn - await tryRemoveBazeliskFromYarnGlobal(); - - // Test if bazel bin is available - const isBazelBinAlreadyAvailable = await isBazelBinAvailable(repoRootPath); - - // Install bazelisk if not installed - if (!isBazelBinAlreadyAvailable) { - log.info(`[bazel_tools] installing Bazel tools`); - - log.debug( - `[bazel_tools] bazelisk is not installed. Installing @bazel/bazelisk@${bazeliskVersion} and bazel@${bazelVersion}` - ); - await spawn('npm', ['install', '--global', `@bazel/bazelisk@${bazeliskVersion}`], { - env: { - USE_BAZEL_VERSION: bazelVersion, - }, - stdio: 'pipe', - }); - - const isBazelBinAvailableAfterInstall = await isBazelBinAvailable(repoRootPath); - if (!isBazelBinAvailableAfterInstall) { - throw new Error(dedent` - [bazel_tools] an error occurred when installing the Bazel tools. Please make sure you have access to npm globally installed modules on your $PATH - `); - } - } - - log.success(`[bazel_tools] all bazel tools are correctly installed`); -} diff --git a/packages/kbn-pm/src/utils/bazel/yarn.ts b/packages/kbn-pm/src/utils/bazel/yarn.ts deleted file mode 100644 index 24e44be3b3cdf..0000000000000 --- a/packages/kbn-pm/src/utils/bazel/yarn.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { join, resolve } from 'path'; -import { isDirectory, isFile, tryRealpath, unlink } from '../fs'; - -// yarn integrity file checker -export async function removeYarnIntegrityFileIfExists(nodeModulesPath: string) { - try { - const nodeModulesRealPath = await tryRealpath(nodeModulesPath); - const yarnIntegrityFilePath = join(nodeModulesRealPath, '.yarn-integrity'); - - // check if the file exists and delete it in that case - if (await isFile(yarnIntegrityFilePath)) { - await unlink(yarnIntegrityFilePath); - } - } catch { - // no-op - } -} - -// yarn and bazel integration checkers -async function areNodeModulesPresent(kbnRootPath: string) { - try { - return await isDirectory(resolve(kbnRootPath, 'node_modules')); - } catch { - return false; - } -} - -async function haveBazelFoldersBeenCreatedBefore(kbnRootPath: string) { - try { - return ( - (await isDirectory(resolve(kbnRootPath, 'bazel-bin', 'packages'))) || - (await isDirectory(resolve(kbnRootPath, 'bazel-kibana', 'packages'))) || - (await isDirectory(resolve(kbnRootPath, 'bazel-out', 'host'))) - ); - } catch { - return false; - } -} - -export async function haveNodeModulesBeenManuallyDeleted(kbnRootPath: string) { - return ( - !(await areNodeModulesPresent(kbnRootPath)) && - (await haveBazelFoldersBeenCreatedBefore(kbnRootPath)) - ); -} diff --git a/packages/kbn-pm/src/utils/child_process.ts b/packages/kbn-pm/src/utils/child_process.ts deleted file mode 100644 index 662a83f3811b0..0000000000000 --- a/packages/kbn-pm/src/utils/child_process.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { Writable } from 'stream'; - -import chalk from 'chalk'; -import execa from 'execa'; -import logTransformer from 'strong-log-transformer'; - -import { log } from './log'; - -const colorWheel = [chalk.cyan, chalk.magenta, chalk.blue, chalk.yellow, chalk.green]; -const getColor = () => { - const color = colorWheel.shift()!; - colorWheel.push(color); - return color; -}; - -export function spawn(command: string, args: string[], opts: execa.Options) { - return execa(command, args, { - stdio: 'inherit', - preferLocal: true, - ...opts, - }); -} - -function streamToLog(debug: boolean = true) { - return new Writable({ - objectMode: true, - write(line, _, cb) { - if (line.endsWith('\n')) { - log[debug ? 'debug' : 'write'](line.slice(0, -1)); - } else { - log[debug ? 'debug' : 'write'](line); - } - - cb(); - }, - }); -} - -export function spawnStreaming( - command: string, - args: string[], - opts: execa.Options, - { prefix, debug }: { prefix: string; debug?: boolean } -) { - const spawned = execa(command, args, { - stdio: ['ignore', 'pipe', 'pipe'], - preferLocal: true, - ...opts, - }); - - const color = getColor(); - const prefixedStdout = logTransformer({ tag: color.bold(prefix) }); - const prefixedStderr = logTransformer({ mergeMultiline: true, tag: color.bold(prefix) }); - - spawned.stdout!.pipe(prefixedStdout).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null - spawned.stderr!.pipe(prefixedStderr).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null - - return spawned; -} diff --git a/packages/kbn-pm/src/utils/convert_plugin_id_to_package_id.ts b/packages/kbn-pm/src/utils/convert_plugin_id_to_package_id.ts deleted file mode 100644 index 613ab6abc3a6f..0000000000000 --- a/packages/kbn-pm/src/utils/convert_plugin_id_to_package_id.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -export function convertPluginIdToPackageId(pluginId: string) { - if (pluginId === 'core') { - // core is the only non-plugin - return `@kbn/core`; - } - - return `@kbn/${pluginId - .split('') - .flatMap((c) => (c.toUpperCase() === c ? `-${c.toLowerCase()}` : c)) - .join('')}-plugin` - .replace(/-\w(-\w)+-/g, (match) => `-${match.split('-').join('')}-`) - .replace(/-plugin-plugin$/, '-plugin'); -} diff --git a/packages/kbn-pm/src/utils/fs.ts b/packages/kbn-pm/src/utils/fs.ts deleted file mode 100644 index 5739d319e08e7..0000000000000 --- a/packages/kbn-pm/src/utils/fs.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import cmdShimCb from 'cmd-shim'; -import del from 'del'; -import fs from 'fs'; -import { ncp } from 'ncp'; -import { dirname, relative } from 'path'; -import { promisify } from 'util'; - -const lstat = promisify(fs.lstat); -export const readFile = promisify(fs.readFile); -export const writeFile = promisify(fs.writeFile); -const symlink = promisify(fs.symlink); -export const chmod = promisify(fs.chmod); -const cmdShim = promisify(cmdShimCb); -const mkdir = promisify(fs.mkdir); -const realpathNative = promisify(fs.realpath.native); -export const mkdirp = async (path: string) => await mkdir(path, { recursive: true }); -export const rmdirp = async (path: string) => await del(path, { force: true }); -export const unlink = promisify(fs.unlink); -export const copyDirectory = promisify(ncp); - -async function statTest(path: string, block: (stats: fs.Stats) => boolean) { - try { - return block(await lstat(path)); - } catch (e) { - if (e.code === 'ENOENT') { - return false; - } - throw e; - } -} - -/** - * Test if a path points to a symlink. - * @param path - */ -export async function isSymlink(path: string) { - return await statTest(path, (stats) => stats.isSymbolicLink()); -} - -/** - * Test if a path points to a directory. - * @param path - */ -export async function isDirectory(path: string) { - return await statTest(path, (stats) => stats.isDirectory()); -} - -/** - * Test if a path points to a regular file. - * @param path - */ -export async function isFile(path: string) { - return await statTest(path, (stats) => stats.isFile()); -} - -/** - * Create a symlink at dest that points to src. Adapted from - * https://github.com/lerna/lerna/blob/2f1b87d9e2295f587e4ac74269f714271d8ed428/src/FileSystemUtilities.js#L103. - * - * @param src - * @param dest - * @param type 'dir', 'file', 'junction', or 'exec'. 'exec' on - * windows will use the `cmd-shim` module since symlinks can't be used - * for executable files on windows. - */ -export async function createSymlink(src: string, dest: string, type: string) { - if (process.platform === 'win32') { - if (type === 'exec') { - await cmdShim(src, dest); - } else { - await forceCreate(src, dest, type); - } - } else { - const posixType = type === 'exec' ? 'file' : type; - const relativeSource = relative(dirname(dest), src); - await forceCreate(relativeSource, dest, posixType); - } -} - -async function forceCreate(src: string, dest: string, type: string) { - try { - // If something exists at `dest` we need to remove it first. - await unlink(dest); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - await symlink(src, dest, type); -} - -export async function tryRealpath(path: string): Promise { - let calculatedPath = path; - - try { - calculatedPath = await realpathNative(path); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - return calculatedPath; -} diff --git a/packages/kbn-pm/src/utils/kibana.ts b/packages/kbn-pm/src/utils/kibana.ts deleted file mode 100644 index ece64acf3efbf..0000000000000 --- a/packages/kbn-pm/src/utils/kibana.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import Path from 'path'; -import Fs from 'fs'; - -import multimatch from 'multimatch'; -import isPathInside from 'is-path-inside'; - -import { resolveDepsForProject, YarnLock } from './yarn_lock'; -import { Log } from './log'; -import { ProjectMap, getProjects, includeTransitiveProjects } from './projects'; -import { Project } from './project'; -import { getProjectPaths } from '../config'; - -/** - * Helper class for dealing with a set of projects as children of - * the Kibana project. The kbn/pm is currently implemented to be - * more generic, where everything is an operation of generic projects, - * but that leads to exceptions where we need the kibana project and - * do things like `project.get('kibana')!`. - * - * Using this helper we can restructre the generic list of projects - * as a Kibana object which encapulates all the projects in the - * workspace and knows about the root Kibana project. - */ -export class Kibana { - static async loadFrom(rootPath: string) { - return new Kibana(await getProjects(rootPath, getProjectPaths({ rootPath }))); - } - - public readonly kibanaProject: Project; - - constructor(private readonly allWorkspaceProjects: ProjectMap) { - const kibanaProject = allWorkspaceProjects.get('kibana'); - - if (!kibanaProject) { - throw new TypeError( - 'Unable to create Kibana object without all projects, including the Kibana project.' - ); - } - - this.kibanaProject = kibanaProject; - } - - /** make an absolute path by resolving subPath relative to the kibana repo */ - getAbsolute(...subPath: string[]) { - return Path.resolve(this.kibanaProject.path, ...subPath); - } - - /** convert an absolute path to a relative path, relative to the kibana repo */ - getRelative(absolute: string) { - return Path.relative(this.kibanaProject.path, absolute); - } - - /** get a copy of the map of all projects in the kibana workspace */ - getAllProjects() { - return new Map(this.allWorkspaceProjects); - } - - /** determine if a project with the given name exists */ - hasProject(name: string) { - return this.allWorkspaceProjects.has(name); - } - - /** get a specific project, throws if the name is not known (use hasProject() first) */ - getProject(name: string) { - const project = this.allWorkspaceProjects.get(name); - - if (!project) { - throw new Error(`No package with name "${name}" in the workspace`); - } - - return project; - } - - /** get a project and all of the projects it depends on in a ProjectMap */ - getProjectAndDeps(name: string) { - const project = this.getProject(name); - return includeTransitiveProjects([project], this.allWorkspaceProjects); - } - - /** filter the projects to just those matching certain paths/include/exclude tags */ - getFilteredProjects(options: { - skipKibanaPlugins: boolean; - ossOnly: boolean; - exclude: string[]; - include: string[]; - }) { - const allProjects = this.getAllProjects(); - const filteredProjects: ProjectMap = new Map(); - - const pkgJsonPaths = Array.from(allProjects.values()).map((p) => p.packageJsonLocation); - const filteredPkgJsonGlobs = getProjectPaths({ - ...options, - rootPath: this.kibanaProject.path, - }).map((g) => Path.resolve(g, 'package.json')); - const matchingPkgJsonPaths = multimatch(pkgJsonPaths, filteredPkgJsonGlobs); - - for (const project of allProjects.values()) { - const pathMatches = matchingPkgJsonPaths.includes(project.packageJsonLocation); - const notExcluded = !options.exclude.includes(project.name); - const isIncluded = !options.include.length || options.include.includes(project.name); - - if (pathMatches && notExcluded && isIncluded) { - filteredProjects.set(project.name, project); - } - } - - return filteredProjects; - } - - isPartOfRepo(project: Project) { - return ( - project.path === this.kibanaProject.path || - isPathInside(project.path, this.kibanaProject.path) - ); - } - - isOutsideRepo(project: Project) { - return !this.isPartOfRepo(project); - } - - resolveAllProductionDependencies(yarnLock: YarnLock, log: Log) { - const kibanaDeps = resolveDepsForProject({ - project: this.kibanaProject, - yarnLock, - kbn: this, - includeDependentProject: true, - productionDepsOnly: true, - log, - })!; - - const xpackDeps = resolveDepsForProject({ - project: this.getProject('x-pack')!, - yarnLock, - kbn: this, - includeDependentProject: true, - productionDepsOnly: true, - log, - })!; - - return new Map([...kibanaDeps.entries(), ...xpackDeps.entries()]); - } - - getUuid() { - try { - return Fs.readFileSync(this.getAbsolute('data/uuid'), 'utf-8').trim(); - } catch (error) { - if (error.code === 'ENOENT') { - return undefined; - } - - throw error; - } - } -} diff --git a/packages/kbn-pm/src/utils/link_project_executables.test.ts b/packages/kbn-pm/src/utils/link_project_executables.test.ts deleted file mode 100644 index 5045474321ce5..0000000000000 --- a/packages/kbn-pm/src/utils/link_project_executables.test.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -/* eslint-disable @typescript-eslint/no-var-requires */ - -jest.mock('./fs'); - -import { resolve } from 'path'; - -import { ToolingLogCollectingWriter } from '@kbn/tooling-log'; - -import { absolutePathSnapshotSerializer, stripAnsiSnapshotSerializer } from '../test_helpers'; -import { linkProjectExecutables } from './link_project_executables'; -import { Project } from './project'; -import { buildProjectGraph } from './projects'; -import { log } from './log'; - -const logWriter = new ToolingLogCollectingWriter(); -log.setWriters([logWriter]); -beforeEach(() => { - logWriter.messages.length = 0; -}); - -const projectsByName = new Map([ - [ - 'foo', - new Project( - { - dependencies: { - bar: 'link:../bar', - }, - name: 'foo', - }, - resolve(__dirname, 'foo') - ), - ], - [ - 'bar', - new Project( - { - bin: 'bin/bar.js', - name: 'bar', - }, - resolve(__dirname, 'bar') - ), - ], - [ - 'baz', - new Project( - { - devDependencies: { - bar: 'link:../bar', - }, - name: 'baz', - }, - resolve(__dirname, 'baz') - ), - ], -]); -(projectsByName.get('bar') as Project).isSinglePackageJsonProject = true; - -const projectGraph = buildProjectGraph(projectsByName); - -function getFsMockCalls() { - const fs = require('./fs'); - const fsMockCalls: { [key: string]: any[][] } = {}; - Object.keys(fs).map((key) => { - if (jest.isMockFunction(fs[key])) { - fsMockCalls[key] = fs[key].mock.calls; - } - }); - return fsMockCalls; -} - -expect.addSnapshotSerializer(absolutePathSnapshotSerializer); -expect.addSnapshotSerializer(stripAnsiSnapshotSerializer); - -afterEach(() => { - jest.resetAllMocks(); - jest.restoreAllMocks(); -}); - -describe('bin script points nowhere', () => { - test('does not try to create symlink on node_modules/.bin for that bin script', async () => { - const fs = require('./fs'); - fs.isFile.mockReturnValue(false); - fs.isDirectory.mockReturnValue(true); - - await linkProjectExecutables(projectsByName, projectGraph); - expect(getFsMockCalls()).toMatchSnapshot('fs module calls'); - }); -}); - -describe('bin script points to a file', () => { - test('creates a symlink for the project bin into the roots project node_modules/.bin directory as well as node_modules/.bin directory symlink into the roots one', async () => { - const fs = require('./fs'); - fs.isFile.mockReturnValue(true); - fs.isDirectory.mockReturnValue(false); - - await linkProjectExecutables(projectsByName, projectGraph); - - expect(getFsMockCalls()).toMatchSnapshot('fs module calls'); - expect(logWriter.messages).toMatchInlineSnapshot(` - Array [ - debg Linking package executables, - ] - `); - }); -}); diff --git a/packages/kbn-pm/src/utils/link_project_executables.ts b/packages/kbn-pm/src/utils/link_project_executables.ts deleted file mode 100644 index 59179d06ac7f6..0000000000000 --- a/packages/kbn-pm/src/utils/link_project_executables.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { dirname, relative, resolve, sep } from 'path'; - -import { chmod, createSymlink, isFile, mkdirp } from './fs'; -import { log } from './log'; -import { ProjectGraph, ProjectMap } from './projects'; - -/** - * Yarn does not link the executables from dependencies that are installed - * using `link:` https://github.com/yarnpkg/yarn/pull/5046 - * - * We simulate this functionality by walking through each project's project - * dependencies, and manually linking their executables if defined. The logic - * for linking was mostly adapted from lerna: https://github.com/lerna/lerna/blob/1d7eb9eeff65d5a7de64dea73613b1bf6bfa8d57/src/PackageUtilities.js#L348 - */ -export async function linkProjectExecutables( - projectsByName: ProjectMap, - projectGraph: ProjectGraph -) { - log.debug(`Linking package executables`); - - // Find root and generate executables from dependencies for it - let rootProject = null; - let rootProjectDeps = [] as any; - for (const [projectName, projectDeps] of projectGraph) { - const project = projectsByName.get(projectName)!; - if (project.isSinglePackageJsonProject) { - rootProject = projectsByName.get(projectName); - rootProjectDeps = projectDeps; - break; - } - } - - if (!rootProject) { - throw new Error('Could not finding root project while linking package executables'); - } - - // Prepare root project node_modules/.bin - const rootBinsDir = resolve(rootProject.nodeModulesLocation, '.bin'); - for (const rootProjectDep of rootProjectDeps) { - const executables = rootProjectDep.getExecutables(); - for (const name of Object.keys(executables)) { - const srcPath = executables[name]; - - // existing logic from lerna -- ensure that the bin we are going to - // point to exists or ignore it - if (!(await isFile(srcPath))) { - continue; - } - - const dest = resolve(rootBinsDir, name); - - // Get relative project path with normalized path separators. - const rootProjectRelativePath = relative(rootProject.path, srcPath).split(sep).join('/'); - - log.debug(`[${rootProject.name}] ${name} -> ${rootProjectRelativePath}`); - - await mkdirp(dirname(dest)); - await createSymlink(srcPath, dest, 'exec'); - await chmod(dest, '755'); - } - } -} diff --git a/packages/kbn-pm/src/utils/log.ts b/packages/kbn-pm/src/utils/log.ts deleted file mode 100644 index a70f967adc400..0000000000000 --- a/packages/kbn-pm/src/utils/log.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { - ToolingLog, - ToolingLogTextWriter, - LogLevel, - parseLogLevel, - ParsedLogLevel, -} from '@kbn/tooling-log'; - -class Log extends ToolingLog { - private logLevel!: ParsedLogLevel; - - constructor() { - super(); - this.setLogLevel('info'); - } - - setLogLevel(level: LogLevel) { - this.logLevel = parseLogLevel(level); - this.setWriters([ - new ToolingLogTextWriter({ - level: this.logLevel.name, - writeTo: process.stdout, - }), - ]); - } - - wouldLogLevel(level: LogLevel) { - return this.logLevel.flags[level]; - } -} - -export const log = new Log(); -export type { LogLevel }; -export { Log }; diff --git a/packages/kbn-pm/src/utils/package_json.ts b/packages/kbn-pm/src/utils/package_json.ts deleted file mode 100644 index e8ed8d0a7f8f5..0000000000000 --- a/packages/kbn-pm/src/utils/package_json.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import readPkg from 'read-pkg'; -import writePkg from 'write-pkg'; - -export interface IPackageJson { - [key: string]: any; -} -export interface IPackageDependencies { - [key: string]: string; -} -export interface IPackageScripts { - [key: string]: string; -} - -export function readPackageJson(cwd: string): IPackageJson { - return readPkg({ cwd, normalize: false }); -} - -export function writePackageJson(path: string, json: IPackageJson) { - return writePkg(path, json); -} - -export const isLinkDependency = (depVersion: string) => depVersion.startsWith('link:'); diff --git a/packages/kbn-pm/src/utils/parallelize.test.ts b/packages/kbn-pm/src/utils/parallelize.test.ts deleted file mode 100644 index 2694838ae727a..0000000000000 --- a/packages/kbn-pm/src/utils/parallelize.test.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { parallelizeBatches } from './parallelize'; - -// As promises resolve async, we use this helper to wait for all promises that -// have been resolved to complete (aka call `then`). -const tick = () => - new Promise((resolve) => { - setTimeout(resolve, 0); - }); - -test('parallelizes batches', async () => { - const foo = createPromiseWithResolve(); - const bar = createPromiseWithResolve(); - const baz = createPromiseWithResolve(); - - const batches = [[foo, bar], [baz]]; - const parallelize = parallelizeBatches(batches, async (obj) => { - obj.called = true; - await obj.promise; - }); - - const completed: string[] = []; - parallelize.then(() => { - completed.push('parallelizeBatches'); - }); - foo.promise.then(() => { - completed.push('foo'); - }); - bar.promise.then(() => { - completed.push('bar'); - }); - baz.promise.then(() => { - completed.push('baz'); - }); - - expect(foo.called).toBe(true); - expect(bar.called).toBe(true); - expect(baz.called).toBe(false); - expect(completed).toEqual([]); - - bar.resolve(); - await tick(); - - expect(completed).toEqual(['bar']); - expect(baz.called).toBe(false); - - foo.resolve(); - await tick(); - - expect(completed).toEqual(['bar', 'foo']); - expect(baz.called).toBe(true); - - baz.resolve(); - await tick(); - - expect(completed).toEqual(['bar', 'foo', 'baz', 'parallelizeBatches']); -}); - -test('schedules at most 4 calls at the same time (concurrency)', async () => { - const foo = createPromiseWithResolve(); - const bar = createPromiseWithResolve(); - const baz = createPromiseWithResolve(); - const quux = createPromiseWithResolve(); - const foobar = createPromiseWithResolve(); - - const batches = [[foo, bar, baz, quux, foobar]]; - const parallelize = parallelizeBatches(batches, async (obj) => { - obj.called = true; - await obj.promise; - }); - - expect(foo.called).toBe(true); - expect(bar.called).toBe(true); - expect(baz.called).toBe(true); - expect(quux.called).toBe(true); - expect(foobar.called).toBe(false); - - foo.resolve(); - await tick(); - - expect(foobar.called).toBe(true); - - bar.resolve(); - baz.resolve(); - quux.resolve(); - foobar.resolve(); - await tick(); - - await expect(parallelize).resolves.toBe(undefined); -}); - -test('rejects if any promise rejects', async () => { - const foo = createPromiseWithResolve(); - const bar = createPromiseWithResolve(); - const baz = createPromiseWithResolve(); - - const batches = [[foo, bar], [baz]]; - const parallelize = parallelizeBatches(batches, async (obj) => { - await obj.promise; - }); - - foo.reject(new Error('foo failed')); - - await expect(parallelize).rejects.toThrow('foo failed'); -}); - -function createPromiseWithResolve() { - let resolve: (val?: any) => void; - let reject: (err?: any) => void; - const promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - return { promise, resolve: resolve!, reject: reject!, called: false }; -} diff --git a/packages/kbn-pm/src/utils/parallelize.ts b/packages/kbn-pm/src/utils/parallelize.ts deleted file mode 100644 index afd953fdcccb7..0000000000000 --- a/packages/kbn-pm/src/utils/parallelize.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -export async function parallelizeBatches(batches: T[][], fn: (item: T) => Promise) { - for (const batch of batches) { - // We need to make sure the entire batch has completed before we can move on - // to the next batch - await parallelize(batch, fn); - } -} - -export async function parallelize(items: T[], fn: (item: T) => Promise, concurrency = 4) { - if (items.length === 0) { - return; - } - - return new Promise((resolve, reject) => { - let activePromises = 0; - const values = items.slice(0); - - async function scheduleItem(item: T) { - activePromises++; - - try { - await fn(item); - - activePromises--; - - if (values.length > 0) { - // We have more work to do, so we schedule the next promise - scheduleItem(values.shift()!); - } else if (activePromises === 0) { - // We have no more values left, and all items have completed, so we've - // completed all the work. - resolve(); - } - } catch (error) { - reject(error); - } - } - - values.splice(0, concurrency).map(scheduleItem); - }); -} diff --git a/packages/kbn-pm/src/utils/project.test.ts b/packages/kbn-pm/src/utils/project.test.ts deleted file mode 100644 index 389dbf123cd52..0000000000000 --- a/packages/kbn-pm/src/utils/project.test.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { join, resolve } from 'path'; - -import { IPackageJson } from './package_json'; -import { Project } from './project'; - -const rootPath = resolve(`${__dirname}/__fixtures__/kibana`); - -const createProjectWith = (packageJson: IPackageJson, path = '') => - new Project( - { - name: 'kibana', - version: '1.0.0', - ...packageJson, - }, - join(rootPath, path) - ); - -describe('fromPath', () => { - test('reads project.json at path and constructs Project', async () => { - const kibana = await Project.fromPath(rootPath); - - expect(kibana.name).toBe('kibana'); - }); -}); - -test('fields', async () => { - const kibana = createProjectWith({ - dependencies: { - foo: '1.2.3', - }, - scripts: { - test: 'jest', - }, - }); - - expect(kibana.name).toBe('kibana'); - - expect(kibana.hasDependencies()).toBe(true); - expect(kibana.allDependencies).toEqual({ foo: '1.2.3' }); - - expect(kibana.hasScript('test')).toBe(true); - expect(kibana.hasScript('build')).toBe(false); -}); - -describe('#getExecutables()', () => { - test('converts bin:string to an object with absolute paths', () => { - const project = createProjectWith({ - bin: './bin/script.js', - }); - - expect(project.getExecutables()).toEqual({ - kibana: resolve(rootPath, 'bin/script.js'), - }); - }); - - test('resolves absolute paths when bin is an object', () => { - const project = createProjectWith({ - bin: { - script1: 'bin/script1.js', - script2: './bin/script2.js', - }, - }); - - expect(project.getExecutables()).toEqual({ - script1: resolve(rootPath, 'bin/script1.js'), - script2: resolve(rootPath, 'bin/script2.js'), - }); - }); - - test('returns empty object when bin is missing, or falsy', () => { - expect(createProjectWith({}).getExecutables()).toEqual({}); - expect(createProjectWith({ bin: null }).getExecutables()).toEqual({}); - expect(createProjectWith({ bin: false }).getExecutables()).toEqual({}); - expect(createProjectWith({ bin: 0 }).getExecutables()).toEqual({}); - }); - - test('throws CliError when bin is something strange', () => { - expect(() => createProjectWith({ bin: 1 }).getExecutables()).toThrowErrorMatchingSnapshot(); - }); -}); diff --git a/packages/kbn-pm/src/utils/project.ts b/packages/kbn-pm/src/utils/project.ts deleted file mode 100644 index 842f828543116..0000000000000 --- a/packages/kbn-pm/src/utils/project.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import Fs from 'fs'; -import Path from 'path'; -import { inspect } from 'util'; - -import { CliError } from './errors'; -import { log } from './log'; -import { - IPackageDependencies, - IPackageJson, - IPackageScripts, - isLinkDependency, - readPackageJson, -} from './package_json'; -import { runScriptInPackage, runScriptInPackageStreaming } from './scripts'; - -interface BuildConfig { - skip?: boolean; - oss?: boolean; -} - -interface CleanConfig { - extraPatterns?: string[]; -} - -export class Project { - public static async fromPath(path: string) { - const pkgJson = await readPackageJson(path); - return new Project(pkgJson, path); - } - - /** parsed package.json */ - public readonly json: IPackageJson; - /** absolute path to the package.json file in the project */ - public readonly packageJsonLocation: string; - /** absolute path to the node_modules in the project (might not actually exist) */ - public readonly nodeModulesLocation: string; - /** absolute path to the target directory in the project (might not actually exist) */ - public readonly targetLocation: string; - /** absolute path to the directory containing the project */ - public readonly path: string; - /** the version of the project */ - public readonly version: string; - /** merged set of dependencies of the project, [name => version range] */ - public readonly allDependencies: IPackageDependencies; - /** regular dependencies of the project, [name => version range] */ - public readonly productionDependencies: IPackageDependencies; - /** development dependencies of the project, [name => version range] */ - public readonly devDependencies: IPackageDependencies; - /** scripts defined in the package.json file for the project [name => body] */ - public readonly scripts: IPackageScripts; - /** states if this project is a Bazel package */ - public readonly bazelPackage: boolean; - - public isSinglePackageJsonProject = false; - - constructor(packageJson: IPackageJson, projectPath: string) { - this.json = Object.freeze(packageJson); - this.path = projectPath; - - this.packageJsonLocation = Path.resolve(this.path, 'package.json'); - this.nodeModulesLocation = Path.resolve(this.path, 'node_modules'); - this.targetLocation = Path.resolve(this.path, 'target'); - - this.version = this.json.version; - this.productionDependencies = this.json.dependencies || {}; - this.devDependencies = this.json.devDependencies || {}; - this.allDependencies = { - ...this.devDependencies, - ...this.productionDependencies, - }; - this.isSinglePackageJsonProject = this.json.name === 'kibana'; - - this.scripts = this.json.scripts || {}; - - this.bazelPackage = - !this.isSinglePackageJsonProject && Fs.existsSync(Path.resolve(this.path, 'BUILD.bazel')); - } - - public get name(): string { - return this.json.name; - } - - public getBuildConfig(): BuildConfig { - return (this.json.kibana && this.json.kibana.build) || {}; - } - - public getCleanConfig(): CleanConfig { - return (this.json.kibana && this.json.kibana.clean) || {}; - } - - public isBazelPackage() { - return this.bazelPackage; - } - - public isFlaggedAsDevOnly() { - return !!(this.json.kibana && this.json.kibana.devOnly); - } - - public hasScript(name: string) { - return name in this.scripts; - } - - public getExecutables(): { [key: string]: string } { - const raw = this.json.bin; - - if (!raw) { - return {}; - } - - if (typeof raw === 'string') { - return { - [this.name]: Path.resolve(this.path, raw), - }; - } - - if (typeof raw === 'object') { - const binsConfig: { [k: string]: string } = {}; - for (const binName of Object.keys(raw)) { - binsConfig[binName] = Path.resolve(this.path, raw[binName]); - } - return binsConfig; - } - - throw new CliError( - `[${this.name}] has an invalid "bin" field in its package.json, ` + - `expected an object or a string`, - { - binConfig: inspect(raw), - package: `${this.name} (${this.packageJsonLocation})`, - } - ); - } - - public async runScript(scriptName: string, args: string[] = []) { - log.info(`Running script [${scriptName}] in [${this.name}]:`); - return runScriptInPackage(scriptName, args, this); - } - - public runScriptStreaming( - scriptName: string, - options: { args?: string[]; debug?: boolean } = {} - ) { - return runScriptInPackageStreaming({ - script: scriptName, - args: options.args || [], - pkg: this, - debug: options.debug, - }); - } - - public hasDependencies() { - return Object.keys(this.allDependencies).length > 0; - } - - public isEveryDependencyLocal() { - return Object.values(this.allDependencies).every((dep) => isLinkDependency(dep)); - } -} diff --git a/packages/kbn-pm/src/utils/projects.test.ts b/packages/kbn-pm/src/utils/projects.test.ts deleted file mode 100644 index c87876642cf0b..0000000000000 --- a/packages/kbn-pm/src/utils/projects.test.ts +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { mkdir, symlink } from 'fs'; -import { join, resolve } from 'path'; -import del from 'del'; -import { promisify } from 'util'; - -import { getProjectPaths } from '../config'; -import { Project } from './project'; -import { - buildProjectGraph, - getProjects, - includeTransitiveProjects, - ProjectGraph, - ProjectMap, - topologicallyBatchProjects, -} from './projects'; - -const rootPath = resolve(__dirname, '__fixtures__/kibana'); -const rootPlugins = join(rootPath, 'plugins'); - -describe('#getProjects', () => { - beforeAll(async () => { - await promisify(mkdir)(rootPlugins); - - await promisify(symlink)( - join(__dirname, '__fixtures__/symlinked-plugins/corge'), - join(rootPlugins, 'corge') - ); - }); - - afterAll(async () => await del(rootPlugins)); - - test('find all packages in the packages directory', async () => { - const projects = await getProjects(rootPath, ['packages/*']); - - const expectedProjects = ['bar', 'foo']; - - expect(projects.size).toBe(2); - expect([...projects.keys()]).toEqual(expect.arrayContaining(expectedProjects)); - }); - - test('can specify root as a separate project', async () => { - const projects = await getProjects(rootPath, ['.']); - - expect(projects.size).toBe(1); - expect([...projects.keys()]).toEqual(['kibana']); - }); - - test('handles packages outside root', async () => { - const projects = await getProjects(rootPath, ['../plugins/*']); - - const expectedProjects = ['baz', 'quux', 'zorge']; - - expect(projects.size).toBe(3); - expect([...projects.keys()]).toEqual(expect.arrayContaining(expectedProjects)); - }); - - test('throws if multiple projects has the same name', async () => { - await expect( - getProjects(rootPath, ['../plugins/*', '../other-plugins/*']) - ).rejects.toHaveProperty('message', 'There are multiple projects with the same name [baz]'); - }); - - test('includes additional projects in package.json', async () => { - const projectPaths = getProjectPaths({ rootPath }); - const projects = await getProjects(rootPath, projectPaths); - - const expectedProjects = [ - 'kibana', - 'bar', - 'foo', - 'with-additional-projects', - 'quux', - 'baz', - 'bar', - ]; - - expect([...projects.keys()]).toEqual(expect.arrayContaining(expectedProjects)); - expect(projects.size).toBe(expectedProjects.length); - }); - - describe('with exclude/include filters', () => { - let projectPaths: string[]; - beforeEach(() => { - projectPaths = getProjectPaths({ rootPath }); - }); - - test('excludes projects specified in `exclude` filter', async () => { - const projects = await getProjects(rootPath, projectPaths, { - exclude: ['foo', 'bar', 'baz'], - }); - - expect([...projects.keys()].sort()).toEqual([ - 'corge', - 'kibana', - 'quux', - 'with-additional-projects', - ]); - }); - - test('ignores unknown projects specified in `exclude` filter', async () => { - const projects = await getProjects(rootPath, projectPaths, { - exclude: ['unknown-foo', 'bar', 'unknown-baz'], - }); - - expect([...projects.keys()].sort()).toEqual([ - 'baz', - 'corge', - 'foo', - 'kibana', - 'quux', - 'with-additional-projects', - ]); - }); - - test('includes only projects specified in `include` filter', async () => { - const projects = await getProjects(rootPath, projectPaths, { - include: ['foo', 'bar'], - }); - - expect([...projects.keys()].sort()).toEqual(['bar', 'foo']); - }); - - test('ignores unknown projects specified in `include` filter', async () => { - const projects = await getProjects(rootPath, projectPaths, { - include: ['unknown-foo', 'bar', 'unknown-baz'], - }); - - expect([...projects.keys()].sort()).toEqual(['bar']); - }); - - test('respects both `include` and `exclude` filters if specified at the same time', async () => { - const projects = await getProjects(rootPath, projectPaths, { - exclude: ['bar'], - include: ['foo', 'bar', 'baz'], - }); - - expect([...projects.keys()].sort()).toEqual(['baz', 'foo']); - }); - - test('does not return any project if wrong `include` filter is specified', async () => { - const projects = await getProjects(rootPath, projectPaths, { - include: ['unknown-foo', 'unknown-bar'], - }); - - expect(projects.size).toBe(0); - }); - - test('does not return any project if `exclude` filter is specified for all projects', async () => { - const projects = await getProjects(rootPath, projectPaths, { - exclude: ['kibana', 'bar', 'corge', 'foo', 'with-additional-projects', 'quux', 'baz'], - }); - - expect(projects.size).toBe(0); - }); - - test('does not return any project if `exclude` and `include` filters are mutually exclusive', async () => { - const projects = await getProjects(rootPath, projectPaths, { - exclude: ['foo', 'bar'], - include: ['foo', 'bar'], - }); - - expect(projects.size).toBe(0); - }); - }); -}); - -describe('#buildProjectGraph', () => { - test('builds full project graph', async () => { - const allProjects = await getProjects(rootPath, ['.', 'packages/*', '../plugins/*']); - const graph = buildProjectGraph(allProjects); - - const expected: { [k: string]: string[] } = {}; - for (const [projectName, projects] of graph.entries()) { - expected[projectName] = projects.map((project: Project) => project.name); - } - - expect(expected).toMatchSnapshot(); - }); -}); - -describe('#topologicallyBatchProjects', () => { - let projects: ProjectMap; - let graph: ProjectGraph; - beforeEach(async () => { - projects = await getProjects(rootPath, ['.', 'packages/*', '../plugins/*']); - graph = buildProjectGraph(projects); - }); - - test('batches projects topologically based on their project dependencies', async () => { - const batches = topologicallyBatchProjects(projects, graph); - - const expectedBatches = batches.map((batch) => batch.map((project) => project.name)); - - expect(expectedBatches).toMatchSnapshot(); - }); - - test('batches projects topologically even if graph contains projects not presented in the project map', async () => { - // Make sure that the project we remove really existed in the projects map. - expect(projects.delete('foo')).toBe(true); - - const batches = topologicallyBatchProjects(projects, graph); - - const expectedBatches = batches.map((batch) => batch.map((project) => project.name)); - - expect(expectedBatches).toMatchSnapshot(); - }); -}); - -describe('#includeTransitiveProjects', () => { - test('includes transitive dependencies for Kibana package', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*']); - - const kibana = projects.get('kibana')!; - const withTransitive = includeTransitiveProjects([kibana], projects); - - expect([...withTransitive.keys()]).toEqual(['kibana', 'foo']); - }); - - test('handles multiple projects with same transitive dep', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*']); - - const kibana = projects.get('kibana')!; - const bar = projects.get('bar')!; - const withTransitive = includeTransitiveProjects([kibana, bar], projects); - - expect([...withTransitive.keys()]).toEqual(['kibana', 'bar', 'foo']); - }); - - test('handles projects with no deps', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*']); - - const foo = projects.get('foo')!; - const withTransitive = includeTransitiveProjects([foo], projects); - - expect([...withTransitive.keys()]).toEqual(['foo']); - }); - - test('includes dependencies of dependencies', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*', '../plugins/*']); - - const quux = projects.get('quux')!; - const withTransitive = includeTransitiveProjects([quux], projects); - - expect([...withTransitive.keys()]).toEqual(['quux']); - }); -}); diff --git a/packages/kbn-pm/src/utils/projects.ts b/packages/kbn-pm/src/utils/projects.ts deleted file mode 100644 index e30dfc9f4c876..0000000000000 --- a/packages/kbn-pm/src/utils/projects.ts +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import globSync from 'glob'; -import path from 'path'; -import { promisify } from 'util'; - -import { CliError } from './errors'; -import { log } from './log'; -import { Project } from './project'; - -const glob = promisify(globSync); - -/** a Map of project names to Project instances */ -export type ProjectMap = Map; -export type ProjectGraph = Map; -export interface IProjectsOptions { - include?: string[]; - exclude?: string[]; -} - -export async function getProjects( - rootPath: string, - projectsPathsPatterns: string[], - { include = [], exclude = [] }: IProjectsOptions = {}, - bazelOnly: boolean = false -) { - const projects: ProjectMap = new Map(); - - for (const pattern of projectsPathsPatterns) { - const pathsToProcess = await packagesFromGlobPattern({ pattern, rootPath }); - - for (const filePath of pathsToProcess) { - const projectConfigPath = normalize(filePath); - const projectDir = path.dirname(projectConfigPath); - const project = await Project.fromPath(projectDir); - - const excludeProject = - exclude.includes(project.name) || - (include.length > 0 && !include.includes(project.name)) || - (bazelOnly && !project.isBazelPackage()); - - if (excludeProject) { - continue; - } - - if (projects.has(project.name)) { - throw new CliError(`There are multiple projects with the same name [${project.name}]`, { - name: project.name, - paths: [project.path, projects.get(project.name)!.path], - }); - } - - projects.set(project.name, project); - } - } - - return projects; -} - -export async function getNonBazelProjectsOnly(projects: ProjectMap) { - const bazelProjectsOnly: ProjectMap = new Map(); - - for (const project of projects.values()) { - if (!project.isBazelPackage()) { - bazelProjectsOnly.set(project.name, project); - } - } - - return bazelProjectsOnly; -} - -export async function getBazelProjectsOnly(projects: ProjectMap) { - const bazelProjectsOnly: ProjectMap = new Map(); - - for (const project of projects.values()) { - if (project.isBazelPackage()) { - bazelProjectsOnly.set(project.name, project); - } - } - - return bazelProjectsOnly; -} - -function packagesFromGlobPattern({ pattern, rootPath }: { pattern: string; rootPath: string }) { - const globOptions = { - cwd: rootPath, - - // Should throw in case of unusual errors when reading the file system - strict: true, - - // Always returns absolute paths for matched files - absolute: true, - - // Do not match ** against multiple filenames - // (This is only specified because we currently don't have a need for it.) - noglobstar: true, - }; - - return glob(path.join(pattern, 'package.json'), globOptions); -} - -// https://github.com/isaacs/node-glob/blob/master/common.js#L104 -// glob always returns "\\" as "/" in windows, so everyone -// gets normalized because we can't have nice things. -function normalize(dir: string) { - return path.normalize(dir); -} - -export function buildProjectGraph(projects: ProjectMap) { - const projectGraph: ProjectGraph = new Map(); - - for (const project of projects.values()) { - const projectDeps: Project[] = []; - const dependencies = project.allDependencies; - - if (!project.isSinglePackageJsonProject && Object.keys(dependencies).length > 0) { - log.warning( - `${project.name} is not allowed to hold local dependencies and they will be discarded. Please declare them at the root package.json` - ); - } - - if (!project.isSinglePackageJsonProject) { - projectGraph.set(project.name, projectDeps); - continue; - } - - for (const depName of Object.keys(dependencies)) { - if (projects.has(depName)) { - const dep = projects.get(depName)!; - projectDeps.push(dep); - } - } - - projectGraph.set(project.name, projectDeps); - } - - return projectGraph; -} - -export function topologicallyBatchProjects( - projectsToBatch: ProjectMap, - projectGraph: ProjectGraph -) { - // We're going to be chopping stuff out of this list, so copy it. - const projectsLeftToBatch = new Set(projectsToBatch.keys()); - const batches = []; - - while (projectsLeftToBatch.size > 0) { - // Get all projects that have no remaining dependencies within the repo - // that haven't yet been picked. - const batch = []; - for (const projectName of projectsLeftToBatch) { - const projectDeps = projectGraph.get(projectName)!; - const needsDependenciesBatched = projectDeps.some((dep) => projectsLeftToBatch.has(dep.name)); - - if (!needsDependenciesBatched) { - batch.push(projectsToBatch.get(projectName)!); - } - } - - // If we weren't able to find a project with no remaining dependencies, - // then we've encountered a cycle in the dependency graph. - const hasCycles = batch.length === 0; - if (hasCycles) { - const cycleProjectNames = [...projectsLeftToBatch]; - const message = - 'Encountered a cycle in the dependency graph. Projects in cycle are:\n' + - cycleProjectNames.join(', '); - - throw new CliError(message); - } - - batches.push(batch); - - batch.forEach((project) => projectsLeftToBatch.delete(project.name)); - } - - return batches; -} - -export function includeTransitiveProjects( - subsetOfProjects: Project[], - allProjects: ProjectMap, - { onlyProductionDependencies = false } = {} -) { - const projectsWithDependents: ProjectMap = new Map(); - - // the current list of packages we are expanding using breadth-first-search - const toProcess = [...subsetOfProjects]; - - while (toProcess.length > 0) { - const project = toProcess.shift()!; - - const dependencies = onlyProductionDependencies - ? project.productionDependencies - : project.allDependencies; - - Object.keys(dependencies).forEach((dep) => { - if (allProjects.has(dep)) { - toProcess.push(allProjects.get(dep)!); - } - }); - - projectsWithDependents.set(project.name, project); - } - - return projectsWithDependents; -} diff --git a/packages/kbn-pm/src/utils/projects_tree.test.ts b/packages/kbn-pm/src/utils/projects_tree.test.ts deleted file mode 100644 index 73626b2429867..0000000000000 --- a/packages/kbn-pm/src/utils/projects_tree.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { resolve } from 'path'; - -import { getProjectPaths } from '../config'; -import { stripAnsiSnapshotSerializer } from '../test_helpers'; -import { getProjects } from './projects'; -import { renderProjectsTree } from './projects_tree'; - -const rootPath = resolve(`${__dirname}/__fixtures__/kibana`); - -expect.addSnapshotSerializer(stripAnsiSnapshotSerializer); - -test('handles projects with root folder', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*']); - - const tree = await renderProjectsTree(rootPath, projects); - expect(tree).toMatchSnapshot(); -}); - -test('handles projects outside root folder', async () => { - const projects = await getProjects(rootPath, ['.', 'packages/*', '../plugins/*']); - - const tree = await renderProjectsTree(rootPath, projects); - expect(tree).toMatchSnapshot(); -}); - -test('handles projects within projects outside root folder', async () => { - const projectPaths = getProjectPaths({ rootPath }); - const projects = await getProjects(rootPath, projectPaths); - - const tree = await renderProjectsTree(rootPath, projects); - expect(tree).toMatchSnapshot(); -}); diff --git a/packages/kbn-pm/src/utils/projects_tree.ts b/packages/kbn-pm/src/utils/projects_tree.ts deleted file mode 100644 index 8eded35e063ae..0000000000000 --- a/packages/kbn-pm/src/utils/projects_tree.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import chalk from 'chalk'; -import path from 'path'; - -import { Project } from './project'; - -const projectKey = Symbol('__project'); - -export function renderProjectsTree(rootPath: string, projects: Map) { - const projectsTree = buildProjectsTree(rootPath, projects); - return treeToString(createTreeStructure(projectsTree)); -} - -export interface ITree { - name?: string; - children?: ITreeChildren; -} -// eslint-disable-next-line @typescript-eslint/no-empty-interface -interface ITreeChildren extends Array {} - -type DirOrProjectName = string | typeof projectKey; - -// eslint-disable-next-line @typescript-eslint/no-empty-interface -interface IProjectsTree extends Map {} - -export function treeToString(tree: ITree) { - return [tree.name].concat(childrenToStrings(tree.children, '')).join('\n'); -} - -function childrenToStrings(tree: ITreeChildren | undefined, treePrefix: string) { - if (tree === undefined) { - return []; - } - - let strings: string[] = []; - tree.forEach((node, index) => { - const isLastNode = tree.length - 1 === index; - const nodePrefix = isLastNode ? '└── ' : '├── '; - const childPrefix = isLastNode ? ' ' : '│ '; - const childrenPrefix = treePrefix + childPrefix; - - strings.push(`${treePrefix}${nodePrefix}${node.name}`); - strings = strings.concat(childrenToStrings(node.children, childrenPrefix)); - }); - return strings; -} - -function createTreeStructure(tree: IProjectsTree): ITree { - let name: string | undefined; - const children: ITreeChildren = []; - - for (const [dir, project] of tree.entries()) { - // This is a leaf node (aka a project) - if (typeof project === 'string') { - name = chalk.green(project); - continue; - } - - // If there's only one project and the key indicates it's a leaf node, we - // know that we're at a package folder that contains a package.json, so we - // "inline it" so we don't get unnecessary levels, i.e. we'll just see - // `foo` instead of `foo -> foo`. - if (project.size === 1 && project.has(projectKey)) { - const projectName = project.get(projectKey)! as string; - children.push({ - children: [], - name: dirOrProjectName(dir, projectName), - }); - continue; - } - - const subtree = createTreeStructure(project); - - // If the name is specified, we know there's a package at the "root" of the - // subtree itself. - if (subtree.name !== undefined) { - const projectName = subtree.name; - - children.push({ - children: subtree.children, - name: dirOrProjectName(dir, projectName), - }); - continue; - } - - // Special-case whenever we have one child, so we don't get unnecessary - // folders in the output. E.g. instead of `foo -> bar -> baz` we get - // `foo/bar/baz` instead. - if (subtree.children && subtree.children.length === 1) { - const child = subtree.children[0]; - const newName = chalk.dim(path.join(dir.toString(), child.name!)); - - children.push({ - children: child.children, - name: newName, - }); - continue; - } - - children.push({ - children: subtree.children, - name: chalk.dim(dir.toString()), - }); - } - - return { name, children }; -} - -function dirOrProjectName(dir: DirOrProjectName, projectName: string) { - return dir === projectName - ? chalk.green(dir) - : chalk`{dim ${dir.toString()} ({reset.green ${projectName}})}`; -} - -function buildProjectsTree(rootPath: string, projects: Map) { - const tree: IProjectsTree = new Map(); - - for (const project of projects.values()) { - if (rootPath === project.path) { - tree.set(projectKey, project.name); - } else { - const relativeProjectPath = path.relative(rootPath, project.path); - addProjectToTree(tree, relativeProjectPath.split(path.sep), project); - } - } - - return tree; -} - -function addProjectToTree(tree: IProjectsTree, pathParts: string[], project: Project) { - if (pathParts.length === 0) { - tree.set(projectKey, project.name); - } else { - const [currentDir, ...rest] = pathParts; - - if (!tree.has(currentDir)) { - tree.set(currentDir, new Map()); - } - - const subtree = tree.get(currentDir) as IProjectsTree; - addProjectToTree(subtree, rest, project); - } -} diff --git a/packages/kbn-pm/src/utils/regenerate_synthetic_package_map.ts b/packages/kbn-pm/src/utils/regenerate_synthetic_package_map.ts deleted file mode 100644 index c502e11f1a3c8..0000000000000 --- a/packages/kbn-pm/src/utils/regenerate_synthetic_package_map.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import Fs from 'fs/promises'; -import Path from 'path'; - -import normalizePath from 'normalize-path'; -import { KibanaPlatformPlugin } from '@kbn/plugin-discovery'; -import { convertPluginIdToPackageId } from './convert_plugin_id_to_package_id'; - -export async function regenerateSyntheticPackageMap( - plugins: KibanaPlatformPlugin[], - repoRoot: string -) { - const entries: Array<[string, string]> = [['@kbn/core', 'src/core']]; - - for (const plugin of plugins) { - entries.push([ - convertPluginIdToPackageId(plugin.manifest.id), - normalizePath(Path.relative(repoRoot, plugin.directory)), - ]); - } - - await Fs.writeFile( - Path.resolve(repoRoot, 'packages/kbn-synthetic-package-map/synthetic-packages.json'), - JSON.stringify(entries, null, 2) - ); -} diff --git a/packages/kbn-pm/src/utils/scripts.ts b/packages/kbn-pm/src/utils/scripts.ts deleted file mode 100644 index fff2b4ca77a14..0000000000000 --- a/packages/kbn-pm/src/utils/scripts.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { spawn, spawnStreaming } from './child_process'; -import { Project } from './project'; - -const YARN_EXEC = process.env.npm_execpath || 'yarn'; - -/** - * Run script in the given directory - */ -export async function runScriptInPackage(script: string, args: string[], pkg: Project) { - const execOpts = { - cwd: pkg.path, - }; - - await spawn(YARN_EXEC, ['run', script, ...args], execOpts); -} - -/** - * Run script in the given directory - */ -export function runScriptInPackageStreaming({ - script, - args, - pkg, - debug, -}: { - script: string; - args: string[]; - pkg: Project; - debug?: boolean; -}) { - const execOpts = { - cwd: pkg.path, - }; - - return spawnStreaming(YARN_EXEC, ['run', script, ...args], execOpts, { - prefix: pkg.name, - debug, - }); -} diff --git a/packages/kbn-pm/src/utils/validate_dependencies.ts b/packages/kbn-pm/src/utils/validate_dependencies.ts deleted file mode 100644 index dc8c51682d75e..0000000000000 --- a/packages/kbn-pm/src/utils/validate_dependencies.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -// @ts-expect-error published types are useless -import { stringify as stringifyLockfile } from '@yarnpkg/lockfile'; -import dedent from 'dedent'; -import chalk from 'chalk'; -import { sep } from 'path'; - -import { writeFile } from './fs'; -import { Kibana } from './kibana'; -import { YarnLock } from './yarn_lock'; -import { log } from './log'; -import { Project } from './project'; -import { isLinkDependency } from './package_json'; -import { ITree, treeToString } from './projects_tree'; - -export async function validateDependencies(kbn: Kibana, yarnLock: YarnLock) { - // look through all of the packages in the yarn.lock file to see if - // we have accidentally installed multiple lodash v4 versions - const lodash4Versions = new Set(); - const lodash4Reqs = new Set(); - for (const [req, dep] of Object.entries(yarnLock)) { - if (req.startsWith('lodash@') && dep.version.startsWith('4.')) { - lodash4Reqs.add(req); - lodash4Versions.add(dep.version); - } - } - - // if we find more than one lodash v4 version installed then delete - // lodash v4 requests from the yarn.lock file and prompt the user to - // retry bootstrap so that a single v4 version will be installed - if (lodash4Versions.size > 1) { - for (const req of lodash4Reqs) { - delete yarnLock[req]; - } - - await writeFile(kbn.getAbsolute('yarn.lock'), stringifyLockfile(yarnLock), 'utf8'); - - log.error(dedent` - - Multiple version of lodash v4 were detected, so they have been removed - from the yarn.lock file. Please rerun yarn kbn bootstrap to coalese the - lodash versions installed. - - If you still see this error when you re-bootstrap then you might need - to force a new dependency to use the latest version of lodash via the - "resolutions" field in package.json. - - If you have questions about this please reach out to the operations team. - - `); - - process.exit(1); - } - - // look through all the dependencies of production packages and production - // dependencies of those packages to determine if we're shipping any versions - // of lodash v3 in the distributable - const prodDependencies = kbn.resolveAllProductionDependencies(yarnLock, log); - const lodash3Versions = new Set(); - for (const dep of prodDependencies.values()) { - if (dep.name === 'lodash' && dep.version.startsWith('3.')) { - lodash3Versions.add(dep.version); - } - } - - // if any lodash v3 packages were found we abort and tell the user to fix things - if (lodash3Versions.size) { - log.error(dedent` - - Due to changes in the yarn.lock file and/or package.json files a version of - lodash 3 is now included in the production dependencies. To reduce the size of - our distributable and especially our front-end bundles we have decided to - prevent adding any new instances of lodash 3. - - Please inspect the changes to yarn.lock or package.json files to identify where - the lodash 3 version is coming from and remove it. - - If you have questions about this please reack out to the operations team. - - `); - - process.exit(1); - } - - // TODO: remove this once we move into a single package.json - // look through all the package.json files to find packages which have mismatched version ranges - const depRanges = new Map>(); - for (const project of kbn.getAllProjects().values()) { - // Skip if this is an external plugin - if (project.path.includes(`${kbn.kibanaProject?.path}${sep}plugins`)) { - continue; - } - - for (const [dep, range] of Object.entries(project.allDependencies)) { - const existingDep = depRanges.get(dep); - if (!existingDep) { - depRanges.set(dep, [ - { - range, - projects: [project], - }, - ]); - continue; - } - - const existingRange = existingDep.find((existing) => existing.range === range); - if (!existingRange) { - existingDep.push({ - range, - projects: [project], - }); - continue; - } - - existingRange.projects.push(project); - } - } - - const duplicateRanges = Array.from(depRanges.entries()) - .filter( - ([, ranges]) => ranges.length > 1 && !ranges.every((rng) => isLinkDependency(rng.range)) - ) - .reduce( - (acc: string[], [dep, ranges]) => [ - ...acc, - dep, - ...ranges.map( - ({ range, projects }) => ` ${range} => ${projects.map((p) => p.name).join(', ')}` - ), - ], - [] - ) - .join('\n '); - - if (duplicateRanges) { - log.error(dedent` - - [single_version_dependencies] Multiple version ranges for the same dependency - were found declared across different package.json files. Please consolidate - those to match across all package.json files. Different versions for the - same dependency is not supported. - - If you have questions about this please reach out to the operations team. - - The conflicting dependencies are: - - ${duplicateRanges} - `); - - process.exit(1); - } - - // look for packages that have the the `kibana.devOnly` flag in their package.json - // and make sure they aren't included in the production dependencies of Kibana - const devOnlyProjectsInProduction = getDevOnlyProductionDepsTree(kbn, 'kibana'); - if (devOnlyProjectsInProduction) { - log.error(dedent` - Some of the packages in the production dependency chain for Kibana and X-Pack are - flagged with "kibana.devOnly" in their package.json. Please check changes made to - packages and their dependencies to ensure they don't end up in production. - - The devOnly dependencies that are being dependend on in production are: - - ${treeToString(devOnlyProjectsInProduction).split('\n').join('\n ')} - `); - - process.exit(1); - } - - log.success('yarn.lock analysis completed without any issues'); -} - -function getDevOnlyProductionDepsTree(kbn: Kibana, projectName: string) { - const project = kbn.getProject(projectName); - const childProjectNames = [ - ...Object.keys(project.productionDependencies).filter((name) => kbn.hasProject(name)), - ...(projectName === 'kibana' ? ['x-pack'] : []), - ]; - - const children = childProjectNames - .map((n) => getDevOnlyProductionDepsTree(kbn, n)) - .filter((t): t is ITree => !!t); - - if (!children.length && !project.isFlaggedAsDevOnly()) { - return; - } - - const tree: ITree = { - name: project.isFlaggedAsDevOnly() ? chalk.red.bold(projectName) : projectName, - children, - }; - - return tree; -} diff --git a/packages/kbn-pm/src/utils/watch.ts b/packages/kbn-pm/src/utils/watch.ts deleted file mode 100644 index 0b4b1c2956080..0000000000000 --- a/packages/kbn-pm/src/utils/watch.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import * as Rx from 'rxjs'; -import { catchError, delay, finalize, first, map, mapTo, mergeMap, timeout } from 'rxjs/operators'; - -/** - * Number of milliseconds we wait before we fall back to the default watch handler. - */ -const defaultHandlerDelay = 3000; - -/** - * If default watch handler is used, then it's the number of milliseconds we wait for - * any build output before we consider watch task ready. - */ -const defaultHandlerReadinessTimeout = 2000; - -/** - * Describes configurable watch options. - */ -interface IWatchOptions { - /** - * Number of milliseconds to wait before we fall back to default watch handler. - */ - handlerDelay?: number; - - /** - * Number of milliseconds that default watch handler waits for any build output before - * it considers initial build completed. If build process outputs anything in a given - * time span, the timeout is restarted. - */ - handlerReadinessTimeout?: number; -} - -function getWatchHandlers( - buildOutput$: Rx.Observable, - { - handlerDelay = defaultHandlerDelay, - handlerReadinessTimeout = defaultHandlerReadinessTimeout, - }: IWatchOptions -) { - const typescriptHandler = buildOutput$.pipe( - first((data) => data.includes('$ tsc')), - map(() => - buildOutput$.pipe( - first((data) => data.includes('Compilation complete.')), - mapTo('tsc') - ) - ) - ); - - const webpackHandler = buildOutput$.pipe( - first((data) => data.includes('$ webpack')), - map(() => - buildOutput$.pipe( - first((data) => data.includes('Chunk Names')), - mapTo('webpack') - ) - ) - ); - - const defaultHandler = Rx.of(undefined).pipe( - delay(handlerReadinessTimeout), - map(() => - buildOutput$.pipe( - timeout(handlerDelay), - catchError(() => Rx.of('timeout')) - ) - ) - ); - - return [typescriptHandler, webpackHandler, defaultHandler]; -} - -export function waitUntilWatchIsReady(stream: NodeJS.EventEmitter, opts: IWatchOptions = {}) { - const buildOutput$ = new Rx.Subject(); - const onDataListener = (data: Buffer) => buildOutput$.next(data.toString('utf-8')); - const onEndListener = () => buildOutput$.complete(); - const onErrorListener = (e: Error) => buildOutput$.error(e); - - stream.once('end', onEndListener); - stream.once('error', onErrorListener); - stream.on('data', onDataListener); - - return Rx.firstValueFrom( - Rx.race(getWatchHandlers(buildOutput$, opts)).pipe( - mergeMap((whenReady) => whenReady), - finalize(() => { - stream.removeListener('data', onDataListener); - stream.removeListener('end', onEndListener); - stream.removeListener('error', onErrorListener); - - buildOutput$.complete(); - }) - ) - ); -} diff --git a/packages/kbn-pm/src/utils/yarn_lock.ts b/packages/kbn-pm/src/utils/yarn_lock.ts deleted file mode 100644 index ce1e3ddae4843..0000000000000 --- a/packages/kbn-pm/src/utils/yarn_lock.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -// @ts-expect-error published types are worthless -import { parse as parseLockfile } from '@yarnpkg/lockfile'; - -import { readFile } from './fs'; -import { Kibana } from './kibana'; -import { Project } from './project'; -import { Log } from './log'; - -export interface YarnLock { - /** a simple map of name@versionrange tags to metadata about a package */ - [key: string]: { - /** resolved version installed for this pacakge */ - version: string; - /** resolved url for this pacakge */ - resolved: string; - /** yarn calculated integrity value for this package */ - integrity: string; - dependencies?: { - /** name => versionRange dependencies listed in package's manifest */ - [key: string]: string; - }; - optionalDependencies?: { - /** name => versionRange dependencies listed in package's manifest */ - [key: string]: string; - }; - }; -} - -export async function readYarnLock(kbn: Kibana): Promise { - try { - const contents = await readFile(kbn.getAbsolute('yarn.lock'), 'utf8'); - const yarnLock = parseLockfile(contents); - - if (yarnLock.type === 'success') { - return yarnLock.object; - } - - throw new Error('unable to read yarn.lock file, please run `yarn kbn bootstrap`'); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - return {}; -} - -/** - * Get a list of the absolute dependencies of this project, as resolved - * in the yarn.lock file, does not include other projects in the workspace - * or their dependencies - */ -export function resolveDepsForProject({ - project: rootProject, - yarnLock, - kbn, - log, - productionDepsOnly, - includeDependentProject, -}: { - project: Project; - yarnLock: YarnLock; - kbn: Kibana; - log: Log; - productionDepsOnly: boolean; - includeDependentProject: boolean; -}) { - /** map of [name@range, { name, version }] */ - const resolved = new Map(); - - const seenProjects = new Set(); - const projectQueue: Project[] = [rootProject]; - const depQueue: Array<[string, string]> = []; - - while (projectQueue.length) { - const project = projectQueue.shift()!; - if (seenProjects.has(project)) { - continue; - } - seenProjects.add(project); - - const projectDeps = Object.entries( - productionDepsOnly ? project.productionDependencies : project.allDependencies - ); - for (const [name, versionRange] of projectDeps) { - depQueue.push([name, versionRange]); - } - - while (depQueue.length) { - const [name, versionRange] = depQueue.shift()!; - const req = `${name}@${versionRange}`; - - if (resolved.has(req)) { - continue; - } - - if (includeDependentProject && kbn.hasProject(name)) { - projectQueue.push(kbn.getProject(name)!); - } - - if (!kbn.hasProject(name)) { - const pkg = yarnLock[req]; - if (!pkg) { - log.warning( - 'yarn.lock file is out of date, please run `yarn kbn bootstrap` to re-enable caching' - ); - return; - } - - resolved.set(req, { name, version: pkg.version }); - - const allDepsEntries = [ - ...Object.entries(pkg.dependencies || {}), - ...Object.entries(pkg.optionalDependencies || {}), - ]; - - for (const [childName, childVersionRange] of allDepsEntries) { - depQueue.push([childName, childVersionRange]); - } - } - } - } - - return resolved; -} diff --git a/packages/kbn-pm/tsconfig.json b/packages/kbn-pm/tsconfig.json deleted file mode 100644 index f12e49fe28d45..0000000000000 --- a/packages/kbn-pm/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.bazel.json", - "compilerOptions": { - "outDir": "target/types", - "types": [ - "jest", - "node" - ] - }, - "include": [ - "./index.d.ts", - "./src/**/*.ts" - ] -} diff --git a/packages/kbn-pm/webpack.config.js b/packages/kbn-pm/webpack.config.js deleted file mode 100644 index 60059ac038e79..0000000000000 --- a/packages/kbn-pm/webpack.config.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -const path = require('path'); - -module.exports = { - mode: 'none', - entry: { - index: './src/index.ts', - }, - target: 'node', - - output: { - path: path.resolve(__dirname, 'dist'), - filename: '[name].js', - libraryTarget: 'commonjs2', - }, - - resolve: { - extensions: ['.ts', '.js'], - symlinks: false, - }, - - module: { - rules: [ - { - test: /\.ts$/, - use: [ - { - loader: 'babel-loader', - }, - ], - exclude: /node_modules/, - }, - // In order to make it work with Node 10 we had the need to upgrade - // the package cpy to a version >= 7.0.0. In this version cpy is - // using the new globby that relies in the fast-glob which relies - // in the new micromatch. The micromatch (use and class-utils) dependencies having a require - // that uses the lazy-cache which cannot be correctly extracted by webpack. - // According to the documentation we should use the unlazy-loader to solve - // this situation: https://github.com/jonschlinkert/lazy-cache#heads-up - // We can also found some issues arround this who also used unlazy-loader - // to solve this: https://github.com/micromatch/micromatch/issues/55 - { - test: /node_modules\/(use|class-utils)\/utils\.js$/, - use: { - loader: 'unlazy-loader', - }, - }, - ], - }, - - node: { - // Don't replace built-in globals - __filename: false, - __dirname: false, - }, - - externals: { - worker_threads: { - commonjs: 'worker_threads', - }, - }, - - watchOptions: { - ignored: [/node_modules/, /vendor/], - }, - - optimization: { - moduleIds: 'named', - nodeEnv: 'production', - usedExports: true, - sideEffects: true, - minimize: false, - }, -}; diff --git a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts b/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts index 24e4d759989eb..88d4a31cfc5fd 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts +++ b/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts @@ -9,7 +9,7 @@ import { doesNotExistOperator, EVENT_FILTERS_OPERATORS, - EXCEPTION_OPERATORS, + ALL_OPERATORS, existsOperator, isNotOperator, isOperator, @@ -53,6 +53,6 @@ describe('#getOperators', () => { test('it returns all operator types when field type is not null, boolean, or nested', () => { const operator = getOperators(getField('machine.os.raw')); - expect(operator).toEqual(EXCEPTION_OPERATORS); + expect(operator).toEqual(ALL_OPERATORS); }); }); diff --git a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts b/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts index 643c330b15241..638c44b8c31a9 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts +++ b/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts @@ -9,7 +9,7 @@ import { DataViewFieldBase } from '@kbn/es-query'; import { - EXCEPTION_OPERATORS, + ALL_OPERATORS, EVENT_FILTERS_OPERATORS, OperatorOption, doesNotExistOperator, @@ -34,6 +34,6 @@ export const getOperators = (field: DataViewFieldBase | undefined): OperatorOpti } else if (field.name === 'file.path.text') { return EVENT_FILTERS_OPERATORS; } else { - return EXCEPTION_OPERATORS; + return ALL_OPERATORS; } }; diff --git a/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx b/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx index 48f5cbf25b91c..3595b96d7e426 100644 --- a/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx +++ b/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx @@ -132,6 +132,9 @@ describe('operator', () => { { label: 'matches', }, + { + label: 'does not match', + }, ]); }); diff --git a/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts b/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts index ac3236528b671..f9caa6387e359 100644 --- a/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts +++ b/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts @@ -94,6 +94,15 @@ export const matchesOperator: OperatorOption = { value: 'matches', }; +export const doesNotMatchOperator: OperatorOption = { + message: i18n.translate('lists.exceptions.doesNotMatchOperatorLabel', { + defaultMessage: 'does not match', + }), + operator: OperatorEnum.EXCLUDED, + type: OperatorTypeEnum.WILDCARD, + value: 'does_not_match', +}; + export const EVENT_FILTERS_OPERATORS: OperatorOption[] = [ isOperator, isNotOperator, @@ -102,7 +111,11 @@ export const EVENT_FILTERS_OPERATORS: OperatorOption[] = [ matchesOperator, ]; -export const EXCEPTION_OPERATORS: OperatorOption[] = [ +/* + * !IMPORTANT! - Please only add to this list if it is an operator + * supported by the detection engine. + */ +export const DETECTION_ENGINE_EXCEPTION_OPERATORS: OperatorOption[] = [ isOperator, isNotOperator, isOneOfOperator, @@ -112,6 +125,20 @@ export const EXCEPTION_OPERATORS: OperatorOption[] = [ isInListOperator, isNotInListOperator, matchesOperator, + doesNotMatchOperator, +]; + +export const ALL_OPERATORS: OperatorOption[] = [ + isOperator, + isNotOperator, + isOneOfOperator, + isNotOneOfOperator, + existsOperator, + doesNotExistOperator, + isInListOperator, + isNotInListOperator, + matchesOperator, + doesNotMatchOperator, ]; export const EXCEPTION_OPERATORS_SANS_LISTS: OperatorOption[] = [ @@ -121,6 +148,8 @@ export const EXCEPTION_OPERATORS_SANS_LISTS: OperatorOption[] = [ isNotOneOfOperator, existsOperator, doesNotExistOperator, + matchesOperator, + doesNotMatchOperator, ]; export const EXCEPTION_OPERATORS_ONLY_LISTS: OperatorOption[] = [ diff --git a/packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts b/packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts index 966cf4281ad75..e8a9d8e74a486 100644 --- a/packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts +++ b/packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts @@ -20,13 +20,15 @@ import { entriesMatchAny, entriesNested, OsTypeArray, + entriesMatchWildcard, + EntryMatchWildcard, } from '@kbn/securitysolution-io-ts-list-types'; import { Filter } from '@kbn/es-query'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { hasLargeValueList } from '../has_large_value_list'; -type NonListEntry = EntryMatch | EntryMatchAny | EntryNested | EntryExists; +type NonListEntry = EntryMatch | EntryMatchAny | EntryNested | EntryExists | EntryMatchWildcard; interface ExceptionListItemNonLargeList extends ExceptionListItemSchema { entries: NonListEntry[]; } @@ -290,6 +292,25 @@ export const buildMatchAnyClause = (entry: EntryMatchAny): BooleanFilter => { } }; +export const buildMatchWildcardClause = (entry: EntryMatchWildcard): BooleanFilter => { + const { field, operator, value } = entry; + const wildcardClause = { + bool: { + filter: { + wildcard: { + [field]: value, + }, + }, + }, + }; + + if (operator === 'excluded') { + return buildExclusionClause(wildcardClause); + } else { + return wildcardClause; + } +}; + export const buildExistsClause = (entry: EntryExists): BooleanFilter => { const { field, operator } = entry; const existsClause = { @@ -352,15 +373,15 @@ export const createInnerAndClauses = ( entry: NonListEntry, parent?: string ): BooleanFilter | NestedFilter => { + const field = parent != null ? `${parent}.${entry.field}` : entry.field; if (entriesExists.is(entry)) { - const field = parent != null ? `${parent}.${entry.field}` : entry.field; return buildExistsClause({ ...entry, field }); } else if (entriesMatch.is(entry)) { - const field = parent != null ? `${parent}.${entry.field}` : entry.field; return buildMatchClause({ ...entry, field }); } else if (entriesMatchAny.is(entry)) { - const field = parent != null ? `${parent}.${entry.field}` : entry.field; return buildMatchAnyClause({ ...entry, field }); + } else if (entriesMatchWildcard.is(entry)) { + return buildMatchWildcardClause({ ...entry, field }); } else if (entriesNested.is(entry)) { return buildNestedClause(entry); } else { diff --git a/packages/kbn-securitysolution-list-utils/src/helpers/index.ts b/packages/kbn-securitysolution-list-utils/src/helpers/index.ts index 470e15db0404e..3c0fea8577353 100644 --- a/packages/kbn-securitysolution-list-utils/src/helpers/index.ts +++ b/packages/kbn-securitysolution-list-utils/src/helpers/index.ts @@ -36,13 +36,14 @@ import { } from '@kbn/es-query'; import { - EXCEPTION_OPERATORS, + ALL_OPERATORS, EXCEPTION_OPERATORS_SANS_LISTS, doesNotExistOperator, existsOperator, isNotOperator, isOneOfOperator, isOperator, + DETECTION_ENGINE_EXCEPTION_OPERATORS, } from '../autocomplete_operators'; import { @@ -192,7 +193,7 @@ export const getExceptionOperatorSelect = (item: BuilderEntry): OperatorOption = return isOperator; } else { const operatorType = getOperatorType(item); - const foundOperator = EXCEPTION_OPERATORS.find((operatorOption) => { + const foundOperator = ALL_OPERATORS.find((operatorOption) => { return item.operator === operatorOption.operator && operatorType === operatorOption.type; }); @@ -687,12 +688,12 @@ export const getOperatorOptions = ( return isBoolean ? [isOperator] : [isOperator, isOneOfOperator]; } else if (item.nested != null && listType === 'detection') { return isBoolean ? [isOperator, existsOperator] : [isOperator, isOneOfOperator, existsOperator]; + } else if (isBoolean) { + return [isOperator, isNotOperator, existsOperator, doesNotExistOperator]; + } else if (!includeValueListOperators) { + return EXCEPTION_OPERATORS_SANS_LISTS; } else { - return isBoolean - ? [isOperator, isNotOperator, existsOperator, doesNotExistOperator] - : includeValueListOperators - ? EXCEPTION_OPERATORS - : EXCEPTION_OPERATORS_SANS_LISTS; + return listType === 'detection' ? DETECTION_ENGINE_EXCEPTION_OPERATORS : ALL_OPERATORS; } }; diff --git a/packages/kbn-some-dev-log/BUILD.bazel b/packages/kbn-some-dev-log/BUILD.bazel new file mode 100644 index 0000000000000..da84f8e76211f --- /dev/null +++ b/packages/kbn-some-dev-log/BUILD.bazel @@ -0,0 +1,116 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-some-dev-log" +PKG_REQUIRE_NAME = "@kbn/some-dev-log" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-some-dev-log/README.mdx b/packages/kbn-some-dev-log/README.mdx new file mode 100644 index 0000000000000..3e5b9a7375d8b --- /dev/null +++ b/packages/kbn-some-dev-log/README.mdx @@ -0,0 +1,19 @@ +--- +id: kibDevDocsOpsSomeDevLog +slug: /kibana-dev-docs/ops/kbn-some-dev-log +title: "@kbn/some-dev-log" +description: 'LCD types for several dev-focused loggers' +date: 2022-07-14 +tags: ['kibana', 'dev', 'contributor', 'operations', 'packages', 'scripts', 'logging'] +--- + +`@kbn/some-dev-log` implements lowest-common denominator types for several loggers that we use in development tooling. In order for commonly used tools to accept either log instance we need a common interface for them to implement which gives enough functionality to get the job done but doesn't require implementing a bunch of fancy features in all loggers. + +The interface mostly follows the `console.log()` interface, allowing you to pass a string as the first argument and then anything afterwards. The arguments are converted to a string by all loggers using [`util.format()`](https://nodejs.org/api/util.html#utilformatformat-args) from the standard library. + +Currently, the loggers implementing this type are: + + - : The majority of dev tasks should use this log and it is automatically provided by the common dev-task wrapper provided by . + - `Log` class: `@kbn/pm` runs before the repository is bootstrapped and needs a logger to use before other packages are available, so we have a separate and simple log implementation that code which implements the `SomeDevLog` class. Other code in the repository should rarely need to use this class or even know of it's existance. + +Unless your package needs to be used by `@kbn/pm` there is little reason you should need to use this type, but it might be a good idea to use this type if there's a chance we might need to use your package in the future. diff --git a/packages/kbn-pm/jest.config.js b/packages/kbn-some-dev-log/jest.config.js similarity index 82% rename from packages/kbn-pm/jest.config.js rename to packages/kbn-some-dev-log/jest.config.js index 4502d42043d46..f4ba48ad7a21b 100644 --- a/packages/kbn-pm/jest.config.js +++ b/packages/kbn-some-dev-log/jest.config.js @@ -7,7 +7,7 @@ */ module.exports = { - preset: '@kbn/test', + preset: '@kbn/test/jest_node', rootDir: '../..', - roots: ['/packages/kbn-pm'], + roots: ['/packages/kbn-some-dev-log'], }; diff --git a/packages/kbn-some-dev-log/package.json b/packages/kbn-some-dev-log/package.json new file mode 100644 index 0000000000000..f075d74b65359 --- /dev/null +++ b/packages/kbn-some-dev-log/package.json @@ -0,0 +1,10 @@ +{ + "name": "@kbn/some-dev-log", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0", + "kibana": { + "devOnly": true + } +} diff --git a/src/core/public/integrations/index.ts b/packages/kbn-some-dev-log/src/index.ts similarity index 84% rename from src/core/public/integrations/index.ts rename to packages/kbn-some-dev-log/src/index.ts index db21ce0184cc5..e3f11d373ca66 100644 --- a/src/core/public/integrations/index.ts +++ b/packages/kbn-some-dev-log/src/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { IntegrationsService } from './integrations_service'; +export type { SomeDevLog, SomeLogLevel } from './some_dev_log'; diff --git a/packages/kbn-some-dev-log/src/some_dev_log.ts b/packages/kbn-some-dev-log/src/some_dev_log.ts new file mode 100644 index 0000000000000..94e5e7f5d6d18 --- /dev/null +++ b/packages/kbn-some-dev-log/src/some_dev_log.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Basic set of log-level flags, the common levels implemented between + * the ToolingLog and the kbn_pm logger + */ +export type SomeLogLevel = 'verbose' | 'debug' | 'info' | 'quiet'; + +/** + * Generic interface that is implemented by the ToolingLog and the logger + * used by kbn_pm, which is responsible for running before the repo is + * bootstrapped and therefore can't use the ToolingLog. + */ +export interface SomeDevLog { + /** + * Log an info message + */ + info(msg: string, ...rest: any[]): void; + /** + * Log a warning message + */ + warning(msg: string, ...rest: any[]): void; + /** + * Log an error message + */ + error(msg: string, ...rest: any[]): void; + /** + * Log a success message + */ + success(msg: string, ...rest: any[]): void; + /** + * Log a debug message. Only printed to the terminal when --debug or --verbose are passed + */ + debug(msg: string, ...rest: any[]): void; + /** + * Log a verbose message. Only printed to the terminal when --verbose is passed + */ + verbose(msg: string, ...rest: any[]): void; +} diff --git a/packages/kbn-some-dev-log/tsconfig.json b/packages/kbn-some-dev-log/tsconfig.json new file mode 100644 index 0000000000000..789c6b3111115 --- /dev/null +++ b/packages/kbn-some-dev-log/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 7f4821767cd9c..880afe83528a8 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -91,8 +91,8 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { { loader: 'postcss-loader', options: { - config: { - path: require.resolve('@kbn/optimizer/postcss.config.js'), + postcssOptions: { + config: require.resolve('@kbn/optimizer/postcss.config.js'), }, }, }, diff --git a/packages/kbn-test/src/functional_test_runner/lib/mocha/load_test_files.js b/packages/kbn-test/src/functional_test_runner/lib/mocha/load_test_files.js index 59f8f003004b6..7c4a6ddcd1430 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/mocha/load_test_files.js +++ b/packages/kbn-test/src/functional_test_runner/lib/mocha/load_test_files.js @@ -48,7 +48,7 @@ export const loadTestFiles = ({ const testModule = require(path); // eslint-disable-line import/no-dynamic-require const testProvider = testModule.__esModule ? testModule.default : testModule; - runTestProvider(testProvider, path); // eslint-disable-line + runTestProvider(testProvider, path); // eslint-disable-line no-use-before-define }); }; diff --git a/packages/kbn-test/src/jest/run.ts b/packages/kbn-test/src/jest/run.ts index 04e047d694502..daf4706cebdba 100644 --- a/packages/kbn-test/src/jest/run.ts +++ b/packages/kbn-test/src/jest/run.ts @@ -32,7 +32,7 @@ import { map } from 'lodash'; // Patch node 16 types to be compatible with jest 26 // https://github.com/facebook/jest/issues/11640#issuecomment-893867514 -/* eslint-disable */ +/* eslint-disable @typescript-eslint/no-namespace,@typescript-eslint/no-empty-interface,no-console */ declare global { namespace NodeJS { interface Global {} diff --git a/packages/kbn-tinymath/src/index.js b/packages/kbn-tinymath/src/index.js index 83c981031c182..dd23b0847c999 100644 --- a/packages/kbn-tinymath/src/index.js +++ b/packages/kbn-tinymath/src/index.js @@ -35,7 +35,7 @@ function evaluate(expression, scope = {}, injectedFunctions = {}) { } function interpret(node, scope, injectedFunctions) { - const functions = Object.assign({}, includedFunctions, injectedFunctions); // eslint-disable-line + const functions = Object.assign({}, includedFunctions, injectedFunctions); // eslint-disable-line prefer-object-spread/prefer-object-spread return exec(node); function exec(node) { diff --git a/packages/kbn-tooling-log/BUILD.bazel b/packages/kbn-tooling-log/BUILD.bazel index 3acf9108010f9..791757e8ac4b7 100644 --- a/packages/kbn-tooling-log/BUILD.bazel +++ b/packages/kbn-tooling-log/BUILD.bazel @@ -54,7 +54,8 @@ TYPES_DEPS = [ "@npm//tslib", "@npm//@types/node", "@npm//@types/jest", - "//packages/kbn-jest-serializers:npm_module_types" # needed for windows development, only used in tests + "//packages/kbn-some-dev-log:npm_module_types", + "//packages/kbn-jest-serializers:npm_module_types", # needed for windows development, only used in tests ] jsts_transpiler( diff --git a/packages/kbn-tooling-log/src/tooling_log.ts b/packages/kbn-tooling-log/src/tooling_log.ts index 727f71f85abc4..bef4320be2356 100644 --- a/packages/kbn-tooling-log/src/tooling_log.ts +++ b/packages/kbn-tooling-log/src/tooling_log.ts @@ -7,6 +7,7 @@ */ import * as Rx from 'rxjs'; +import { SomeDevLog } from '@kbn/some-dev-log'; import { ToolingLogTextWriter, ToolingLogTextWriterConfig } from './tooling_log_text_writer'; import { Writer } from './writer'; @@ -26,7 +27,7 @@ export interface ToolingLogOptions { parent?: ToolingLog; } -export class ToolingLog { +export class ToolingLog implements SomeDevLog { private indentWidth$: Rx.BehaviorSubject; private writers$: Rx.BehaviorSubject; private readonly written$: Rx.Subject; diff --git a/packages/kbn-ui-shared-deps-src/webpack.config.js b/packages/kbn-ui-shared-deps-src/webpack.config.js index a0be05ab9d609..85d14314c5c60 100644 --- a/packages/kbn-ui-shared-deps-src/webpack.config.js +++ b/packages/kbn-ui-shared-deps-src/webpack.config.js @@ -102,7 +102,7 @@ module.exports = { new webpack.DllReferencePlugin({ context: REPO_ROOT, - manifest: require(UiSharedDepsNpm.dllManifestPath), // eslint-disable-line + manifest: require(UiSharedDepsNpm.dllManifestPath), // eslint-disable-line import/no-dynamic-require }), ], }; diff --git a/packages/kbn-utils/src/package_json/index.ts b/packages/kbn-utils/src/package_json/index.ts index fbd554c8c2c04..fada3e15b97d6 100644 --- a/packages/kbn-utils/src/package_json/index.ts +++ b/packages/kbn-utils/src/package_json/index.ts @@ -7,12 +7,46 @@ */ import Path from 'path'; +import Fs from 'fs'; + import { REPO_ROOT } from '../repo_root'; -export const kibanaPackageJson = { - ...require(Path.resolve(REPO_ROOT, 'package.json')), -}; +interface KibanaPackageJson { + name: string; + version: string; + branch: string; + build: { + number: number; + sha: string; + distributable?: boolean; + }; + dependencies: { + [dep: string]: string; + }; + devDependencies: { + [dep: string]: string; + }; + engines?: { + [name: string]: string | undefined; + }; + [key: string]: unknown; +} + +function parseKibanaPackageJson() { + const path = Path.resolve(REPO_ROOT, 'package.json'); + const json = Fs.readFileSync(path, 'utf8'); + let pkg; + try { + pkg = JSON.parse(json); + } catch (error) { + throw new Error(`unable to parse kibana's package.json file: ${error.message}`); + } + + return pkg as KibanaPackageJson; +} + +export const kibanaPackageJson = parseKibanaPackageJson(); export const isKibanaDistributable = () => { - return kibanaPackageJson.build && kibanaPackageJson.build.distributable === true; + return kibanaPackageJson.build.distributable === true; }; diff --git a/packages/kbn-yarn-lock-validator/BUILD.bazel b/packages/kbn-yarn-lock-validator/BUILD.bazel new file mode 100644 index 0000000000000..29b52958b58ac --- /dev/null +++ b/packages/kbn-yarn-lock-validator/BUILD.bazel @@ -0,0 +1,121 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "kbn-yarn-lock-validator" +PKG_REQUIRE_NAME = "@kbn/yarn-lock-validator" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "@npm//@types/dedent", + "@npm//@types/node", + "@npm//@types/jest", + "@npm//tslib", + "//packages/kbn-utils:npm_module_types", + "//packages/kbn-bazel-packages:npm_module_types", + "//packages/kbn-some-dev-log:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-yarn-lock-validator/README.mdx b/packages/kbn-yarn-lock-validator/README.mdx new file mode 100644 index 0000000000000..5fd8ce0731afe --- /dev/null +++ b/packages/kbn-yarn-lock-validator/README.mdx @@ -0,0 +1,17 @@ +--- +id: kibDevDocsOpsKbnYarnLockValidator +slug: /kibana-dev-docs/ops/kbn-yarn-lock-validator +title: "@kbn/yarn-lock-validator" +description: 'A tool for validating specific conditions for our dependency chain' +date: 2022-07-14 +tags: ['kibana', 'dev', 'contributor', 'operations', 'packages', 'scripts', 'yarn'] +--- + +`@kbn/yarn-lock-validator` provides yarn.lock validation logic for the Kibana project. It is loaded up by after bootstrap and validates that we haven't accidentally re-introduced specific dependencies or version-combination scenarios detailed below: + +## validation scenarios + + - Only a single version of lodash@4 is installed + - No lodash@3 versions installed + - None of the bazel packages in `"dependencies"`, and none of the transient dependencies of those packages, are marked as `"devOnly": true` + diff --git a/packages/kbn-yarn-lock-validator/jest.config.js b/packages/kbn-yarn-lock-validator/jest.config.js new file mode 100644 index 0000000000000..98bd882c6666e --- /dev/null +++ b/packages/kbn-yarn-lock-validator/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-yarn-lock-validator'], +}; diff --git a/packages/kbn-yarn-lock-validator/package.json b/packages/kbn-yarn-lock-validator/package.json new file mode 100644 index 0000000000000..e7d0c00269ac7 --- /dev/null +++ b/packages/kbn-yarn-lock-validator/package.json @@ -0,0 +1,10 @@ +{ + "name": "@kbn/yarn-lock-validator", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0", + "kibana": { + "devOnly": true + } +} diff --git a/packages/kbn-yarn-lock-validator/src/find_production_dependencies.ts b/packages/kbn-yarn-lock-validator/src/find_production_dependencies.ts new file mode 100644 index 0000000000000..59166bef39e7d --- /dev/null +++ b/packages/kbn-yarn-lock-validator/src/find_production_dependencies.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SomeDevLog } from '@kbn/some-dev-log'; +import { kibanaPackageJson } from '@kbn/utils'; + +import { YarnLock } from './yarn_lock'; + +/** + * Get a list of the all production dependencies for Kibana by starting with the + * dependencies listed in package.json and then traversing deeply into the transitive + * dependencies as declared by the yarn.lock file. + */ +export function findProductionDependencies(log: SomeDevLog, yarnLock: YarnLock) { + const resolved = new Map(); + + // queue of dependencies entries, we will add the transitive dependencies to + // this queue as we itterate + const depQueue = Object.entries(kibanaPackageJson.dependencies); + + for (const [name, versionRange] of depQueue) { + const key = `${name}@${versionRange}`; + + // ignore `link:` deps to our own packages and deps we have already seen + if (resolved.has(key) || versionRange.startsWith('link:')) { + continue; + } + + const pkg = yarnLock[key]; + if (!pkg) { + log.warning('yarn.lock file is out of date, please re-run `yarn kbn bootstrap`'); + process.exit(1); + } + + resolved.set(key, { name, version: pkg.version }); + + const allDepsEntries = [ + ...Object.entries(pkg.dependencies || {}), + ...Object.entries(pkg.optionalDependencies || {}), + ]; + + for (const [childName, childVersionRange] of allDepsEntries) { + depQueue.push([childName, childVersionRange]); + } + } + + return resolved; +} diff --git a/packages/kbn-plugin-discovery/src/index.ts b/packages/kbn-yarn-lock-validator/src/index.ts similarity index 70% rename from packages/kbn-plugin-discovery/src/index.ts rename to packages/kbn-yarn-lock-validator/src/index.ts index a382b45515e53..70658cc0133dc 100644 --- a/packages/kbn-plugin-discovery/src/index.ts +++ b/packages/kbn-yarn-lock-validator/src/index.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export * from './parse_kibana_platform_plugin'; -export * from './plugin_search_paths'; -export * from './simple_kibana_platform_plugin_discovery'; +export { readYarnLock } from './yarn_lock'; +export type { YarnLock } from './yarn_lock'; +export { validateDependencies } from './validate_yarn_lock'; diff --git a/packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts b/packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts new file mode 100644 index 0000000000000..923a0f11fcbf6 --- /dev/null +++ b/packages/kbn-yarn-lock-validator/src/validate_yarn_lock.ts @@ -0,0 +1,115 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fsp from 'fs/promises'; + +import dedent from 'dedent'; + +import { REPO_ROOT, kibanaPackageJson } from '@kbn/utils'; +import { SomeDevLog } from '@kbn/some-dev-log'; +import { discoverBazelPackages } from '@kbn/bazel-packages'; + +import { YarnLock, stringifyLockFile } from './yarn_lock'; +import { findProductionDependencies } from './find_production_dependencies'; + +/** + * Validates the passed yarn.lock file to ensure that we aren't accidentally reproducing + * specific scenarios we have tried to remove from the codebase. + */ +export async function validateDependencies(log: SomeDevLog, yarnLock: YarnLock) { + // look through all of the packages in the yarn.lock file to see if + // we have accidentally installed multiple lodash v4 versions + const lodash4Versions = new Set(); + const lodash4Reqs = new Set(); + for (const [req, dep] of Object.entries(yarnLock)) { + if (req.startsWith('lodash@') && dep.version.startsWith('4.')) { + lodash4Reqs.add(req); + lodash4Versions.add(dep.version); + } + } + + // if we find more than one lodash v4 version installed then delete + // lodash v4 requests from the yarn.lock file and prompt the user to + // retry bootstrap so that a single v4 version will be installed + if (lodash4Versions.size > 1) { + for (const req of lodash4Reqs) { + delete yarnLock[req]; + } + + await Fsp.writeFile(Path.resolve(REPO_ROOT, 'yarn.lock'), stringifyLockFile(yarnLock), 'utf8'); + + log.error(dedent` + + Multiple version of lodash v4 were detected, so they have been removed + from the yarn.lock file. Please rerun yarn kbn bootstrap to coalese the + lodash versions installed. + + If you still see this error when you re-bootstrap then you might need + to force a new dependency to use the latest version of lodash via the + "resolutions" field in package.json. + + If you have questions about this please reach out to the operations team. + + `); + + process.exit(1); + } + + // look through all the dependencies of production packages and production + // dependencies of those packages to determine if we're shipping any versions + // of lodash v3 in the distributable + const prodDependencies = findProductionDependencies(log, yarnLock); + const lodash3Versions = new Set(); + for (const dep of prodDependencies.values()) { + if (dep.name === 'lodash' && dep.version.startsWith('3.')) { + lodash3Versions.add(dep.version); + } + } + // if any lodash v3 packages were found we abort and tell the user to fix things + if (lodash3Versions.size) { + log.error(dedent` + + Due to changes in the yarn.lock file and/or package.json files a version of + lodash 3 is now included in the production dependencies. To reduce the size of + our distributable and especially our front-end bundles we have decided to + prevent adding any new instances of lodash 3. + + Please inspect the changes to yarn.lock or package.json files to identify where + the lodash 3 version is coming from and remove it. + + If you have questions about this please reack out to the operations team. + + `); + + process.exit(1); + } + + // look for packages that have the the `kibana.devOnly` flag in their package.json + // and make sure they aren't included in the production dependencies of Kibana + const bazelPackages = await discoverBazelPackages(REPO_ROOT); + const devOnlyPackagesInProduction = bazelPackages + .filter((p) => p.isDevOnly() && Object.hasOwn(kibanaPackageJson.dependencies, p.pkg.name)) + .map((p) => p.pkg.name); + + if (devOnlyPackagesInProduction.length) { + log.error(dedent` + Some of the packages in the production dependency chain for Kibana and X-Pack are + flagged with "kibana.devOnly" in their package.json. Please check changes made to + packages and their dependencies to ensure they don't end up in production. + + The devOnly dependencies that are being dependend on in production are: + + - ${devOnlyPackagesInProduction.join('\n - ')} + `); + + process.exit(1); + } + + log.success('yarn.lock analysis completed without any issues'); +} diff --git a/packages/kbn-yarn-lock-validator/src/yarn_lock.ts b/packages/kbn-yarn-lock-validator/src/yarn_lock.ts new file mode 100644 index 0000000000000..383dcbe09ceee --- /dev/null +++ b/packages/kbn-yarn-lock-validator/src/yarn_lock.ts @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Fsp from 'fs/promises'; +import Path from 'path'; + +import { REPO_ROOT } from '@kbn/utils'; +// @ts-expect-error published types are worthless +import * as YarnLockFile from '@yarnpkg/lockfile'; + +/** + * Parsed yarn.lock file contents mapping `name@versionRange` strings to information from + * the yarn.lock file that is used to satisfy that request. + */ +export interface YarnLock { + /** a simple map of `name@versionrange` tags to metadata about a package */ + [key: string]: { + /** resolved version installed for this pacakge */ + version: string; + /** resolved url for this pacakge */ + resolved: string; + /** yarn calculated integrity value for this package */ + integrity: string; + dependencies?: { + /** name => versionRange dependencies listed in package's manifest */ + [key: string]: string; + }; + optionalDependencies?: { + /** name => versionRange dependencies listed in package's manifest */ + [key: string]: string; + }; + }; +} + +/** + * Parse any yarn.lock content into a YarnLock map + */ +export function parseLockfile(content: string): YarnLock { + const result = YarnLockFile.parse(content); + if (result.type === 'success') { + return result.object; + } + + throw new Error('unable to read yarn.lock file, please run `yarn kbn bootstrap`'); +} + +/** + * Convert a parsed yarn.lock file back to a string + */ +export function stringifyLockFile(yarnLock: YarnLock): string { + return YarnLockFile.stringify(yarnLock); +} + +/** + * Parse any yarn.lock content into a YarnLock map + */ +export async function readYarnLock(): Promise { + try { + const contents = await Fsp.readFile(Path.resolve(REPO_ROOT, 'yarn.lock'), 'utf8'); + return parseLockfile(contents); + } catch (error) { + if (error.code === 'ENOENT') { + return {}; + } + + throw error; + } +} diff --git a/packages/kbn-yarn-lock-validator/tsconfig.json b/packages/kbn-yarn-lock-validator/tsconfig.json new file mode 100644 index 0000000000000..789c6b3111115 --- /dev/null +++ b/packages/kbn-yarn-lock-validator/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/renovate.json b/renovate.json index 34ef1ea5bc0cf..49337a00d7246 100644 --- a/renovate.json +++ b/renovate.json @@ -165,6 +165,21 @@ "matchPackagePatterns": ["^@storybook"], "labels": ["Team:Operations", "release_note:skip"], "enabled": true + }, + { + "groupName": "react-query", + "packageNames": ["react-query"], + "reviewers": [ + "team:response-ops", + "team:kibana-cloud-security-posture", + "team:security-asset-management", + "team:fleet", + "team:awp-platform", + "team:security-onboarding-and-lifecycle-mgt" + ], + "matchBaseBranches": ["main"], + "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], + "enabled": true } ] } diff --git a/scripts/kbn.js b/scripts/kbn.js index 459c590ddf8cc..264150fcf9364 100644 --- a/scripts/kbn.js +++ b/scripts/kbn.js @@ -8,4 +8,7 @@ require('../src/setup_node_env/ensure_node_preserve_symlinks'); require('../src/setup_node_env/node_version_validator'); -require('../packages/kbn-pm/dist').run(process.argv.slice(2)); +import('../kbn_pm/src/cli.mjs').catch(function (error) { + console.error('UNHANDLED EXCEPTION:', error.stack); + process.exit(1); +}); diff --git a/src/cli_setup/utils.ts b/src/cli_setup/utils.ts index 6a5b60681a9f0..de047a0540db4 100644 --- a/src/cli_setup/utils.ts +++ b/src/cli_setup/utils.ts @@ -13,8 +13,8 @@ import { merge } from 'lodash'; import { kibanaPackageJson } from '@kbn/utils'; import { Logger } from '@kbn/core/server'; -import { ClusterClient } from '@kbn/core/server/elasticsearch/client'; -import { configSchema } from '@kbn/core/server/elasticsearch'; +import { ClusterClient } from '@kbn/core-elasticsearch-client-server-internal'; +import { configSchema } from '@kbn/core-elasticsearch-server-internal'; import { ElasticsearchService } from '@kbn/interactive-setup-plugin/server/elasticsearch_service'; import { KibanaConfigWriter } from '@kbn/interactive-setup-plugin/server/kibana_config_writer'; import type { EnrollmentToken } from '@kbn/interactive-setup-plugin/common'; diff --git a/src/core/public/core_system.test.mocks.ts b/src/core/public/core_system.test.mocks.ts index baf4c28401c06..99f525b1f8aba 100644 --- a/src/core/public/core_system.test.mocks.ts +++ b/src/core/public/core_system.test.mocks.ts @@ -20,7 +20,7 @@ import { overlayServiceMock } from './overlays/overlay_service.mock'; import { pluginsServiceMock } from './plugins/plugins_service.mock'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { renderingServiceMock } from './rendering/rendering_service.mock'; -import { integrationsServiceMock } from './integrations/integrations_service.mock'; +import { integrationsServiceMock } from '@kbn/core-integrations-browser-mocks'; import { coreAppMock } from './core_app/core_app.mock'; export const analyticsServiceStartMock = analyticsServiceMock.createAnalyticsServiceStart(); @@ -122,7 +122,7 @@ export const MockIntegrationsService = integrationsServiceMock.create(); export const IntegrationsServiceConstructor = jest .fn() .mockImplementation(() => MockIntegrationsService); -jest.doMock('./integrations', () => ({ +jest.doMock('@kbn/core-integrations-browser-internal', () => ({ IntegrationsService: IntegrationsServiceConstructor, })); diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts index 710d7b90c4c30..20f5725f1693a 100644 --- a/src/core/public/core_system.ts +++ b/src/core/public/core_system.ts @@ -25,6 +25,7 @@ import { FatalErrorsService } from '@kbn/core-fatal-errors-browser-internal'; import { HttpService } from '@kbn/core-http-browser-internal'; import { UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; import { DeprecationsService } from '@kbn/core-deprecations-browser-internal'; +import { IntegrationsService } from '@kbn/core-integrations-browser-internal'; import { CoreSetup, CoreStart } from '.'; import { ChromeService } from './chrome'; import { NotificationsService } from './notifications'; @@ -33,7 +34,6 @@ import { PluginsService } from './plugins'; import { ApplicationService } from './application'; import { RenderingService } from './rendering'; import { SavedObjectsService } from './saved_objects'; -import { IntegrationsService } from './integrations'; import { CoreApp } from './core_app'; import type { InternalApplicationSetup, InternalApplicationStart } from './application/types'; import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info'; diff --git a/src/core/server/bootstrap.ts b/src/core/server/bootstrap.ts index 851b698dbcc75..5aa602328e67b 100644 --- a/src/core/server/bootstrap.ts +++ b/src/core/server/bootstrap.ts @@ -115,7 +115,7 @@ function onRootShutdown(reason?: any) { // There is a chance that logger wasn't configured properly and error that // that forced root to shut down could go unnoticed. To prevent this we always // mirror such fatal errors in standard output with `console.error`. - // eslint-disable-next-line + // eslint-disable-next-line no-console console.error(`\n${chalk.white.bgRed(' FATAL ')} ${reason}\n`); process.exit(reason instanceof CriticalError ? reason.processExitCode : 1); diff --git a/src/core/server/core_route_handler_context.ts b/src/core/server/core_route_handler_context.ts index ccdefc97f6293..3f4dfbcc8adde 100644 --- a/src/core/server/core_route_handler_context.ts +++ b/src/core/server/core_route_handler_context.ts @@ -7,15 +7,13 @@ */ import type { KibanaRequest } from '@kbn/core-http-server'; +import type { ElasticsearchRequestHandlerContext } from '@kbn/core-elasticsearch-server'; +import { CoreElasticsearchRouteHandlerContext } from '@kbn/core-elasticsearch-server-internal'; import type { InternalCoreStart } from './internal_types'; import { CoreSavedObjectsRouteHandlerContext, SavedObjectsRequestHandlerContext, } from './saved_objects'; -import { - CoreElasticsearchRouteHandlerContext, - ElasticsearchRequestHandlerContext, -} from './elasticsearch'; import { CoreUiSettingsRouteHandlerContext, UiSettingsRequestHandlerContext } from './ui_settings'; import { CoreDeprecationsRouteHandlerContext, diff --git a/src/core/server/core_usage_data/core_usage_data_service.test.ts b/src/core/server/core_usage_data/core_usage_data_service.test.ts index c22f1d3667365..a9219ede9d659 100644 --- a/src/core/server/core_usage_data/core_usage_data_service.test.ts +++ b/src/core/server/core_usage_data/core_usage_data_service.test.ts @@ -16,7 +16,7 @@ import { HotObservable } from 'rxjs/internal/testing/HotObservable'; import { configServiceMock } from '@kbn/config-mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { config as RawLoggingConfig } from '@kbn/core-logging-server-internal'; -import { config as RawElasticsearchConfig } from '../elasticsearch/elasticsearch_config'; +import { config as RawElasticsearchConfig } from '@kbn/core-elasticsearch-server-internal'; import { config as RawHttpConfig } from '@kbn/core-http-server-internal'; import { savedObjectsConfig as RawSavedObjectsConfig } from '../saved_objects/saved_objects_config'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; @@ -24,7 +24,7 @@ import { metricsServiceMock } from '../metrics/metrics_service.mock'; import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock'; import { CoreUsageDataService } from './core_usage_data_service'; -import { elasticsearchServiceMock } from '../elasticsearch/elasticsearch_service.mock'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { typeRegistryMock } from '../saved_objects/saved_objects_type_registry.mock'; import { CORE_USAGE_STATS_TYPE } from './constants'; import { CoreUsageStatsClient } from './core_usage_stats_client'; diff --git a/src/core/server/core_usage_data/core_usage_data_service.ts b/src/core/server/core_usage_data/core_usage_data_service.ts index f18dfe0dcd624..10258ac004aa7 100644 --- a/src/core/server/core_usage_data/core_usage_data_service.ts +++ b/src/core/server/core_usage_data/core_usage_data_service.ts @@ -20,8 +20,9 @@ import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import type { LoggingConfigType } from '@kbn/core-logging-server-internal'; import type { Logger } from '@kbn/logging'; import type { HttpConfigType, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import type { ElasticsearchServiceStart } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchConfigType } from '@kbn/core-elasticsearch-server-internal'; import { SavedObjectsServiceStart, SavedObjectTypeRegistry } from '..'; -import { ElasticsearchConfigType } from '../elasticsearch/elasticsearch_config'; import { SavedObjectsConfigType } from '../saved_objects/saved_objects_config'; import type { @@ -33,7 +34,6 @@ import type { CoreConfigUsageData, } from './types'; import { isConfigured } from './is_configured'; -import { ElasticsearchServiceStart } from '../elasticsearch'; import { coreUsageStatsType } from './core_usage_stats'; import { LEGACY_URL_ALIAS_TYPE } from '../saved_objects/object_types'; import { CORE_USAGE_STATS_TYPE } from './constants'; diff --git a/src/core/server/deprecations/deprecations_registry.mock.ts b/src/core/server/deprecations/deprecations_registry.mock.ts index bb178c3935cdc..65433f5eca5cb 100644 --- a/src/core/server/deprecations/deprecations_registry.mock.ts +++ b/src/core/server/deprecations/deprecations_registry.mock.ts @@ -7,10 +7,11 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { DeprecationsRegistry } from './deprecations_registry'; import type { GetDeprecationsContext } from './types'; -import { elasticsearchClientMock } from '../elasticsearch/client/mocks'; import { savedObjectsClientMock } from '../saved_objects/service/saved_objects_client.mock'; + type DeprecationsRegistryContract = PublicMethodsOf; const createDeprecationsRegistryMock = () => { diff --git a/src/core/server/deprecations/deprecations_route_handler_context.ts b/src/core/server/deprecations/deprecations_route_handler_context.ts index 76e5d974056d4..bd19023a1ec78 100644 --- a/src/core/server/deprecations/deprecations_route_handler_context.ts +++ b/src/core/server/deprecations/deprecations_route_handler_context.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { CoreElasticsearchRouteHandlerContext } from '../elasticsearch'; +import type { CoreElasticsearchRouteHandlerContext } from '@kbn/core-elasticsearch-server-internal'; import type { CoreSavedObjectsRouteHandlerContext } from '../saved_objects'; import type { DeprecationsClient, InternalDeprecationsServiceStart } from './deprecations_service'; diff --git a/src/core/server/deprecations/deprecations_service.ts b/src/core/server/deprecations/deprecations_service.ts index 7b07b4c1d10de..d9a8e14eb3b05 100644 --- a/src/core/server/deprecations/deprecations_service.ts +++ b/src/core/server/deprecations/deprecations_service.ts @@ -12,11 +12,11 @@ import type { IConfigService } from '@kbn/config'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import { DomainDeprecationDetails } from '@kbn/core-deprecations-common'; import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import type { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; import { DeprecationsFactory } from './deprecations_factory'; import { RegisterDeprecationsConfig } from './types'; import { registerRoutes } from './routes'; import { config as deprecationConfig, DeprecationConfigType } from './deprecation_config'; -import { IScopedClusterClient } from '../elasticsearch/client'; import { SavedObjectsClientContract } from '../saved_objects/types'; /** diff --git a/src/core/server/deprecations/types.ts b/src/core/server/deprecations/types.ts index 16104c6f9cc57..5cefb7b68dbe1 100644 --- a/src/core/server/deprecations/types.ts +++ b/src/core/server/deprecations/types.ts @@ -8,8 +8,8 @@ import type { MaybePromise } from '@kbn/utility-types'; import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; +import type { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsClientContract } from '../saved_objects/types'; -import type { IScopedClusterClient } from '../elasticsearch'; /** * @public diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 82d98f875241e..c0e450ebde765 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -52,12 +52,12 @@ import type { HttpServiceStart, } from '@kbn/core-http-server'; import type { PrebootServicePreboot } from '@kbn/core-preboot-server'; -import { +import type { ElasticsearchServiceSetup, - configSchema as elasticsearchConfigSchema, ElasticsearchServiceStart, ElasticsearchServicePreboot, -} from './elasticsearch'; +} from '@kbn/core-elasticsearch-server'; +import { configSchema as elasticsearchConfigSchema } from '@kbn/core-elasticsearch-server-internal'; import { HttpResources } from './http_resources'; import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plugins'; @@ -115,22 +115,25 @@ export type { export type { CoreId } from '@kbn/core-base-common-internal'; -export { ElasticsearchConfig, pollEsNodesVersion } from './elasticsearch'; +export { ElasticsearchConfig, pollEsNodesVersion } from '@kbn/core-elasticsearch-server-internal'; +export type { + NodesVersionCompatibility, + PollEsNodesVersionOptions, +} from '@kbn/core-elasticsearch-server-internal'; export type { ElasticsearchServicePreboot, ElasticsearchServiceSetup, ElasticsearchServiceStart, - ElasticsearchStatusMeta, - NodesVersionCompatibility, + ElasticsearchConfigPreboot, + ElasticsearchRequestHandlerContext, FakeRequest, ScopeableRequest, ElasticsearchClient, IClusterClient, ICustomClusterClient, ElasticsearchClientConfig, + ElasticsearchClientSslConfig, IScopedClusterClient, - ElasticsearchConfigPreboot, - PollEsNodesVersionOptions, UnauthorizedErrorHandlerOptions, UnauthorizedErrorHandlerResultRetryParams, UnauthorizedErrorHandlerRetryResult, @@ -138,8 +141,7 @@ export type { UnauthorizedErrorHandlerResult, UnauthorizedErrorHandlerToolkit, UnauthorizedErrorHandler, - ElasticsearchRequestHandlerContext, -} from './elasticsearch'; +} from '@kbn/core-elasticsearch-server'; export { CspConfig } from '@kbn/core-http-server-internal'; export { CoreKibanaRequest, kibanaResponseFactory } from '@kbn/core-http-router-server-internal'; diff --git a/src/core/server/capabilities/integration_tests/capabilities_service.test.ts b/src/core/server/integration_tests/capabilities/capabilities_service.test.ts similarity index 98% rename from src/core/server/capabilities/integration_tests/capabilities_service.test.ts rename to src/core/server/integration_tests/capabilities/capabilities_service.test.ts index fd5310a8bf444..40345e8a7e750 100644 --- a/src/core/server/capabilities/integration_tests/capabilities_service.test.ts +++ b/src/core/server/integration_tests/capabilities/capabilities_service.test.ts @@ -19,7 +19,7 @@ import { InternalHttpServiceSetup, } from '@kbn/core-http-server-internal'; import { createHttpServer } from '@kbn/core-http-server-mocks'; -import { CapabilitiesService, CapabilitiesSetup } from '..'; +import { CapabilitiesService, CapabilitiesSetup } from '../../capabilities'; const coreId = Symbol('core'); diff --git a/src/core/server/integration_tests/capabilities/jest.integration.config.js b/src/core/server/integration_tests/capabilities/jest.integration.config.js new file mode 100644 index 0000000000000..edc8b077ffb94 --- /dev/null +++ b/src/core/server/integration_tests/capabilities/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/capabilities'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/config/integration_tests/config_deprecation.test.mocks.ts b/src/core/server/integration_tests/config/config_deprecation.test.mocks.ts similarity index 100% rename from src/core/server/config/integration_tests/config_deprecation.test.mocks.ts rename to src/core/server/integration_tests/config/config_deprecation.test.mocks.ts diff --git a/src/core/server/config/integration_tests/config_deprecation.test.ts b/src/core/server/integration_tests/config/config_deprecation.test.ts similarity index 100% rename from src/core/server/config/integration_tests/config_deprecation.test.ts rename to src/core/server/integration_tests/config/config_deprecation.test.ts diff --git a/src/core/server/integration_tests/config/jest.integration.config.js b/src/core/server/integration_tests/config/jest.integration.config.js new file mode 100644 index 0000000000000..ff1c6a75ed900 --- /dev/null +++ b/src/core/server/integration_tests/config/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/config'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/core_app/integration_tests/__fixtures__/outside_output.js b/src/core/server/integration_tests/core_app/__fixtures__/outside_output.js similarity index 100% rename from src/core/server/core_app/integration_tests/__fixtures__/outside_output.js rename to src/core/server/integration_tests/core_app/__fixtures__/outside_output.js diff --git a/src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/gzip_chunk.js b/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js similarity index 100% rename from src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/gzip_chunk.js rename to src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js diff --git a/src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/gzip_chunk.js.gz b/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz similarity index 100% rename from src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/gzip_chunk.js.gz rename to src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz diff --git a/src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/image.png b/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png similarity index 100% rename from src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/image.png rename to src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png diff --git a/src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/plugin.js b/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js similarity index 100% rename from src/core/server/core_app/integration_tests/__fixtures__/plugin/foo/plugin.js rename to src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js diff --git a/src/core/server/core_app/integration_tests/bundle_routes.test.ts b/src/core/server/integration_tests/core_app/bundle_routes.test.ts similarity index 97% rename from src/core/server/core_app/integration_tests/bundle_routes.test.ts rename to src/core/server/integration_tests/core_app/bundle_routes.test.ts index 30ff025ac2a14..b3b02cef691d9 100644 --- a/src/core/server/core_app/integration_tests/bundle_routes.test.ts +++ b/src/core/server/integration_tests/core_app/bundle_routes.test.ts @@ -15,8 +15,8 @@ import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; import type { IRouter } from '@kbn/core-http-server'; import { HttpService } from '@kbn/core-http-server-internal'; import { createHttpServer } from '@kbn/core-http-server-mocks'; -import { registerRouteForBundle } from '../bundle_routes/bundles_route'; -import { FileHashCache } from '../bundle_routes/file_hash_cache'; +import { registerRouteForBundle } from '../../core_app/bundle_routes/bundles_route'; +import { FileHashCache } from '../../core_app/bundle_routes/file_hash_cache'; const buildNum = 1234; const fooPluginFixture = resolve(__dirname, './__fixtures__/plugin/foo'); diff --git a/src/core/server/core_app/integration_tests/core_app_routes.test.ts b/src/core/server/integration_tests/core_app/core_app_routes.test.ts similarity index 100% rename from src/core/server/core_app/integration_tests/core_app_routes.test.ts rename to src/core/server/integration_tests/core_app/core_app_routes.test.ts diff --git a/src/core/server/core_app/integration_tests/default_route_provider_config.test.ts b/src/core/server/integration_tests/core_app/default_route_provider_config.test.ts similarity index 100% rename from src/core/server/core_app/integration_tests/default_route_provider_config.test.ts rename to src/core/server/integration_tests/core_app/default_route_provider_config.test.ts diff --git a/src/core/server/integration_tests/core_app/jest.integration.config.js b/src/core/server/integration_tests/core_app/jest.integration.config.js new file mode 100644 index 0000000000000..990934f54c982 --- /dev/null +++ b/src/core/server/integration_tests/core_app/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/core_app'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/core_app/integration_tests/static_assets.test.ts b/src/core/server/integration_tests/core_app/static_assets.test.ts similarity index 100% rename from src/core/server/core_app/integration_tests/static_assets.test.ts rename to src/core/server/integration_tests/core_app/static_assets.test.ts diff --git a/src/core/server/elasticsearch/integration_tests/client.test.ts b/src/core/server/integration_tests/elasticsearch/client.test.ts similarity index 100% rename from src/core/server/elasticsearch/integration_tests/client.test.ts rename to src/core/server/integration_tests/elasticsearch/client.test.ts diff --git a/src/core/server/elasticsearch/integration_tests/is_scripting_enabled.test.ts b/src/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts similarity index 96% rename from src/core/server/elasticsearch/integration_tests/is_scripting_enabled.test.ts rename to src/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts index 501193a833f27..353acbc70c18e 100644 --- a/src/core/server/elasticsearch/integration_tests/is_scripting_enabled.test.ts +++ b/src/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts @@ -11,7 +11,7 @@ import { TestElasticsearchUtils, TestKibanaUtils, } from '../../../test_helpers/kbn_server'; -import { isInlineScriptingEnabled } from '../is_scripting_enabled'; +import { isInlineScriptingEnabled } from '@kbn/core-elasticsearch-server-internal'; describe('isInlineScriptingEnabled', () => { let esServer: TestElasticsearchUtils; diff --git a/src/core/server/integration_tests/elasticsearch/jest.integration.config.js b/src/core/server/integration_tests/elasticsearch/jest.integration.config.js new file mode 100644 index 0000000000000..e40d650120e77 --- /dev/null +++ b/src/core/server/integration_tests/elasticsearch/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/elasticsearch'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/execution_context/jest.integration.config.js b/src/core/server/integration_tests/execution_context/jest.integration.config.js new file mode 100644 index 0000000000000..b091874152f90 --- /dev/null +++ b/src/core/server/integration_tests/execution_context/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/execution_context'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/execution_context/integration_tests/tracing.test.ts b/src/core/server/integration_tests/execution_context/tracing.test.ts similarity index 100% rename from src/core/server/execution_context/integration_tests/tracing.test.ts rename to src/core/server/integration_tests/execution_context/tracing.test.ts diff --git a/src/core/server/http/integration_tests/cookie_session_storage.test.ts b/src/core/server/integration_tests/http/cookie_session_storage.test.ts similarity index 100% rename from src/core/server/http/integration_tests/cookie_session_storage.test.ts rename to src/core/server/integration_tests/http/cookie_session_storage.test.ts diff --git a/src/core/server/http/integration_tests/core_service.test.mocks.ts b/src/core/server/integration_tests/http/core_service.test.mocks.ts similarity index 100% rename from src/core/server/http/integration_tests/core_service.test.mocks.ts rename to src/core/server/integration_tests/http/core_service.test.mocks.ts diff --git a/src/core/server/http/integration_tests/core_services.test.ts b/src/core/server/integration_tests/http/core_services.test.ts similarity index 98% rename from src/core/server/http/integration_tests/core_services.test.ts rename to src/core/server/integration_tests/http/core_services.test.ts index 8bf0908ae4dc7..dbbc16105b070 100644 --- a/src/core/server/http/integration_tests/core_services.test.ts +++ b/src/core/server/integration_tests/http/core_services.test.ts @@ -7,10 +7,10 @@ */ import { MockElasticsearchClient } from './core_service.test.mocks'; -import { elasticsearchClientMock } from '../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { errors } from '@elastic/elasticsearch'; +import type { InternalElasticsearchServiceStart } from '@kbn/core-elasticsearch-server-internal'; import * as kbnTestServer from '../../../test_helpers/kbn_server'; -import { InternalElasticsearchServiceStart } from '../../elasticsearch'; const cookieOptions = { name: 'sid', diff --git a/src/core/server/http/integration_tests/fixtures/static/compression_available.json b/src/core/server/integration_tests/http/fixtures/static/compression_available.json similarity index 100% rename from src/core/server/http/integration_tests/fixtures/static/compression_available.json rename to src/core/server/integration_tests/http/fixtures/static/compression_available.json diff --git a/src/core/server/http/integration_tests/fixtures/static/compression_available.json.gz b/src/core/server/integration_tests/http/fixtures/static/compression_available.json.gz similarity index 100% rename from src/core/server/http/integration_tests/fixtures/static/compression_available.json.gz rename to src/core/server/integration_tests/http/fixtures/static/compression_available.json.gz diff --git a/src/core/server/http/integration_tests/fixtures/static/some_json.json b/src/core/server/integration_tests/http/fixtures/static/some_json.json similarity index 100% rename from src/core/server/http/integration_tests/fixtures/static/some_json.json rename to src/core/server/integration_tests/http/fixtures/static/some_json.json diff --git a/src/core/server/http/integration_tests/http_auth.test.ts b/src/core/server/integration_tests/http/http_auth.test.ts similarity index 100% rename from src/core/server/http/integration_tests/http_auth.test.ts rename to src/core/server/integration_tests/http/http_auth.test.ts diff --git a/src/core/server/http/integration_tests/http_server.test.ts b/src/core/server/integration_tests/http/http_server.test.ts similarity index 100% rename from src/core/server/http/integration_tests/http_server.test.ts rename to src/core/server/integration_tests/http/http_server.test.ts diff --git a/src/core/server/jest.integration.config.js b/src/core/server/integration_tests/http/jest.integration.config.js similarity index 73% rename from src/core/server/jest.integration.config.js rename to src/core/server/integration_tests/http/jest.integration.config.js index 0392fe6006547..523bff2c1d9f6 100644 --- a/src/core/server/jest.integration.config.js +++ b/src/core/server/integration_tests/http/jest.integration.config.js @@ -12,6 +12,8 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../..', - roots: ['/src/core/server'], + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/http'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/http/integration_tests/lifecycle.test.ts b/src/core/server/integration_tests/http/lifecycle.test.ts similarity index 100% rename from src/core/server/http/integration_tests/lifecycle.test.ts rename to src/core/server/integration_tests/http/lifecycle.test.ts diff --git a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts b/src/core/server/integration_tests/http/lifecycle_handlers.test.ts similarity index 100% rename from src/core/server/http/integration_tests/lifecycle_handlers.test.ts rename to src/core/server/integration_tests/http/lifecycle_handlers.test.ts diff --git a/src/core/server/http/integration_tests/logging.test.ts b/src/core/server/integration_tests/http/logging.test.ts similarity index 100% rename from src/core/server/http/integration_tests/logging.test.ts rename to src/core/server/integration_tests/http/logging.test.ts diff --git a/src/core/server/http/integration_tests/preboot.test.ts b/src/core/server/integration_tests/http/preboot.test.ts similarity index 100% rename from src/core/server/http/integration_tests/preboot.test.ts rename to src/core/server/integration_tests/http/preboot.test.ts diff --git a/src/core/server/http/integration_tests/request.test.ts b/src/core/server/integration_tests/http/request.test.ts similarity index 100% rename from src/core/server/http/integration_tests/request.test.ts rename to src/core/server/integration_tests/http/request.test.ts diff --git a/src/core/server/http/integration_tests/router.test.ts b/src/core/server/integration_tests/http/router.test.ts similarity index 100% rename from src/core/server/http/integration_tests/router.test.ts rename to src/core/server/integration_tests/http/router.test.ts diff --git a/src/core/server/http_resources/integration_tests/http_resources_service.test.ts b/src/core/server/integration_tests/http_resources/http_resources_service.test.ts similarity index 100% rename from src/core/server/http_resources/integration_tests/http_resources_service.test.ts rename to src/core/server/integration_tests/http_resources/http_resources_service.test.ts diff --git a/src/core/server/integration_tests/http_resources/jest.integration.config.js b/src/core/server/integration_tests/http_resources/jest.integration.config.js new file mode 100644 index 0000000000000..5dfb722c5071e --- /dev/null +++ b/src/core/server/integration_tests/http_resources/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/http_resources'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/logging/jest.integration.config.js b/src/core/server/integration_tests/logging/jest.integration.config.js new file mode 100644 index 0000000000000..b55eebc9ba21c --- /dev/null +++ b/src/core/server/integration_tests/logging/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/logging'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/logging/integration_tests/logging.test.ts b/src/core/server/integration_tests/logging/logging.test.ts similarity index 100% rename from src/core/server/logging/integration_tests/logging.test.ts rename to src/core/server/integration_tests/logging/logging.test.ts diff --git a/src/core/server/logging/integration_tests/rolling_file_appender.test.ts b/src/core/server/integration_tests/logging/rolling_file_appender.test.ts similarity index 100% rename from src/core/server/logging/integration_tests/rolling_file_appender.test.ts rename to src/core/server/integration_tests/logging/rolling_file_appender.test.ts diff --git a/src/core/server/logging/integration_tests/utils.ts b/src/core/server/integration_tests/logging/utils.ts similarity index 100% rename from src/core/server/logging/integration_tests/utils.ts rename to src/core/server/integration_tests/logging/utils.ts diff --git a/src/core/server/integration_tests/metrics/jest.integration.config.js b/src/core/server/integration_tests/metrics/jest.integration.config.js new file mode 100644 index 0000000000000..d55cb61f42571 --- /dev/null +++ b/src/core/server/integration_tests/metrics/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/metrics'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/metrics/integration_tests/server_collector.test.ts b/src/core/server/integration_tests/metrics/server_collector.test.ts similarity index 99% rename from src/core/server/metrics/integration_tests/server_collector.test.ts rename to src/core/server/integration_tests/metrics/server_collector.test.ts index 73be33c868cf5..1febd1aab56ea 100644 --- a/src/core/server/metrics/integration_tests/server_collector.test.ts +++ b/src/core/server/integration_tests/metrics/server_collector.test.ts @@ -15,7 +15,7 @@ import type { IRouter } from '@kbn/core-http-server'; import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; import type { HttpService } from '@kbn/core-http-server-internal'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { ServerMetricsCollector } from '../collectors/server'; +import { ServerMetricsCollector } from '../../metrics/collectors/server'; import { setTimeout as setTimeoutPromise } from 'timers/promises'; describe('ServerMetricsCollector', () => { diff --git a/src/core/server/integration_tests/node/jest.integration.config.js b/src/core/server/integration_tests/node/jest.integration.config.js new file mode 100644 index 0000000000000..fd25c9f3882a1 --- /dev/null +++ b/src/core/server/integration_tests/node/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/node'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/node/integration_tests/logging.test.ts b/src/core/server/integration_tests/node/logging.test.ts similarity index 100% rename from src/core/server/node/integration_tests/logging.test.ts rename to src/core/server/integration_tests/node/logging.test.ts diff --git a/src/core/server/integration_tests/plugins/jest.integration.config.js b/src/core/server/integration_tests/plugins/jest.integration.config.js new file mode 100644 index 0000000000000..55bbf66147bb8 --- /dev/null +++ b/src/core/server/integration_tests/plugins/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/plugins'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/plugins/integration_tests/plugins_service.test.mocks.ts b/src/core/server/integration_tests/plugins/plugins_service.test.mocks.ts similarity index 85% rename from src/core/server/plugins/integration_tests/plugins_service.test.mocks.ts rename to src/core/server/integration_tests/plugins/plugins_service.test.mocks.ts index 30b409e8791c6..d20d3bc094ac4 100644 --- a/src/core/server/plugins/integration_tests/plugins_service.test.mocks.ts +++ b/src/core/server/integration_tests/plugins/plugins_service.test.mocks.ts @@ -15,4 +15,4 @@ jest.doMock('load-json-file', () => ({ })); export const mockDiscover = jest.fn(); -jest.mock('../discovery/plugins_discovery', () => ({ discover: mockDiscover })); +jest.mock('../../plugins/discovery/plugins_discovery', () => ({ discover: mockDiscover })); diff --git a/src/core/server/plugins/integration_tests/plugins_service.test.ts b/src/core/server/integration_tests/plugins/plugins_service.test.ts similarity index 95% rename from src/core/server/plugins/integration_tests/plugins_service.test.ts rename to src/core/server/integration_tests/plugins/plugins_service.test.ts index dc832b093f917..2d51b63921bad 100644 --- a/src/core/server/plugins/integration_tests/plugins_service.test.ts +++ b/src/core/server/integration_tests/plugins/plugins_service.test.ts @@ -17,12 +17,12 @@ import { getEnvOptions, rawConfigServiceMock } from '@kbn/config-mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; import { nodeServiceMock } from '@kbn/core-node-server-mocks'; -import { PluginsService } from '../plugins_service'; +import { PluginsService } from '../../plugins/plugins_service'; import { BehaviorSubject, from } from 'rxjs'; -import { config } from '../plugins_config'; +import { config } from '../../plugins/plugins_config'; import { coreMock } from '../../mocks'; -import { AsyncPlugin, PluginType } from '../types'; -import { PluginWrapper } from '../plugin'; +import { AsyncPlugin, PluginType } from '../../plugins/types'; +import { PluginWrapper } from '../../plugins/plugin'; describe('PluginsService', () => { const logger = loggingSystemMock.create(); diff --git a/src/core/server/integration_tests/saved_objects/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/jest.integration.config.js new file mode 100644 index 0000000000000..9f20cc58db7e9 --- /dev/null +++ b/src/core/server/integration_tests/saved_objects/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/saved_objects'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/saved_objects/migrations/integration_tests/.gitignore b/src/core/server/integration_tests/saved_objects/migrations/.gitignore similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/.gitignore rename to src/core/server/integration_tests/saved_objects/migrations/.gitignore diff --git a/src/core/server/saved_objects/migrations/integration_tests/7.7.2_xpack_100k.test.ts b/src/core/server/integration_tests/saved_objects/migrations/7.7.2_xpack_100k.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/7.7.2_xpack_100k.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/7.7.2_xpack_100k.test.ts index 66c7d2e81b846..530a4b92ead6a 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/7.7.2_xpack_100k.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/7.7.2_xpack_100k.test.ts @@ -11,8 +11,8 @@ import { unlink } from 'fs/promises'; import { REPO_ROOT } from '@kbn/utils'; import { Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import { ElasticsearchClient } from '../../../elasticsearch'; import { InternalCoreStart } from '../../../internal_types'; import { Root } from '../../../root'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_failed_action_tasks.test.ts b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_failed_action_tasks.test.ts similarity index 98% rename from src/core/server/saved_objects/migrations/integration_tests/7_13_0_failed_action_tasks.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/7_13_0_failed_action_tasks.test.ts index d2bf71f023de7..cffc23b476c71 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_failed_action_tasks.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_failed_action_tasks.test.ts @@ -8,9 +8,9 @@ import Path from 'path'; import fs from 'fs/promises'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; -import { ElasticsearchClient } from '../../../elasticsearch'; const logFilePath = Path.join(__dirname, '7_13_failed_action_tasks.log'); diff --git a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_transform_failures.test.ts b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_transform_failures.test.ts similarity index 99% rename from src/core/server/saved_objects/migrations/integration_tests/7_13_0_transform_failures.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/7_13_0_transform_failures.test.ts index 714ce363c06e2..b177332322c00 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_transform_failures.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_transform_failures.test.ts @@ -12,7 +12,7 @@ import Util from 'util'; import { Env } from '@kbn/config'; import { REPO_ROOT } from '@kbn/utils'; import { getEnvOptions } from '@kbn/config-mocks'; -import type { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_unknown_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_unknown_types.test.ts similarity index 98% rename from src/core/server/saved_objects/migrations/integration_tests/7_13_0_unknown_types.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/7_13_0_unknown_types.test.ts index 6ccb6497516f9..2008cc370f2ce 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/7_13_0_unknown_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/7_13_0_unknown_types.test.ts @@ -12,9 +12,9 @@ import type { IndicesIndexSettings } from '@elastic/elasticsearch/lib/api/types' import { Env } from '@kbn/config'; import { REPO_ROOT } from '@kbn/utils'; import { getEnvOptions } from '@kbn/config-mocks'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import type { Root } from '../../../root'; -import type { ElasticsearchClient } from '../../../elasticsearch'; const logFilePath = Path.join(__dirname, '7_13_unknown_types.log'); diff --git a/src/core/server/saved_objects/migrations/actions/integration_tests/actions.test.ts b/src/core/server/integration_tests/saved_objects/migrations/actions/actions.test.ts similarity index 99% rename from src/core/server/saved_objects/migrations/actions/integration_tests/actions.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/actions/actions.test.ts index a799ced0ffe39..67dd9a54fa26f 100644 --- a/src/core/server/saved_objects/migrations/actions/integration_tests/actions.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/actions/actions.test.ts @@ -13,7 +13,7 @@ import { errors } from '@elastic/elasticsearch'; import type { TaskEither } from 'fp-ts/lib/TaskEither'; import type { ElasticsearchClient } from '../../../..'; import * as kbnTestServer from '../../../../../test_helpers/kbn_server'; -import type { SavedObjectsRawDoc } from '../../../serialization'; +import type { SavedObjectsRawDoc } from '../../../../saved_objects/serialization'; import { bulkOverwriteTransformedDocuments, cloneIndex, @@ -40,18 +40,18 @@ import { transformDocs, waitForIndexStatusYellow, initAction, -} from '..'; -import type { DocumentsTransformFailed, DocumentsTransformSuccess } from '../../core'; +} from '../../../../saved_objects/migrations/actions'; +import type { + DocumentsTransformFailed, + DocumentsTransformSuccess, +} from '../../../../saved_objects/migrations/core'; const { startES } = kbnTestServer.createTestServers({ adjustTimeout: (t: number) => jest.setTimeout(t), settings: { es: { license: 'basic', - dataArchive: Path.resolve( - __dirname, - '../../integration_tests/archives/7.7.2_xpack_100k_obj.zip' - ), + dataArchive: Path.resolve(__dirname, '../archives/7.7.2_xpack_100k_obj.zip'), esArgs: ['http.max_content_length=10Kb'], }, }, diff --git a/src/core/server/saved_objects/migrations/actions/integration_tests/es_errors.test.ts b/src/core/server/integration_tests/saved_objects/migrations/actions/es_errors.test.ts similarity index 93% rename from src/core/server/saved_objects/migrations/actions/integration_tests/es_errors.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/actions/es_errors.test.ts index 8a051835cad67..dab9067e93efb 100644 --- a/src/core/server/saved_objects/migrations/actions/integration_tests/es_errors.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/actions/es_errors.test.ts @@ -10,9 +10,12 @@ import { ElasticsearchClient } from '../../../..'; import { InternalCoreStart } from '../../../../internal_types'; import * as kbnTestServer from '../../../../../test_helpers/kbn_server'; import { Root } from '../../../../root'; -import { isWriteBlockException, isClusterShardLimitExceeded } from '../es_errors'; -import { createIndex } from '../create_index'; -import { setWriteBlock } from '../set_write_block'; +import { + isWriteBlockException, + isClusterShardLimitExceeded, +} from '../../../../saved_objects/migrations/actions/es_errors'; +import { createIndex } from '../../../../saved_objects/migrations/actions/create_index'; +import { setWriteBlock } from '../../../../saved_objects/migrations/actions/set_write_block'; const { startES } = kbnTestServer.createTestServers({ adjustTimeout: (t: number) => jest.setTimeout(t), diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_5k_so_node_01.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_5k_so_node_01.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_5k_so_node_02.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_5k_so_node_02.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_concurrent_5k_foo.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_concurrent_5k_foo.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_concurrent_5k_foo.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_concurrent_5k_foo.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_with_corrupted_so.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_with_corrupted_so.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_with_corrupted_so.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_with_corrupted_so.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_with_unknown_so.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_with_unknown_so.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.0_with_unknown_so.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_with_unknown_so.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13.2_so_with_multiple_namespaces.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.2_so_with_multiple_namespaces.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13.2_so_with_multiple_namespaces.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13.2_so_with_multiple_namespaces.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.13_1.5k_failed_action_tasks.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.13_1.5k_failed_action_tasks.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.13_1.5k_failed_action_tasks.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.13_1.5k_failed_action_tasks.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.14.0_xpack_sample_saved_objects.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.14.0_xpack_sample_saved_objects.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.14.0_xpack_sample_saved_objects.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.14.0_xpack_sample_saved_objects.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.3.0_xpack_sample_saved_objects.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.3.0_xpack_sample_saved_objects.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.3.0_xpack_sample_saved_objects.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.3.0_xpack_sample_saved_objects.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7.7.2_xpack_100k_obj.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7.7.2_xpack_100k_obj.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7.7.2_xpack_100k_obj.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7.7.2_xpack_100k_obj.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/7_13_corrupt_and_transform_failures_docs.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/7_13_corrupt_and_transform_failures_docs.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/7_13_corrupt_and_transform_failures_docs.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/7_13_corrupt_and_transform_failures_docs.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_document_migration_failure.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_document_migration_failure.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_document_migration_failure.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_document_migration_failure.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_migrated_with_corrupt_outdated_docs.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_migrated_with_corrupt_outdated_docs.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_migrated_with_corrupt_outdated_docs.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_migrated_with_corrupt_outdated_docs.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_migrated_with_outdated_docs.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_migrated_with_outdated_docs.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_migrated_with_outdated_docs.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_migrated_with_outdated_docs.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip b/src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip rename to src/core/server/integration_tests/saved_objects/migrations/archives/8.0.0_v1_migrations_sample_data_saved_objects.zip diff --git a/src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes.test.ts index b6e10e6b3034b..1b903ea864890 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes.test.ts @@ -11,12 +11,12 @@ import fs from 'fs/promises'; import JSON5 from 'json5'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { Env } from '@kbn/config'; import { REPO_ROOT } from '@kbn/utils'; import { getEnvOptions } from '@kbn/config-mocks'; import { LogRecord } from '@kbn/logging'; -import { retryAsync } from '../test_helpers/retry_async'; +import { retryAsync } from '../../../saved_objects/migrations/test_helpers/retry_async'; const kibanaVersion = Env.createDefault(REPO_ROOT, getEnvOptions()).packageInfo.version; const targetIndex = `.kibana_${kibanaVersion}_001`; diff --git a/src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes_exceeds_es_content_length.test.ts b/src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes_exceeds_es_content_length.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes_exceeds_es_content_length.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes_exceeds_es_content_length.test.ts index ae9dc76b134a5..670660509f7a8 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/batch_size_bytes_exceeds_es_content_length.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/batch_size_bytes_exceeds_es_content_length.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import JSON5 from 'json5'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; -import { retryAsync } from '../test_helpers/retry_async'; +import { retryAsync } from '../../../saved_objects/migrations/test_helpers/retry_async'; const logFilePath = Path.join(__dirname, 'batch_size_bytes_exceeds_es_content_length.log'); diff --git a/src/core/server/saved_objects/migrations/integration_tests/cleanup.test.ts b/src/core/server/integration_tests/saved_objects/migrations/cleanup.test.ts similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/cleanup.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/cleanup.test.ts diff --git a/src/core/server/saved_objects/migrations/integration_tests/collects_corrupt_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/collects_corrupt_docs.test.ts similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/collects_corrupt_docs.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/collects_corrupt_docs.test.ts diff --git a/src/core/server/saved_objects/migrations/integration_tests/corrupt_outdated_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/corrupt_outdated_docs.test.ts similarity index 100% rename from src/core/server/saved_objects/migrations/integration_tests/corrupt_outdated_docs.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/corrupt_outdated_docs.test.ts diff --git a/src/core/server/saved_objects/migrations/integration_tests/incompatible_cluster_routing_allocation.test.ts b/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/incompatible_cluster_routing_allocation.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts index 8a075aa08bbe2..371f4b7e712ff 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/incompatible_cluster_routing_allocation.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/incompatible_cluster_routing_allocation.test.ts @@ -15,9 +15,9 @@ import { getDocLinksMeta } from '@kbn/doc-links'; import { getEnvOptions } from '@kbn/config-mocks'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { LogRecord } from '@kbn/logging'; -import { retryAsync } from '../test_helpers/retry_async'; +import { retryAsync } from '../../../saved_objects/migrations/test_helpers/retry_async'; const logFilePath = Path.join(__dirname, 'incompatible_cluster_routing_allocation.log'); const env = Env.createDefault(REPO_ROOT, getEnvOptions()); diff --git a/src/core/server/saved_objects/migrations/integration_tests/migration_from_older_v1.test.ts b/src/core/server/integration_tests/saved_objects/migrations/migration_from_older_v1.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/migration_from_older_v1.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/migration_from_older_v1.test.ts index 69c9cc38fc79d..2420895833077 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/migration_from_older_v1.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/migration_from_older_v1.test.ts @@ -13,9 +13,9 @@ import Semver from 'semver'; import { REPO_ROOT } from '@kbn/utils'; import { Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import { ElasticsearchClient } from '../../../elasticsearch'; -import { SavedObjectsRawDoc } from '../../serialization'; +import { SavedObjectsRawDoc } from '../../../saved_objects/serialization'; import { InternalCoreStart } from '../../../internal_types'; import { Root } from '../../../root'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/migration_from_same_v1.test.ts b/src/core/server/integration_tests/saved_objects/migrations/migration_from_same_v1.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/migration_from_same_v1.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/migration_from_same_v1.test.ts index 5c723b89c23d1..53a2dd64d4084 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/migration_from_same_v1.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/migration_from_same_v1.test.ts @@ -14,8 +14,8 @@ import { REPO_ROOT } from '@kbn/utils'; import { Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import { ElasticsearchClient } from '../../../elasticsearch'; -import { SavedObjectsRawDoc } from '../../serialization'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { SavedObjectsRawDoc } from '../../../saved_objects/serialization'; import { InternalCoreStart } from '../../../internal_types'; import { Root } from '../../../root'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/multiple_es_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/multiple_es_nodes.test.ts similarity index 98% rename from src/core/server/saved_objects/migrations/integration_tests/multiple_es_nodes.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/multiple_es_nodes.test.ts index f88f97a677616..adb7aeacf4610 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/multiple_es_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/multiple_es_nodes.test.ts @@ -11,7 +11,7 @@ import del from 'del'; import { kibanaServerTestUser } from '@kbn/test'; import { kibanaPackageJson as pkg } from '@kbn/utils'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import type { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { Root } from '../../../root'; const LOG_FILE_PREFIX = 'migration_test_multiple_es_nodes'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/multiple_kibana_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/multiple_kibana_nodes.test.ts similarity index 98% rename from src/core/server/saved_objects/migrations/integration_tests/multiple_kibana_nodes.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/multiple_kibana_nodes.test.ts index bc8c138e9ef20..b1ee15572d6e2 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/multiple_kibana_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/multiple_kibana_nodes.test.ts @@ -11,8 +11,8 @@ import del from 'del'; import { esTestConfig, kibanaServerTestUser } from '@kbn/test'; import { kibanaPackageJson as pkg } from '@kbn/utils'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import type { ElasticsearchClient } from '../../../elasticsearch'; -import { SavedObjectsType } from '../../types'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { SavedObjectsType } from '../../../saved_objects/types'; import type { Root } from '../../../root'; const LOG_FILE_PREFIX = 'migration_test_multiple_kibana_nodes'; diff --git a/src/core/server/saved_objects/migrations/integration_tests/outdated_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/outdated_docs.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/outdated_docs.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/outdated_docs.test.ts index bc1f41b542380..74dc2d785c35e 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/outdated_docs.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/outdated_docs.test.ts @@ -11,7 +11,7 @@ import Fs from 'fs'; import Util from 'util'; import { kibanaPackageJson as pkg } from '@kbn/utils'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import type { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { Root } from '../../../root'; const logFilePath = Path.join(__dirname, 'outdated_docs.log'); diff --git a/src/core/server/saved_objects/migrations/integration_tests/rewriting_id.test.ts b/src/core/server/integration_tests/saved_objects/migrations/rewriting_id.test.ts similarity index 97% rename from src/core/server/saved_objects/migrations/integration_tests/rewriting_id.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/rewriting_id.test.ts index cf350c0e9a35e..4cfbe4d9bd1dd 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/rewriting_id.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/rewriting_id.test.ts @@ -11,9 +11,9 @@ import Fs from 'fs'; import Util from 'util'; import { kibanaPackageJson as pkg } from '@kbn/utils'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import type { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { Root } from '../../../root'; -import { deterministicallyRegenerateObjectId } from '../core/document_migrator'; +import { deterministicallyRegenerateObjectId } from '../../../saved_objects/migrations/core/document_migrator'; const logFilePath = Path.join(__dirname, 'rewriting_id.log'); diff --git a/src/core/server/saved_objects/migrations/integration_tests/type_registrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts similarity index 98% rename from src/core/server/saved_objects/migrations/integration_tests/type_registrations.test.ts rename to src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts index 4eddd54acf121..1c8ea64eb8dea 100644 --- a/src/core/server/saved_objects/migrations/integration_tests/type_registrations.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { REMOVED_TYPES } from '../core'; +import { REMOVED_TYPES } from '../../../saved_objects/migrations/core'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; // Types should NEVER be removed from this array diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts similarity index 95% rename from src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts rename to src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts index c34ea099d0ec8..899cf114f6869 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerBulkCreateRoute } from '../bulk_create'; +import { registerBulkCreateRoute } from '../../../saved_objects/routes/bulk_create'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts rename to src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts index a82a5351e9949..6c903ff672b3d 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerBulkGetRoute } from '../bulk_get'; +import { registerBulkGetRoute } from '../../../saved_objects/routes/bulk_get'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_resolve.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/bulk_resolve.test.ts rename to src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts index 90f06368468be..0c51e58f713b6 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_resolve.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerBulkResolveRoute } from '../bulk_resolve'; +import { registerBulkResolveRoute } from '../../../saved_objects/routes/bulk_resolve'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts b/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts similarity index 95% rename from src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts rename to src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts index d92041bce3c72..45aedf8544dfa 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerBulkUpdateRoute } from '../bulk_update'; +import { registerBulkUpdateRoute } from '../../../saved_objects/routes/bulk_update'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/create.test.ts b/src/core/server/integration_tests/saved_objects/routes/create.test.ts similarity index 93% rename from src/core/server/saved_objects/routes/integration_tests/create.test.ts rename to src/core/server/integration_tests/saved_objects/routes/create.test.ts index e4f566c769234..bdaca61ee23e4 100644 --- a/src/core/server/saved_objects/routes/integration_tests/create.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/create.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerCreateRoute } from '../create'; -import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; +import { registerCreateRoute } from '../../../saved_objects/routes/create'; +import { savedObjectsClientMock } from '../../../saved_objects/service/saved_objects_client.mock'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts b/src/core/server/integration_tests/saved_objects/routes/delete.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/delete.test.ts rename to src/core/server/integration_tests/saved_objects/routes/delete.test.ts index 849b99b49fbc0..41f7fd06556f9 100644 --- a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/delete.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerDeleteRoute } from '../delete'; +import { registerDeleteRoute } from '../../../saved_objects/routes/delete'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/delete_unknown_types.test.ts b/src/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts similarity index 88% rename from src/core/server/saved_objects/routes/integration_tests/delete_unknown_types.test.ts rename to src/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts index 87376de206810..4a13921750d1f 100644 --- a/src/core/server/saved_objects/routes/integration_tests/delete_unknown_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts @@ -7,12 +7,12 @@ */ import supertest from 'supertest'; -import { registerDeleteUnknownTypesRoute } from '../deprecations'; -import { elasticsearchServiceMock } from '../../../elasticsearch/elasticsearch_service.mock'; -import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; -import { setupServer } from '../test_utils'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { registerDeleteUnknownTypesRoute } from '../../../saved_objects/routes/deprecations'; +import { typeRegistryMock } from '../../../saved_objects/saved_objects_type_registry.mock'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; import { SavedObjectsType } from '../../..'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/export.test.ts b/src/core/server/integration_tests/saved_objects/routes/export.test.ts similarity index 90% rename from src/core/server/saved_objects/routes/integration_tests/export.test.ts rename to src/core/server/integration_tests/saved_objects/routes/export.test.ts index 9bdd6f39abbd0..358a23902d5e1 100644 --- a/src/core/server/saved_objects/routes/integration_tests/export.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/export.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -jest.mock('../../export', () => ({ +jest.mock('../../../saved_objects/export', () => ({ exportSavedObjectsToStream: jest.fn(), })); @@ -15,11 +15,11 @@ import { createListStream } from '@kbn/utils'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { savedObjectsExporterMock } from '../../export/saved_objects_exporter.mock'; -import { SavedObjectConfig } from '../../saved_objects_config'; -import { registerExportRoute } from '../export'; -import { setupServer, createExportableType } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { savedObjectsExporterMock } from '../../../saved_objects/export/saved_objects_exporter.mock'; +import { SavedObjectConfig } from '../../../saved_objects/saved_objects_config'; +import { registerExportRoute } from '../../../saved_objects/routes/export'; +import { setupServer, createExportableType } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; const allowedTypes = ['index-pattern', 'search']; diff --git a/src/core/server/saved_objects/routes/integration_tests/find.test.ts b/src/core/server/integration_tests/saved_objects/routes/find.test.ts similarity index 98% rename from src/core/server/saved_objects/routes/integration_tests/find.test.ts rename to src/core/server/integration_tests/saved_objects/routes/find.test.ts index 8758666bc487d..41ec6c26041d4 100644 --- a/src/core/server/saved_objects/routes/integration_tests/find.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/find.test.ts @@ -9,13 +9,13 @@ import supertest from 'supertest'; import querystring from 'querystring'; -import { registerFindRoute } from '../find'; +import { registerFindRoute } from '../../../saved_objects/routes/find'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/get.test.ts b/src/core/server/integration_tests/saved_objects/routes/get.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/get.test.ts rename to src/core/server/integration_tests/saved_objects/routes/get.test.ts index 6f0cb25934ef5..264919a9d96b3 100644 --- a/src/core/server/saved_objects/routes/integration_tests/get.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/get.test.ts @@ -7,17 +7,17 @@ */ import supertest from 'supertest'; -import { registerGetRoute } from '../get'; +import { registerGetRoute } from '../../../saved_objects/routes/get'; import { ContextService } from '@kbn/core-http-context-server-internal'; import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; -import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; +import { savedObjectsClientMock } from '../../../saved_objects/service/saved_objects_client.mock'; import type { CoreUsageStatsClient } from '../../../core_usage_data'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; import { contextServiceMock, coreMock } from '../../../mocks'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; const coreId = Symbol('core'); diff --git a/src/core/server/saved_objects/routes/integration_tests/import.test.ts b/src/core/server/integration_tests/saved_objects/routes/import.test.ts similarity index 98% rename from src/core/server/saved_objects/routes/integration_tests/import.test.ts rename to src/core/server/integration_tests/saved_objects/routes/import.test.ts index 9e6e52977b2e1..a9062b8d07919 100644 --- a/src/core/server/saved_objects/routes/integration_tests/import.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/import.test.ts @@ -9,15 +9,15 @@ jest.mock('uuid'); import supertest from 'supertest'; -import { registerImportRoute } from '../import'; +import { registerImportRoute } from '../../../saved_objects/routes/import'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { SavedObjectConfig } from '../../saved_objects_config'; -import { setupServer, createExportableType } from '../test_utils'; -import { SavedObjectsErrorHelpers, SavedObjectsImporter } from '../..'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { SavedObjectConfig } from '../../../saved_objects/saved_objects_config'; +import { setupServer, createExportableType } from '../../../saved_objects/routes/test_utils'; +import { SavedObjectsErrorHelpers, SavedObjectsImporter } from '../../../saved_objects'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/legacy_import_export/integration_tests/export.test.ts b/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts similarity index 90% rename from src/core/server/saved_objects/routes/legacy_import_export/integration_tests/export.test.ts rename to src/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts index 7d0a8607fb6ed..22facc0f3235c 100644 --- a/src/core/server/saved_objects/routes/legacy_import_export/integration_tests/export.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts @@ -27,7 +27,7 @@ const exportObjects = [ }, ]; -jest.mock('../lib/export_dashboards', () => ({ +jest.mock('../../../../saved_objects/routes/legacy_import_export/lib/export_dashboards', () => ({ exportDashboards: jest.fn().mockResolvedValue({ version: 'mockversion', objects: exportObjects }), })); @@ -35,10 +35,10 @@ import supertest from 'supertest'; import { CoreUsageStatsClient } from '../../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../../core_usage_data/core_usage_data_service.mock'; -import { registerLegacyExportRoute } from '../export'; -import { setupServer } from '../../test_utils'; +import { registerLegacyExportRoute } from '../../../../saved_objects/routes/legacy_import_export/export'; +import { setupServer } from '../../../../saved_objects/routes/test_utils'; import { loggerMock } from '@kbn/logging-mocks'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; let coreUsageStatsClient: jest.Mocked; diff --git a/src/core/server/saved_objects/routes/legacy_import_export/integration_tests/import.test.ts b/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts similarity index 89% rename from src/core/server/saved_objects/routes/legacy_import_export/integration_tests/import.test.ts rename to src/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts index 37f82aa47ece5..d508d4c048bfb 100644 --- a/src/core/server/saved_objects/routes/legacy_import_export/integration_tests/import.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts @@ -27,7 +27,7 @@ const importObjects = [ }, ]; -jest.mock('../lib/import_dashboards', () => ({ +jest.mock('../../../../saved_objects/routes/legacy_import_export/lib/import_dashboards', () => ({ importDashboards: jest.fn().mockResolvedValue({ objects: importObjects }), })); @@ -35,10 +35,10 @@ import supertest from 'supertest'; import { CoreUsageStatsClient } from '../../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../../core_usage_data/core_usage_data_service.mock'; -import { registerLegacyImportRoute } from '../import'; -import { setupServer } from '../../test_utils'; +import { registerLegacyImportRoute } from '../../../../saved_objects/routes/legacy_import_export/import'; +import { setupServer } from '../../../../saved_objects/routes/test_utils'; import { loggerMock } from '@kbn/logging-mocks'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; let coreUsageStatsClient: jest.Mocked; diff --git a/src/core/server/saved_objects/routes/integration_tests/migrate.test.mocks.ts b/src/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts similarity index 76% rename from src/core/server/saved_objects/routes/integration_tests/migrate.test.mocks.ts rename to src/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts index b8b3a22c5d0fa..7f5f03ecfbc0c 100644 --- a/src/core/server/saved_objects/routes/integration_tests/migrate.test.mocks.ts +++ b/src/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { mockKibanaMigrator } from '../../migrations/kibana_migrator.mock'; +import { mockKibanaMigrator } from '../../../saved_objects/migrations/kibana_migrator.mock'; export const migratorInstanceMock = mockKibanaMigrator.create(); export const KibanaMigratorMock = jest.fn().mockImplementation(() => migratorInstanceMock); -jest.doMock('../../migrations/kibana_migrator', () => ({ +jest.doMock('../../../saved_objects/migrations/kibana_migrator', () => ({ KibanaMigrator: KibanaMigratorMock, })); diff --git a/src/core/server/saved_objects/routes/integration_tests/migrate.test.ts b/src/core/server/integration_tests/saved_objects/routes/migrate.test.ts similarity index 100% rename from src/core/server/saved_objects/routes/integration_tests/migrate.test.ts rename to src/core/server/integration_tests/saved_objects/routes/migrate.test.ts diff --git a/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts b/src/core/server/integration_tests/saved_objects/routes/resolve.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/resolve.test.ts rename to src/core/server/integration_tests/saved_objects/routes/resolve.test.ts index 9ee1b0f1200e6..8ae3635a8b6ea 100644 --- a/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/resolve.test.ts @@ -10,14 +10,14 @@ import supertest from 'supertest'; import { ContextService } from '@kbn/core-http-context-server-internal'; import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; -import { registerResolveRoute } from '../resolve'; -import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; +import { registerResolveRoute } from '../../../saved_objects/routes/resolve'; +import { savedObjectsClientMock } from '../../../saved_objects/service/saved_objects_client.mock'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { contextServiceMock, coreMock } from '../../../mocks'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; const coreId = Symbol('core'); diff --git a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts b/src/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts similarity index 97% rename from src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts rename to src/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts index 101cf05032618..defdbc5cfc1d6 100644 --- a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts @@ -9,15 +9,15 @@ jest.mock('uuid'); import supertest from 'supertest'; -import { registerResolveImportErrorsRoute } from '../resolve_import_errors'; +import { registerResolveImportErrorsRoute } from '../../../saved_objects/routes/resolve_import_errors'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer, createExportableType } from '../test_utils'; -import { SavedObjectConfig } from '../../saved_objects_config'; -import { SavedObjectsImporter } from '../..'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer, createExportableType } from '../../../saved_objects/routes/test_utils'; +import { SavedObjectConfig } from '../../../saved_objects/saved_objects_config'; +import { SavedObjectsImporter } from '../../../saved_objects/import'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/routes/integration_tests/update.test.ts b/src/core/server/integration_tests/saved_objects/routes/update.test.ts similarity index 94% rename from src/core/server/saved_objects/routes/integration_tests/update.test.ts rename to src/core/server/integration_tests/saved_objects/routes/update.test.ts index 1a41d94b0febe..d0b950093239f 100644 --- a/src/core/server/saved_objects/routes/integration_tests/update.test.ts +++ b/src/core/server/integration_tests/saved_objects/routes/update.test.ts @@ -7,13 +7,13 @@ */ import supertest from 'supertest'; -import { registerUpdateRoute } from '../update'; +import { registerUpdateRoute } from '../../../saved_objects/routes/update'; import { savedObjectsClientMock } from '../../../mocks'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { setupServer } from '../test_utils'; -import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; +import { setupServer } from '../../../saved_objects/routes/test_utils'; +import type { InternalSavedObjectsRequestHandlerContext } from '../../../saved_objects/internal_types'; type SetupServerReturn = Awaited>; diff --git a/src/core/server/saved_objects/service/lib/integration_tests/repository.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository.test.ts similarity index 100% rename from src/core/server/saved_objects/service/lib/integration_tests/repository.test.ts rename to src/core/server/integration_tests/saved_objects/service/lib/repository.test.ts diff --git a/src/core/server/saved_objects/service/lib/integration_tests/repository_with_proxy.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts similarity index 99% rename from src/core/server/saved_objects/service/lib/integration_tests/repository_with_proxy.test.ts rename to src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts index 925b23a64f03e..b82cb54053482 100644 --- a/src/core/server/saved_objects/service/lib/integration_tests/repository_with_proxy.test.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts @@ -9,8 +9,8 @@ import Hapi from '@hapi/hapi'; import h2o2 from '@hapi/h2o2'; import { URL } from 'url'; -import { ISavedObjectsRepository } from '../repository'; -import { SavedObject } from '../../../types'; +import { ISavedObjectsRepository } from '../../../../saved_objects/service/lib/repository'; +import { SavedObject } from '../../../../saved_objects/types'; import { InternalCoreSetup, InternalCoreStart } from '../../../../internal_types'; import { Root } from '../../../../root'; import * as kbnTestServer from '../../../../../test_helpers/kbn_server'; diff --git a/src/core/server/saved_objects/service/lib/integration_tests/repository_with_proxy_utils.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts similarity index 100% rename from src/core/server/saved_objects/service/lib/integration_tests/repository_with_proxy_utils.ts rename to src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts diff --git a/src/core/server/saved_objects/validation/integration_tests/validator.test.ts b/src/core/server/integration_tests/saved_objects/validation/validator.test.ts similarity index 97% rename from src/core/server/saved_objects/validation/integration_tests/validator.test.ts rename to src/core/server/integration_tests/saved_objects/validation/validator.test.ts index 83d6b0f087804..44d882b0fe80b 100644 --- a/src/core/server/saved_objects/validation/integration_tests/validator.test.ts +++ b/src/core/server/integration_tests/saved_objects/validation/validator.test.ts @@ -12,8 +12,8 @@ import Util from 'util'; import { Env } from '@kbn/config'; import { schema } from '@kbn/config-schema'; import { REPO_ROOT } from '@kbn/utils'; -import { SavedObjectsType } from '../../types'; -import { ISavedObjectsRepository } from '../../service/lib'; +import { SavedObjectsType } from '../../../saved_objects/types'; +import { ISavedObjectsRepository } from '../../../saved_objects/service/lib'; import { getEnvOptions } from '@kbn/config-mocks'; import { InternalCoreSetup, InternalCoreStart } from '../../../internal_types'; import { Root } from '../../../root'; diff --git a/src/core/server/integration_tests/status/jest.integration.config.js b/src/core/server/integration_tests/status/jest.integration.config.js new file mode 100644 index 0000000000000..57f19325a6be4 --- /dev/null +++ b/src/core/server/integration_tests/status/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/status'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/status/routes/integration_tests/status.test.ts b/src/core/server/integration_tests/status/routes/status.test.ts similarity index 98% rename from src/core/server/status/routes/integration_tests/status.test.ts rename to src/core/server/integration_tests/status/routes/status.test.ts index 6034542fab932..12b185a61cf54 100644 --- a/src/core/server/status/routes/integration_tests/status.test.ts +++ b/src/core/server/integration_tests/status/routes/status.test.ts @@ -16,9 +16,9 @@ import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-serve import { metricsServiceMock } from '../../../metrics/metrics_service.mock'; import type { MetricsServiceSetup } from '../../../metrics'; -import { registerStatusRoute } from '../status'; -import { ServiceStatus, ServiceStatusLevels, ServiceStatusLevel } from '../../types'; -import { statusServiceMock } from '../../status_service.mock'; +import { registerStatusRoute } from '../../../status/routes/status'; +import { ServiceStatus, ServiceStatusLevels, ServiceStatusLevel } from '../../../status/types'; +import { statusServiceMock } from '../../../status/status_service.mock'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts b/src/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts similarity index 96% rename from src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts rename to src/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts index e94c696b4eca8..ec4d1025e9f69 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts +++ b/src/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts @@ -6,15 +6,15 @@ * Side Public License, v 1. */ -import { SavedObjectsClientContract } from '../../..'; +import { SavedObjectsClientContract } from '../../saved_objects/types'; import { createTestServers, TestElasticsearchUtils, TestKibanaUtils, TestUtils, -} from '../../../../test_helpers/kbn_server'; -import { createOrUpgradeSavedConfig } from '../create_or_upgrade_saved_config'; +} from '../../../test_helpers/kbn_server'; +import { createOrUpgradeSavedConfig } from '../../ui_settings/create_or_upgrade_saved_config'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { httpServerMock } from '@kbn/core-http-server-mocks'; diff --git a/src/core/server/ui_settings/integration_tests/doc_exists.ts b/src/core/server/integration_tests/ui_settings/doc_exists.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/doc_exists.ts rename to src/core/server/integration_tests/ui_settings/doc_exists.ts diff --git a/src/core/server/ui_settings/integration_tests/doc_missing.ts b/src/core/server/integration_tests/ui_settings/doc_missing.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/doc_missing.ts rename to src/core/server/integration_tests/ui_settings/doc_missing.ts diff --git a/src/core/server/ui_settings/integration_tests/index.test.ts b/src/core/server/integration_tests/ui_settings/index.test.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/index.test.ts rename to src/core/server/integration_tests/ui_settings/index.test.ts diff --git a/src/core/server/integration_tests/ui_settings/jest.integration.config.js b/src/core/server/integration_tests/ui_settings/jest.integration.config.js new file mode 100644 index 0000000000000..aa41cd5a6b7b3 --- /dev/null +++ b/src/core/server/integration_tests/ui_settings/jest.integration.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../..', + roots: ['/src/core/server/integration_tests/ui_settings'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/ui_settings/integration_tests/lib/chance.ts b/src/core/server/integration_tests/ui_settings/lib/chance.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/lib/chance.ts rename to src/core/server/integration_tests/ui_settings/lib/chance.ts diff --git a/src/core/server/ui_settings/integration_tests/lib/index.ts b/src/core/server/integration_tests/ui_settings/lib/index.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/lib/index.ts rename to src/core/server/integration_tests/ui_settings/lib/index.ts diff --git a/src/core/server/ui_settings/integration_tests/lib/servers.ts b/src/core/server/integration_tests/ui_settings/lib/servers.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/lib/servers.ts rename to src/core/server/integration_tests/ui_settings/lib/servers.ts diff --git a/src/core/server/ui_settings/integration_tests/routes.test.ts b/src/core/server/integration_tests/ui_settings/routes.test.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/routes.test.ts rename to src/core/server/integration_tests/ui_settings/routes.test.ts diff --git a/src/core/server/ui_settings/integration_tests/so_migrations.test.ts b/src/core/server/integration_tests/ui_settings/so_migrations.test.ts similarity index 100% rename from src/core/server/ui_settings/integration_tests/so_migrations.test.ts rename to src/core/server/integration_tests/ui_settings/so_migrations.test.ts diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts index ca02ad45eacf4..4338d55e7ac3d 100644 --- a/src/core/server/internal_types.ts +++ b/src/core/server/internal_types.ts @@ -31,12 +31,12 @@ import type { InternalHttpServiceSetup, InternalHttpServiceStart, } from '@kbn/core-http-server-internal'; -import { CapabilitiesSetup, CapabilitiesStart } from './capabilities'; -import { +import type { InternalElasticsearchServicePreboot, InternalElasticsearchServiceSetup, InternalElasticsearchServiceStart, -} from './elasticsearch'; +} from '@kbn/core-elasticsearch-server-internal'; +import { CapabilitiesSetup, CapabilitiesStart } from './capabilities'; import { InternalSavedObjectsServiceSetup, InternalSavedObjectsServiceStart, diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 9e693ac7600e8..c13051932f2d6 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -20,6 +20,7 @@ import { executionContextServiceMock } from '@kbn/core-execution-context-server- import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import type { PluginInitializerContext, CoreSetup, @@ -28,7 +29,6 @@ import type { CorePreboot, RequestHandlerContext, } from '.'; -import { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; import { httpResourcesMock } from './http_resources/http_resources_service.mock'; import { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; import { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock'; @@ -46,8 +46,8 @@ import { deprecationsServiceMock } from './deprecations/deprecations_service.moc export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks'; export { loggingSystemMock } from '@kbn/core-logging-server-mocks'; export { httpServerMock, sessionStorageMock, httpServiceMock } from '@kbn/core-http-server-mocks'; +export { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; export { httpResourcesMock } from './http_resources/http_resources_service.mock'; -export { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; export { savedObjectsRepositoryMock } from './saved_objects/service/lib/repository.mock'; export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; export { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock'; @@ -70,7 +70,7 @@ export type { ElasticsearchClientMock, ClusterClientMock, ScopedClusterClientMock, -} from './elasticsearch/client/mocks'; +} from '@kbn/core-elasticsearch-client-server-mocks'; type MockedPluginInitializerConfig = jest.Mocked['config']>; diff --git a/src/core/server/plugins/legacy_config.ts b/src/core/server/plugins/legacy_config.ts index 9dc4afc37515a..4bee00d615748 100644 --- a/src/core/server/plugins/legacy_config.ts +++ b/src/core/server/plugins/legacy_config.ts @@ -12,11 +12,11 @@ import { PathConfigType, config as pathConfig } from '@kbn/utils'; import { pick, deepFreeze } from '@kbn/std'; import { IConfigService } from '@kbn/config'; -import { SharedGlobalConfig, SharedGlobalConfigKeys } from './types'; import { ElasticsearchConfigType, config as elasticsearchConfig, -} from '../elasticsearch/elasticsearch_config'; +} from '@kbn/core-elasticsearch-server-internal'; +import { SharedGlobalConfig, SharedGlobalConfigKeys } from './types'; import { SavedObjectsConfigType, savedObjectsConfig } from '../saved_objects/saved_objects_config'; const createGlobalConfig = ({ diff --git a/src/core/server/plugins/types.ts b/src/core/server/plugins/types.ts index 98c5b6cb60497..a07eff177108e 100644 --- a/src/core/server/plugins/types.ts +++ b/src/core/server/plugins/types.ts @@ -19,8 +19,8 @@ import type { } from '@kbn/config'; import type { PluginName, PluginOpaqueId, PluginType } from '@kbn/core-base-common'; import type { NodeInfo } from '@kbn/core-node-server'; +import type { ElasticsearchConfigType } from '@kbn/core-elasticsearch-server-internal'; -import { ElasticsearchConfigType } from '../elasticsearch/elasticsearch_config'; import { SavedObjectsConfigType } from '../saved_objects/saved_objects_config'; import { CorePreboot, CoreSetup, CoreStart } from '..'; diff --git a/src/core/server/rendering/__mocks__/params.ts b/src/core/server/rendering/__mocks__/params.ts index 47c5612555e48..71b4996590c64 100644 --- a/src/core/server/rendering/__mocks__/params.ts +++ b/src/core/server/rendering/__mocks__/params.ts @@ -8,7 +8,7 @@ import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { httpServiceMock } from '@kbn/core-http-server-mocks'; -import { elasticsearchServiceMock } from '../../elasticsearch/elasticsearch_service.mock'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { pluginServiceMock } from '../../plugins/plugins_service.mock'; import { statusServiceMock } from '../../status/status_service.mock'; diff --git a/src/core/server/rendering/types.ts b/src/core/server/rendering/types.ts index d6c660f3b5ec1..0c5382627e9b6 100644 --- a/src/core/server/rendering/types.ts +++ b/src/core/server/rendering/types.ts @@ -14,7 +14,7 @@ import type { InternalHttpServicePreboot, InternalHttpServiceSetup, } from '@kbn/core-http-server-internal'; -import { InternalElasticsearchServiceSetup } from '../elasticsearch'; +import type { InternalElasticsearchServiceSetup } from '@kbn/core-elasticsearch-server-internal'; import { UiPlugins } from '../plugins'; import { IUiSettingsClient } from '../ui_settings'; import type { InternalStatusServiceSetup } from '../status'; diff --git a/src/core/server/saved_objects/deprecations/unknown_object_types.test.ts b/src/core/server/saved_objects/deprecations/unknown_object_types.test.ts index 84a8d94f8bf2c..51f228f46438b 100644 --- a/src/core/server/saved_objects/deprecations/unknown_object_types.test.ts +++ b/src/core/server/saved_objects/deprecations/unknown_object_types.test.ts @@ -10,7 +10,7 @@ import { getIndexForTypeMock } from './unknown_object_types.test.mocks'; import { deleteUnknownTypeObjects, getUnknownTypesDeprecations } from './unknown_object_types'; import { typeRegistryMock } from '../saved_objects_type_registry.mock'; -import { elasticsearchClientMock } from '../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { SavedObjectsType } from '../..'; import { createAggregateTypesSearchResponse } from '../migrations/actions/check_for_unknown_docs.mocks'; diff --git a/src/core/server/saved_objects/deprecations/unknown_object_types.ts b/src/core/server/saved_objects/deprecations/unknown_object_types.ts index d8762ebcfd1bd..ba2b593dff9e5 100644 --- a/src/core/server/saved_objects/deprecations/unknown_object_types.ts +++ b/src/core/server/saved_objects/deprecations/unknown_object_types.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; -import { IScopedClusterClient } from '../../elasticsearch'; +import type { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; import { getAggregatedTypesDocuments } from '../migrations/actions/check_for_unknown_docs'; import { addExcludedTypesToBoolQuery } from '../migrations/model/helpers'; import { ISavedObjectTypeRegistry } from '../saved_objects_type_registry'; diff --git a/src/core/server/saved_objects/internal_types.ts b/src/core/server/saved_objects/internal_types.ts index 4f8dc1f520e71..9235f700f25ec 100644 --- a/src/core/server/saved_objects/internal_types.ts +++ b/src/core/server/saved_objects/internal_types.ts @@ -7,7 +7,7 @@ */ import type { IRouter, RequestHandlerContextBase } from '@kbn/core-http-server'; -import type { ElasticsearchRequestHandlerContext } from '../elasticsearch'; +import type { ElasticsearchRequestHandlerContext } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsRequestHandlerContext } from './saved_objects_route_handler_context'; /** diff --git a/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.test.ts b/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.test.ts index 7f2cfa01ec42f..06b5dd762cffc 100644 --- a/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.test.ts +++ b/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.test.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/Either'; import { errors as EsErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { bulkOverwriteTransformedDocuments } from './bulk_overwrite_transformed_documents'; diff --git a/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.ts b/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.ts index 8318bd8f7a69b..2948c56166133 100644 --- a/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.ts +++ b/src/core/server/saved_objects/migrations/actions/bulk_overwrite_transformed_documents.ts @@ -10,7 +10,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { errors as esErrors } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsRawDoc } from '../../serialization'; import { catchRetryableEsClientErrors, diff --git a/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.test.ts b/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.test.ts index 68bd6c934a80f..95a9a33831d09 100644 --- a/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.test.ts +++ b/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.test.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import { errors as esErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { calculateExcludeFilters } from './calculate_exclude_filters'; describe('calculateExcludeFilters', () => { diff --git a/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.ts b/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.ts index a2cea776792ad..ecf29aa25f9f4 100644 --- a/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.ts +++ b/src/core/server/saved_objects/migrations/actions/calculate_exclude_filters.ts @@ -10,8 +10,8 @@ import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/type import { withTimeout } from '@kbn/std'; import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { RetryableEsClientError } from '.'; -import type { ElasticsearchClient } from '../../../elasticsearch'; import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '../../types'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; diff --git a/src/core/server/saved_objects/migrations/actions/catch_retryable_es_client_errors.test.ts b/src/core/server/saved_objects/migrations/actions/catch_retryable_es_client_errors.test.ts index 175631945d52f..989e50af73683 100644 --- a/src/core/server/saved_objects/migrations/actions/catch_retryable_es_client_errors.test.ts +++ b/src/core/server/saved_objects/migrations/actions/catch_retryable_es_client_errors.test.ts @@ -7,7 +7,7 @@ */ import { errors as esErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; describe('catchRetryableEsClientErrors', () => { diff --git a/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.test.ts b/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.test.ts index d5c99f01ada33..465d4c8aa7ee8 100644 --- a/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.test.ts +++ b/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.test.ts @@ -10,7 +10,7 @@ import * as Either from 'fp-ts/lib/Either'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { checkForUnknownDocs } from './check_for_unknown_docs'; import { createAggregateTypesSearchResponse } from './check_for_unknown_docs.mocks'; diff --git a/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.ts b/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.ts index b475f47e3d7f2..a7027c65d011e 100644 --- a/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.ts +++ b/src/core/server/saved_objects/migrations/actions/check_for_unknown_docs.ts @@ -15,8 +15,8 @@ import type { QueryDslQueryContainer, SearchRequest, } from '@elastic/elasticsearch/lib/api/types'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsRawDocSource } from '../../serialization'; -import type { ElasticsearchClient } from '../../../elasticsearch'; import { catchRetryableEsClientErrors, type RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/clone_index.test.ts b/src/core/server/saved_objects/migrations/actions/clone_index.test.ts index 84b4b00bc7e7f..49e20d7fc7b39 100644 --- a/src/core/server/saved_objects/migrations/actions/clone_index.test.ts +++ b/src/core/server/saved_objects/migrations/actions/clone_index.test.ts @@ -9,8 +9,9 @@ import { errors as EsErrors } from '@elastic/elasticsearch'; import { cloneIndex } from './clone_index'; import { setWriteBlock } from './set_write_block'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; + jest.mock('./catch_retryable_es_client_errors'); describe('cloneIndex', () => { diff --git a/src/core/server/saved_objects/migrations/actions/clone_index.ts b/src/core/server/saved_objects/migrations/actions/clone_index.ts index c64b715468c28..8b0bce96989f2 100644 --- a/src/core/server/saved_objects/migrations/actions/clone_index.ts +++ b/src/core/server/saved_objects/migrations/actions/clone_index.ts @@ -10,7 +10,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { errors as EsErrors } from '@elastic/elasticsearch'; import { pipe } from 'fp-ts/lib/pipeable'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, @@ -25,6 +25,7 @@ import { } from './constants'; import { isClusterShardLimitExceeded } from './es_errors'; import { ClusterShardLimitExceeded } from './create_index'; + export type CloneIndexResponse = AcknowledgeResponse; /** @internal */ diff --git a/src/core/server/saved_objects/migrations/actions/close_pit.test.ts b/src/core/server/saved_objects/migrations/actions/close_pit.test.ts index 5d9696239a61e..d2e4a9439e326 100644 --- a/src/core/server/saved_objects/migrations/actions/close_pit.test.ts +++ b/src/core/server/saved_objects/migrations/actions/close_pit.test.ts @@ -6,11 +6,12 @@ * Side Public License, v 1. */ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; -jest.mock('./catch_retryable_es_client_errors'); import { errors as EsErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { closePit } from './close_pit'; +jest.mock('./catch_retryable_es_client_errors'); + describe('closePit', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/close_pit.ts b/src/core/server/saved_objects/migrations/actions/close_pit.ts index cb340068560d4..a3ea50edccae6 100644 --- a/src/core/server/saved_objects/migrations/actions/close_pit.ts +++ b/src/core/server/saved_objects/migrations/actions/close_pit.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/create_index.test.ts b/src/core/server/saved_objects/migrations/actions/create_index.test.ts index d5d906898943c..47ea28ca2953d 100644 --- a/src/core/server/saved_objects/migrations/actions/create_index.test.ts +++ b/src/core/server/saved_objects/migrations/actions/create_index.test.ts @@ -8,11 +8,12 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { createIndex } from './create_index'; import { setWriteBlock } from './set_write_block'; +jest.mock('./catch_retryable_es_client_errors'); + describe('createIndex', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/create_index.ts b/src/core/server/saved_objects/migrations/actions/create_index.ts index 3766a470984f5..3436845f82382 100644 --- a/src/core/server/saved_objects/migrations/actions/create_index.ts +++ b/src/core/server/saved_objects/migrations/actions/create_index.ts @@ -10,8 +10,8 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { pipe } from 'fp-ts/lib/pipeable'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { AcknowledgeResponse } from '.'; -import { ElasticsearchClient } from '../../../elasticsearch'; import { IndexMapping } from '../../mappings'; import { catchRetryableEsClientErrors, diff --git a/src/core/server/saved_objects/migrations/actions/fetch_indices.test.ts b/src/core/server/saved_objects/migrations/actions/fetch_indices.test.ts index ea53c8f4cfa54..b0839c10a8a92 100644 --- a/src/core/server/saved_objects/migrations/actions/fetch_indices.test.ts +++ b/src/core/server/saved_objects/migrations/actions/fetch_indices.test.ts @@ -8,6 +8,9 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { fetchIndices } from './fetch_indices'; + // Create a mock powered by the actual implementation jest.mock('./catch_retryable_es_client_errors', () => ({ catchRetryableEsClientErrors: jest @@ -17,9 +20,6 @@ jest.mock('./catch_retryable_es_client_errors', () => ({ ), })); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; -import { fetchIndices } from './fetch_indices'; - describe('fetchIndices', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/fetch_indices.ts b/src/core/server/saved_objects/migrations/actions/fetch_indices.ts index 8141670a7dbe6..a88d610a90221 100644 --- a/src/core/server/saved_objects/migrations/actions/fetch_indices.ts +++ b/src/core/server/saved_objects/migrations/actions/fetch_indices.ts @@ -7,12 +7,13 @@ */ import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as Either from 'fp-ts/lib/Either'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { IndexMapping } from '../../mappings'; -import { ElasticsearchClient } from '../../../elasticsearch'; import { catchRetryableEsClientErrors, RetryableEsClientError, } from './catch_retryable_es_client_errors'; + export type FetchIndexResponse = Record< string, { aliases: Record; mappings: IndexMapping; settings: unknown } diff --git a/src/core/server/saved_objects/migrations/actions/initialize_action.test.ts b/src/core/server/saved_objects/migrations/actions/initialize_action.test.ts index 5d831a5bb8f78..ebcca7e1bb787 100644 --- a/src/core/server/saved_objects/migrations/actions/initialize_action.test.ts +++ b/src/core/server/saved_objects/migrations/actions/initialize_action.test.ts @@ -9,10 +9,11 @@ import * as Either from 'fp-ts/lib/Either'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { initAction } from './initialize_action'; +jest.mock('./catch_retryable_es_client_errors'); + describe('initAction', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/initialize_action.ts b/src/core/server/saved_objects/migrations/actions/initialize_action.ts index b797d81a46ec3..a1b5e01360018 100644 --- a/src/core/server/saved_objects/migrations/actions/initialize_action.ts +++ b/src/core/server/saved_objects/migrations/actions/initialize_action.ts @@ -9,7 +9,7 @@ import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as Either from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/open_pit.test.ts b/src/core/server/saved_objects/migrations/actions/open_pit.test.ts index c8fc29d06f42f..5a6d00a1482d9 100644 --- a/src/core/server/saved_objects/migrations/actions/open_pit.test.ts +++ b/src/core/server/saved_objects/migrations/actions/open_pit.test.ts @@ -8,10 +8,11 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { openPit } from './open_pit'; +jest.mock('./catch_retryable_es_client_errors'); + describe('openPit', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/open_pit.ts b/src/core/server/saved_objects/migrations/actions/open_pit.ts index 7e1f3a77f2d1e..c17b42d13a8c4 100644 --- a/src/core/server/saved_objects/migrations/actions/open_pit.ts +++ b/src/core/server/saved_objects/migrations/actions/open_pit.ts @@ -8,11 +8,12 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, } from './catch_retryable_es_client_errors'; + /** @internal */ export interface OpenPitResponse { pitId: string; diff --git a/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.test.ts b/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.test.ts index e319d4149dd1a..41253ebcd1ed2 100644 --- a/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.test.ts +++ b/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.test.ts @@ -7,10 +7,11 @@ */ import { errors as EsErrors } from '@elastic/elasticsearch'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { pickupUpdatedMappings } from './pickup_updated_mappings'; +jest.mock('./catch_retryable_es_client_errors'); + describe('pickupUpdatedMappings', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.ts b/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.ts index c1e1111a4afe3..9cb37facc0b5a 100644 --- a/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.ts +++ b/src/core/server/saved_objects/migrations/actions/pickup_updated_mappings.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts b/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts index 0d8d76b45a57b..d2f7a3ab3c3d7 100644 --- a/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts +++ b/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts @@ -8,27 +8,63 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { readWithPit } from './read_with_pit'; +jest.mock('./catch_retryable_es_client_errors'); + describe('readWithPit', () => { beforeEach(() => { jest.clearAllMocks(); }); + it('calls esClient.search with the appropriate params', async () => { + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createSuccessTransportRequestPromise({ + hits: { + total: 0, + hits: [], + }, + }) + ); + + await readWithPit({ + client, + pitId: 'pitId', + query: { match_all: {} }, + batchSize: 10_000, + })(); + + expect(client.search).toHaveBeenCalledTimes(1); + expect(client.search).toHaveBeenCalledWith({ + allow_partial_search_results: false, + pit: { + id: 'pitId', + keep_alive: '10m', + }, + query: { + match_all: {}, + }, + search_after: undefined, + seq_no_primary_term: undefined, + size: 10000, + sort: '_shard_doc:asc', + track_total_hits: true, + }); + }); - // Create a mock client that rejects all methods with a 503 status code - // response. - const retryableError = new EsErrors.ResponseError( - elasticsearchClientMock.createApiResponse({ - statusCode: 503, - body: { error: { type: 'es_type', reason: 'es_reason' } }, - }) - ); - const client = elasticsearchClientMock.createInternalClient( - elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) - ); it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + const task = readWithPit({ client, pitId: 'pitId', diff --git a/src/core/server/saved_objects/migrations/actions/read_with_pit.ts b/src/core/server/saved_objects/migrations/actions/read_with_pit.ts index 013cd59271ee1..10d5ff6bfff88 100644 --- a/src/core/server/saved_objects/migrations/actions/read_with_pit.ts +++ b/src/core/server/saved_objects/migrations/actions/read_with_pit.ts @@ -9,7 +9,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsRawDoc } from '../../serialization'; import { catchRetryableEsClientErrors, @@ -49,24 +49,20 @@ export const readWithPit = () => { return client .search({ + allow_partial_search_results: false, seq_no_primary_term: seqNoPrimaryTerm, - body: { - // Sort fields are required to use searchAfter - sort: { - // the most efficient option as order is not important for the migration - _shard_doc: { order: 'asc' }, - }, - pit: { id: pitId, keep_alive: pitKeepAlive }, - size: batchSize, - search_after: searchAfter, - /** - * We want to know how many documents we need to process so we can log the progress. - * But we also want to increase the performance of these requests, - * so we ask ES to report the total count only on the first request (when searchAfter does not exist) - */ - track_total_hits: typeof searchAfter === 'undefined', - query, - }, + // Sort fields are required to use searchAfter + sort: '_shard_doc:asc', + pit: { id: pitId, keep_alive: pitKeepAlive }, + size: batchSize, + search_after: searchAfter, + /** + * We want to know how many documents we need to process so we can log the progress. + * But we also want to increase the performance of these requests, + * so we ask ES to report the total count only on the first request (when searchAfter does not exist) + */ + track_total_hits: typeof searchAfter === 'undefined', + query, }) .then((body) => { const totalHits = diff --git a/src/core/server/saved_objects/migrations/actions/refresh_index.test.ts b/src/core/server/saved_objects/migrations/actions/refresh_index.test.ts index 0ebdb2b2b1851..1de2a0142032d 100644 --- a/src/core/server/saved_objects/migrations/actions/refresh_index.test.ts +++ b/src/core/server/saved_objects/migrations/actions/refresh_index.test.ts @@ -8,10 +8,11 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { refreshIndex } from './refresh_index'; +jest.mock('./catch_retryable_es_client_errors'); + describe('refreshIndex', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/refresh_index.ts b/src/core/server/saved_objects/migrations/actions/refresh_index.ts index 371247789af24..7eb5c5d560d4c 100644 --- a/src/core/server/saved_objects/migrations/actions/refresh_index.ts +++ b/src/core/server/saved_objects/migrations/actions/refresh_index.ts @@ -7,7 +7,7 @@ */ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, diff --git a/src/core/server/saved_objects/migrations/actions/reindex.test.ts b/src/core/server/saved_objects/migrations/actions/reindex.test.ts index 3352e4eebadca..969150a21cfcd 100644 --- a/src/core/server/saved_objects/migrations/actions/reindex.test.ts +++ b/src/core/server/saved_objects/migrations/actions/reindex.test.ts @@ -8,10 +8,11 @@ import * as Option from 'fp-ts/lib/Option'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { reindex } from './reindex'; +jest.mock('./catch_retryable_es_client_errors'); + describe('reindex', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/reindex.ts b/src/core/server/saved_objects/migrations/actions/reindex.ts index 46f20928e1bef..594822f724760 100644 --- a/src/core/server/saved_objects/migrations/actions/reindex.ts +++ b/src/core/server/saved_objects/migrations/actions/reindex.ts @@ -10,7 +10,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as Option from 'fp-ts/lib/Option'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import type { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, type RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/remove_write_block.test.ts b/src/core/server/saved_objects/migrations/actions/remove_write_block.test.ts index 497211cb693ab..d8caaaca5eac6 100644 --- a/src/core/server/saved_objects/migrations/actions/remove_write_block.test.ts +++ b/src/core/server/saved_objects/migrations/actions/remove_write_block.test.ts @@ -7,9 +7,10 @@ */ import { removeWriteBlock } from './remove_write_block'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; + jest.mock('./catch_retryable_es_client_errors'); describe('removeWriteBlock', () => { diff --git a/src/core/server/saved_objects/migrations/actions/remove_write_block.ts b/src/core/server/saved_objects/migrations/actions/remove_write_block.ts index 47a3ecf7a4404..e5c64c8385e91 100644 --- a/src/core/server/saved_objects/migrations/actions/remove_write_block.ts +++ b/src/core/server/saved_objects/migrations/actions/remove_write_block.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.test.ts b/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.test.ts index ab133e9a564be..9af32139bb78e 100644 --- a/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.test.ts +++ b/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.test.ts @@ -8,10 +8,11 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { searchForOutdatedDocuments } from './search_for_outdated_documents'; +jest.mock('./catch_retryable_es_client_errors'); + describe('searchForOutdatedDocuments', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.ts b/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.ts index bc6b6e5c29d46..fefc73c588fee 100644 --- a/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.ts +++ b/src/core/server/saved_objects/migrations/actions/search_for_outdated_documents.ts @@ -9,7 +9,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { SavedObjectsRawDoc, SavedObjectsRawDocSource } from '../../serialization'; import { catchRetryableEsClientErrors, diff --git a/src/core/server/saved_objects/migrations/actions/set_write_block.test.ts b/src/core/server/saved_objects/migrations/actions/set_write_block.test.ts index cf7b3091f38ff..7da18cb411453 100644 --- a/src/core/server/saved_objects/migrations/actions/set_write_block.test.ts +++ b/src/core/server/saved_objects/migrations/actions/set_write_block.test.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ import { setWriteBlock } from './set_write_block'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; + jest.mock('./catch_retryable_es_client_errors'); describe('setWriteBlock', () => { diff --git a/src/core/server/saved_objects/migrations/actions/set_write_block.ts b/src/core/server/saved_objects/migrations/actions/set_write_block.ts index fcb508aa6cf3f..d5410cf11b57e 100644 --- a/src/core/server/saved_objects/migrations/actions/set_write_block.ts +++ b/src/core/server/saved_objects/migrations/actions/set_write_block.ts @@ -9,7 +9,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { errors as EsErrors } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/update_aliases.test.ts b/src/core/server/saved_objects/migrations/actions/update_aliases.test.ts index e2ea07d40281b..960029252da24 100644 --- a/src/core/server/saved_objects/migrations/actions/update_aliases.test.ts +++ b/src/core/server/saved_objects/migrations/actions/update_aliases.test.ts @@ -8,11 +8,12 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { updateAliases } from './update_aliases'; import { setWriteBlock } from './set_write_block'; +jest.mock('./catch_retryable_es_client_errors'); + describe('updateAliases', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/update_aliases.ts b/src/core/server/saved_objects/migrations/actions/update_aliases.ts index c8ac3655ba72a..1a5e487ce9205 100644 --- a/src/core/server/saved_objects/migrations/actions/update_aliases.ts +++ b/src/core/server/saved_objects/migrations/actions/update_aliases.ts @@ -9,7 +9,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { errors as EsErrors } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.test.ts b/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.test.ts index 3ecb990cd9e82..8fdb5550bd01e 100644 --- a/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.test.ts +++ b/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.test.ts @@ -8,10 +8,11 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { updateAndPickupMappings } from './update_and_pickup_mappings'; +jest.mock('./catch_retryable_es_client_errors'); + describe('updateAndPickupMappings', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.ts b/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.ts index 06b3e9051ffa3..bd1c2d6ff7614 100644 --- a/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.ts +++ b/src/core/server/saved_objects/migrations/actions/update_and_pickup_mappings.ts @@ -9,7 +9,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import { pipe } from 'fp-ts/lib/pipeable'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { IndexMapping } from '../../mappings'; import { catchRetryableEsClientErrors, diff --git a/src/core/server/saved_objects/migrations/actions/verify_reindex.ts b/src/core/server/saved_objects/migrations/actions/verify_reindex.ts index 481daf459251d..866ec9974e929 100644 --- a/src/core/server/saved_objects/migrations/actions/verify_reindex.ts +++ b/src/core/server/saved_objects/migrations/actions/verify_reindex.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.test.ts b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.test.ts index 8cea34b80ffad..ecff30c595a78 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.test.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.test.ts @@ -8,8 +8,9 @@ import { errors as EsErrors } from '@elastic/elasticsearch'; import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; + jest.mock('./catch_retryable_es_client_errors'); describe('waitForIndexStatusYellow', () => { diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts index fed28252bd2a4..a306c0d2d058c 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_index_status_yellow.ts @@ -8,7 +8,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_pickup_updated_mappings_task.test.ts b/src/core/server/saved_objects/migrations/actions/wait_for_pickup_updated_mappings_task.test.ts index f7c380be9427c..896a687c1f8d3 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_pickup_updated_mappings_task.test.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_pickup_updated_mappings_task.test.ts @@ -8,11 +8,12 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { waitForPickupUpdatedMappingsTask } from './wait_for_pickup_updated_mappings_task'; import { setWriteBlock } from './set_write_block'; +jest.mock('./catch_retryable_es_client_errors'); + describe('waitForPickupUpdatedMappingsTask', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_reindex_task.test.ts b/src/core/server/saved_objects/migrations/actions/wait_for_reindex_task.test.ts index f6a236aab5c85..bb9858c60cb24 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_reindex_task.test.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_reindex_task.test.ts @@ -8,11 +8,12 @@ import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { waitForReindexTask } from './wait_for_reindex_task'; import { setWriteBlock } from './set_write_block'; +jest.mock('./catch_retryable_es_client_errors'); + describe('waitForReindexTask', () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_task.test.ts b/src/core/server/saved_objects/migrations/actions/wait_for_task.test.ts index c7ca9bf36a2c6..4a5fc20e1fe12 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_task.test.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_task.test.ts @@ -7,8 +7,9 @@ */ import { errors as EsErrors } from '@elastic/elasticsearch'; import { waitForTask } from './wait_for_task'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; + jest.mock('./catch_retryable_es_client_errors'); describe('waitForTask', () => { diff --git a/src/core/server/saved_objects/migrations/actions/wait_for_task.ts b/src/core/server/saved_objects/migrations/actions/wait_for_task.ts index f3f1e116ab3c0..a5762ff10a122 100644 --- a/src/core/server/saved_objects/migrations/actions/wait_for_task.ts +++ b/src/core/server/saved_objects/migrations/actions/wait_for_task.ts @@ -10,11 +10,12 @@ import * as Either from 'fp-ts/lib/Either'; import * as TaskEither from 'fp-ts/lib/TaskEither'; import * as Option from 'fp-ts/lib/Option'; import { errors as EsErrors } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { catchRetryableEsClientErrors, RetryableEsClientError, } from './catch_retryable_es_client_errors'; + /** @internal */ export interface WaitForTaskResponse { error: Option.Option<{ type: string; reason: string; index?: string }>; diff --git a/src/core/server/saved_objects/migrations/kibana_migrator.test.ts b/src/core/server/saved_objects/migrations/kibana_migrator.test.ts index a19071a7d2d76..926b6efcf1803 100644 --- a/src/core/server/saved_objects/migrations/kibana_migrator.test.ts +++ b/src/core/server/saved_objects/migrations/kibana_migrator.test.ts @@ -10,7 +10,7 @@ import { take } from 'rxjs/operators'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { elasticsearchClientMock } from '../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { KibanaMigratorOptions, KibanaMigrator } from './kibana_migrator'; import { SavedObjectTypeRegistry } from '../saved_objects_type_registry'; import { SavedObjectsType } from '../types'; diff --git a/src/core/server/saved_objects/migrations/kibana_migrator.ts b/src/core/server/saved_objects/migrations/kibana_migrator.ts index 7be5576e55241..c7fb2533a89ba 100644 --- a/src/core/server/saved_objects/migrations/kibana_migrator.ts +++ b/src/core/server/saved_objects/migrations/kibana_migrator.ts @@ -15,7 +15,7 @@ import { BehaviorSubject } from 'rxjs'; import Semver from 'semver'; import type { Logger } from '@kbn/logging'; import type { DocLinksServiceStart } from '@kbn/core-doc-links-server'; -import { ElasticsearchClient } from '../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { IndexMapping, SavedObjectsTypeMappingDefinitions } from '../mappings'; import { SavedObjectUnsanitizedDoc, diff --git a/src/core/server/saved_objects/migrations/migrations_state_action_machine.test.ts b/src/core/server/saved_objects/migrations/migrations_state_action_machine.test.ts index 2a182873be061..db319c63e216f 100644 --- a/src/core/server/saved_objects/migrations/migrations_state_action_machine.test.ts +++ b/src/core/server/saved_objects/migrations/migrations_state_action_machine.test.ts @@ -16,7 +16,7 @@ import { typeRegistryMock } from '../saved_objects_type_registry.mock'; import * as Either from 'fp-ts/lib/Either'; import * as Option from 'fp-ts/lib/Option'; import { errors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { AllControlStates, State } from './state'; import { createInitialState } from './initial_state'; import { ByteSizeValue } from '@kbn/config-schema'; diff --git a/src/core/server/saved_objects/migrations/migrations_state_action_machine.ts b/src/core/server/saved_objects/migrations/migrations_state_action_machine.ts index 8eaae216914f7..92806236203af 100644 --- a/src/core/server/saved_objects/migrations/migrations_state_action_machine.ts +++ b/src/core/server/saved_objects/migrations/migrations_state_action_machine.ts @@ -9,8 +9,11 @@ import { errors as EsErrors } from '@elastic/elasticsearch'; import * as Option from 'fp-ts/lib/Option'; import type { Logger, LogMeta } from '@kbn/logging'; -import type { ElasticsearchClient } from '../../elasticsearch'; -import { getErrorMessage, getRequestDebugMeta } from '../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { + getErrorMessage, + getRequestDebugMeta, +} from '@kbn/core-elasticsearch-client-server-internal'; import { Model, Next, stateActionMachine } from './state_action_machine'; import { cleanup } from './migrations_state_machine_cleanup'; import { ReindexSourceToTempTransform, ReindexSourceToTempIndexBulk, State } from './state'; diff --git a/src/core/server/saved_objects/migrations/migrations_state_machine_cleanup.ts b/src/core/server/saved_objects/migrations/migrations_state_machine_cleanup.ts index ff8ff57d41ce4..8b1f93c327857 100644 --- a/src/core/server/saved_objects/migrations/migrations_state_machine_cleanup.ts +++ b/src/core/server/saved_objects/migrations/migrations_state_machine_cleanup.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { ElasticsearchClient } from '../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as Actions from './actions'; import type { State } from './state'; diff --git a/src/core/server/saved_objects/migrations/next.test.ts b/src/core/server/saved_objects/migrations/next.test.ts index 98a8690844872..548c6b8c43b51 100644 --- a/src/core/server/saved_objects/migrations/next.test.ts +++ b/src/core/server/saved_objects/migrations/next.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ElasticsearchClient } from '../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { next } from './next'; import { State } from './state'; diff --git a/src/core/server/saved_objects/migrations/next.ts b/src/core/server/saved_objects/migrations/next.ts index e50331d3b7658..7d73d4830259b 100644 --- a/src/core/server/saved_objects/migrations/next.ts +++ b/src/core/server/saved_objects/migrations/next.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { AllActionStates, ReindexSourceToTempOpenPit, @@ -42,7 +43,6 @@ import type { } from './state'; import type { TransformRawDocs } from './types'; import * as Actions from './actions'; -import type { ElasticsearchClient } from '../../elasticsearch'; type ActionMap = ReturnType; diff --git a/src/core/server/saved_objects/migrations/run_resilient_migrator.ts b/src/core/server/saved_objects/migrations/run_resilient_migrator.ts index 4d75bc09caf2d..87618dcbab1c9 100644 --- a/src/core/server/saved_objects/migrations/run_resilient_migrator.ts +++ b/src/core/server/saved_objects/migrations/run_resilient_migrator.ts @@ -8,7 +8,7 @@ import type { Logger } from '@kbn/logging'; import type { DocLinksServiceStart } from '@kbn/core-doc-links-server'; -import { ElasticsearchClient } from '../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { IndexMapping } from '../mappings'; import type { SavedObjectsMigrationVersion } from '../types'; import type { TransformRawDocs } from './types'; diff --git a/src/core/server/saved_objects/routes/test_utils.ts b/src/core/server/saved_objects/routes/test_utils.ts index 74d813ab68793..10207682e9bda 100644 --- a/src/core/server/saved_objects/routes/test_utils.ts +++ b/src/core/server/saved_objects/routes/test_utils.ts @@ -11,7 +11,7 @@ import { ContextService } from '@kbn/core-http-context-server-internal'; import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; import { contextServiceMock, coreMock } from '../../mocks'; import { SavedObjectsType } from '../types'; -import { InternalSavedObjectsRequestHandlerContext } from '../internal_types'; +import type { InternalSavedObjectsRequestHandlerContext } from '../internal_types'; const defaultCoreId = Symbol('core'); diff --git a/src/core/server/saved_objects/saved_objects_service.test.ts b/src/core/server/saved_objects/saved_objects_service.test.ts index e2b7cdb92c46b..c821ff9b4bbd2 100644 --- a/src/core/server/saved_objects/saved_objects_service.test.ts +++ b/src/core/server/saved_objects/saved_objects_service.test.ts @@ -28,11 +28,11 @@ import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks'; import { SavedObjectsService } from './saved_objects_service'; import { configServiceMock } from '../mocks'; -import { elasticsearchServiceMock } from '../elasticsearch/elasticsearch_service.mock'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { coreUsageDataServiceMock } from '../core_usage_data/core_usage_data_service.mock'; import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock'; import { SavedObjectsClientFactoryProvider } from './service/lib'; -import { NodesVersionCompatibility } from '../elasticsearch/version_check/ensure_es_version'; +import type { NodesVersionCompatibility } from '@kbn/core-elasticsearch-server-internal'; import { SavedObjectsRepository } from './service/lib/repository'; import { registerCoreObjectTypes } from './object_types'; import { getSavedObjectsDeprecationsProvider } from './deprecations'; diff --git a/src/core/server/saved_objects/saved_objects_service.ts b/src/core/server/saved_objects/saved_objects_service.ts index 83f906f0d14c9..123550393f49b 100644 --- a/src/core/server/saved_objects/saved_objects_service.ts +++ b/src/core/server/saved_objects/saved_objects_service.ts @@ -13,6 +13,11 @@ import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import type { DocLinksServiceStart } from '@kbn/core-doc-links-server'; import type { KibanaRequest } from '@kbn/core-http-server'; import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { + InternalElasticsearchServiceSetup, + InternalElasticsearchServiceStart, +} from '@kbn/core-elasticsearch-server-internal'; import { SavedObjectsClient, SavedObjectsClientProvider, @@ -20,11 +25,6 @@ import { } from '.'; import { KibanaMigrator, IKibanaMigrator } from './migrations'; import { InternalCoreUsageDataSetup } from '../core_usage_data'; -import { - ElasticsearchClient, - InternalElasticsearchServiceSetup, - InternalElasticsearchServiceStart, -} from '../elasticsearch'; import { InternalDeprecationsServiceSetup } from '../deprecations'; import { SavedObjectsConfigType, diff --git a/src/core/server/saved_objects/serialization/serializer.test.ts b/src/core/server/saved_objects/serialization/serializer.test.ts index 24eded55615c4..af3c2991e1c69 100644 --- a/src/core/server/saved_objects/serialization/serializer.test.ts +++ b/src/core/server/saved_objects/serialization/serializer.test.ts @@ -498,7 +498,7 @@ describe('#rawToSavedObject', () => { _id: 'foo:bar', _source: { // @ts-expect-error expects a string - // eslint-disable-next-line + // eslint-disable-next-line no-new-wrappers type: new String('foo'), }, }) @@ -527,7 +527,7 @@ describe('#rawToSavedObject', () => { expect(() => singleNamespaceSerializer.rawToSavedObject({ // @ts-expect-error expects a string - // eslint-disable-next-line + // eslint-disable-next-line no-new-wrappers _id: new String('foo:bar'), _source: { type: 'foo', diff --git a/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.test.ts b/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.test.ts index bac745995ce07..cc219579d9c0b 100644 --- a/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.test.ts +++ b/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.test.ts @@ -12,7 +12,7 @@ import { mockRawDocExistsInNamespace, } from './collect_multi_namespace_references.test.mock'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; import { SavedObjectsSerializer } from '../../serialization'; import { diff --git a/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.ts b/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.ts index a6336a89ac6fe..fb6bd89f358f6 100644 --- a/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.ts +++ b/src/core/server/saved_objects/service/lib/collect_multi_namespace_references.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; +import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; import type { SavedObjectsSerializer } from '../../serialization'; import type { SavedObject, SavedObjectsBaseOptions } from '../../types'; diff --git a/src/core/server/saved_objects/service/lib/decorate_es_error.test.ts b/src/core/server/saved_objects/service/lib/decorate_es_error.test.ts index 4e187e85f81a7..a7aa52f7a0f5a 100644 --- a/src/core/server/saved_objects/service/lib/decorate_es_error.test.ts +++ b/src/core/server/saved_objects/service/lib/decorate_es_error.test.ts @@ -7,7 +7,7 @@ */ import { errors as esErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { decorateEsError } from './decorate_es_error'; import { SavedObjectsErrorHelpers } from './errors'; diff --git a/src/core/server/saved_objects/service/lib/decorate_es_error.ts b/src/core/server/saved_objects/service/lib/decorate_es_error.ts index cfe80df789142..40eda7a854a25 100644 --- a/src/core/server/saved_objects/service/lib/decorate_es_error.ts +++ b/src/core/server/saved_objects/service/lib/decorate_es_error.ts @@ -9,7 +9,7 @@ import { get } from 'lodash'; import { errors as esErrors } from '@elastic/elasticsearch'; import type { ElasticsearchErrorDetails } from '@kbn/es-errors'; -import { isSupportedEsServer } from '../../../elasticsearch'; +import { isSupportedEsServer } from '@kbn/core-elasticsearch-server-internal'; const responseErrors = { isServiceUnavailable: (statusCode?: number) => statusCode === 503, diff --git a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.mock.ts b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.mock.ts index fbd774f1c10d5..277d1ae4af34a 100644 --- a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.mock.ts +++ b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.mock.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import type { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; import type * as InternalUtils from './internal_utils'; -import type { isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; export const mockGetSavedObjectFromSource = jest.fn() as jest.MockedFunction< typeof InternalUtils['getSavedObjectFromSource'] @@ -28,8 +28,8 @@ jest.mock('./internal_utils', () => { export const mockIsNotFoundFromUnsupportedServer = jest.fn() as jest.MockedFunction< typeof isNotFoundFromUnsupportedServer >; -jest.mock('../../../elasticsearch', () => { - const actual = jest.requireActual('../../../elasticsearch'); +jest.mock('@kbn/core-elasticsearch-server-internal', () => { + const actual = jest.requireActual('@kbn/core-elasticsearch-server-internal'); return { ...actual, isNotFoundFromUnsupportedServer: mockIsNotFoundFromUnsupportedServer, diff --git a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.ts b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.ts index 749eff0e33875..44940cd0ae0d7 100644 --- a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.ts +++ b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.test.ts @@ -12,7 +12,7 @@ import { mockIsNotFoundFromUnsupportedServer, } from './internal_bulk_resolve.test.mock'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LEGACY_URL_ALIAS_TYPE } from '../../object_types'; import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; import { SavedObjectsSerializer } from '../../serialization'; diff --git a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.ts b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.ts index 3a59ab8a8d9f3..96ea29486520b 100644 --- a/src/core/server/saved_objects/service/lib/internal_bulk_resolve.ts +++ b/src/core/server/saved_objects/service/lib/internal_bulk_resolve.ts @@ -8,12 +8,12 @@ import type { MgetResponseItem } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; import { CORE_USAGE_STATS_ID, CORE_USAGE_STATS_TYPE, REPOSITORY_RESOLVE_OUTCOME_STATS, } from '../../../core_usage_data'; -import { isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; import { LegacyUrlAlias, LEGACY_URL_ALIAS_TYPE } from '../../object_types'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; import type { SavedObjectsRawDocSource, SavedObjectsSerializer } from '../../serialization'; diff --git a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.mock.ts b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.mock.ts index d8c1b8edb9558..0922910936c52 100644 --- a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.mock.ts +++ b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.mock.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import type { getErrorMessage } from '../../../../elasticsearch'; +import type { getErrorMessage } from '@kbn/core-elasticsearch-client-server-internal'; export const mockGetEsErrorMessage = jest.fn() as jest.MockedFunction; -jest.mock('../../../../elasticsearch', () => { +jest.mock('@kbn/core-elasticsearch-client-server-internal', () => { return { getErrorMessage: mockGetEsErrorMessage }; }); diff --git a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.ts b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.ts index e23f8ef1eb9fd..dc261ee23aafb 100644 --- a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.ts +++ b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.test.ts @@ -10,7 +10,7 @@ import { mockGetEsErrorMessage } from './delete_legacy_url_aliases.test.mock'; / import { errors as EsErrors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '../../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { typeRegistryMock } from '../../../saved_objects_type_registry.mock'; import { ALL_NAMESPACES_STRING } from '../utils'; import { deleteLegacyUrlAliases } from './delete_legacy_url_aliases'; diff --git a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.ts b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.ts index 690465f08bd36..e562543125472 100644 --- a/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.ts +++ b/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.ts @@ -8,7 +8,7 @@ import * as esKuery from '@kbn/es-query'; -import { getErrorMessage as getEsErrorMessage } from '../../../../elasticsearch'; +import { getErrorMessage as getEsErrorMessage } from '@kbn/core-elasticsearch-client-server-internal'; import type { ISavedObjectTypeRegistry } from '../../../saved_objects_type_registry'; import type { IndexMapping } from '../../../mappings'; import { LEGACY_URL_ALIAS_TYPE } from '../../../object_types'; diff --git a/src/core/server/saved_objects/service/lib/preflight_check_for_create.test.ts b/src/core/server/saved_objects/service/lib/preflight_check_for_create.test.ts index b7c61bc6f7711..9563ebd51344f 100644 --- a/src/core/server/saved_objects/service/lib/preflight_check_for_create.test.ts +++ b/src/core/server/saved_objects/service/lib/preflight_check_for_create.test.ts @@ -13,8 +13,8 @@ import { import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; -import type { ElasticsearchClient } from '../../../elasticsearch'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LEGACY_URL_ALIAS_TYPE } from '../../object_types'; import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; import { SavedObjectsSerializer } from '../../serialization'; diff --git a/src/core/server/saved_objects/service/lib/preflight_check_for_create.ts b/src/core/server/saved_objects/service/lib/preflight_check_for_create.ts index 55eb80dbc4874..2611ae19184c9 100644 --- a/src/core/server/saved_objects/service/lib/preflight_check_for_create.ts +++ b/src/core/server/saved_objects/service/lib/preflight_check_for_create.ts @@ -5,8 +5,9 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; +import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; import { LegacyUrlAlias, LEGACY_URL_ALIAS_TYPE } from '../../object_types'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; import type { diff --git a/src/core/server/saved_objects/service/lib/repository.test.ts b/src/core/server/saved_objects/service/lib/repository.test.ts index 199ad514c28ed..c916953df2ad5 100644 --- a/src/core/server/saved_objects/service/lib/repository.test.ts +++ b/src/core/server/saved_objects/service/lib/repository.test.ts @@ -56,7 +56,7 @@ import { SavedObjectTypeRegistry } from '../../saved_objects_type_registry'; import { DocumentMigrator } from '../../migrations/core/document_migrator'; import { mockKibanaMigrator } from '../../migrations/kibana_migrator.mock'; import { LEGACY_URL_ALIAS_TYPE } from '../../object_types'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import * as esKuery from '@kbn/es-query'; import { errors as EsErrors } from '@elastic/elasticsearch'; import { diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index 679d3fbdb498f..6688b8ce18485 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -10,8 +10,11 @@ import { omit, isObject } from 'lodash'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import * as esKuery from '@kbn/es-query'; import type { Logger } from '@kbn/logging'; -import type { ElasticsearchClient } from '../../../elasticsearch'; -import { isSupportedEsServer, isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { + isSupportedEsServer, + isNotFoundFromUnsupportedServer, +} from '@kbn/core-elasticsearch-server-internal'; import { getRootPropertiesObjects, IndexMapping } from '../../mappings'; import { ISavedObjectsPointInTimeFinder, diff --git a/src/core/server/saved_objects/service/lib/repository_es_client.test.mock.ts b/src/core/server/saved_objects/service/lib/repository_es_client.test.mock.ts index 22702a6a565f1..700786beb64aa 100644 --- a/src/core/server/saved_objects/service/lib/repository_es_client.test.mock.ts +++ b/src/core/server/saved_objects/service/lib/repository_es_client.test.mock.ts @@ -7,6 +7,6 @@ */ export const retryCallClusterMock = jest.fn((fn) => fn()); -jest.doMock('../../../elasticsearch/client/retry_call_cluster', () => ({ +jest.doMock('@kbn/core-elasticsearch-server-internal', () => ({ retryCallCluster: retryCallClusterMock, })); diff --git a/src/core/server/saved_objects/service/lib/repository_es_client.test.ts b/src/core/server/saved_objects/service/lib/repository_es_client.test.ts index d06172fc6a673..f465ffb6a3dab 100644 --- a/src/core/server/saved_objects/service/lib/repository_es_client.test.ts +++ b/src/core/server/saved_objects/service/lib/repository_es_client.test.ts @@ -9,7 +9,7 @@ import { retryCallClusterMock } from './repository_es_client.test.mock'; import { createRepositoryEsClient, RepositoryEsClient } from './repository_es_client'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { SavedObjectsErrorHelpers } from './errors'; describe('RepositoryEsClient', () => { diff --git a/src/core/server/saved_objects/service/lib/repository_es_client.ts b/src/core/server/saved_objects/service/lib/repository_es_client.ts index 9c9d84d975d0d..14dcb99626789 100644 --- a/src/core/server/saved_objects/service/lib/repository_es_client.ts +++ b/src/core/server/saved_objects/service/lib/repository_es_client.ts @@ -8,8 +8,8 @@ import type { TransportRequestOptions } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '../../../elasticsearch'; -import { retryCallCluster } from '../../../elasticsearch/client/retry_call_cluster'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { retryCallCluster } from '@kbn/core-elasticsearch-server-internal'; import { decorateEsError } from './decorate_es_error'; const methods = [ diff --git a/src/core/server/saved_objects/service/lib/update_objects_spaces.test.ts b/src/core/server/saved_objects/service/lib/update_objects_spaces.test.ts index 5a600128a38ec..194caef879fe8 100644 --- a/src/core/server/saved_objects/service/lib/update_objects_spaces.test.ts +++ b/src/core/server/saved_objects/service/lib/update_objects_spaces.test.ts @@ -13,7 +13,7 @@ import { mockDeleteLegacyUrlAliases, } from './update_objects_spaces.test.mock'; -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; diff --git a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts index 9a1ca70b83fc7..b8ffd0ad7e528 100644 --- a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts +++ b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts @@ -11,7 +11,7 @@ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import intersection from 'lodash/intersection'; import type { Logger } from '@kbn/logging'; -import { isNotFoundFromUnsupportedServer } from '../../../elasticsearch'; +import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; import type { IndexMapping } from '../../mappings'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; import type { SavedObjectsRawDocSource, SavedObjectsSerializer } from '../../serialization'; diff --git a/src/core/server/saved_objects/types.ts b/src/core/server/saved_objects/types.ts index eb4eb77f8d4b8..134289cb2b493 100644 --- a/src/core/server/saved_objects/types.ts +++ b/src/core/server/saved_objects/types.ts @@ -7,6 +7,7 @@ */ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { SavedObjectsClient } from './service/saved_objects_client'; import { SavedObjectsTypeMappingDefinition } from './mappings'; import { SavedObjectMigrationMap } from './migrations'; @@ -30,7 +31,6 @@ export type { } from './import/types'; import { SavedObject } from '../../types'; -import { ElasticsearchClient } from '../elasticsearch'; type KueryNode = any; diff --git a/src/core/server/server.test.mocks.ts b/src/core/server/server.test.mocks.ts index e1b294fb6778a..4b7f7ec958979 100644 --- a/src/core/server/server.test.mocks.ts +++ b/src/core/server/server.test.mocks.ts @@ -20,10 +20,10 @@ jest.doMock('./plugins/plugins_service', () => ({ PluginsService: jest.fn(() => mockPluginsService), })); -import { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; export const mockElasticsearchService = elasticsearchServiceMock.create(); -jest.doMock('./elasticsearch/elasticsearch_service', () => ({ +jest.doMock('@kbn/core-elasticsearch-server-internal', () => ({ ElasticsearchService: jest.fn(() => mockElasticsearchService), })); diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 5f811723845c1..6f2039cf41eb2 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -37,9 +37,12 @@ import { cspConfig, externalUrlConfig, } from '@kbn/core-http-server-internal'; +import { + ElasticsearchService, + config as elasticsearchConfig, +} from '@kbn/core-elasticsearch-server-internal'; import { CoreApp } from './core_app'; import { I18nService } from './i18n'; -import { ElasticsearchService } from './elasticsearch'; import { HttpResourcesService } from './http_resources'; import { RenderingService } from './rendering'; import { UiSettingsService } from './ui_settings'; @@ -50,7 +53,6 @@ import { CapabilitiesService } from './capabilities'; // do not try to shorten the import to `./status`, it will break server test mocking import { StatusService } from './status/status_service'; -import { config as elasticsearchConfig } from './elasticsearch'; import { savedObjectsConfig, savedObjectsMigrationConfig } from './saved_objects'; import { config as uiSettingsConfig } from './ui_settings'; import { config as statusConfig } from './status'; diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index dc73bd83c4625..733a3373447a9 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -25,7 +25,7 @@ import type { PluginName } from '@kbn/core-base-common'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import type { InternalEnvironmentServiceSetup } from '@kbn/core-environment-server-internal'; import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; -import { InternalElasticsearchServiceSetup } from '../elasticsearch'; +import type { InternalElasticsearchServiceSetup } from '@kbn/core-elasticsearch-server-internal'; import { InternalSavedObjectsServiceSetup } from '../saved_objects'; import { InternalMetricsServiceSetup } from '../metrics'; import { registerStatusRoute } from './routes'; diff --git a/src/core/server/status/types.ts b/src/core/server/status/types.ts index b44dde13983bb..8217b29463700 100644 --- a/src/core/server/status/types.ts +++ b/src/core/server/status/types.ts @@ -7,100 +7,10 @@ */ import { Observable } from 'rxjs'; -import { deepFreeze } from '@kbn/std'; -import type { PluginName } from '@kbn/core-base-common'; +import type { PluginName, ServiceStatus } from '@kbn/core-base-common'; -/** - * The current status of a service at a point in time. - * - * @typeParam Meta - JSON-serializable object. Plugins should export this type to allow other plugins to read the `meta` - * field in a type-safe way. - * @public - */ -export interface ServiceStatus | unknown = unknown> { - /** - * The current availability level of the service. - */ - level: ServiceStatusLevel; - /** - * A high-level summary of the service status. - */ - summary: string; - /** - * A more detailed description of the service status. - */ - detail?: string; - /** - * A URL to open in a new tab about how to resolve or troubleshoot the problem. - */ - documentationUrl?: string; - /** - * Any JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained, - * machine-readable information about the service status. May include status information for underlying features. - */ - meta?: Meta; -} - -/** - * The current "level" of availability of a service. - * - * @remarks - * The values implement `valueOf` to allow for easy comparisons between status levels with <, >, etc. Higher values - * represent higher severities. Note that the default `Array.prototype.sort` implementation does not correctly sort - * these values. - * - * A snapshot serializer is available in `src/core/server/test_utils` to ease testing of these values with Jest. - * - * @public - */ -export const ServiceStatusLevels = deepFreeze({ - /** - * Everything is working! - */ - available: { - toString: () => 'available', - valueOf: () => 0, - toJSON() { - return this.toString(); - }, - }, - /** - * Some features may not be working. - */ - degraded: { - toString: () => 'degraded', - valueOf: () => 1, - toJSON() { - return this.toString(); - }, - }, - /** - * The service is unavailable, but other functions that do not depend on this service should work. - */ - unavailable: { - toString: () => 'unavailable', - valueOf: () => 2, - toJSON() { - return this.toString(); - }, - }, - /** - * Block all user functions and display the status page, reserved for Core services only. - */ - critical: { - toString: () => 'critical', - valueOf: () => 3, - toJSON() { - return this.toString(); - }, - }, -}); - -/** - * A convenience type that represents the union of each value in {@link ServiceStatusLevels}. - * @public - */ -export type ServiceStatusLevel = typeof ServiceStatusLevels[keyof typeof ServiceStatusLevels]; +export type { ServiceStatusLevel, ServiceStatus } from '@kbn/core-base-common'; +export { ServiceStatusLevels } from '@kbn/core-base-common'; /** * Status of core services. diff --git a/src/dev/build/lib/config.test.ts b/src/dev/build/lib/config.test.ts index 0e373bb8794c3..4d5393f03f558 100644 --- a/src/dev/build/lib/config.test.ts +++ b/src/dev/build/lib/config.test.ts @@ -46,7 +46,7 @@ describe('#getKibanaPkg()', () => { describe('#getNodeVersion()', () => { it('returns the node version from the kibana package.json', async () => { const config = await setup(); - expect(config.getNodeVersion()).toEqual(kibanaPackageJson.engines.node); + expect(config.getNodeVersion()).toEqual(kibanaPackageJson.engines?.node); }); }); diff --git a/src/dev/build/tasks/build_packages_task.ts b/src/dev/build/tasks/build_packages_task.ts index 62baf74559a2a..bae1807f1f4c3 100644 --- a/src/dev/build/tasks/build_packages_task.ts +++ b/src/dev/build/tasks/build_packages_task.ts @@ -20,10 +20,7 @@ export const BuildBazelPackages: Task = { const packages = (await discoverBazelPackages()).filter((pkg) => !pkg.isDevOnly()); log.info(`Preparing Bazel projects production build non-devOnly packages`); - await runBazel({ - log, - bazelArgs: ['build', '//packages:build'], - }); + await runBazel(['build', '//packages:build']); for (const pkg of packages) { log.info(`Copying build of`, pkg.pkg.name, 'into build'); diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index 1c25e53aad184..a104b5a171d78 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -32,6 +32,7 @@ export const PROJECTS = [ createProject('x-pack/test/tsconfig.json', { name: 'x-pack/test' }), createProject('src/core/tsconfig.json'), createProject('.buildkite/tsconfig.json'), + createProject('kbn_pm/tsconfig.json'), createProject('x-pack/plugins/drilldowns/url_drilldown/tsconfig.json', { name: 'security_solution/cypress', diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts index f59e6c47242bf..ad766a595b83b 100644 --- a/src/dev/typescript/run_type_check_cli.ts +++ b/src/dev/typescript/run_type_check_cli.ts @@ -35,14 +35,16 @@ export async function runTypeCheckCli() { return !p.disableTypeCheck && (!projectFilter || p.tsConfigPath === projectFilter); }); - const { failed } = await buildTsRefs({ - log, - procRunner, - verbose: !!flags.verbose, - project: projects.length === 1 ? projects[0] : undefined, - }); - if (failed) { - throw createFailError('Unable to build TS project refs'); + if (projects.length > 1 || projects[0].isCompositeProject()) { + const { failed } = await buildTsRefs({ + log, + procRunner, + verbose: !!flags.verbose, + project: projects.length === 1 ? projects[0] : undefined, + }); + if (failed) { + throw createFailError('Unable to build TS project refs'); + } } if (!projects.length) { diff --git a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx index 56673cda1a953..8d45aba74de95 100644 --- a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx @@ -156,7 +156,7 @@ export class Field extends PureComponent { this.onFieldChange(e.target.value); onFieldChange = (targetValue: any) => { - const { type, value, defVal } = this.props.setting; + const { type, value, defVal, options } = this.props.setting; let newUnsavedValue; switch (type) { @@ -170,6 +170,13 @@ export class Field extends PureComponent { case 'number': newUnsavedValue = Number(targetValue); break; + case 'select': + if (typeof options?.[0] === 'number') { + newUnsavedValue = Number(targetValue); + } else { + newUnsavedValue = targetValue; + } + break; default: newUnsavedValue = targetValue; } diff --git a/src/plugins/advanced_settings/public/management_app/types.ts b/src/plugins/advanced_settings/public/management_app/types.ts index ec099a3f8fb69..9ee0d7811cd30 100644 --- a/src/plugins/advanced_settings/public/management_app/types.ts +++ b/src/plugins/advanced_settings/public/management_app/types.ts @@ -15,7 +15,7 @@ export interface FieldSetting { name: string; value: unknown; description?: string | ReactElement; - options?: string[]; + options?: string[] | number[]; optionLabels?: Record; requiresPageReload: boolean; type: UiSettingsType; diff --git a/src/plugins/bfetch/public/plugin.ts b/src/plugins/bfetch/public/plugin.ts index b82d69df95a5b..5e4357139fa7b 100644 --- a/src/plugins/bfetch/public/plugin.ts +++ b/src/plugins/bfetch/public/plugin.ts @@ -13,10 +13,10 @@ import { DISABLE_BFETCH_COMPRESSION, removeLeadingSlash } from '../common'; import { createStreamingBatchedFunction, StreamingBatchedFunctionParams } from './batching'; import { BatchedFunc } from './batching/types'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface BfetchPublicSetupDependencies {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface BfetchPublicStartDependencies {} export interface BfetchPublicContract { diff --git a/src/plugins/bfetch/server/plugin.ts b/src/plugins/bfetch/server/plugin.ts index f32f3d03862b8..87a44956a4ffc 100644 --- a/src/plugins/bfetch/server/plugin.ts +++ b/src/plugins/bfetch/server/plugin.ts @@ -28,10 +28,10 @@ import { import { createStream } from './streaming'; import { getUiSettings } from './ui_settings'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface BfetchServerSetupDependencies {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface BfetchServerStartDependencies {} export interface BatchProcessingRouteParams { @@ -50,7 +50,7 @@ export interface BfetchServerSetup { ) => void; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface BfetchServerStart {} const streamingHeaders = { diff --git a/src/plugins/console/common/constants/index.ts b/src/plugins/console/common/constants/index.ts index 756a79883cbdb..7d95d4693f7cf 100644 --- a/src/plugins/console/common/constants/index.ts +++ b/src/plugins/console/common/constants/index.ts @@ -8,3 +8,4 @@ export { MAJOR_VERSION } from './plugin'; export { API_BASE_PATH, KIBANA_API_PREFIX } from './api'; +export { DEFAULT_VARIABLES } from './variables'; diff --git a/packages/kbn-pm/src/test_helpers/index.ts b/src/plugins/console/common/constants/variables.ts similarity index 64% rename from packages/kbn-pm/src/test_helpers/index.ts rename to src/plugins/console/common/constants/variables.ts index 80e2464906348..1554f118c264b 100644 --- a/packages/kbn-pm/src/test_helpers/index.ts +++ b/src/plugins/console/common/constants/variables.ts @@ -6,6 +6,9 @@ * Side Public License, v 1. */ -export { absolutePathSnapshotSerializer } from './absolute_path_snapshot_serializer'; +import uuid from 'uuid'; -export { stripAnsiSnapshotSerializer } from './strip_ansi_snapshot_serializer'; +export const DEFAULT_VARIABLES = [ + { id: uuid.v4(), name: 'exampleVariable1', value: '_search' }, + { id: uuid.v4(), name: 'exampleVariable2', value: 'match_all' }, +]; diff --git a/src/plugins/console/public/application/components/index.ts b/src/plugins/console/public/application/components/index.ts index 8f8292477cb94..8170638221ebd 100644 --- a/src/plugins/console/public/application/components/index.ts +++ b/src/plugins/console/public/application/components/index.ts @@ -6,6 +6,9 @@ * Side Public License, v 1. */ +import React from 'react'; +import { withSuspense } from '@kbn/shared-ux-utility'; + export { NetworkRequestStatusBar } from './network_request_status_bar'; export { SomethingWentWrongCallout } from './something_went_wrong_callout'; export type { TopNavMenuItem } from './top_nav_menu'; @@ -13,6 +16,40 @@ export { TopNavMenu } from './top_nav_menu'; export { ConsoleMenu } from './console_menu'; export { WelcomePanel } from './welcome_panel'; export type { AutocompleteOptions } from './settings_modal'; -export { DevToolsSettingsModal } from './settings_modal'; export { HelpPanel } from './help_panel'; export { EditorContentSpinner } from './editor_content_spinner'; +export type { DevToolsVariable } from './variables'; + +/** + * The Lazily-loaded `DevToolsSettingsModal` component. Consumers should use `React.Suspense` or + * the withSuspense` HOC to load this component. + */ +export const DevToolsSettingsModalLazy = React.lazy(() => + import('./settings_modal').then(({ DevToolsSettingsModal }) => ({ + default: DevToolsSettingsModal, + })) +); + +/** + * A `DevToolsSettingsModal` component that is wrapped by the `withSuspense` HOC. This component can + * be used directly by consumers and will load the `DevToolsSettingsModalLazy` component lazily with + * a predefined fallback and error boundary. + */ +export const DevToolsSettingsModal = withSuspense(DevToolsSettingsModalLazy); + +/** + * The Lazily-loaded `DevToolsVariablesFlyout` component. Consumers should use `React.Suspense` or + * the withSuspense` HOC to load this component. + */ +export const DevToolsVariablesFlyoutLazy = React.lazy(() => + import('./variables').then(({ DevToolsVariablesFlyout }) => ({ + default: DevToolsVariablesFlyout, + })) +); + +/** + * A `DevToolsVariablesFlyout` component that is wrapped by the `withSuspense` HOC. This component can + * be used directly by consumers and will load the `DevToolsVariablesFlyoutLazy` component lazily with + * a predefined fallback and error boundary. + */ +export const DevToolsVariablesFlyout = withSuspense(DevToolsVariablesFlyoutLazy); diff --git a/src/plugins/console/public/application/components/settings_modal.tsx b/src/plugins/console/public/application/components/settings_modal.tsx index 3e6fdf2c08ccc..04394fd50de31 100644 --- a/src/plugins/console/public/application/components/settings_modal.tsx +++ b/src/plugins/console/public/application/components/settings_modal.tsx @@ -59,7 +59,7 @@ const intervalOptions = PRESETS_IN_MINUTES.map((value) => ({ : everyNMinutesTimeInterval(value), })); -interface Props { +export interface DevToolsSettingsModalProps { onSaveSettings: (newSettings: DevToolsSettings) => void; onClose: () => void; refreshAutocompleteSettings: (selectedSettings: DevToolsSettings['autocomplete']) => void; @@ -67,7 +67,7 @@ interface Props { editorInstance: SenseEditor | null; } -export function DevToolsSettingsModal(props: Props) { +export const DevToolsSettingsModal = (props: DevToolsSettingsModalProps) => { const [fontSize, setFontSize] = useState(props.settings.fontSize); const [wrapMode, setWrapMode] = useState(props.settings.wrapMode); const [fields, setFields] = useState(props.settings.autocomplete.fields); @@ -355,4 +355,4 @@ export function DevToolsSettingsModal(props: Props) { ); -} +}; diff --git a/src/plugins/embeddable/.storybook/main.js b/src/plugins/console/public/application/components/variables/index.ts similarity index 85% rename from src/plugins/embeddable/.storybook/main.js rename to src/plugins/console/public/application/components/variables/index.ts index 8dc3c5d1518f4..dd5b0273c5e0b 100644 --- a/src/plugins/embeddable/.storybook/main.js +++ b/src/plugins/console/public/application/components/variables/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -module.exports = require('@kbn/storybook').defaultConfig; +export * from './variables_flyout'; +export * from './utils'; diff --git a/src/plugins/console/public/application/components/variables/utils.ts b/src/plugins/console/public/application/components/variables/utils.ts new file mode 100644 index 0000000000000..9507e69644dd3 --- /dev/null +++ b/src/plugins/console/public/application/components/variables/utils.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import uuid from 'uuid'; +import type { DevToolsVariable } from './variables_flyout'; + +export const editVariable = ( + name: string, + value: string, + id: string, + variables: DevToolsVariable[] +) => { + const index = variables.findIndex((v) => v.id === id); + + if (index === -1) { + return variables; + } + + return [ + ...variables.slice(0, index), + { ...variables[index], [name]: value }, + ...variables.slice(index + 1), + ]; +}; + +export const deleteVariable = (variables: DevToolsVariable[], id: string) => { + return variables.filter((v) => v.id !== id); +}; + +export const generateEmptyVariableField = (): DevToolsVariable => ({ + id: uuid.v4(), + name: '', + value: '', +}); diff --git a/src/plugins/console/public/application/components/variables/variables_flyout.tsx b/src/plugins/console/public/application/components/variables/variables_flyout.tsx new file mode 100644 index 0000000000000..46b67bdf9075f --- /dev/null +++ b/src/plugins/console/public/application/components/variables/variables_flyout.tsx @@ -0,0 +1,215 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState, useCallback, ChangeEvent, FormEvent } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { + EuiFlyout, + EuiFlyoutHeader, + EuiTitle, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlexGroup, + EuiFlexItem, + EuiButton, + EuiButtonEmpty, + EuiBasicTable, + EuiFieldText, + useGeneratedHtmlId, + EuiForm, + EuiFormRow, + EuiButtonIcon, + EuiSpacer, + EuiText, + type EuiBasicTableColumn, +} from '@elastic/eui'; + +import * as utils from './utils'; + +export interface DevToolsVariablesFlyoutProps { + onClose: () => void; + onSaveVariables: (newVariables: DevToolsVariable[]) => void; + variables: []; +} + +export interface DevToolsVariable { + id: string; + name: string; + value: string; +} + +export const DevToolsVariablesFlyout = (props: DevToolsVariablesFlyoutProps) => { + const [variables, setVariables] = useState(props.variables); + const formId = useGeneratedHtmlId({ prefix: '__console' }); + + const addNewVariable = useCallback(() => { + setVariables((v) => [...v, utils.generateEmptyVariableField()]); + }, []); + + const deleteVariable = useCallback( + (id: string) => { + const updatedVariables = utils.deleteVariable(variables, id); + setVariables(updatedVariables); + }, + [variables] + ); + + const onSubmit = useCallback( + (e: FormEvent) => { + e.preventDefault(); + props.onSaveVariables(variables.filter(({ name, value }) => name.trim() && value)); + }, + [props, variables] + ); + + const onChange = useCallback( + (event: ChangeEvent, id: string) => { + const { name, value } = event.target; + const editedVariables = utils.editVariable(name, value, id, variables); + setVariables(editedVariables); + }, + [variables] + ); + + const columns: Array> = [ + { + field: 'name', + name: i18n.translate('console.variablesPage.variablesTable.columns.variableHeader', { + defaultMessage: 'Variable name', + }), + render: (name, { id }) => { + // Avoid characters that get URL-encoded, because they'll result in unusable variable names. + const isInvalid = name && !name.match(/^[a-zA-Z0-9]+$/g); + return ( + , + ]} + fullWidth={true} + css={{ flexGrow: 1 }} + > + onChange(e, id)} + isInvalid={isInvalid} + fullWidth={true} + aria-label={i18n.translate( + 'console.variablesPage.variablesTable.variableInput.ariaLabel', + { + defaultMessage: 'Variable name', + } + )} + /> + + ); + }, + }, + { + field: 'value', + name: i18n.translate('console.variablesPage.variablesTable.columns.valueHeader', { + defaultMessage: 'Value', + }), + render: (value, { id }) => ( + onChange(e, id)} + value={value} + aria-label={i18n.translate('console.variablesPage.variablesTable.valueInput.ariaLabel', { + defaultMessage: 'Variable value', + })} + /> + ), + }, + { + field: 'id', + name: '', + width: '5%', + render: (id: string) => ( + deleteVariable(id)} + data-test-subj="variablesRemoveButton" + /> + ), + }, + ]; + + return ( + + + +

+ +

+
+ + +

+ + + + ), + }} + /> +

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ ); +}; diff --git a/src/plugins/console/public/application/containers/console_history/console_history.tsx b/src/plugins/console/public/application/containers/console_history/console_history.tsx index 7fbef6de80eef..dcc19d340ae5d 100644 --- a/src/plugins/console/public/application/containers/console_history/console_history.tsx +++ b/src/plugins/console/public/application/containers/console_history/console_history.tsx @@ -102,7 +102,7 @@ export function ConsoleHistory({ close }: Props) { return () => done(); }, [history]); - /* eslint-disable */ + /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role,jsx-a11y/click-events-have-key-events */ return ( <>
diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx index ba5f1e78d5f01..ed8bd07349e8c 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +jest.mock('../../../../../lib/utils', () => ({ replaceVariables: jest.fn() })); + import './editor.test.mock'; import React from 'react'; @@ -30,6 +32,7 @@ import { getEndpointFromPosition } from '../../../../../lib/autocomplete/get_end import type { DevToolsSettings } from '../../../../../services'; import * as consoleMenuActions from '../console_menu_actions'; import { Editor } from './editor'; +import * as utils from '../../../../../lib/utils'; describe('Legacy (Ace) Console Editor Component Smoke Test', () => { let mockedAppContextValue: ContextValue; @@ -51,6 +54,7 @@ describe('Legacy (Ace) Console Editor Component Smoke Test', () => { beforeEach(() => { document.queryCommandSupported = sinon.fake(() => true); mockedAppContextValue = serviceContextMock.create(); + (utils.replaceVariables as jest.Mock).mockReturnValue(['test']); }); afterEach(() => { diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index 76e91baa8e21e..74a052646e198 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -54,10 +54,11 @@ const abs: CSSProperties = { right: '0', }; -const DEFAULT_INPUT_VALUE = `GET _search +const DEFAULT_INPUT_VALUE = `# Click the Variables button, above, to create your own variables. +GET \${exampleVariable1} // _search { "query": { - "match_all": {} + "\${exampleVariable2}": {} // match_all } }`; diff --git a/src/plugins/console/public/application/containers/main/get_top_nav.ts b/src/plugins/console/public/application/containers/main/get_top_nav.ts index 78d33b4721fa8..66609c1ba418b 100644 --- a/src/plugins/console/public/application/containers/main/get_top_nav.ts +++ b/src/plugins/console/public/application/containers/main/get_top_nav.ts @@ -12,9 +12,15 @@ interface Props { onClickHistory: () => void; onClickSettings: () => void; onClickHelp: () => void; + onClickVariables: () => void; } -export function getTopNavConfig({ onClickHistory, onClickSettings, onClickHelp }: Props) { +export function getTopNavConfig({ + onClickHistory, + onClickSettings, + onClickHelp, + onClickVariables, +}: Props) { return [ { id: 'history', @@ -42,6 +48,19 @@ export function getTopNavConfig({ onClickHistory, onClickSettings, onClickHelp } }, testId: 'consoleSettingsButton', }, + { + id: 'variables', + label: i18n.translate('console.topNav.variablesTabLabel', { + defaultMessage: 'Variables', + }), + description: i18n.translate('console.topNav.variablesTabDescription', { + defaultMessage: 'Variables', + }), + onClick: () => { + onClickVariables(); + }, + testId: 'consoleVariablesButton', + }, { id: 'help', label: i18n.translate('console.topNav.helpTabLabel', { diff --git a/src/plugins/console/public/application/containers/main/main.tsx b/src/plugins/console/public/application/containers/main/main.tsx index 2833bf1fbebc3..889c9d352bc5d 100644 --- a/src/plugins/console/public/application/containers/main/main.tsx +++ b/src/plugins/console/public/application/containers/main/main.tsx @@ -12,6 +12,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiPageContent } from '@elastic/eu import { ConsoleHistory } from '../console_history'; import { Editor } from '../editor'; import { Settings } from '../settings'; +import { Variables } from '../variables'; import { TopNavMenu, @@ -47,6 +48,7 @@ export function Main() { const [showingHistory, setShowHistory] = useState(false); const [showSettings, setShowSettings] = useState(false); const [showHelp, setShowHelp] = useState(false); + const [showVariables, setShowVariables] = useState(false); const [editorInstance, setEditorInstance] = useState(null); @@ -89,6 +91,7 @@ export function Main() { onClickHistory: () => setShowHistory(!showingHistory), onClickSettings: () => setShowSettings(true), onClickHelp: () => setShowHelp(!showHelp), + onClickVariables: () => setShowVariables(!showVariables), })} /> @@ -129,6 +132,8 @@ export function Main() { setShowSettings(false)} editorInstance={editorInstance} /> ) : null} + {showVariables ? setShowVariables(false)} /> : null} + {showHelp ? setShowHelp(false)} /> : null}
); diff --git a/src/plugins/console/public/application/containers/variables.tsx b/src/plugins/console/public/application/containers/variables.tsx new file mode 100644 index 0000000000000..665e2ca4849f0 --- /dev/null +++ b/src/plugins/console/public/application/containers/variables.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { DevToolsVariablesFlyout, DevToolsVariable } from '../components'; +import { useServicesContext } from '../contexts'; +import { StorageKeys } from '../../services'; +import { DEFAULT_VARIABLES } from '../../../common/constants'; + +interface VariablesProps { + onClose: () => void; +} + +export function Variables({ onClose }: VariablesProps) { + const { + services: { storage }, + } = useServicesContext(); + + const onSaveVariables = (newVariables: DevToolsVariable[]) => { + storage.set(StorageKeys.VARIABLES, newVariables); + onClose(); + }; + return ( + + ); +} diff --git a/src/plugins/console/public/application/contexts/services_context.tsx b/src/plugins/console/public/application/contexts/services_context.tsx index f133a49ca1fe1..a9fb86175d02c 100644 --- a/src/plugins/console/public/application/contexts/services_context.tsx +++ b/src/plugins/console/public/application/contexts/services_context.tsx @@ -10,7 +10,7 @@ import React, { createContext, useContext, useEffect } from 'react'; import { Observable } from 'rxjs'; import type { NotificationsSetup, CoreTheme, DocLinksStart, HttpSetup } from '@kbn/core/public'; -import { AutocompleteInfo, History, Settings, Storage } from '../../services'; +import type { AutocompleteInfo, History, Settings, Storage } from '../../services'; import { ObjectStorageClient } from '../../../common/types'; import { MetricsTracker } from '../../types'; import { EsHostService } from '../lib'; diff --git a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx index d16dc3f832d3a..0c7e4c46d95a6 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx +++ b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx @@ -12,6 +12,7 @@ jest.mock('../../contexts/editor_context/editor_registry', () => ({ })); jest.mock('./track', () => ({ track: jest.fn() })); jest.mock('../../contexts/request_context', () => ({ useRequestActionContext: jest.fn() })); +jest.mock('../../../lib/utils', () => ({ replaceVariables: jest.fn() })); import React from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; @@ -20,6 +21,7 @@ import { ContextValue, ServicesContextProvider } from '../../contexts'; import { serviceContextMock } from '../../contexts/services_context.mock'; import { useRequestActionContext } from '../../contexts/request_context'; import { instance as editorRegistry } from '../../contexts/editor_context/editor_registry'; +import * as utils from '../../../lib/utils'; import { sendRequest } from './send_request'; import { useSendCurrentRequest } from './use_send_current_request'; @@ -35,6 +37,7 @@ describe('useSendCurrentRequest', () => { mockContextValue = serviceContextMock.create(); dispatch = jest.fn(); (useRequestActionContext as jest.Mock).mockReturnValue(dispatch); + (utils.replaceVariables as jest.Mock).mockReturnValue(['test']); }); afterEach(() => { diff --git a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts index 6cd1eaddc3583..87f72571a63e6 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts +++ b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts @@ -16,10 +16,13 @@ import { useRequestActionContext, useServicesContext } from '../../contexts'; import { StorageQuotaError } from '../../components/storage_quota_error'; import { sendRequest } from './send_request'; import { track } from './track'; +import { replaceVariables } from '../../../lib/utils'; +import { StorageKeys } from '../../../services'; +import { DEFAULT_VARIABLES } from '../../../../common/constants'; export const useSendCurrentRequest = () => { const { - services: { history, settings, notifications, trackUiMetric, http, autocompleteInfo }, + services: { history, settings, notifications, trackUiMetric, http, autocompleteInfo, storage }, theme$, } = useServicesContext(); @@ -28,7 +31,9 @@ export const useSendCurrentRequest = () => { return useCallback(async () => { try { const editor = registry.getInputEditor(); - const requests = await editor.getRequestsInRange(); + const variables = storage.get(StorageKeys.VARIABLES, DEFAULT_VARIABLES); + let requests = await editor.getRequestsInRange(); + requests = replaceVariables(requests, variables); if (!requests.length) { notifications.toasts.add( i18n.translate('console.notification.error.noRequestSelectedTitle', { @@ -128,6 +133,7 @@ export const useSendCurrentRequest = () => { } } }, [ + storage, dispatch, http, settings, diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js index 6c188eca0f0cc..bb3efc0834694 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js @@ -61,21 +61,26 @@ export function InputHighlightRules() { 'start', 'url' ), + addEOL(['whitespace', 'variable.template'], /(\s+)(\${\w+})/, 'start', 'url'), addEOL(['whitespace', 'url.protocol_host'], /(\s+)(https?:\/\/[^?\/,]+)/, 'start', 'url'), addEOL(['whitespace', 'url.slash'], /(\s+)(\/)/, 'start', 'url'), addEOL(['whitespace'], /(\s+)/, 'start', 'url') ), url: mergeTokens( + addEOL(['variable.template'], /(\${\w+})/, 'start'), addEOL(['url.part'], /(_sql)/, 'start-sql', 'url-sql'), addEOL(['url.part'], /([^?\/,\s]+)/, 'start'), addEOL(['url.comma'], /(,)/, 'start'), addEOL(['url.slash'], /(\/)/, 'start'), - addEOL(['url.questionmark'], /(\?)/, 'start', 'urlParams') + addEOL(['url.questionmark'], /(\?)/, 'start', 'urlParams'), + addEOL(['whitespace', 'comment.punctuation', 'comment.line'], /(\s+)(\/\/)(.*$)/, 'start') ), urlParams: mergeTokens( + addEOL(['url.param', 'url.equal', 'variable.template'], /([^&=]+)(=)(\${\w+})/, 'start'), addEOL(['url.param', 'url.equal', 'url.value'], /([^&=]+)(=)([^&]*)/, 'start'), addEOL(['url.param'], /([^&=]+)/, 'start'), - addEOL(['url.amp'], /(&)/, 'start') + addEOL(['url.amp'], /(&)/, 'start'), + addEOL(['whitespace', 'comment.punctuation', 'comment.line'], /(\s+)(\/\/)(.*$)/, 'start') ), 'url-sql': mergeTokens( addEOL(['url.part'], /([^?\/,\s]+)/, 'start-sql'), @@ -129,6 +134,8 @@ export function InputHighlightRules() { // Add comment rules to json rule set this.$rules.json.unshift({ include: 'comments' }); + this.$rules.json.unshift({ token: 'variable.template', regex: /("\${\w+}")/ }); + if (this.constructor === InputHighlightRules) { this.normalizeRules(); } diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js index a570f97ced0a3..35faba08d8739 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js @@ -39,7 +39,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* eslint-disable */ +/* eslint-disable prettier/prettier,prefer-const,eqeqeq,import/no-commonjs,no-undef,no-sequences, + block-scoped-var,no-use-before-define,no-var,one-var,guard-for-in,new-cap,no-nested-ternary,no-redeclare, + no-unused-vars,no-extend-native,no-empty,camelcase,no-proto,@kbn/imports/no_unresolvable_imports */ /* This file is loaded up as a blob by Brace to hand to Ace to load as Jsonp (hence the redefining of everything). It is based on the javascript diff --git a/src/plugins/console/public/application/models/sense_editor/sense_editor.ts b/src/plugins/console/public/application/models/sense_editor/sense_editor.ts index 37c3799c05119..50ee1cd1d262a 100644 --- a/src/plugins/console/public/application/models/sense_editor/sense_editor.ts +++ b/src/plugins/console/public/application/models/sense_editor/sense_editor.ts @@ -248,7 +248,7 @@ export class SenseEditor { request.url = ''; - while (t && t.type && t.type.indexOf('url') === 0) { + while (t && t.type && (t.type.indexOf('url') === 0 || t.type === 'variable.template')) { request.url += t.value; t = tokenIter.stepForward(); } @@ -256,6 +256,12 @@ export class SenseEditor { // if the url row ends with some spaces, skip them. t = this.parser.nextNonEmptyToken(tokenIter); } + + // If the url row ends with a comment, skip it + while (this.parser.isCommentToken(t)) { + t = tokenIter.stepForward(); + } + let bodyStartLineNumber = (t ? 0 : 1) + tokenIter.getCurrentPosition().lineNumber; // artificially increase end of docs. let dataEndPos: Position; while ( @@ -291,7 +297,6 @@ export class SenseEditor { } const expandedRange = await this.expandRangeToRequestEdges(range); - if (!expandedRange) { return []; } diff --git a/src/plugins/console/public/lib/autocomplete/autocomplete.ts b/src/plugins/console/public/lib/autocomplete/autocomplete.ts index 21c1acf73bfd5..4e3770779f580 100644 --- a/src/plugins/console/public/lib/autocomplete/autocomplete.ts +++ b/src/plugins/console/public/lib/autocomplete/autocomplete.ts @@ -303,7 +303,7 @@ export function getCurrentMethodAndTokenPaths( return ret; } -// eslint-disable-next-line +// eslint-disable-next-line import/no-default-export export default function ({ coreEditor: editor, parser, diff --git a/src/plugins/console/public/lib/row_parser.ts b/src/plugins/console/public/lib/row_parser.ts index 5faca5ffc4a7d..55014345ae3cc 100644 --- a/src/plugins/console/public/lib/row_parser.ts +++ b/src/plugins/console/public/lib/row_parser.ts @@ -29,10 +29,10 @@ export default class RowParser { return MODE.BETWEEN_REQUESTS; } const mode = this.editor.getLineState(lineNumber); + if (!mode) { return MODE.BETWEEN_REQUESTS; } // shouldn't really happen - // If another "start" mode is added here because we want to allow for new language highlighting // please see https://github.com/elastic/kibana/pull/51446 for a discussion on why // should consider a different approach. @@ -40,6 +40,19 @@ export default class RowParser { return MODE.IN_REQUEST; } let line = (this.editor.getLineValue(lineNumber) || '').trim(); + + // Check if the line has variables, depending on the request type, (e.g. single line, multi doc requests) return the correct mode + if (line && /(\${\w+})/.test(line)) { + lineNumber++; + line = (this.editor.getLineValue(lineNumber) || '').trim(); + + if (line.startsWith('{')) { + return MODE.REQUEST_START; + } + // next line is another request + // eslint-disable-next-line no-bitwise + return MODE.REQUEST_START | MODE.REQUEST_END; + } if (!line || line.startsWith('#') || line.startsWith('//') || line.startsWith('/*')) { return MODE.BETWEEN_REQUESTS; } // empty line or a comment waiting for a new req to start @@ -140,4 +153,14 @@ export default class RowParser { t = tokenIter.stepBackward(); return t; } + + isCommentToken(token: Token | null) { + return ( + token && + token.type && + (token.type === 'comment.punctuation' || + token.type === 'comment.line' || + token.type === 'comment.block') + ); + } } diff --git a/src/plugins/console/public/lib/utils/index.ts b/src/plugins/console/public/lib/utils/index.ts index 1beb13eb6b3d4..2495f63c7614f 100644 --- a/src/plugins/console/public/lib/utils/index.ts +++ b/src/plugins/console/public/lib/utils/index.ts @@ -8,7 +8,11 @@ import _ from 'lodash'; import { XJson } from '@kbn/es-ui-shared-plugin/public'; -import type { RequestResult } from '../../application/hooks/use_send_current_request/send_request'; +import type { + RequestArgs, + RequestResult, +} from '../../application/hooks/use_send_current_request/send_request'; +import type { DevToolsVariable } from '../../application/components'; const { collapseLiteralStrings, expandLiteralStrings } = XJson; @@ -108,3 +112,66 @@ export const getResponseWithMostSevereStatusCode = (requestData: RequestResult[] .pop(); } }; + +export const replaceVariables = ( + requests: RequestArgs['requests'], + variables: DevToolsVariable[] +) => { + const urlRegex = /(\${\w+})/g; + const bodyRegex = /("\${\w+}")/g; + return requests.map((req) => { + if (urlRegex.test(req.url)) { + req.url = req.url.replaceAll(urlRegex, (match) => { + // Sanitize variable name + const key = match.replace('${', '').replace('}', ''); + const variable = variables.find(({ name }) => name === key); + + return variable?.value ?? match; + }); + } + + if (req.data.length) { + if (bodyRegex.test(req.data[0])) { + const data = req.data[0].replaceAll(bodyRegex, (match) => { + // Sanitize variable name + const key = match.replace('"${', '').replace('}"', ''); + const variable = variables.find(({ name }) => name === key); + + if (variable) { + // All values must be stringified to send a successful request to ES. + const { value } = variable; + + const isStringifiedObject = value.startsWith('{') && value.endsWith('}'); + if (isStringifiedObject) { + return value; + } + + const isStringifiedNumber = !isNaN(parseFloat(value)); + if (isStringifiedNumber) { + return value; + } + + const isStringifiedArray = value.startsWith('[') && value.endsWith(']'); + if (isStringifiedArray) { + return value; + } + + const isStringifiedBool = value === 'true' || value === 'false'; + if (isStringifiedBool) { + return value; + } + + // At this point the value must be an unstringified string, so we have to stringify it. + // Example: 'stringValue' -> '"stringValue"' + return JSON.stringify(value); + } + + return match; + }); + req.data = [data]; + } + } + + return req; + }); +}; diff --git a/src/plugins/console/public/lib/utils/utils.test.js b/src/plugins/console/public/lib/utils/utils.test.js index 8cdd93c3b6ed8..406411b7a32bf 100644 --- a/src/plugins/console/public/lib/utils/utils.test.js +++ b/src/plugins/console/public/lib/utils/utils.test.js @@ -193,4 +193,67 @@ describe('Utils class', () => { expect(utils.getResponseWithMostSevereStatusCode(undefined)).toBe(undefined); }); + + describe('replaceVariables', () => { + function testVariables(data, variables, expected) { + const result = utils.replaceVariables([data], [variables]); + expect(result).toEqual([expected]); + } + + it('should replace variables in url and body', () => { + testVariables( + { url: '${v1}/search', data: ['{\n "f": "${v1}"\n}'] }, + { name: 'v1', value: 'test' }, + { + url: 'test/search', + data: ['{\n "f": "test"\n}'], + } + ); + }); + + describe('with booleans as field value', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v2}"\n}'] }, + { name: 'v2', value: 'true' }, + { + url: 'test', + data: ['{\n "f": true\n}'], + } + ); + }); + + describe('with objects as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v3}"\n}'] }, + { name: 'v3', value: '{"f": "test"}' }, + { url: 'test', data: ['{\n "f": {"f": "test"}\n}'] } + ); + }); + + describe('with arrays as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v5}"\n}'] }, + { name: 'v5', value: '[{"t": "test"}]' }, + { url: 'test', data: ['{\n "f": [{"t": "test"}]\n}'] } + ); + }); + + describe('with numbers as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v6}"\n}'] }, + { name: 'v6', value: '1' }, + { url: 'test', data: ['{\n "f": 1\n}'] } + ); + }); + + describe('with other variables as field values', () => { + // Currently, variables embedded in other variables' values aren't replaced. + // Once we build this feature, this test will fail and need to be updated. + testVariables( + { url: 'test', data: ['{\n "f": "${v4}"\n}'] }, + { name: 'v4', value: '{"v1": "${v1}", "v6": "${v6}"}' }, + { url: 'test', data: ['{\n "f": {"v1": "${v1}", "v6": "${v6}"}\n}'] } + ); + }); + }); }); diff --git a/src/plugins/console/public/services/storage.ts b/src/plugins/console/public/services/storage.ts index 4d5f897b13403..4b4d051607b8d 100644 --- a/src/plugins/console/public/services/storage.ts +++ b/src/plugins/console/public/services/storage.ts @@ -13,6 +13,7 @@ type IStorageEngine = typeof window.localStorage; export enum StorageKeys { WIDTH = 'widths', FOLDS = 'folds', + VARIABLES = 'variables', } export class Storage { diff --git a/src/plugins/controls/public/control_group/component/control_group_component.tsx b/src/plugins/controls/public/control_group/component/control_group_component.tsx index 0d7eb4a4dd962..1c977e0162cbd 100644 --- a/src/plugins/controls/public/control_group/component/control_group_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_group_component.tsx @@ -91,7 +91,7 @@ export const ControlGroup = () => { return null; } - let panelBg: 'subdued' | 'plain' | 'success' = 'subdued'; + let panelBg: 'transparent' | 'plain' | 'success' = 'transparent'; if (emptyState) panelBg = 'plain'; if (draggingId) panelBg = 'success'; diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/print_media/styling/_index.scss b/src/plugins/dashboard/public/application/embeddable/viewport/print_media/styling/_index.scss index 16c4dd85ea45e..eec56a3ef2113 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/print_media/styling/_index.scss +++ b/src/plugins/dashboard/public/application/embeddable/viewport/print_media/styling/_index.scss @@ -45,8 +45,9 @@ Observations: } * { - -webkit-print-color-adjust: exact !important; /* Chrome, Safari, Edge */ - color-adjust: exact !important; /*Firefox*/ + // requires upgrade to stylint 14 + // stylelint-disable-next-line property-no-unknown + print-color-adjust: exact !important; } } diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx index 99016cbe2fe46..2f906127b9229 100644 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx +++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx @@ -70,6 +70,7 @@ const createDashboardAppStateServices = () => { const data = dataPluginMock.createStartContract(); data.query.filterManager.getUpdates$ = jest.fn().mockImplementation(() => of(void 0)); + data.query.filterManager.getFilters = jest.fn().mockImplementation(() => []); data.query.queryString.getUpdates$ = jest.fn().mockImplementation(() => of({})); data.query.timefilter.timefilter.getTimeUpdate$ = jest.fn().mockImplementation(() => of(void 0)); data.query.timefilter.timefilter.getRefreshIntervalUpdate$ = jest diff --git a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts index 24d891c658056..22af4f5d3a022 100644 --- a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts +++ b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts @@ -9,6 +9,13 @@ import _ from 'lodash'; import type { KibanaExecutionContext } from '@kbn/core/public'; import { ControlGroupInput } from '@kbn/controls-plugin/public'; +import { + compareFilters, + isFilterPinned, + migrateFilter, + COMPARE_ALL_OPTIONS, + type Filter, +} from '@kbn/es-query'; import { DashboardSavedObject } from '../../saved_dashboards'; import { getTagsFromSavedDashboard, migrateAppState } from '.'; import { EmbeddablePackageState, ViewMode } from '../../services/embeddable'; @@ -110,11 +117,20 @@ export const stateToDashboardContainerInput = ({ query, title, timeRestore, + filters: dashboardFilters, } = dashboardState; return { refreshConfig: timefilter.getRefreshInterval(), - filters: filterManager.getFilters(), + filters: filterManager + .getFilters() + .filter( + (filter) => + isFilterPinned(filter) || + dashboardFilters.some((dashboardFilter) => + filtersAreEqual(migrateFilter(_.cloneDeep(dashboardFilter)), filter) + ) + ), isFullScreenMode: fullScreenMode, id: savedDashboard.id || '', dashboardCapabilities, @@ -136,6 +152,9 @@ export const stateToDashboardContainerInput = ({ }; }; +const filtersAreEqual = (first: Filter, second: Filter) => + compareFilters(first, second, { ...COMPARE_ALL_OPTIONS, state: false }); + /** * Converts a given dashboard state object to raw dashboard state. This is useful for sharing, and session restoration, as * they require panels to be formatted as an array. diff --git a/src/plugins/dashboard/public/application/top_nav/clone_modal.test.js b/src/plugins/dashboard/public/application/top_nav/clone_modal.test.js index 0aab14334a997..bc88218a8e388 100644 --- a/src/plugins/dashboard/public/application/top_nav/clone_modal.test.js +++ b/src/plugins/dashboard/public/application/top_nav/clone_modal.test.js @@ -25,7 +25,7 @@ test('renders DashboardCloneModal', () => { const component = shallowWithI18nProvider( ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('onClone', () => { diff --git a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx index 5192759f2166a..941a45cc6b956 100644 --- a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx +++ b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React, { useCallback } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { EuiContextMenu, EuiContextMenuPanelItemDescriptor, @@ -19,7 +19,11 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { i18n } from '@kbn/i18n'; import { BaseVisType, VisGroups, VisTypeAlias } from '@kbn/visualizations-plugin/public'; import { SolutionToolbarPopover } from '@kbn/presentation-util-plugin/public'; -import { EmbeddableFactoryDefinition, EmbeddableInput } from '../../services/embeddable'; +import { + EmbeddableFactory, + EmbeddableFactoryDefinition, + EmbeddableInput, +} from '../../services/embeddable'; import { useKibana } from '../../services/kibana_react'; import { DashboardAppServices } from '../../types'; import { DashboardContainer } from '..'; @@ -41,11 +45,36 @@ interface FactoryGroup { factories: EmbeddableFactoryDefinition[]; } +interface UnwrappedEmbeddableFactory { + factory: EmbeddableFactory; + isEditable: boolean; +} + export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => { const { core, embeddable, visualizations, usageCollection, uiSettings } = useKibana().services; + const embeddableFactories = useMemo( + () => (embeddable ? Array.from(embeddable.getEmbeddableFactories()) : []), + [embeddable] + ); + const [unwrappedEmbeddableFactories, setUnwrappedEmbeddableFactories] = useState< + UnwrappedEmbeddableFactory[] + >([]); + + useEffect(() => { + Promise.all( + embeddableFactories.map>(async (factory) => ({ + factory, + isEditable: await factory.isEditable(), + })) + ).then((factories) => { + setUnwrappedEmbeddableFactories(factories); + }); + }, [embeddableFactories]); + const IS_DARK_THEME = uiSettings.get('theme:darkMode'); + const LABS_ENABLED = uiSettings.get('visualize:enableLabs'); const trackUiMetric = usageCollection?.reportUiCounter.bind( usageCollection, @@ -75,7 +104,9 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => { } return 0; }) - .filter(({ hidden }: BaseVisType) => !hidden); + .filter( + ({ hidden, stage }: BaseVisType) => !(hidden || (!LABS_ENABLED && stage === 'experimental')) + ); const promotedVisTypes = getVisTypesByGroup(VisGroups.PROMOTED); const aggsBasedVisTypes = getVisTypesByGroup(VisGroups.AGGBASED); @@ -86,13 +117,10 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => { a === b ? 0 : a ? -1 : 1 ); - const factories = embeddable - ? Array.from(embeddable.getEmbeddableFactories()).filter( - ({ type, isEditable, canCreateNew, isContainerType }) => - // @ts-expect-error ts 4.5 upgrade - isEditable() && !isContainerType && canCreateNew() && type !== 'visualization' - ) - : []; + const factories = unwrappedEmbeddableFactories.filter( + ({ isEditable, factory: { type, canCreateNew, isContainerType } }) => + isEditable && !isContainerType && canCreateNew() && type !== 'visualization' + ); const factoryGroupMap: Record = {}; const ungroupedFactories: EmbeddableFactoryDefinition[] = []; @@ -100,7 +128,7 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => { let panelCount = 1 + aggBasedPanelID; - factories.forEach((factory: EmbeddableFactoryDefinition, index) => { + factories.forEach(({ factory }) => { const { grouping } = factory; if (grouping) { diff --git a/src/plugins/dashboard/public/application/top_nav/save_modal.test.js b/src/plugins/dashboard/public/application/top_nav/save_modal.test.js index 89cd53fd53624..acbde2cc47160 100644 --- a/src/plugins/dashboard/public/application/top_nav/save_modal.test.js +++ b/src/plugins/dashboard/public/application/top_nav/save_modal.test.js @@ -26,5 +26,5 @@ test('renders DashboardSaveModal', () => { showCopyOnSave={true} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/data/common/search/aggs/agg_config.test.ts b/src/plugins/data/common/search/aggs/agg_config.test.ts index 4e7d408e56ae9..84882c4bf5c2a 100644 --- a/src/plugins/data/common/search/aggs/agg_config.test.ts +++ b/src/plugins/data/common/search/aggs/agg_config.test.ts @@ -563,12 +563,18 @@ describe('AggConfig', () => { "enabled": Array [ true, ], + "excludeIsRegex": Array [ + true, + ], "field": Array [ "machine.os.keyword", ], "id": Array [ "1", ], + "includeIsRegex": Array [ + true, + ], "missingBucket": Array [ false, ], @@ -629,12 +635,18 @@ describe('AggConfig', () => { "enabled": Array [ true, ], + "excludeIsRegex": Array [ + true, + ], "field": Array [ "bytes", ], "id": Array [ "1-orderAgg", ], + "includeIsRegex": Array [ + true, + ], "missingBucket": Array [ false, ], diff --git a/src/plugins/data/common/search/aggs/buckets/migrate_include_exclude_format.ts b/src/plugins/data/common/search/aggs/buckets/migrate_include_exclude_format.ts index 87b63e0baca8d..205bd96bcab7f 100644 --- a/src/plugins/data/common/search/aggs/buckets/migrate_include_exclude_format.ts +++ b/src/plugins/data/common/search/aggs/buckets/migrate_include_exclude_format.ts @@ -40,6 +40,13 @@ export const migrateIncludeExcludeFormat = { if (parsedValue.length) { output.params[this.name] = parsedValue; } + } else if (Array.isArray(value) && value.length > 0 && isStringType(aggConfig)) { + // check if is regex + const filtered = value.filter((val) => val !== ''); + if (filtered.length) { + const isRegularExpression = aggConfig.getParam(`${this.name}IsRegex`); + output.params[this.name] = isRegularExpression ? filtered[0] : filtered; + } } else if (isObject(value)) { output.params[this.name] = (value as any).pattern; } else if (value && isStringType(aggConfig)) { diff --git a/src/plugins/data/common/search/aggs/buckets/terms.test.ts b/src/plugins/data/common/search/aggs/buckets/terms.test.ts index a135cb17845c7..3dd49b566ab5c 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms.test.ts @@ -94,12 +94,18 @@ describe('Terms Agg', () => { "enabled": Array [ true, ], + "excludeIsRegex": Array [ + true, + ], "field": Array [ "field", ], "id": Array [ "test", ], + "includeIsRegex": Array [ + true, + ], "missingBucket": Array [ false, ], @@ -196,6 +202,70 @@ describe('Terms Agg', () => { expect(params.exclude).toBe('exclude value'); }); + test('accepts array of strings from string field type and writes this value', () => { + const aggConfigs = getAggConfigs({ + include: ['include1', 'include2'], + exclude: ['exclude1'], + includeIsRegex: false, + excludeIsRegex: false, + field: { + name: 'string_field', + type: 'string', + }, + orderAgg: { + type: 'count', + }, + }); + + const { [BUCKET_TYPES.TERMS]: params } = aggConfigs.aggs[0].toDsl(); + + expect(params.field).toBe('string_field'); + expect(params.include).toStrictEqual(['include1', 'include2']); + expect(params.exclude).toStrictEqual(['exclude1']); + }); + + test('accepts array of string with regex and returns the pattern', () => { + const aggConfigs = getAggConfigs({ + include: ['include.*'], + exclude: ['exclude.*'], + includeIsRegex: true, + excludeIsRegex: true, + field: { + name: 'string_field', + type: 'string', + }, + orderAgg: { + type: 'count', + }, + }); + + const { [BUCKET_TYPES.TERMS]: params } = aggConfigs.aggs[0].toDsl(); + + expect(params.field).toBe('string_field'); + expect(params.include).toBe('include.*'); + expect(params.exclude).toBe('exclude.*'); + }); + + test('accepts array of empty strings and does not write a value', () => { + const aggConfigs = getAggConfigs({ + include: [''], + exclude: [''], + field: { + name: 'string_field', + type: 'string', + }, + orderAgg: { + type: 'count', + }, + }); + + const { [BUCKET_TYPES.TERMS]: params } = aggConfigs.aggs[0].toDsl(); + + expect(params.field).toBe('string_field'); + expect(params.include).toBe(undefined); + expect(params.exclude).toBe(undefined); + }); + test('accepts empty array from number field type and does not write a value', () => { const aggConfigs = getAggConfigs({ include: [], diff --git a/src/plugins/data/common/search/aggs/buckets/terms.ts b/src/plugins/data/common/search/aggs/buckets/terms.ts index b32ca564d2919..dcd2ec6143b03 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms.ts @@ -45,8 +45,10 @@ export interface AggParamsTerms extends BaseAggParams { otherBucket?: boolean; otherBucketLabel?: string; // advanced - exclude?: string; - include?: string; + exclude?: string[] | number[]; + include?: string[] | number[]; + includeIsRegex?: boolean; + excludeIsRegex?: boolean; } export const getTermsBucketAgg = () => @@ -178,5 +180,15 @@ export const getTermsBucketAgg = () => shouldShow: isStringOrNumberType, ...migrateIncludeExcludeFormat, }, + { + name: 'includeIsRegex', + default: true, + write: noop, + }, + { + name: 'excludeIsRegex', + default: true, + write: noop, + }, ], }); diff --git a/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts index 0d0a00bc24e06..1a34262adbc69 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts @@ -27,8 +27,10 @@ describe('agg_expression_functions', () => { "params": Object { "customLabel": undefined, "exclude": undefined, + "excludeIsRegex": undefined, "field": "machine.os.keyword", "include": undefined, + "includeIsRegex": undefined, "json": undefined, "missingBucket": undefined, "missingBucketLabel": undefined, @@ -61,8 +63,8 @@ describe('agg_expression_functions', () => { missingBucketLabel: 'missing', otherBucket: true, otherBucketLabel: 'other', - include: 'win', - exclude: 'ios', + include: ['win'], + exclude: ['ios'], }); expect(actual.value).toMatchInlineSnapshot(` @@ -71,9 +73,15 @@ describe('agg_expression_functions', () => { "id": "1", "params": Object { "customLabel": undefined, - "exclude": "ios", + "exclude": Array [ + "ios", + ], + "excludeIsRegex": undefined, "field": "machine.os.keyword", - "include": "win", + "include": Array [ + "win", + ], + "includeIsRegex": undefined, "json": undefined, "missingBucket": true, "missingBucketLabel": "missing", @@ -103,8 +111,10 @@ describe('agg_expression_functions', () => { Object { "customLabel": undefined, "exclude": undefined, + "excludeIsRegex": undefined, "field": "machine.os.keyword", "include": undefined, + "includeIsRegex": undefined, "json": undefined, "missingBucket": undefined, "missingBucketLabel": undefined, @@ -115,8 +125,10 @@ describe('agg_expression_functions', () => { "params": Object { "customLabel": undefined, "exclude": undefined, + "excludeIsRegex": undefined, "field": "name", "include": undefined, + "includeIsRegex": undefined, "json": undefined, "missingBucket": undefined, "missingBucketLabel": undefined, diff --git a/src/plugins/data/common/search/aggs/buckets/terms_fn.ts b/src/plugins/data/common/search/aggs/buckets/terms_fn.ts index 045295a7c7c94..86436251c56c7 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms_fn.ts @@ -117,16 +117,30 @@ export const aggTerms = (): FunctionDefinition => ({ }), }, exclude: { - types: ['string'], + types: ['string', 'number'], help: i18n.translate('data.search.aggs.buckets.terms.exclude.help', { defaultMessage: 'Specific bucket values to exclude from results', }), + multi: true, }, include: { - types: ['string'], + types: ['string', 'number'], help: i18n.translate('data.search.aggs.buckets.terms.include.help', { defaultMessage: 'Specific bucket values to include in results', }), + multi: true, + }, + includeIsRegex: { + types: ['boolean'], + help: i18n.translate('data.search.aggs.buckets.terms.includeIsRegex.help', { + defaultMessage: 'When set to true, the include property is handled as regex', + }), + }, + excludeIsRegex: { + types: ['boolean'], + help: i18n.translate('data.search.aggs.buckets.terms.excludeIsRegex.help', { + defaultMessage: 'When set to true, the exclude property is handled as regex', + }), }, json: { types: ['string'], diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation.ts index a6b74b083d689..8bc1af26509d5 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation.ts @@ -18,6 +18,7 @@ import { BaseAggParams } from '../types'; export interface AggParamsStdDeviation extends BaseAggParams { field: string; + showBounds?: boolean; } interface ValProp { @@ -91,15 +92,33 @@ export const getStdDeviationMetricAgg = () => { type: 'field', filterFieldTypes: KBN_FIELD_TYPES.NUMBER, }, + { + name: 'showBounds', + type: 'boolean', + write: () => {}, + shouldShow: () => false, + }, ], getResponseAggs(agg) { + const showBounds = agg.getParam('showBounds'); + if (showBounds === false) { + return [agg]; + } const ValueAggConfig = getResponseAggConfigClass(agg, responseAggConfigProps); return [new ValueAggConfig('std_lower'), new ValueAggConfig('std_upper')]; }, + getValueBucketPath(aggConfig) { + return `${aggConfig.id}.std_deviation`; + }, + getValue(agg, bucket) { + const showBounds = agg.getParam('showBounds'); + if (showBounds === false) { + return bucket[agg.id].std_deviation; + } return get(bucket[agg.parentId], agg.valProp()); }, }); diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts index 849987695dc7c..695540c065941 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "showBounds": true, "timeShift": undefined, }, "schema": undefined, diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts index 1993713470dd6..9e1868dba6ae9 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts @@ -48,6 +48,14 @@ export const aggStdDeviation = (): FunctionDefinition => ({ defaultMessage: 'Schema to use for this aggregation', }), }, + showBounds: { + types: ['boolean'], + default: true, + help: i18n.translate('data.search.aggs.metrics.std_deviation.showBounds.help', { + defaultMessage: + 'Specifies whether this aggregation should return upper and lower bound or the standard deviation itself', + }), + }, field: { types: ['string'], required: true, diff --git a/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts b/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts index bd4b0c2066479..4d4f6d4b04f3b 100644 --- a/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts +++ b/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts @@ -23,8 +23,20 @@ import type { ISearchSource } from '../../../../public'; export function getRequestInspectorStats(searchSource: ISearchSource) { const stats: RequestStatistics = {}; const index = searchSource.getField('index'); + const indexFilters = searchSource.getActiveIndexFilter(); if (index) { + if (indexFilters.length > 0) { + stats.indexFilter = { + label: i18n.translate('data.search.searchSource.indexFilterLabel', { + defaultMessage: 'Index Pattern', + }), + value: indexFilters.join(', '), + description: i18n.translate('data.search.searchSource.indexFilterDescription', { + defaultMessage: 'The active index pattern.', + }), + }; + } stats.indexPattern = { label: i18n.translate('data.search.searchSource.dataViewLabel', { defaultMessage: 'Data view', diff --git a/src/plugins/data/common/search/search_source/mocks.ts b/src/plugins/data/common/search/search_source/mocks.ts index e291a9ec27cff..a17ef12484b65 100644 --- a/src/plugins/data/common/search/search_source/mocks.ts +++ b/src/plugins/data/common/search/search_source/mocks.ts @@ -36,6 +36,8 @@ export const searchSourceInstanceMock: MockedKeys = { getSerializedFields: jest.fn(), serialize: jest.fn(), toExpressionAst: jest.fn(), + getActiveIndexFilter: jest.fn(), + parseActiveIndexPatternFromQueryString: jest.fn(), }; export const searchSourceCommonMock: jest.Mocked = { diff --git a/src/plugins/data/common/search/search_source/search_source.test.ts b/src/plugins/data/common/search/search_source/search_source.test.ts index 10f96ec0526f9..7c571eb392540 100644 --- a/src/plugins/data/common/search/search_source/search_source.test.ts +++ b/src/plugins/data/common/search/search_source/search_source.test.ts @@ -117,6 +117,130 @@ describe('SearchSource', () => { }); }); + describe('#getActiveIndexFilter()', () => { + test('pase _index from query', () => { + searchSource.setField('query', { + language: 'kuery', + query: `_INDEX : fakebeat and _index : "mybeat-*"`, + }); + expect(searchSource.getActiveIndexFilter()).toMatchInlineSnapshot( + ['mybeat-*'], + ` + Array [ + "mybeat-*", + ] + ` + ); + }); + + test('pase _index from filter', () => { + const filter = [ + { + query: { match_phrase: { _index: 'auditbeat-*' } }, + meta: { + key: '_index', + alias: null, + disabled: false, + negate: false, + params: { + query: 'auditbeat-*', + }, + type: 'phrase', + }, + }, + { + query: { + bool: { + should: [ + { + match_phrase: { + _index: 'auditbeat-*', + }, + }, + ], + }, + }, + meta: { + key: '_index', + alias: null, + disabled: false, + negate: false, + params: ['auditbeat-*'], + type: 'phrase', + }, + }, + ]; + searchSource.setField('filter', filter); + expect(searchSource.getActiveIndexFilter()).toMatchInlineSnapshot( + ['auditbeat-*'], + ` + Array [ + "auditbeat-*", + ] + ` + ); + }); + + test('pase _index from query and filter with negate equals to true', () => { + const filter = [ + { + query: { + match_phrase: { + _index: 'auditbeat-*', + }, + }, + meta: { + key: '_index', + alias: null, + disabled: false, + negate: true, + params: { query: 'auditbeat-*' }, + type: 'phrase', + }, + }, + ]; + searchSource.setField('filter', filter); + searchSource.setField('query', { + language: 'kuery', + query: '_index : auditbeat-*', + }); + expect(searchSource.getActiveIndexFilter()).toMatchInlineSnapshot([], `Array []`); + }); + + test('pase _index from query and filter with negate equals to true and disabled equals to true', () => { + const filter = [ + { + query: { + match_phrase: { + _index: 'auditbeat-*', + }, + }, + meta: { + key: '_index', + alias: null, + disabled: true, + negate: true, + params: { query: 'auditbeat-*' }, + type: 'phrase', + }, + }, + ]; + searchSource.setField('filter', filter); + searchSource.setField('query', { + language: 'kuery', + query: '_index : auditbeat-*', + }); + expect(searchSource.getActiveIndexFilter()).toMatchInlineSnapshot( + ['auditbeat-*'], + ` + Array [ + "auditbeat-*", + ] + ` + ); + }); + }); + describe('#removeField()', () => { test('remove property', () => { searchSource = new SearchSource({}, searchSourceDependencies); diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index 4c7606fea4262..a3f127573644d 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -81,6 +81,7 @@ import { buildExpression, buildExpressionFunction, } from '@kbn/expressions-plugin/common'; +import _ from 'lodash'; import { normalizeSortRequest } from './normalize_sort_request'; import { AggConfigSerialized, DataViewField, SerializedSearchSourceFields } from '../..'; @@ -252,6 +253,44 @@ export class SearchSource { return parent && parent.getField(field); } + getActiveIndexFilter() { + const { filter: originalFilters, query } = this.getFields(); + + let filters: Filter[] = []; + if (originalFilters) { + filters = this.getFilters(originalFilters); + } + + const queryString = Array.isArray(query) ? query.map((q) => q.query) : query?.query; + + const indexPatternFromQuery = + typeof queryString === 'string' + ? this.parseActiveIndexPatternFromQueryString(queryString) + : queryString?.reduce((acc: string[], currStr: string) => { + return acc.concat(this.parseActiveIndexPatternFromQueryString(currStr)); + }, []) ?? []; + + const activeIndexPattern: string[] = filters?.reduce((acc, f) => { + if (f.meta.key === '_index' && f.meta.disabled === false) { + if (f.meta.negate === false) { + return _.concat(acc, f.meta.params.query ?? f.meta.params); + } else { + if (Array.isArray(f.meta.params)) { + return _.difference(acc, f.meta.params); + } else { + return _.difference(acc, [f.meta.params.query]); + } + } + } else { + return acc; + } + }, indexPatternFromQuery); + + const dedupActiveIndexPattern = new Set([...activeIndexPattern]); + + return [...dedupActiveIndexPattern]; + } + /** * Get the field from our own fields, don't traverse up the chain */ @@ -994,4 +1033,25 @@ export class SearchSource { return ast; } + + parseActiveIndexPatternFromQueryString(queryString: string): string[] { + let m; + const indexPatternSet: Set = new Set(); + const regex = /\s?(_index)\s?:\s?[\'\"]?(\w+\-?\*?)[\'\"]?\s?(\w+)?/g; + + while ((m = regex.exec(queryString)) !== null) { + // This is necessary to avoid infinite loops with zero-width matches + if (m.index === regex.lastIndex) { + regex.lastIndex++; + } + + m.forEach((match, groupIndex) => { + if (groupIndex === 2) { + indexPatternSet.add(match); + } + }); + } + + return [...indexPatternSet]; + } } diff --git a/src/plugins/data/common/search/tabify/response_writer.test.ts b/src/plugins/data/common/search/tabify/response_writer.test.ts index e16dae23a7ebc..776f0209f5da9 100644 --- a/src/plugins/data/common/search/tabify/response_writer.test.ts +++ b/src/plugins/data/common/search/tabify/response_writer.test.ts @@ -180,6 +180,8 @@ describe('TabbedAggResponseWriter class', () => { order: 'desc', otherBucket: false, otherBucketLabel: 'Other', + includeIsRegex: true, + excludeIsRegex: true, size: 5, }, type: 'terms', @@ -245,6 +247,8 @@ describe('TabbedAggResponseWriter class', () => { otherBucket: false, otherBucketLabel: 'Other', size: 5, + includeIsRegex: true, + excludeIsRegex: true, }, type: 'terms', }, diff --git a/src/plugins/data/public/stubs.ts b/src/plugins/data/public/stubs.ts index b81d9c4cc78e4..e98f2ac08acbb 100644 --- a/src/plugins/data/public/stubs.ts +++ b/src/plugins/data/public/stubs.ts @@ -7,5 +7,5 @@ */ export * from '../common/stubs'; -// eslint-disable-next-line +// eslint-disable-next-line @kbn/imports/uniform_imports,@kbn/eslint/no-restricted-paths export { createStubDataView } from '../../data_views/public/data_views/data_view.stub'; diff --git a/src/plugins/data_view_editor/kibana.json b/src/plugins/data_view_editor/kibana.json index 8e83cb1be046b..26bff485037e2 100644 --- a/src/plugins/data_view_editor/kibana.json +++ b/src/plugins/data_view_editor/kibana.json @@ -9,5 +9,5 @@ "name": "App Services", "githubTeam": "kibana-app-services" }, - "description": "This plugin provides the ability to create data views via a modal flyout from any kibana app" + "description": "This plugin provides the ability to create data views via a modal flyout inside Kibana apps" } diff --git a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx index 6e21cc00e5dd5..127badffc826d 100644 --- a/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx +++ b/src/plugins/data_view_field_editor/public/components/preview/field_preview_context.tsx @@ -121,7 +121,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { // If no documents could be fetched from the cluster (and we are not trying to load // a custom doc ID) then we disable preview as the script field validation expect the result // of the preview to before resolving. If there are no documents we can't have a preview - // (the _execute API expects one) and thus the validation should not expect any value. + // (the _execute API expects one) and thus the validation should not expect a value. if (!isFetchingDocument && !isCustomDocId && documents.length === 0) { isPreviewAvailable = false; } @@ -341,7 +341,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { if (currentApiCall !== previewCount.current) { // Discard this response as there is another one inflight - // or we have called reset() and don't need the response anymore. + // or we have called reset() and no longer need the response. return; } @@ -410,7 +410,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { }, [currentIdx, totalDocs]); const reset = useCallback(() => { - // By resetting the previewCount we will discard any inflight + // By resetting the previewCount we will discard previous inflight // API call response coming in after calling reset() was called previewCount.current = 0; @@ -603,7 +603,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { }, [scriptEditorValidation, script?.source, setPreviewError, clearPreviewError]); /** - * Whenever updatePreview() changes (meaning whenever any of the params changes) + * Whenever updatePreview() changes (meaning whenever a param changes) * we call it to update the preview response with the field(s) value or possible error. */ useDebounce(updatePreview, 500, [updatePreview]); diff --git a/src/plugins/data_view_field_editor/public/types.ts b/src/plugins/data_view_field_editor/public/types.ts index 25f97e6737bf2..504a97eb7f329 100644 --- a/src/plugins/data_view_field_editor/public/types.ts +++ b/src/plugins/data_view_field_editor/public/types.ts @@ -6,20 +6,20 @@ * Side Public License, v 1. */ +import { SerializableRecord } from '@kbn/utility-types'; import { FunctionComponent } from 'react'; - +import { DeleteFieldProviderProps } from './components'; +import { OpenFieldDeleteModalOptions } from './open_delete_modal'; +import { OpenFieldEditorOptions } from './open_editor'; +import { FormatEditorServiceSetup, FormatEditorServiceStart } from './service'; import { DataPublicPluginStart, DataViewsPublicPluginStart, + FieldFormatsStart, RuntimeField, RuntimeType, UsageCollectionStart, - FieldFormatsStart, } from './shared_imports'; -import { OpenFieldEditorOptions } from './open_editor'; -import { OpenFieldDeleteModalOptions } from './open_delete_modal'; -import { FormatEditorServiceSetup, FormatEditorServiceStart } from './service'; -import { DeleteFieldProviderProps } from './components'; export interface PluginSetup { fieldFormatEditors: FormatEditorServiceSetup['fieldFormatEditors']; @@ -58,7 +58,7 @@ export interface Field { export interface FieldFormatConfig { id: string; - params?: { [key: string]: any }; + params?: SerializableRecord; } export interface EsRuntimeField { diff --git a/src/plugins/data_view_field_editor/server/plugin.ts b/src/plugins/data_view_field_editor/server/plugin.ts index c5bbe9bab7572..deb516ab25012 100644 --- a/src/plugins/data_view_field_editor/server/plugin.ts +++ b/src/plugins/data_view_field_editor/server/plugin.ts @@ -9,7 +9,7 @@ import { PluginInitializerContext, CoreSetup, Plugin, Logger } from '@kbn/core/s import { ApiRoutes } from './routes'; -export class IndexPatternPlugin implements Plugin { +export class IndexPatternPlugin implements Plugin { private readonly logger: Logger; private readonly apiRoutes: ApiRoutes; diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx index d502038a1018d..74e1eb77cf503 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -70,7 +70,7 @@ export const EditIndexPattern = withRouter( indexPattern.fields.getAll().filter((field) => field.type === 'conflict') ); const [defaultIndex, setDefaultIndex] = useState(uiSettings.get('defaultIndex')); - const [tags, setTags] = useState([]); + const [tags, setTags] = useState>([]); const [showEditDialog, setShowEditDialog] = useState(false); const [relationships, setRelationships] = useState([]); const [allowedTypes, setAllowedTypes] = useState([]); @@ -220,7 +220,7 @@ export const EditIndexPattern = withRouter( {securityDataView} )} - {tags.map((tag: any) => ( + {tags.map((tag) => ( {tag.key === 'default' ? ( diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx index 455371d6c5e2b..f2fd9ce2d2140 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx @@ -33,7 +33,7 @@ export class SourceFiltersTable extends Component< SourceFiltersTableProps, SourceFiltersTableState > { - // Source filters do not have any unique ids, only the value is stored. + // Source filters do not have unique ids, only the value is stored. // To ensure we can create a consistent and expected UX when managing // source filters, we are assigning a unique id to each filter on the // client side only diff --git a/src/plugins/data_view_management/public/components/field_editor/field_editor.test.tsx b/src/plugins/data_view_management/public/components/field_editor/field_editor.test.tsx index 89f41e8b269ad..f3b533b7d8290 100644 --- a/src/plugins/data_view_management/public/components/field_editor/field_editor.test.tsx +++ b/src/plugins/data_view_management/public/components/field_editor/field_editor.test.tsx @@ -85,6 +85,7 @@ class Format { params() {} } +// FIXME: which interface is this? const field = { scripted: true, type: 'number', @@ -190,7 +191,7 @@ describe('FieldEditor', () => { add: jest.fn(), }, }; - indexPattern.fieldFormatMap = { test: field }; + indexPattern.fieldFormatMap = { test: field } as {}; (indexPattern.deleteFieldFormat as any) = jest.fn(); const component = createComponentWithContext( diff --git a/src/plugins/data_view_management/public/components/index_pattern_table/delete_modal_msg.tsx b/src/plugins/data_view_management/public/components/index_pattern_table/delete_modal_msg.tsx index e675f4be59b45..080b3b8bd8ea0 100644 --- a/src/plugins/data_view_management/public/components/index_pattern_table/delete_modal_msg.tsx +++ b/src/plugins/data_view_management/public/components/index_pattern_table/delete_modal_msg.tsx @@ -32,7 +32,7 @@ const tableTitle = i18n.translate('indexPatternManagement.dataViewTable.tableTit }); export const deleteModalMsg = (views: RemoveDataViewProps[], hasSpaces: boolean) => { - const columns: Array> = [ + const columns: Array> = [ { field: 'name', name: dataViewColumnName, diff --git a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx index 23ecb5657ae36..20dd75aff49c7 100644 --- a/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/data_view_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -267,7 +267,7 @@ export const IndexPatternTable = ({ id={dataView.id} title={dataView.title} refresh={() => { - dataViews.clearCache(dataView.id); + dataViews.clearInstanceCache(dataView.id); loadDataViews(); }} /> diff --git a/src/plugins/data_views/README.mdx b/src/plugins/data_views/README.mdx index 2d7bf08d78586..7fdd435db746e 100644 --- a/src/plugins/data_views/README.mdx +++ b/src/plugins/data_views/README.mdx @@ -20,5 +20,5 @@ and field lists across the various Kibana apps. Its typically used in conjunctio **hasData:** A standardized way to check the empty state for indices and data views. - `hasESData: () => Promise; // Check to see if ES data exists` -- `hasDataView: () => Promise; // Check to see if any data view exists (managed or user created)` +- `hasDataView: () => Promise; // Check to see if data view exists (managed or user created)` - `hasUserDataView: () => Promise; // Check to see if user created data views exists` diff --git a/src/plugins/data_views/common/constants.ts b/src/plugins/data_views/common/constants.ts index 81a424d291bec..b79eef45e7fc8 100644 --- a/src/plugins/data_views/common/constants.ts +++ b/src/plugins/data_views/common/constants.ts @@ -22,7 +22,7 @@ export const RUNTIME_FIELD_TYPES = [ ] as const; /** - * Used to determine if the instance has any user created index patterns by filtering index patterns + * Used to determine if the instance has some user created index patterns by filtering index patterns * that are created and backed only by Fleet server data * Should be revised after https://github.com/elastic/kibana/issues/82851 is fixed * For more background see: https://github.com/elastic/kibana/issues/107020 diff --git a/src/plugins/data_views/common/data_views/data_view.ts b/src/plugins/data_views/common/data_views/data_view.ts index 6f01f61c98fe8..c8cafd36fb742 100644 --- a/src/plugins/data_views/common/data_views/data_view.ts +++ b/src/plugins/data_views/common/data_views/data_view.ts @@ -6,21 +6,31 @@ * Side Public License, v 1. */ -import _, { cloneDeep, each, reject } from 'lodash'; -import { castEsToKbnFieldTypeName, ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { CharacterNotAllowedInField } from '@kbn/kibana-utils-plugin/common'; -import { - FieldFormatsStartCommon, +import type { DataViewBase } from '@kbn/es-query'; +import type { FieldFormat, + FieldFormatsStartCommon, SerializedFieldFormat, } from '@kbn/field-formats-plugin/common'; -import type { DataViewBase } from '@kbn/es-query'; -import { FieldAttrs, FieldAttrSet, DataViewAttributes } from '..'; -import type { RuntimeField, RuntimeFieldSpec, RuntimeType, FieldConfiguration } from '../types'; -import { DataViewField, IIndexPatternFieldList, fieldList } from '../fields'; +import { castEsToKbnFieldTypeName, ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; +import { CharacterNotAllowedInField } from '@kbn/kibana-utils-plugin/common'; +import _, { cloneDeep, each, reject } from 'lodash'; +import type { DataViewAttributes, FieldAttrs, FieldAttrSet } from '..'; +import type { DataViewField, IIndexPatternFieldList } from '../fields'; +import { fieldList } from '../fields'; +import type { + DataViewFieldMap, + DataViewSpec, + FieldConfiguration, + FieldFormatMap, + RuntimeField, + RuntimeFieldSpec, + RuntimeType, + SourceFilter, + TypeMeta, +} from '../types'; import { flattenHitWrapper } from './flatten_hit'; -import { DataViewSpec, TypeMeta, SourceFilter, DataViewFieldMap } from '../types'; import { removeFieldAttrs } from './utils'; interface DataViewDeps { @@ -70,7 +80,7 @@ export class DataView implements DataViewBase { /** * Map of field formats by field name */ - public fieldFormatMap: Record; + public fieldFormatMap: FieldFormatMap; /** * Only used by rollup indices, used by rollup specific endpoint to load field list. */ @@ -90,7 +100,7 @@ export class DataView implements DataViewBase { /** * @deprecated Use `flattenHit` utility method exported from data plugin instead. */ - public flattenHit: (hit: Record, deep?: boolean) => Record; + public flattenHit: (hit: Record, deep?: boolean) => Record; /** * List of meta fields by name */ @@ -233,7 +243,7 @@ export class DataView implements DataViewBase { }; } - // Date value returned in "_source" could be in any number of formats + // Date value returned in "_source" could be in a number of formats // Use a docvalue for each date field to ensure standardized formats when working with date fields // dataView.flattenHit will override "_source" values when the same field is also defined in "fields" const docvalueFields = reject(this.fields.getByType('date'), 'scripted').map((dateField) => { @@ -296,7 +306,7 @@ export class DataView implements DataViewBase { name: this.name, }; - // Filter any undefined values from the spec + // Filter undefined values from the spec return Object.fromEntries(Object.entries(spec).filter(([, v]) => typeof v !== 'undefined')); } diff --git a/src/plugins/data_views/common/data_views/data_views.test.ts b/src/plugins/data_views/common/data_views/data_views.test.ts index ac4fc71414cb3..827592f7fd31a 100644 --- a/src/plugins/data_views/common/data_views/data_views.test.ts +++ b/src/plugins/data_views/common/data_views/data_views.test.ts @@ -210,7 +210,7 @@ describe('IndexPatterns', () => { // Create a normal index patterns const pattern = await indexPatterns.get('foo'); - indexPatterns.clearCache(); + indexPatterns.clearInstanceCache(); // Create the same one - we're going to handle concurrency const samePattern = await indexPatterns.get('foo'); diff --git a/src/plugins/data_views/common/data_views/data_views.ts b/src/plugins/data_views/common/data_views/data_views.ts index 12a06b9a98fa7..8c98f7f18f0de 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -38,6 +38,10 @@ import { DuplicateDataViewError, DataViewInsufficientAccessError } from '../erro const MAX_ATTEMPTS_TO_RESOLVE_CONFLICTS = 3; +/* + * Attributes of the data view saved object + * @public + */ export type DataViewSavedObjectAttrs = Pick< DataViewAttributes, 'title' | 'type' | 'typeMeta' | 'name' @@ -123,10 +127,15 @@ export interface DataViewsServiceDeps { */ export interface DataViewsServicePublicMethods { /** - * Clear the cache of data views. - * @param id + * Clear the cache of data view saved objects. + */ + clearCache: () => void; + + /** + * Clear the cache of data view instances. */ - clearCache: (id?: string | undefined) => void; + clearInstanceCache: (id?: string) => void; + /** * Create data view based on the provided spec. * @param spec - Data view spec. @@ -396,11 +405,16 @@ export class DataViewsService { }; /** - * Clear index pattern list cache. - * @param id optionally clear a single id + * Clear index pattern saved objects cache. */ - clearCache = (id?: string) => { + clearCache = () => { this.savedObjectsCache = null; + }; + + /** + * Clear index pattern instance cache + */ + clearInstanceCache = (id?: string) => { if (id) { this.dataViewCache.clear(id); } else { @@ -435,7 +449,7 @@ export class DataViewsService { * Get default index pattern id */ getDefaultId = async (): Promise => { - const defaultIndexPatternId = await this.config.get('defaultIndex'); + const defaultIndexPatternId = await this.config.get('defaultIndex'); return defaultIndexPatternId ?? null; }; @@ -463,7 +477,7 @@ export class DataViewsService { * @returns FieldSpec[] */ getFieldsForWildcard = async (options: GetFieldsOptions): Promise => { - const metaFields = await this.config.get(META_FIELDS); + const metaFields = await this.config.get(META_FIELDS); return this.apiClient.getFieldsForWildcard({ pattern: options.pattern, metaFields, @@ -776,8 +790,8 @@ export class DataViewsService { { id, name, title, ...restOfSpec }: DataViewSpec, skipFetchFields = false ): Promise { - const shortDotsEnable = await this.config.get(FORMATS_UI_SETTINGS.SHORT_DOTS_ENABLE); - const metaFields = await this.config.get(META_FIELDS); + const shortDotsEnable = await this.config.get(FORMATS_UI_SETTINGS.SHORT_DOTS_ENABLE); + const metaFields = await this.config.get(META_FIELDS); const spec = { id: id ?? uuid.v4(), @@ -876,7 +890,8 @@ export class DataViewsService { // get changed keys const originalChangedKeys: string[] = []; Object.entries(body).forEach(([key, value]) => { - if (value !== (originalBody as any)[key]) { + const realKey = key as keyof typeof originalBody; + if (value !== originalBody[realKey]) { originalChangedKeys.push(key); } }); @@ -903,7 +918,8 @@ export class DataViewsService { const serverChangedKeys: string[] = []; Object.entries(updatedBody).forEach(([key, value]) => { - if (value !== (body as any)[key] && value !== (originalBody as any)[key]) { + const realKey = key as keyof typeof originalBody; + if (value !== body[realKey] && value !== originalBody[realKey]) { serverChangedKeys.push(key); } }); @@ -936,6 +952,7 @@ export class DataViewsService { // Set the updated response on this object serverChangedKeys.forEach((key) => { + // FIXME: this overwrites read-only properties (indexPattern as any)[key] = (samePattern as any)[key]; }); indexPattern.version = samePattern.version; diff --git a/src/plugins/data_views/common/data_views/flatten_hit.test.ts b/src/plugins/data_views/common/data_views/flatten_hit.test.ts index 24d5ee12885d2..ab7e7d14df4ec 100644 --- a/src/plugins/data_views/common/data_views/flatten_hit.test.ts +++ b/src/plugins/data_views/common/data_views/flatten_hit.test.ts @@ -59,7 +59,7 @@ describe('flattenHit', () => { zzz: ['z'], _abc: ['a'], }, - }); + } as {}); const expectedOrder = ['_abc', 'date', 'name', 'zzz', '_id', '_routing', '_score', '_type']; expect(Object.keys(response)).toEqual(expectedOrder); expect(Object.entries(response).map(([key]) => key)).toEqual(expectedOrder); diff --git a/src/plugins/data_views/common/data_views/flatten_hit.ts b/src/plugins/data_views/common/data_views/flatten_hit.ts index 0a6388f0914b1..b9932c0de950d 100644 --- a/src/plugins/data_views/common/data_views/flatten_hit.ts +++ b/src/plugins/data_views/common/data_views/flatten_hit.ts @@ -14,11 +14,21 @@ import _ from 'lodash'; import { DataView } from './data_view'; -// Takes a hit, merges it with any stored/scripted fields, and with the metaFields -// returns a flattened version - -function flattenHit(indexPattern: DataView, hit: Record, deep: boolean) { - const flat = {} as Record; +/** + * Takes a hit, merges it with whatever stored/scripted fields, and with the metaFields + * returns a flattened version + * + * @param {DataView} indexPattern + * @param {Record} hit - userland data + * @param {boolean} deep - whether to look into objects within arrays + * @returns {Record} + */ +function flattenHit( + indexPattern: DataView, + hit: Record, + deep: boolean +): Record { + const flat = {} as Record; // recursively merge _source const fields = indexPattern.fields.getByName; @@ -61,8 +71,11 @@ function flattenHit(indexPattern: DataView, hit: Record, deep: bool return flat; } -function decorateFlattenedWrapper(hit: Record, metaFields: Record) { - return function (flattened: Record) { +function decorateFlattenedWrapper( + hit: Record, + metaFields: Record +) { + return function (flattened: Record) { // assign the meta fields _.each(metaFields, function (meta) { if (meta === '_source') return; @@ -70,7 +83,7 @@ function decorateFlattenedWrapper(hit: Record, metaFields: Record, metaFields: Record, deep = false) { +export function flattenHitWrapper(dataView: DataView, metaFields = {}, cache = new WeakMap()) { + return function cachedFlatten(hit: Record, deep = false) { const decorateFlattened = decorateFlattenedWrapper(hit, metaFields); const cached = cache.get(hit); const flattened = cached || flattenHit(dataView, hit, deep); diff --git a/src/plugins/data_views/common/fields/utils.test.ts b/src/plugins/data_views/common/fields/utils.test.ts index 0f2ff280eb61b..e7d84f4dc6f0a 100644 --- a/src/plugins/data_views/common/fields/utils.test.ts +++ b/src/plugins/data_views/common/fields/utils.test.ts @@ -16,8 +16,8 @@ describe('shortenDottedString', () => { test('should ignore non-string values', () => { const obj = { key: 'val' }; - expect(shortenDottedString(true)).toBe(true); - expect(shortenDottedString(123)).toBe(123); - expect(shortenDottedString(obj)).toBe(obj); + expect(shortenDottedString(true as unknown as string)).toBe(true); + expect(shortenDottedString(123 as unknown as string)).toBe(123); + expect(shortenDottedString(obj as unknown as string)).toBe(obj); }); }); diff --git a/src/plugins/data_views/common/fields/utils.ts b/src/plugins/data_views/common/fields/utils.ts index 1dc7e7f698995..a6418bec744f0 100644 --- a/src/plugins/data_views/common/fields/utils.ts +++ b/src/plugins/data_views/common/fields/utils.ts @@ -30,10 +30,8 @@ const DOT_PREFIX_RE = /(.).+?\./g; /** * Convert a dot.notated.string into a short * version (d.n.string) - * - * @return {any} */ -export function shortenDottedString(input: any) { +export function shortenDottedString(input: string): string { return typeof input !== 'string' ? input : input.replace(DOT_PREFIX_RE, '$1.'); } diff --git a/src/plugins/data_views/common/index.ts b/src/plugins/data_views/common/index.ts index aeaca476a8abd..ffeeb069d1912 100644 --- a/src/plugins/data_views/common/index.ts +++ b/src/plugins/data_views/common/index.ts @@ -55,7 +55,11 @@ export type { } from './types'; export { DataViewType } from './types'; -export type { DataViewsContract, DataViewsServiceDeps } from './data_views'; +export type { + DataViewsContract, + DataViewsServiceDeps, + DataViewSavedObjectAttrs, +} from './data_views'; export { DataViewsService, DataViewPersistableStateService } from './data_views'; export type { DataViewListItem, diff --git a/src/plugins/data_views/common/lib/errors.ts b/src/plugins/data_views/common/lib/errors.ts index 29f9e01582f7c..079dcfd8b3993 100644 --- a/src/plugins/data_views/common/lib/errors.ts +++ b/src/plugins/data_views/common/lib/errors.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -/* eslint-disable */ +/* eslint-disable @kbn/imports/uniform_imports */ import { KbnError } from '../../../kibana_utils/common'; @@ -17,8 +17,6 @@ export class DataViewMissingIndices extends KbnError { constructor(message: string) { const defaultMessage = "Data view's title does not match any indices"; - super( - message && message.length ? `No matching indices found: ${message}` : defaultMessage - ); + super(message && message.length ? `No matching indices found: ${message}` : defaultMessage); } } diff --git a/src/plugins/data_views/common/types.ts b/src/plugins/data_views/common/types.ts index 11b0982446bfe..40a70e3c1f547 100644 --- a/src/plugins/data_views/common/types.ts +++ b/src/plugins/data_views/common/types.ts @@ -6,15 +6,19 @@ * Side Public License, v 1. */ +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { + SavedObject, + SavedObjectsCreateOptions, + SavedObjectsUpdateOptions, +} from '@kbn/core/public'; +import type { ErrorToastOptions, ToastInputFields } from '@kbn/core/public/notifications'; import type { DataViewFieldBase } from '@kbn/es-query'; -import { ToastInputFields, ErrorToastOptions } from '@kbn/core/public/notifications'; -// eslint-disable-next-line -import type { SavedObject } from 'src/core/server'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import { RUNTIME_FIELD_TYPES } from './constants'; export type { QueryDslQueryContainer }; +export type { SavedObject }; export type FieldFormatMap = Record; @@ -210,7 +214,7 @@ export interface UiSettingsCommon { * Get a setting value * @param key name of value */ - get: (key: string) => Promise; + get: (key: string) => Promise; /** * Get all settings values */ @@ -220,7 +224,7 @@ export interface UiSettingsCommon { * @param key name of value * @param value value to set */ - set: (key: string, value: T) => Promise; + set: (key: string, value: T) => Promise; /** * Remove a setting value * @param key name of value @@ -281,8 +285,8 @@ export interface SavedObjectsClientCommon { update: ( type: string, id: string, - attributes: Record, - options: Record + attributes: DataViewAttributes, + options: SavedObjectsUpdateOptions ) => Promise; /** * Create a saved object @@ -292,8 +296,8 @@ export interface SavedObjectsClientCommon { */ create: ( type: string, - attributes: Record, - options: Record + attributes: DataViewAttributes, + options: SavedObjectsCreateOptions ) => Promise; /** * Delete a saved object by id @@ -314,12 +318,10 @@ export interface GetFieldsOptions { } export interface IDataViewsApiClient { - getFieldsForWildcard: (options: GetFieldsOptions) => Promise; + getFieldsForWildcard: (options: GetFieldsOptions) => Promise; hasUserIndexPattern: () => Promise; } -export type { SavedObject }; - export type AggregationRestrictions = Record< string, { diff --git a/src/plugins/data_views/public/data_views/data_views_api_client.ts b/src/plugins/data_views/public/data_views/data_views_api_client.ts index e1b7ee1590acf..b02894d1afb63 100644 --- a/src/plugins/data_views/public/data_views/data_views_api_client.ts +++ b/src/plugins/data_views/public/data_views/data_views_api_client.ts @@ -8,7 +8,7 @@ import { HttpSetup } from '@kbn/core/public'; import { DataViewMissingIndices } from '../../common/lib'; -import { GetFieldsOptions, IDataViewsApiClient } from '../../common'; +import { FieldSpec, GetFieldsOptions, IDataViewsApiClient } from '../../common'; const API_BASE_URL: string = `/api/index_patterns/`; @@ -26,12 +26,12 @@ export class DataViewsApiClient implements IDataViewsApiClient { this.http = http; } - private _request(url: string, query?: any) { + private _request(url: string, query?: {}): Promise { return this.http .fetch(url, { query, }) - .catch((resp: any) => { + .catch((resp) => { if (resp.body.statusCode === 404 && resp.body.attributes?.code === 'no_matching_indices') { throw new DataViewMissingIndices(resp.body.message); } @@ -50,14 +50,14 @@ export class DataViewsApiClient implements IDataViewsApiClient { */ getFieldsForWildcard(options: GetFieldsOptions) { const { pattern, metaFields, type, rollupIndex, allowNoIndex, filter } = options; - return this._request(this._getUrl(['_fields_for_wildcard']), { + return this._request<{ fields: FieldSpec[] }>(this._getUrl(['_fields_for_wildcard']), { pattern, meta_fields: metaFields, type, rollup_index: rollupIndex, allow_no_index: allowNoIndex, filter, - }).then((resp: any) => resp.fields || []); + }).then((resp) => resp?.fields || []); } /** @@ -67,6 +67,6 @@ export class DataViewsApiClient implements IDataViewsApiClient { const response = await this._request<{ result: boolean }>( this._getUrl(['has_user_index_pattern']) ); - return response.result; + return response?.result ?? false; } } diff --git a/src/plugins/data_views/public/debounce_by_key.ts b/src/plugins/data_views/public/debounce_by_key.ts index c8ae7094a6437..402fd5baf9fc7 100644 --- a/src/plugins/data_views/public/debounce_by_key.ts +++ b/src/plugins/data_views/public/debounce_by_key.ts @@ -8,11 +8,19 @@ import { debounce } from 'lodash'; -export const debounceByKey = any>( +/** + * Uses a debouncer collector behind a debouncing factory to work on a set of functions + * + * @template F - function type + * @param {F} fn - function to debounce + * @param {number} waitInMs + * @returns {(key: string) => Function} + */ +export const debounceByKey = unknown>( fn: F, waitInMs: number -): ((key: string) => F) => { - const debouncerCollector: Record = {}; +): ((key: string) => Function) => { + const debouncerCollector: Record = {}; return (key: string) => { if (!debouncerCollector[key]) { debouncerCollector[key] = debounce(fn, waitInMs, { diff --git a/src/plugins/data_views/public/saved_objects_client_wrapper.ts b/src/plugins/data_views/public/saved_objects_client_wrapper.ts index 9dab5ec46f548..e8d008e130323 100644 --- a/src/plugins/data_views/public/saved_objects_client_wrapper.ts +++ b/src/plugins/data_views/public/saved_objects_client_wrapper.ts @@ -6,14 +6,20 @@ * Side Public License, v 1. */ +import { + SavedObjectsClientContract, + SavedObjectsCreateOptions, + SavedObjectsUpdateOptions, + SimpleSavedObject, +} from '@kbn/core/public'; import { omit } from 'lodash'; -import { SavedObjectsClientContract, SimpleSavedObject } from '@kbn/core/public'; +import { DataViewSavedObjectConflictError } from '../common/errors'; import { + DataViewAttributes, + SavedObject, SavedObjectsClientCommon, SavedObjectsClientCommonFindArgs, - SavedObject, } from '../common/types'; -import { DataViewSavedObjectConflictError } from '../common/errors'; type SOClient = Pick< SavedObjectsClientContract, @@ -24,7 +30,7 @@ const simpleSavedObjectToSavedObject = (simpleSavedObject: SimpleSavedObject) ({ version: simpleSavedObject._version, ...omit(simpleSavedObject, '_version'), - } as any); + } as SavedObject); export class SavedObjectsClientPublicToCommon implements SavedObjectsClientCommon { private savedObjectClient: SOClient; @@ -49,14 +55,14 @@ export class SavedObjectsClientPublicToCommon implements SavedObjectsClientCommo async update( type: string, id: string, - attributes: Record, - options: Record + attributes: DataViewAttributes, + options: SavedObjectsUpdateOptions ) { const response = await this.savedObjectClient.update(type, id, attributes, options); return simpleSavedObjectToSavedObject(response); } - async create(type: string, attributes: Record, options: Record) { + async create(type: string, attributes: DataViewAttributes, options?: SavedObjectsCreateOptions) { const response = await this.savedObjectClient.create(type, attributes, options); return simpleSavedObjectToSavedObject(response); } diff --git a/src/plugins/data_views/public/services/has_data.ts b/src/plugins/data_views/public/services/has_data.ts index 4c641e0e17f13..45f44e04e23a8 100644 --- a/src/plugins/data_views/public/services/has_data.ts +++ b/src/plugins/data_views/public/services/has_data.ts @@ -41,7 +41,7 @@ export class HasData { return hasLocalESData; }, /** - * Check to see if any data view exists + * Check to see if a data view exists */ hasDataView: async (): Promise => { const dataViewsCheck = await this.findDataViews(http); diff --git a/src/plugins/data_views/public/ui_settings_wrapper.ts b/src/plugins/data_views/public/ui_settings_wrapper.ts index 3474451ad720f..ad160ee39373e 100644 --- a/src/plugins/data_views/public/ui_settings_wrapper.ts +++ b/src/plugins/data_views/public/ui_settings_wrapper.ts @@ -14,15 +14,17 @@ export class UiSettingsPublicToCommon implements UiSettingsCommon { constructor(uiSettings: IUiSettingsClient) { this.uiSettings = uiSettings; } - get(key: string): Promise { + get(key: string): Promise { return Promise.resolve(this.uiSettings.get(key)); } - getAll(): Promise>> { + getAll(): Promise< + Record) | undefined> + > { return Promise.resolve(this.uiSettings.getAll()); } - set(key: string, value: any) { + set(key: string, value: unknown) { this.uiSettings.set(key, value); return Promise.resolve(); } diff --git a/src/plugins/data_views/server/fetcher/index.ts b/src/plugins/data_views/server/fetcher/index.ts index 8161f187a5e6a..2fbb7c8f3f3cb 100644 --- a/src/plugins/data_views/server/fetcher/index.ts +++ b/src/plugins/data_views/server/fetcher/index.ts @@ -8,7 +8,8 @@ export * from './index_patterns_fetcher'; export { - shouldReadFieldFromDocValues, - mergeCapabilitiesWithFields, getCapabilitiesForRollupIndices, + mergeCapabilitiesWithFields, + shouldReadFieldFromDocValues, } from './lib'; +export type { RollupIndexCapability } from './lib'; diff --git a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts index 9d3b8a180d91e..dd02c9b7f9a12 100644 --- a/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts +++ b/src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts @@ -79,11 +79,17 @@ export class IndexPatternsFetcher { }); if (type === 'rollup' && rollupIndex) { const rollupFields: FieldDescriptor[] = []; - const rollupIndexCapabilities = getCapabilitiesForRollupIndices( + const capabilityCheck = getCapabilitiesForRollupIndices( await this.elasticsearchClient.rollup.getRollupIndexCaps({ index: rollupIndex, }) - )[rollupIndex].aggs; + )[rollupIndex]; + + if (capabilityCheck.error) { + throw new Error(capabilityCheck.error); + } + + const rollupIndexCapabilities = capabilityCheck.aggs; const fieldCapsResponseObj = keyBy(fieldCapsResponse, 'name'); // Keep meta fields metaFields!.forEach( @@ -91,7 +97,7 @@ export class IndexPatternsFetcher { fieldCapsResponseObj[field] && rollupFields.push(fieldCapsResponseObj[field]) ); return mergeCapabilitiesWithFields( - rollupIndexCapabilities, + rollupIndexCapabilities!, fieldCapsResponseObj, rollupFields ); diff --git a/src/plugins/data_views/server/fetcher/lib/errors.ts b/src/plugins/data_views/server/fetcher/lib/errors.ts index c69e177535b76..eb510798c759f 100644 --- a/src/plugins/data_views/server/fetcher/lib/errors.ts +++ b/src/plugins/data_views/server/fetcher/lib/errors.ts @@ -7,6 +7,7 @@ */ import Boom from '@hapi/boom'; +import { CustomHttpResponseOptions } from '@kbn/core/server'; import { get } from 'lodash'; const ERR_ES_INDEX_NOT_FOUND = 'index_not_found_exception'; @@ -15,10 +16,10 @@ const ERR_NO_MATCHING_INDICES = 'no_matching_indices'; /** * Determines if an error is an elasticsearch error that's * describing a failure caused by missing index/indices - * @param {Any} err + * @param err * @return {Boolean} */ -export function isEsIndexNotFoundError(err: any) { +export function isEsIndexNotFoundError(err: unknown) { return get(err, ['body', 'error', 'type']) === ERR_ES_INDEX_NOT_FOUND; } @@ -30,17 +31,17 @@ export function isEsIndexNotFoundError(err: any) { */ export function createNoMatchingIndicesError(pattern: string[] | string) { const err = Boom.notFound(`No indices match "${pattern}"`); - (err.output.payload as any).code = ERR_NO_MATCHING_INDICES; + (err as Boom.Boom).output.payload.code = ERR_NO_MATCHING_INDICES; return err; } /** * Determines if an error is produced by `createNoMatchingIndicesError()` * - * @param {Any} err + * @param err * @return {Boolean} */ -export function isNoMatchingIndicesError(err: any) { +export function isNoMatchingIndicesError(err: unknown) { return get(err, ['output', 'payload', 'code']) === ERR_NO_MATCHING_INDICES; } @@ -48,18 +49,23 @@ export function isNoMatchingIndicesError(err: any) { * Wrap "index_not_found_exception" errors in custom Boom errors * automatically * @param {Array|String} indices + * @param {Boom.Boom|CustomHttpResponseOptions} error * @return {Boom} */ -export function convertEsError(indices: string[] | string, error: any) { +export function convertEsError(indices: string[] | string, error: unknown) { if (isEsIndexNotFoundError(error)) { return createNoMatchingIndicesError(indices); } - if (error.isBoom) { + if ((error as Boom.Boom).isBoom) { return error; } - const statusCode = error.statusCode; - const message = error.body ? error.body.error : undefined; - return Boom.boomify(error, { statusCode, message }); + const custom = error as CustomHttpResponseOptions<{ error: string; message: string }>; + const options = { + statusCode: custom.statusCode, + message: custom.body?.error ?? undefined, + }; + + return Boom.boomify(error as Error, options); } diff --git a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_caps_response.ts b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_caps_response.ts index 2581b2b78f5d8..c1bfc4c6c7e18 100644 --- a/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_caps_response.ts +++ b/src/plugins/data_views/server/fetcher/lib/field_capabilities/field_caps_response.ts @@ -171,7 +171,7 @@ export function readFieldCapsResponse( subType = { ...subType, multi: { parent: firstParent.name } }; } - // We need to know if any parent field is nested + // We need to know if some parent field is nested const nestedParentCaps = parentFieldCapsAscending.find( (parentCaps) => parentCaps && parentCaps.type === 'nested' ); diff --git a/src/plugins/data_views/server/fetcher/lib/jobs_compatibility.ts b/src/plugins/data_views/server/fetcher/lib/jobs_compatibility.ts index adc60774fae37..2c104b03cf5c1 100644 --- a/src/plugins/data_views/server/fetcher/lib/jobs_compatibility.ts +++ b/src/plugins/data_views/server/fetcher/lib/jobs_compatibility.ts @@ -6,7 +6,10 @@ * Side Public License, v 1. */ +import { RollupGetRollupIndexCapsRollupJobSummary as RollupJobSummary } from '@elastic/elasticsearch/lib/api/types'; import { isEqual } from 'lodash'; +import { AggregationRestrictions } from '../../../common'; +import { RollupIndexCapability } from './map_capabilities'; /** * Checks if given job configs are compatible by attempting to merge them @@ -32,17 +35,19 @@ export function areJobsCompatible(jobs = []) { * by aggregation, then by field * * @param jobs - * @returns {{}} + * @returns {{ aggs: Dictionary }} */ -export function mergeJobConfigurations(jobs = []) { +export function mergeJobConfigurations( + jobs: RollupJobSummary[] = [] +): RollupIndexCapability[string] { if (!jobs || !Array.isArray(jobs) || !jobs.length) { throw new Error('No capabilities available'); } - const allAggs: { [key: string]: any } = {}; + const allAggs: RollupIndexCapability[string]['aggs'] = {}; // For each job, look through all of its fields - jobs.forEach((job: { fields: { [key: string]: any } }) => { + jobs.forEach((job) => { const fields = job.fields; const fieldNames = Object.keys(fields); @@ -51,7 +56,7 @@ export function mergeJobConfigurations(jobs = []) { const fieldAggs = fields[fieldName]; // Look through each field's capabilities (aggregations) - fieldAggs.forEach((agg: { agg: string; interval: string }) => { + fieldAggs.forEach((agg) => { const aggName = agg.agg; const aggDoesntExist = !allAggs[aggName]; const fieldDoesntExist = allAggs[aggName] && !allAggs[aggName][fieldName]; @@ -62,7 +67,7 @@ export function mergeJobConfigurations(jobs = []) { // date histogram field. if (aggDoesntExist || (fieldDoesntExist && !isDateHistogramAgg)) { allAggs[aggName] = allAggs[aggName] || {}; - allAggs[aggName][fieldName] = { ...agg }; + allAggs[aggName][fieldName] = { ...agg } as AggregationRestrictions[string]; } // If aggregation already exists, attempt to merge it else { @@ -73,6 +78,7 @@ export function mergeJobConfigurations(jobs = []) { // new interval and existing interval case 'histogram': // TODO: Fix this with LCD algorithm + // @ts-expect-error - Property 'interval' does not exist on type 'RollupGetRollupIndexCapsRollupJobSummaryField' const intervals = [fieldAgg.interval, agg.interval].sort((a, b) => a - b); const isMultiple = intervals[1] % intervals[0] === 0; fieldAgg.interval = isMultiple ? intervals[1] : intervals[0] * intervals[1]; diff --git a/src/plugins/data_views/server/fetcher/lib/map_capabilities.ts b/src/plugins/data_views/server/fetcher/lib/map_capabilities.ts index e2076a373d489..a5fdf98bd03e9 100644 --- a/src/plugins/data_views/server/fetcher/lib/map_capabilities.ts +++ b/src/plugins/data_views/server/fetcher/lib/map_capabilities.ts @@ -6,17 +6,31 @@ * Side Public License, v 1. */ +import { RollupGetRollupIndexCapsResponse } from '@elastic/elasticsearch/lib/api/types'; +import { Dictionary } from 'lodash'; +import { AggregationRestrictions } from '../../../common'; import { mergeJobConfigurations } from './jobs_compatibility'; +/** + * A record of capabilities (aggregations) for index rollup jobs + */ +export interface RollupIndexCapability { + /** + * A record of capabilities (aggregations) for an index rollup job + */ + [index: string]: { aggs?: Dictionary; error?: string }; +} + /** * Get rollup job capabilities * @public * @param indices rollup job index capabilites */ - -export function getCapabilitiesForRollupIndices(indices: Record) { +export function getCapabilitiesForRollupIndices( + indices: RollupGetRollupIndexCapsResponse +): RollupIndexCapability { const indexNames = Object.keys(indices); - const capabilities = {} as { [key: string]: any }; + const capabilities: RollupIndexCapability = {}; indexNames.forEach((index) => { try { diff --git a/src/plugins/data_views/server/fetcher/lib/merge_capabilities_with_fields.ts b/src/plugins/data_views/server/fetcher/lib/merge_capabilities_with_fields.ts index f80ae108fb681..922fde5347cfb 100644 --- a/src/plugins/data_views/server/fetcher/lib/merge_capabilities_with_fields.ts +++ b/src/plugins/data_views/server/fetcher/lib/merge_capabilities_with_fields.ts @@ -11,7 +11,7 @@ import { FieldDescriptor } from '../index_patterns_fetcher'; export const mergeCapabilitiesWithFields = ( - rollupIndexCapabilities: { [key: string]: any }, + rollupIndexCapabilities: Record, fieldsFromFieldCapsApi: Record, previousFields: FieldDescriptor[] = [] ) => { diff --git a/src/plugins/data_views/server/index.ts b/src/plugins/data_views/server/index.ts index e9eb7f0b50a3f..d7860e0bed473 100644 --- a/src/plugins/data_views/server/index.ts +++ b/src/plugins/data_views/server/index.ts @@ -7,7 +7,7 @@ */ export { getFieldByName, findIndexPatternById } from './utils'; -export type { FieldDescriptor } from './fetcher'; +export type { FieldDescriptor, RollupIndexCapability } from './fetcher'; export { IndexPatternsFetcher, getCapabilitiesForRollupIndices } from './fetcher'; export type { DataViewsServerPluginStart, diff --git a/src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts b/src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts index c828e064fce84..a01890c34a43d 100644 --- a/src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts +++ b/src/plugins/data_views/server/rest_api_routes/util/handle_errors.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import Boom from '@hapi/boom'; import type { RequestHandler, RouteMethod, RequestHandlerContext } from '@kbn/core/server'; import { ErrorIndexPatternNotFound } from '../../error'; @@ -47,7 +48,8 @@ export const handleErrors = } const is404 = - (error as ErrorIndexPatternNotFound).is404 || (error as any)?.output?.statusCode === 404; + (error as ErrorIndexPatternNotFound).is404 || + (error as Boom.Boom)?.output?.statusCode === 404; if (is404) { return response.notFound({ diff --git a/src/plugins/data_views/server/saved_objects/data_views.ts b/src/plugins/data_views/server/saved_objects/data_views.ts index 064302e2b6fe6..3036efd5559d3 100644 --- a/src/plugins/data_views/server/saved_objects/data_views.ts +++ b/src/plugins/data_views/server/saved_objects/data_views.ts @@ -41,5 +41,5 @@ export const dataViewSavedObjectType: SavedObjectsType = { name: { type: 'text' }, }, }, - migrations: indexPatternSavedObjectTypeMigrations as any, + migrations: indexPatternSavedObjectTypeMigrations, }; diff --git a/src/plugins/data_views/server/saved_objects_client_wrapper.ts b/src/plugins/data_views/server/saved_objects_client_wrapper.ts index d8755b9ff1be1..9ac5e5203a10e 100644 --- a/src/plugins/data_views/server/saved_objects_client_wrapper.ts +++ b/src/plugins/data_views/server/saved_objects_client_wrapper.ts @@ -7,7 +7,11 @@ */ import { SavedObjectsClientContract, SavedObject } from '@kbn/core/server'; -import { SavedObjectsClientCommon, SavedObjectsClientCommonFindArgs } from '../common/types'; +import { + DataViewAttributes, + SavedObjectsClientCommon, + SavedObjectsClientCommonFindArgs, +} from '../common/types'; import { DataViewSavedObjectConflictError } from '../common/errors'; export class SavedObjectsClientServerToCommon implements SavedObjectsClientCommon { @@ -27,15 +31,10 @@ export class SavedObjectsClientServerToCommon implements SavedObjectsClientCommo } return response.saved_object; } - async update( - type: string, - id: string, - attributes: Record, - options: Record - ) { + async update(type: string, id: string, attributes: DataViewAttributes, options: {}) { return (await this.savedObjectClient.update(type, id, attributes, options)) as SavedObject; } - async create(type: string, attributes: Record, options: Record) { + async create(type: string, attributes: DataViewAttributes, options: {}) { return await this.savedObjectClient.create(type, attributes, options); } delete(type: string, id: string) { diff --git a/src/plugins/data_views/server/ui_settings_wrapper.ts b/src/plugins/data_views/server/ui_settings_wrapper.ts index 51f23d7de4cd6..e9968d500fca8 100644 --- a/src/plugins/data_views/server/ui_settings_wrapper.ts +++ b/src/plugins/data_views/server/ui_settings_wrapper.ts @@ -14,15 +14,15 @@ export class UiSettingsServerToCommon implements UiSettingsCommon { constructor(uiSettings: IUiSettingsClient) { this.uiSettings = uiSettings; } - get(key: string): Promise { + get(key: string): Promise { return this.uiSettings.get(key); } - getAll(): Promise> { + getAll(): Promise> { return this.uiSettings.getAll(); } - set(key: string, value: any) { + set(key: string, value: unknown) { return this.uiSettings.set(key, value); } diff --git a/src/plugins/discover/common/constants.ts b/src/plugins/discover/common/constants.ts new file mode 100644 index 0000000000000..76cf8b8f8f3c4 --- /dev/null +++ b/src/plugins/discover/common/constants.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const DEFAULT_ROWS_PER_PAGE = 100; +export const ROWS_PER_PAGE_OPTIONS = [10, 25, 50, DEFAULT_ROWS_PER_PAGE, 250, 500]; diff --git a/src/plugins/discover/common/index.ts b/src/plugins/discover/common/index.ts index b5f2238430d02..df0b64e5f102c 100644 --- a/src/plugins/discover/common/index.ts +++ b/src/plugins/discover/common/index.ts @@ -10,6 +10,7 @@ export const PLUGIN_ID = 'discover'; export const APP_ICON = 'discoverApp'; export const DEFAULT_COLUMNS_SETTING = 'defaultColumns'; export const SAMPLE_SIZE_SETTING = 'discover:sampleSize'; +export const SAMPLE_ROWS_PER_PAGE_SETTING = 'discover:sampleRowsPerPage'; export const SORT_DEFAULT_ORDER_SETTING = 'discover:sort:defaultOrder'; export const SEARCH_ON_PAGE_LOAD_SETTING = 'discover:searchOnPageLoad'; export const DOC_HIDE_TIME_COLUMN_SETTING = 'doc_table:hideTimeColumn'; diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts index d6b15da2e3275..3636c4a84f83f 100644 --- a/src/plugins/discover/public/__mocks__/services.ts +++ b/src/plugins/discover/public/__mocks__/services.ts @@ -15,6 +15,7 @@ import { DOC_HIDE_TIME_COLUMN_SETTING, MAX_DOC_FIELDS_DISPLAYED, SAMPLE_SIZE_SETTING, + SAMPLE_ROWS_PER_PAGE_SETTING, SORT_DEFAULT_ORDER_SETTING, HIDE_ANNOUNCEMENTS, } from '../../common'; @@ -67,6 +68,8 @@ export const discoverServiceMock = { return false; } else if (key === SAMPLE_SIZE_SETTING) { return 250; + } else if (key === SAMPLE_ROWS_PER_PAGE_SETTING) { + return 150; } else if (key === MAX_DOC_FIELDS_DISPLAYED) { return 50; } else if (key === HIDE_ANNOUNCEMENTS) { diff --git a/src/plugins/discover/public/__mocks__/ui_settings.ts b/src/plugins/discover/public/__mocks__/ui_settings.ts index 4a0515f7b7d00..7ef7ad3cf2c81 100644 --- a/src/plugins/discover/public/__mocks__/ui_settings.ts +++ b/src/plugins/discover/public/__mocks__/ui_settings.ts @@ -12,6 +12,7 @@ import { DEFAULT_COLUMNS_SETTING, DOC_TABLE_LEGACY, SAMPLE_SIZE_SETTING, + SAMPLE_ROWS_PER_PAGE_SETTING, SHOW_MULTIFIELDS, SEARCH_FIELDS_FROM_SOURCE, ROW_HEIGHT_OPTION, @@ -21,6 +22,8 @@ export const uiSettingsMock = { get: (key: string) => { if (key === SAMPLE_SIZE_SETTING) { return 10; + } else if (key === SAMPLE_ROWS_PER_PAGE_SETTING) { + return 100; } else if (key === DEFAULT_COLUMNS_SETTING) { return ['default_column']; } else if (key === DOC_TABLE_LEGACY) { diff --git a/src/plugins/discover/public/application/main/components/layout/__stories__/get_services.tsx b/src/plugins/discover/public/application/main/components/layout/__stories__/get_services.tsx index 9caffb1f5921b..a3bc71cf7f6d4 100644 --- a/src/plugins/discover/public/application/main/components/layout/__stories__/get_services.tsx +++ b/src/plugins/discover/public/application/main/components/layout/__stories__/get_services.tsx @@ -19,6 +19,7 @@ import { MAX_DOC_FIELDS_DISPLAYED, ROW_HEIGHT_OPTION, SAMPLE_SIZE_SETTING, + SAMPLE_ROWS_PER_PAGE_SETTING, SEARCH_FIELDS_FROM_SOURCE, SHOW_MULTIFIELDS, } from '../../../../../../common'; @@ -32,6 +33,8 @@ export const uiSettingsMock = { return 3; } else if (key === SAMPLE_SIZE_SETTING) { return 10; + } else if (key === SAMPLE_ROWS_PER_PAGE_SETTING) { + return 100; } else if (key === DEFAULT_COLUMNS_SETTING) { return ['default_column']; } else if (key === DOC_TABLE_LEGACY) { diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx index e7d94b9856fab..5bddb53a45f1f 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx @@ -86,8 +86,8 @@ function DiscoverDocumentsComponent({ const onResize = useCallback( (colSettings: { columnId: string; width: number }) => { - const grid = { ...state.grid } || {}; - const newColumns = { ...grid.columns } || {}; + const grid = { ...(state.grid || {}) }; + const newColumns = { ...(grid.columns || {}) }; newColumns[colSettings.columnId] = { width: colSettings.width, }; @@ -97,6 +97,13 @@ function DiscoverDocumentsComponent({ [stateContainer, state] ); + const onUpdateRowsPerPage = useCallback( + (rowsPerPage: number) => { + stateContainer.setAppState({ rowsPerPage }); + }, + [stateContainer] + ); + const onSort = useCallback( (sort: string[][]) => { stateContainer.setAppState({ sort }); @@ -190,6 +197,8 @@ function DiscoverDocumentsComponent({ useNewFieldsApi={useNewFieldsApi} rowHeightState={state.rowHeight} onUpdateRowHeight={onUpdateRowHeight} + rowsPerPageState={state.rowsPerPage} + onUpdateRowsPerPage={onUpdateRowsPerPage} onFieldEdited={onFieldEdited} /> diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx index ec1d9eef5fcc4..c949a715342f0 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx @@ -22,7 +22,13 @@ test('onSaveSearch', async () => { i18n: i18nServiceMock.create(), }, } as unknown as DiscoverServices; - const stateMock = {} as unknown as GetStateReturn; + const stateMock = { + appStateContainer: { + getState: () => ({ + rowsPerPage: 250, + }), + }, + } as unknown as GetStateReturn; await onSaveSearch({ indexPattern: indexPatternMock, diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 6263df7814e2b..11512fc542117 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -8,13 +8,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { SavedObjectSaveModal, showSaveModal } from '@kbn/saved-objects-plugin/public'; +import { SavedObjectSaveModal, showSaveModal, OnSaveProps } from '@kbn/saved-objects-plugin/public'; import { DataView } from '@kbn/data-views-plugin/public'; import { SavedSearch, SaveSavedSearchOptions } from '../../../../services/saved_searches'; import { DiscoverServices } from '../../../../build_services'; import { GetStateReturn } from '../../services/discover_state'; import { setBreadcrumbsTitle } from '../../../../utils/breadcrumbs'; import { persistSavedSearch } from '../../utils/persist_saved_search'; +import { DOC_TABLE_LEGACY } from '../../../../../common'; async function saveDataSource({ indexPattern, @@ -97,6 +98,7 @@ export async function onSaveSearch({ state: GetStateReturn; onClose?: () => void; }) { + const { uiSettings } = services; const onSave = async ({ newTitle, newCopyOnSave, @@ -111,8 +113,12 @@ export async function onSaveSearch({ onTitleDuplicate: () => void; }) => { const currentTitle = savedSearch.title; + const currentRowsPerPage = savedSearch.rowsPerPage; savedSearch.title = newTitle; savedSearch.description = newDescription; + savedSearch.rowsPerPage = uiSettings.get(DOC_TABLE_LEGACY) + ? currentRowsPerPage + : state.appStateContainer.getState().rowsPerPage; const saveOptions: SaveSavedSearchOptions = { onTitleDuplicate, copyOnSave: newCopyOnSave, @@ -129,6 +135,7 @@ export async function onSaveSearch({ // If the save wasn't successful, put the original values back. if (!response.id || response.error) { savedSearch.title = currentTitle; + savedSearch.rowsPerPage = currentRowsPerPage; } else { state.resetInitialAppState(); } @@ -136,17 +143,39 @@ export async function onSaveSearch({ }; const saveModal = ( - {})} + {})} + /> + ); + showSaveModal(saveModal, services.core.i18n.Context); +} + +const SaveSearchObjectModal: React.FC<{ + title: string; + showCopyOnSave: boolean; + description?: string; + onSave: (props: OnSaveProps & { newRowsPerPage?: number }) => void; + onClose: () => void; +}> = ({ title, description, showCopyOnSave, onSave, onClose }) => { + const onModalSave = (params: OnSaveProps) => { + onSave(params); + }; + + return ( + ); - showSaveModal(saveModal, services.core.i18n.Context); -} +}; diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index 213910bf37be2..6818ab3c12cde 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -102,7 +102,7 @@ export function DiscoverMainRoute(props: Props) { const ipList = ip.list as Array>; const indexPatternData = resolveIndexPattern(ip, searchSource, toastNotifications); - + await data.dataViews.refreshFields(indexPatternData); setIndexPatternList(ipList); return indexPatternData; diff --git a/src/plugins/discover/public/application/main/services/discover_state.ts b/src/plugins/discover/public/application/main/services/discover_state.ts index 86d279ec09c20..706068006464c 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.ts @@ -90,6 +90,10 @@ export interface AppState { * Document explorer row height option */ rowHeight?: number; + /** + * Number of rows in the grid per page + */ + rowsPerPage?: number; } export interface AppStateUrl extends Omit { diff --git a/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts b/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts index e76e40a45a316..b00d7720e38b2 100644 --- a/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts +++ b/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts @@ -55,4 +55,29 @@ describe('cleanupUrlState', () => { } as AppStateUrl; expect(cleanupUrlState(state)).toMatchInlineSnapshot(`Object {}`); }); + + test('should keep a valid rowsPerPage', async () => { + const state = { + rowsPerPage: 50, + } as AppStateUrl; + expect(cleanupUrlState(state)).toMatchInlineSnapshot(` + Object { + "rowsPerPage": 50, + } + `); + }); + + test('should remove a negative rowsPerPage', async () => { + const state = { + rowsPerPage: -50, + } as AppStateUrl; + expect(cleanupUrlState(state)).toMatchInlineSnapshot(`Object {}`); + }); + + test('should remove an invalid rowsPerPage', async () => { + const state = { + rowsPerPage: 'test', + } as unknown as AppStateUrl; + expect(cleanupUrlState(state)).toMatchInlineSnapshot(`Object {}`); + }); }); diff --git a/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts b/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts index 0148931f73c58..9abe8bbce4202 100644 --- a/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts +++ b/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts @@ -31,5 +31,14 @@ export function cleanupUrlState(appStateFromUrl: AppStateUrl): AppState { // This allows the sort prop to be overwritten with the default sorting delete appStateFromUrl.sort; } + + if ( + appStateFromUrl?.rowsPerPage && + !(typeof appStateFromUrl.rowsPerPage === 'number' && appStateFromUrl.rowsPerPage > 0) + ) { + // remove the param if it's invalid + delete appStateFromUrl.rowsPerPage; + } + return appStateFromUrl as AppState; } diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts index d6842846a5cf7..4ff418e64c41c 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts @@ -37,6 +37,7 @@ describe('getStateDefaults', () => { "interval": "auto", "query": undefined, "rowHeight": undefined, + "rowsPerPage": undefined, "savedQuery": undefined, "sort": Array [ Array [ @@ -70,6 +71,7 @@ describe('getStateDefaults', () => { "interval": "auto", "query": undefined, "rowHeight": undefined, + "rowsPerPage": undefined, "savedQuery": undefined, "sort": Array [], "viewMode": undefined, diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts index b75e3eb612cc4..4f9e764982732 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts @@ -51,7 +51,7 @@ export function getStateDefaults({ const columns = getDefaultColumns(savedSearch, config); const chartHidden = storage.get(CHART_HIDDEN_KEY); - const defaultState = { + const defaultState: AppState = { query, sort: !sort.length ? getDefaultSort( @@ -63,13 +63,14 @@ export function getStateDefaults({ columns, index: indexPattern?.id, interval: 'auto', - filters: cloneDeep(searchSource.getOwnField('filter')), + filters: cloneDeep(searchSource.getOwnField('filter')) as AppState['filters'], hideChart: typeof chartHidden === 'boolean' ? chartHidden : undefined, viewMode: undefined, hideAggregatedPreview: undefined, savedQuery: undefined, rowHeight: undefined, - } as AppState; + rowsPerPage: undefined, + }; if (savedSearch.grid) { defaultState.grid = savedSearch.grid; } @@ -82,10 +83,12 @@ export function getStateDefaults({ if (savedSearch.viewMode) { defaultState.viewMode = savedSearch.viewMode; } - if (savedSearch.hideAggregatedPreview) { defaultState.hideAggregatedPreview = savedSearch.hideAggregatedPreview; } + if (savedSearch.rowsPerPage) { + defaultState.rowsPerPage = savedSearch.rowsPerPage; + } return defaultState; } diff --git a/src/plugins/discover/public/components/discover_grid/constants.ts b/src/plugins/discover/public/components/discover_grid/constants.ts index f2f5a8e8bebc7..8f7c40e33b957 100644 --- a/src/plugins/discover/public/components/discover_grid/constants.ts +++ b/src/plugins/discover/public/components/discover_grid/constants.ts @@ -17,8 +17,6 @@ export const GRID_STYLE = { rowHover: 'none', } as EuiDataGridStyle; -export const pageSizeArr = [25, 50, 100, 250]; -export const defaultPageSize = 100; export const defaultTimeColumnWidth = 210; export const toolbarVisibility = { showColumnSelector: { diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx index 857910e11314e..803ad6de49a22 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -34,12 +34,7 @@ import { getLeadControlColumns, getVisibleColumns, } from './discover_grid_columns'; -import { - defaultPageSize, - GRID_STYLE, - pageSizeArr, - toolbarVisibility as toolbarVisibilityDefaults, -} from './constants'; +import { GRID_STYLE, toolbarVisibility as toolbarVisibilityDefaults } from './constants'; import { getDisplayedColumns } from '../../utils/columns'; import { DOC_HIDE_TIME_COLUMN_SETTING, @@ -54,6 +49,7 @@ import type { DataTableRecord, ValueToStringConverter } from '../../types'; import { useRowHeightsOptions } from '../../hooks/use_row_heights_options'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { convertValueToString } from '../../utils/convert_value_to_string'; +import { getRowsPerPageOptions, getDefaultRowsPerPage } from '../../utils/rows_per_page'; interface SortObj { id: string; @@ -166,6 +162,14 @@ export interface DiscoverGridProps { * Update row height state */ onUpdateRowHeight?: (rowHeight: number) => void; + /** + * Current state value for rowsPerPage + */ + rowsPerPageState?: number; + /** + * Update rows per page state + */ + onUpdateRowsPerPage?: (rowsPerPage: number) => void; /** * Callback to execute on edit runtime field */ @@ -203,6 +207,8 @@ export const DiscoverGrid = ({ className, rowHeightState, onUpdateRowHeight, + rowsPerPageState, + onUpdateRowsPerPage, onFieldEdited, }: DiscoverGridProps) => { const dataGridRef = useRef(null); @@ -256,17 +262,28 @@ export const DiscoverGrid = ({ /** * Pagination */ - const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: defaultPageSize }); + const defaultRowsPerPage = useMemo( + () => getDefaultRowsPerPage(services.uiSettings), + [services.uiSettings] + ); + const currentPageSize = + typeof rowsPerPageState === 'number' && rowsPerPageState > 0 + ? rowsPerPageState + : defaultRowsPerPage; + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: currentPageSize, + }); const rowCount = useMemo(() => (displayedRows ? displayedRows.length : 0), [displayedRows]); const pageCount = useMemo( () => Math.ceil(rowCount / pagination.pageSize), [rowCount, pagination] ); - const isOnLastPage = pagination.pageIndex === pageCount - 1; const paginationObj = useMemo(() => { - const onChangeItemsPerPage = (pageSize: number) => - setPagination((paginationData) => ({ ...paginationData, pageSize })); + const onChangeItemsPerPage = (pageSize: number) => { + onUpdateRowsPerPage?.(pageSize); + }; const onChangePage = (pageIndex: number) => setPagination((paginationData) => ({ ...paginationData, pageIndex })); @@ -277,10 +294,20 @@ export const DiscoverGrid = ({ onChangePage, pageIndex: pagination.pageIndex > pageCount - 1 ? 0 : pagination.pageIndex, pageSize: pagination.pageSize, - pageSizeOptions: pageSizeArr, + pageSizeOptions: getRowsPerPageOptions(pagination.pageSize), } : undefined; - }, [pagination, pageCount, isPaginationEnabled]); + }, [pagination, pageCount, isPaginationEnabled, onUpdateRowsPerPage]); + + const isOnLastPage = paginationObj ? paginationObj.pageIndex === pageCount - 1 : false; + + useEffect(() => { + setPagination((paginationData) => + paginationData.pageSize === currentPageSize + ? paginationData + : { ...paginationData, pageSize: currentPageSize } + ); + }, [currentPageSize, setPagination]); /** * Sorting diff --git a/src/plugins/discover/public/components/doc_table/components/pager/tool_bar_pagination.tsx b/src/plugins/discover/public/components/doc_table/components/pager/tool_bar_pagination.tsx index 8c2e1892d8fc7..18ba8817391ac 100644 --- a/src/plugins/discover/public/components/doc_table/components/pager/tool_bar_pagination.tsx +++ b/src/plugins/discover/public/components/doc_table/components/pager/tool_bar_pagination.tsx @@ -19,6 +19,9 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { euiLightVars } from '@kbn/ui-theme'; +import { getRowsPerPageOptions } from '../../../../utils/rows_per_page'; + +export const MAX_ROWS_PER_PAGE_OPTION = 100; interface ToolBarPaginationProps { pageSize: number; @@ -53,18 +56,20 @@ export const ToolBarPagination = ({ return size === pageSize ? 'check' : 'empty'; }; - const rowsPerPageOptions = [25, 50, 100].map((cur) => ( - { - closePopover(); - onPageSizeChange(cur); - }} - > - {cur} {rowsWord} - - )); + const rowsPerPageOptions = getRowsPerPageOptions(pageSize) + .filter((option) => option <= MAX_ROWS_PER_PAGE_OPTION) // legacy table is not optimized well for rendering more rows at once + .map((cur) => ( + { + closePopover(); + onPageSizeChange(cur); + }} + > + {cur} {rowsWord} + + )); return ( diff --git a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx b/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx index f44d652595ac9..852c962264b89 100644 --- a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx +++ b/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx @@ -16,6 +16,8 @@ export function DiscoverDocTableEmbeddable(renderProps: DocTableEmbeddableProps) void; } const DocTableWrapperMemoized = memo(DocTableWrapper); export const DocTableEmbeddable = (props: DocTableEmbeddableProps) => { const services = useDiscoverServices(); + const onUpdateRowsPerPage = props.onUpdateRowsPerPage; const tableWrapperRef = useRef(null); const { curPageIndex, @@ -35,7 +41,10 @@ export const DocTableEmbeddable = (props: DocTableEmbeddableProps) => { changePageIndex, changePageSize, } = usePager({ - initialPageSize: 50, + initialPageSize: + typeof props.rowsPerPageState === 'number' && props.rowsPerPageState > 0 + ? Math.min(props.rowsPerPageState, MAX_ROWS_PER_PAGE_OPTION) + : 50, totalItems: props.rows.length, }); const showPagination = totalPages !== 0; @@ -63,8 +72,9 @@ export const DocTableEmbeddable = (props: DocTableEmbeddableProps) => { (size: number) => { scrollTop(); changePageSize(size); + onUpdateRowsPerPage?.(size); // to update `rowsPerPage` input param for the embeddable }, - [changePageSize, scrollTop] + [changePageSize, scrollTop, onUpdateRowsPerPage] ); const shouldShowLimitedResultsWarning = useMemo( diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx index 43b53d03e342a..999dfbd383570 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx @@ -65,6 +65,7 @@ export type SearchProps = Partial & totalHitCount?: number; onMoveColumn?: (column: string, index: number) => void; onUpdateRowHeight?: (rowHeight?: number) => void; + onUpdateRowsPerPage?: (rowsPerPage?: number) => void; }; interface SearchEmbeddableConfig { @@ -139,7 +140,12 @@ export class SavedSearchEmbeddable if (titleChanged) { this.panelTitle = this.output.title || ''; } - if (this.searchProps && (titleChanged || this.isFetchRequired(this.searchProps))) { + if ( + this.searchProps && + (titleChanged || + this.isFetchRequired(this.searchProps) || + this.isInputChangedAndRerenderRequired(this.searchProps)) + ) { this.pushContainerStateParamsToProps(this.searchProps); } }); @@ -302,7 +308,7 @@ export class SavedSearchEmbeddable }); this.updateInput({ sort: sortOrderArr }); }, - sampleSize: 500, + sampleSize: this.services.uiSettings.get(SAMPLE_SIZE_SETTING), onFilter: async (field, value, operator) => { let filters = generateFilters( this.filterManager, @@ -329,6 +335,10 @@ export class SavedSearchEmbeddable onUpdateRowHeight: (rowHeight) => { this.updateInput({ rowHeight }); }, + rowsPerPageState: this.input.rowsPerPage || this.savedSearch.rowsPerPage, + onUpdateRowsPerPage: (rowsPerPage) => { + this.updateInput({ rowsPerPage }); + }, }; const timeRangeSearchSource = searchSource.create(); @@ -364,6 +374,13 @@ export class SavedSearchEmbeddable ); } + private isInputChangedAndRerenderRequired(searchProps?: SearchProps) { + if (!searchProps) { + return false; + } + return this.input.rowsPerPage !== searchProps.rowsPerPageState; + } + private async pushContainerStateParamsToProps( searchProps: SearchProps, { forceFetch = false }: { forceFetch: boolean } = { forceFetch: false } @@ -384,6 +401,7 @@ export class SavedSearchEmbeddable searchProps.sort = this.input.sort || savedSearchSort; searchProps.sharedItemTitle = this.panelTitle; searchProps.rowHeightState = this.input.rowHeight || this.savedSearch.rowHeight; + searchProps.rowsPerPageState = this.input.rowsPerPage || this.savedSearch.rowsPerPage; if (forceFetch || isFetchRequired) { this.filtersSearchSource.setField('filter', this.input.filters); this.filtersSearchSource.setField('query', this.input.query); diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.scss b/src/plugins/discover/public/embeddable/saved_search_grid.scss new file mode 100644 index 0000000000000..1b1046485596b --- /dev/null +++ b/src/plugins/discover/public/embeddable/saved_search_grid.scss @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * 1. Fixes fullscreen mode for saved searches on Dashboard. Otherwise, sibling grids can obscure the grid in fullscreen mode. + * "euiDataGrid__restrictBody" is set to body element when a grid is in fullscreen + * https://github.com/elastic/kibana/issues/134032 + */ +.euiDataGrid__restrictBody .embPanel .embPanel__content { + z-index: unset !important; /* 1 */ +} diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.tsx b/src/plugins/discover/public/embeddable/saved_search_grid.tsx index 7c567dc75dfa3..dbfb64775ed2e 100644 --- a/src/plugins/discover/public/embeddable/saved_search_grid.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_grid.tsx @@ -10,6 +10,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { DataTableRecord } from '../types'; import { DiscoverGrid, DiscoverGridProps } from '../components/discover_grid/discover_grid'; import { TotalDocuments } from '../application/main/components/total_documents/total_documents'; +import './saved_search_grid.scss'; export interface DiscoverGridEmbeddableProps extends DiscoverGridProps { totalHitCount: number; diff --git a/src/plugins/discover/public/embeddable/types.ts b/src/plugins/discover/public/embeddable/types.ts index 5b09082729049..a72d7d86f6801 100644 --- a/src/plugins/discover/public/embeddable/types.ts +++ b/src/plugins/discover/public/embeddable/types.ts @@ -25,6 +25,7 @@ export interface SearchInput extends EmbeddableInput { columns?: string[]; sort?: SortOrder[]; rowHeight?: number; + rowsPerPage?: number; } export interface SearchOutput extends EmbeddableOutput { diff --git a/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts b/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts index 3e103d6ea3699..f732dbb9469a3 100644 --- a/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts +++ b/src/plugins/discover/public/services/saved_searches/get_saved_searches.test.ts @@ -105,6 +105,7 @@ describe('getSavedSearch', () => { "hideChart": false, "id": "ccf1af80-2297-11ec-86e0-1155ffb9c7a7", "rowHeight": undefined, + "rowsPerPage": undefined, "searchSource": Object { "create": [MockFunction], "createChild": [MockFunction], @@ -112,6 +113,7 @@ describe('getSavedSearch', () => { "destroy": [MockFunction], "fetch": [MockFunction], "fetch$": [MockFunction], + "getActiveIndexFilter": [MockFunction], "getField": [MockFunction], "getFields": [MockFunction], "getId": [MockFunction], @@ -121,6 +123,7 @@ describe('getSavedSearch', () => { "getSerializedFields": [MockFunction], "history": Array [], "onRequestStart": [MockFunction], + "parseActiveIndexPatternFromQueryString": [MockFunction], "removeField": [MockFunction], "serialize": [MockFunction], "setField": [MockFunction], diff --git a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts index f0958737d3b79..74be73b609a3b 100644 --- a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts +++ b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.test.ts @@ -42,6 +42,7 @@ describe('saved_searches_utils', () => { "hideChart": true, "id": "id", "rowHeight": undefined, + "rowsPerPage": undefined, "searchSource": SearchSource { "dependencies": Object { "aggs": Object { @@ -119,6 +120,7 @@ describe('saved_searches_utils', () => { "searchSourceJSON": "{}", }, "rowHeight": undefined, + "rowsPerPage": undefined, "sort": Array [ Array [ "a", diff --git a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts index 26b3c0b7cf9b5..d07e418c3aa10 100644 --- a/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts +++ b/src/plugins/discover/public/services/saved_searches/saved_searches_utils.ts @@ -45,6 +45,7 @@ export const fromSavedSearchAttributes = ( viewMode: attributes.viewMode, hideAggregatedPreview: attributes.hideAggregatedPreview, rowHeight: attributes.rowHeight, + rowsPerPage: attributes.rowsPerPage, }); export const toSavedSearchAttributes = ( @@ -61,4 +62,5 @@ export const toSavedSearchAttributes = ( viewMode: savedSearch.viewMode, hideAggregatedPreview: savedSearch.hideAggregatedPreview, rowHeight: savedSearch.rowHeight, + rowsPerPage: savedSearch.rowsPerPage, }); diff --git a/src/plugins/discover/public/services/saved_searches/types.ts b/src/plugins/discover/public/services/saved_searches/types.ts index aba95f85afd11..1e81c9e88c8a3 100644 --- a/src/plugins/discover/public/services/saved_searches/types.ts +++ b/src/plugins/discover/public/services/saved_searches/types.ts @@ -27,6 +27,7 @@ export interface SavedSearchAttributes { viewMode?: VIEW_MODE; hideAggregatedPreview?: boolean; rowHeight?: number; + rowsPerPage?: number; } /** @internal **/ @@ -53,4 +54,5 @@ export interface SavedSearch { viewMode?: VIEW_MODE; hideAggregatedPreview?: boolean; rowHeight?: number; + rowsPerPage?: number; } diff --git a/src/plugins/discover/public/utils/rows_per_page.test.ts b/src/plugins/discover/public/utils/rows_per_page.test.ts new file mode 100644 index 0000000000000..257e2259492f2 --- /dev/null +++ b/src/plugins/discover/public/utils/rows_per_page.test.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { discoverServiceMock } from '../__mocks__/services'; +import { SAMPLE_ROWS_PER_PAGE_SETTING } from '../../common'; +import { getRowsPerPageOptions, getDefaultRowsPerPage } from './rows_per_page'; + +const SORTED_OPTIONS = [10, 25, 50, 100, 250, 500]; + +describe('rows per page', () => { + describe('getRowsPerPageOptions', () => { + it('should return default options if not provided', () => { + expect(getRowsPerPageOptions()).toEqual(SORTED_OPTIONS); + }); + + it('should return default options if current value is one of them', () => { + expect(getRowsPerPageOptions(250)).toEqual(SORTED_OPTIONS); + }); + + it('should return extended options if current value is not one of them', () => { + expect(getRowsPerPageOptions(350)).toEqual([10, 25, 50, 100, 250, 350, 500]); + }); + }); + + describe('getDefaultRowsPerPage', () => { + it('should return a value from settings', () => { + expect(getDefaultRowsPerPage(discoverServiceMock.uiSettings)).toEqual(150); + expect(discoverServiceMock.uiSettings.get).toHaveBeenCalledWith(SAMPLE_ROWS_PER_PAGE_SETTING); + }); + + it('should return a default value', () => { + expect(getDefaultRowsPerPage({ ...discoverServiceMock.uiSettings, get: jest.fn() })).toEqual( + 100 + ); + }); + }); +}); diff --git a/src/plugins/discover/public/utils/rows_per_page.ts b/src/plugins/discover/public/utils/rows_per_page.ts new file mode 100644 index 0000000000000..fb087dc1d0aec --- /dev/null +++ b/src/plugins/discover/public/utils/rows_per_page.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { sortBy, uniq } from 'lodash'; +import { DEFAULT_ROWS_PER_PAGE, ROWS_PER_PAGE_OPTIONS } from '../../common/constants'; +import { SAMPLE_ROWS_PER_PAGE_SETTING } from '../../common'; +import { DiscoverServices } from '../build_services'; + +export const getRowsPerPageOptions = (currentRowsPerPage?: number): number[] => { + return sortBy( + uniq( + typeof currentRowsPerPage === 'number' && currentRowsPerPage > 0 + ? [...ROWS_PER_PAGE_OPTIONS, currentRowsPerPage] + : ROWS_PER_PAGE_OPTIONS + ) + ); +}; + +export const getDefaultRowsPerPage = (uiSettings: DiscoverServices['uiSettings']): number => { + return parseInt(uiSettings.get(SAMPLE_ROWS_PER_PAGE_SETTING), 10) || DEFAULT_ROWS_PER_PAGE; +}; diff --git a/src/plugins/discover/server/saved_objects/search.ts b/src/plugins/discover/server/saved_objects/search.ts index f30fa932aa133..c7eba9dfc0b14 100644 --- a/src/plugins/discover/server/saved_objects/search.ts +++ b/src/plugins/discover/server/saved_objects/search.ts @@ -50,6 +50,7 @@ export function getSavedSearchObjectType( grid: { type: 'object', enabled: false }, version: { type: 'integer' }, rowHeight: { type: 'text' }, + rowsPerPage: { type: 'integer', index: false, doc_values: false }, }, }, migrations: () => getAllMigrations(getSearchSourceMigrations()), diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index 46e2d4d9969c6..4f9f8f05b7803 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -14,6 +14,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { DEFAULT_COLUMNS_SETTING, SAMPLE_SIZE_SETTING, + SAMPLE_ROWS_PER_PAGE_SETTING, SORT_DEFAULT_ORDER_SETTING, SEARCH_ON_PAGE_LOAD_SETTING, DOC_HIDE_TIME_COLUMN_SETTING, @@ -30,6 +31,7 @@ import { SHOW_FIELD_STATISTICS, ROW_HEIGHT_OPTION, } from '../common'; +import { DEFAULT_ROWS_PER_PAGE, ROWS_PER_PAGE_OPTIONS } from '../common/constants'; export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record = ( docLinks: DocLinksServiceSetup @@ -59,11 +61,24 @@ export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record { + const darkMode = ['v8.dark', 'v7.dark'].includes(globals.euiTheme); + + return ( + + {story()} + + ); +}; diff --git a/src/plugins/embeddable/.storybook/main.ts b/src/plugins/embeddable/.storybook/main.ts new file mode 100644 index 0000000000000..2dc1218f070ab --- /dev/null +++ b/src/plugins/embeddable/.storybook/main.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +// eslint-disable-next-line import/no-default-export +export { defaultConfig as default } from '@kbn/storybook'; diff --git a/src/plugins/embeddable/.storybook/manager.ts b/src/plugins/embeddable/.storybook/manager.ts new file mode 100644 index 0000000000000..ce0e05bdcd375 --- /dev/null +++ b/src/plugins/embeddable/.storybook/manager.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { addons } from '@storybook/addons'; +import { create } from '@storybook/theming'; +import { PANEL_ID } from '@storybook/addon-actions'; + +addons.setConfig({ + theme: create({ + base: 'light', + brandTitle: 'Kibana Embeddable Storybook', + brandUrl: 'https://github.com/elastic/kibana/tree/main/src/plugins/embeddable', + }), + showPanel: true.valueOf, + selectedPanel: PANEL_ID, +}); diff --git a/src/plugins/embeddable/.storybook/preview.tsx b/src/plugins/embeddable/.storybook/preview.tsx new file mode 100644 index 0000000000000..e71f4e08b2027 --- /dev/null +++ b/src/plugins/embeddable/.storybook/preview.tsx @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { addDecorator } from '@storybook/react'; +import { Title, Subtitle, Description, Primary, Stories } from '@storybook/addon-docs/blocks'; + +import { servicesContextDecorator } from './decorator'; + +addDecorator(servicesContextDecorator); + +export const parameters = { + docs: { + page: () => ( + <> + + <Subtitle /> + <Description /> + <Primary /> + <Stories /> + </> + ), + }, +}; diff --git a/src/plugins/embeddable/public/__stories__/embeddable_panel.stories.tsx b/src/plugins/embeddable/public/__stories__/embeddable_panel.stories.tsx new file mode 100644 index 0000000000000..1f15b942fb589 --- /dev/null +++ b/src/plugins/embeddable/public/__stories__/embeddable_panel.stories.tsx @@ -0,0 +1,271 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { + forwardRef, + useCallback, + useContext, + useEffect, + useImperativeHandle, + useMemo, + useRef, +} from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; +import { ReplaySubject } from 'rxjs'; +import { ThemeContext } from '@emotion/react'; +import { DecoratorFn, Meta } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; +import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { CoreTheme } from '@kbn/core-theme-browser'; +import type { Action } from '@kbn/ui-actions-plugin/public'; + +import { CONTEXT_MENU_TRIGGER, EmbeddablePanel, PANEL_BADGE_TRIGGER, ViewMode } from '..'; +import { HelloWorldEmbeddable } from './hello_world_embeddable'; + +const layout: DecoratorFn = (story) => { + return ( + <EuiFlexGroup direction="row" justifyContent="center"> + <EuiFlexItem grow={false} style={{ height: 300, width: 500 }}> + {story()} + </EuiFlexItem> + </EuiFlexGroup> + ); +}; + +export default { + title: 'components/EmbeddablePanel', + argTypes: { + hideHeader: { + name: 'Hide Header', + control: { type: 'boolean' }, + }, + loading: { + name: 'Loading', + control: { type: 'boolean' }, + }, + showShadow: { + name: 'Show Shadow', + control: { type: 'boolean' }, + }, + title: { + name: 'Title', + control: { type: 'text' }, + }, + viewMode: { + name: 'View Mode', + control: { type: 'boolean' }, + }, + }, + decorators: [layout], +} as Meta; + +interface HelloWorldEmbeddablePanelProps { + getActions?(type: string): Promise<Action[]>; + hideHeader: boolean; + loading: boolean; + showShadow: boolean; + title: string; + viewMode: boolean; +} + +const HelloWorldEmbeddablePanel = forwardRef< + { embeddable: HelloWorldEmbeddable }, + HelloWorldEmbeddablePanelProps +>( + ( + { + getActions, + hideHeader, + loading, + showShadow, + title, + viewMode, + }: HelloWorldEmbeddablePanelProps, + ref + ) => { + const embeddable = useMemo(() => new HelloWorldEmbeddable({ id: `${Math.random()}` }, {}), []); + const theme$ = useMemo(() => new ReplaySubject<CoreTheme>(1), []); + const theme = useContext(ThemeContext) as CoreTheme; + + useEffect(() => theme$.next(theme), [theme$, theme]); + useEffect( + () => + embeddable.updateInput({ + title, + viewMode: viewMode ? ViewMode.VIEW : ViewMode.EDIT, + lastReloadRequestTime: new Date().getMilliseconds(), + }), + [embeddable, title, viewMode] + ); + useEffect( + () => + embeddable.updateOutput({ + loading, + }), + [embeddable, loading] + ); + useImperativeHandle(ref, () => ({ embeddable })); + + return ( + <EmbeddablePanel + embeddable={embeddable} + getActions={getActions} + hideHeader={hideHeader} + showShadow={showShadow} + theme={{ theme$ }} + /> + ); + } +); + +export const Default = HelloWorldEmbeddablePanel as Meta<HelloWorldEmbeddablePanelProps>; + +Default.args = { + hideHeader: false, + loading: false, + showShadow: true, + title: 'Hello World', + viewMode: true, +}; + +interface DefaultWithBadgesProps extends HelloWorldEmbeddablePanelProps { + badges: string[]; +} + +export function DefaultWithBadges({ badges, ...props }: DefaultWithBadgesProps) { + const getActions = useCallback( + async (type: string) => { + switch (type) { + case PANEL_BADGE_TRIGGER: + return ( + badges?.map<Action>((badge, id) => ({ + execute: async (...args) => action(`onClick(${badge})`)(...args), + getDisplayName: () => badge, + getIconType: () => ['help', 'search', undefined][id % 3], + id: `${id}`, + isCompatible: async () => true, + type: '', + })) ?? [] + ); + default: + return []; + } + }, + [badges] + ); + const ref = useRef<React.ComponentRef<typeof HelloWorldEmbeddablePanel>>(null); + + useEffect( + () => + ref.current?.embeddable.updateInput({ lastReloadRequestTime: new Date().getMilliseconds() }), + [getActions] + ); + + return <HelloWorldEmbeddablePanel ref={ref} {...props} getActions={getActions} />; +} + +DefaultWithBadges.args = { + ...Default.args, + badges: ['Help', 'Search', 'Something'], +}; + +DefaultWithBadges.argTypes = { + badges: { name: 'Badges' }, +}; + +interface DefaultWithContextMenuProps extends HelloWorldEmbeddablePanelProps { + items: string[]; +} + +export function DefaultWithContextMenu({ items, ...props }: DefaultWithContextMenuProps) { + const getActions = useCallback( + async (type: string) => { + switch (type) { + case CONTEXT_MENU_TRIGGER: + return ( + items?.map<Action>((item, id) => ({ + execute: async (...args) => action(`onClick(${item})`)(...args), + getDisplayName: () => item, + getIconType: () => ['help', 'search', undefined][id % 3], + id: `${id}`, + isCompatible: async () => true, + type: '', + })) ?? [] + ); + default: + return []; + } + }, + [items] + ); + const ref = useRef<React.ComponentRef<typeof HelloWorldEmbeddablePanel>>(null); + + useEffect( + () => + ref.current?.embeddable.updateInput({ lastReloadRequestTime: new Date().getMilliseconds() }), + [getActions] + ); + + return <HelloWorldEmbeddablePanel ref={ref} {...props} getActions={getActions} />; +} + +DefaultWithContextMenu.args = { + ...Default.args, + items: ['Help', 'Search', 'Something'], +}; + +DefaultWithContextMenu.argTypes = { + items: { name: 'Context Menu Items' }, +}; + +interface DefaultWithErrorProps extends HelloWorldEmbeddablePanelProps { + message: string; +} + +export function DefaultWithError({ message, ...props }: DefaultWithErrorProps) { + const ref = useRef<React.ComponentRef<typeof HelloWorldEmbeddablePanel>>(null); + + useEffect(() => ref.current?.embeddable.updateOutput({ error: new Error(message) }), [message]); + + return <HelloWorldEmbeddablePanel ref={ref} {...props} />; +} + +DefaultWithError.args = { + ...Default.args, + message: 'Something went wrong', +}; + +DefaultWithError.argTypes = { + message: { name: 'Message', control: { type: 'text' } }, +}; + +export function DefaultWithCustomError({ message, ...props }: DefaultWithErrorProps) { + const ref = useRef<React.ComponentRef<typeof HelloWorldEmbeddablePanel>>(null); + + useEffect( + () => + ref.current?.embeddable.setErrorRenderer((node, error) => { + render(<EuiEmptyPrompt iconColor="warning" iconType="bug" body={error.message} />, node); + + return () => unmountComponentAtNode(node); + }), + [] + ); + useEffect(() => ref.current?.embeddable.updateOutput({ error: new Error(message) }), [message]); + + return <HelloWorldEmbeddablePanel ref={ref} {...props} />; +} + +DefaultWithCustomError.args = { + ...Default.args, + message: 'Something went wrong', +}; + +DefaultWithCustomError.argTypes = { + message: { name: 'Message', control: { type: 'text' } }, +}; diff --git a/src/plugins/embeddable/public/__stories__/embeddable_root.stories.tsx b/src/plugins/embeddable/public/__stories__/embeddable_root.stories.tsx new file mode 100644 index 0000000000000..e8ccc0edd66a2 --- /dev/null +++ b/src/plugins/embeddable/public/__stories__/embeddable_root.stories.tsx @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useMemo } from 'react'; +import { DecoratorFn, Meta } from '@storybook/react'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; + +import { EmbeddableInput, EmbeddableRoot } from '..'; +import { HelloWorldEmbeddable } from './hello_world_embeddable'; + +const layout: DecoratorFn = (story) => { + return ( + <EuiFlexGroup direction="row" justifyContent="center"> + <EuiFlexItem grow={false} style={{ height: 300, width: 500 }}> + {story()} + </EuiFlexItem> + </EuiFlexGroup> + ); +}; + +export default { + title: 'components/EmbeddableRoot', + argTypes: { + loading: { + name: 'Loading', + control: { type: 'boolean' }, + }, + title: { + name: 'Title', + control: { type: 'text' }, + }, + }, + decorators: [layout], +} as Meta; + +interface DefaultProps { + error?: string; + loading?: boolean; + title: string; +} + +export function Default({ title, ...props }: DefaultProps) { + const id = useMemo(() => `${Math.random()}`, []); + const input = useMemo<EmbeddableInput>( + () => ({ + id, + title, + lastReloadRequestTime: new Date().getMilliseconds(), + }), + [id, title] + ); + // eslint-disable-next-line react-hooks/exhaustive-deps + const embeddable = useMemo(() => new HelloWorldEmbeddable(input, {}), []); + + return <EmbeddableRoot {...props} embeddable={embeddable} input={input} />; +} + +Default.args = { + title: 'Hello World', + loading: false, +}; + +export const DefaultWithError = Default as Meta<DefaultProps>; + +DefaultWithError.args = { + ...Default.args, + error: 'Something went wrong', +}; + +DefaultWithError.argTypes = { + error: { name: 'Error', control: { type: 'text' } }, +}; diff --git a/src/plugins/embeddable/public/__stories__/error_embeddable.stories.tsx b/src/plugins/embeddable/public/__stories__/error_embeddable.stories.tsx new file mode 100644 index 0000000000000..ad65b2412c4c4 --- /dev/null +++ b/src/plugins/embeddable/public/__stories__/error_embeddable.stories.tsx @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useContext, useEffect, useMemo, useRef } from 'react'; +import { filter, ReplaySubject } from 'rxjs'; +import { ThemeContext } from '@emotion/react'; +import { Meta } from '@storybook/react'; +import { CoreTheme } from '@kbn/core-theme-browser'; + +import { ErrorEmbeddable } from '..'; +import { setTheme } from '../services'; + +export default { + title: 'components/ErrorEmbeddable', + argTypes: { + message: { + name: 'Message', + control: { type: 'text' }, + }, + }, +} as Meta; + +interface ErrorEmbeddableWrapperProps { + compact?: boolean; + message: string; +} + +function ErrorEmbeddableWrapper({ compact, message }: ErrorEmbeddableWrapperProps) { + const embeddable = useMemo( + () => new ErrorEmbeddable(message, { id: `${Math.random()}` }, undefined, compact), + [compact, message] + ); + const root = useRef<HTMLDivElement>(null); + const theme$ = useMemo(() => new ReplaySubject<CoreTheme>(1), []); + const theme = useContext(ThemeContext) as CoreTheme; + + useEffect(() => setTheme({ theme$: theme$.pipe(filter(Boolean)) }), [theme$]); + useEffect(() => theme$.next(theme), [theme$, theme]); + useEffect(() => { + if (!root.current) { + return; + } + + embeddable.render(root.current); + + return () => embeddable.destroy(); + }, [embeddable]); + + return <div ref={root} />; +} + +export const Default = ErrorEmbeddableWrapper as Meta<ErrorEmbeddableWrapperProps>; + +Default.args = { + message: 'Something went wrong', +}; + +export const DefaultCompact = ((props: ErrorEmbeddableWrapperProps) => ( + <ErrorEmbeddableWrapper {...props} compact /> +)) as Meta<ErrorEmbeddableWrapperProps>; + +DefaultCompact.args = { ...Default.args }; diff --git a/src/plugins/embeddable/public/__stories__/hello_world_embeddable.tsx b/src/plugins/embeddable/public/__stories__/hello_world_embeddable.tsx new file mode 100644 index 0000000000000..2ea923704be77 --- /dev/null +++ b/src/plugins/embeddable/public/__stories__/hello_world_embeddable.tsx @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { render } from 'react-dom'; +import { EuiEmptyPrompt } from '@elastic/eui'; +import { Embeddable, IEmbeddable } from '..'; + +export class HelloWorldEmbeddable extends Embeddable { + readonly type = 'hello-world'; + + renderError: IEmbeddable['renderError']; + + reload() {} + + render(node: HTMLElement) { + render(<EuiEmptyPrompt body={this.getTitle()} />, node); + + this.reload = this.render.bind(this, node); + } + + setErrorRenderer(renderer: IEmbeddable['renderError']) { + this.renderError = renderer; + } + + updateOutput(...args: Parameters<Embeddable['updateOutput']>): void { + return super.updateOutput(...args); + } +} diff --git a/src/plugins/embeddable/public/lib/panel/_embeddable_panel.scss b/src/plugins/embeddable/public/lib/panel/_embeddable_panel.scss index b9c6e92075d02..9305927a04173 100644 --- a/src/plugins/embeddable/public/lib/panel/_embeddable_panel.scss +++ b/src/plugins/embeddable/public/lib/panel/_embeddable_panel.scss @@ -85,7 +85,9 @@ right: 0; top: 0; left: 0; - z-index: $euiZLevel1; + * { + z-index: $euiZLevel1; // apply high z-index to all children + } } // OPTIONS MENU diff --git a/src/plugins/embeddable/public/lib/panel/embeddable_panel.tsx b/src/plugins/embeddable/public/lib/panel/embeddable_panel.tsx index 52af88a0a505e..6456ba1999566 100644 --- a/src/plugins/embeddable/public/lib/panel/embeddable_panel.tsx +++ b/src/plugins/embeddable/public/lib/panel/embeddable_panel.tsx @@ -73,7 +73,7 @@ interface Props { */ index?: number; - getActions: UiActionsService['getTriggerCompatibleActions']; + getActions?: UiActionsService['getTriggerCompatibleActions']; getEmbeddableFactory?: EmbeddableStart['getEmbeddableFactory']; getAllEmbeddableFactories?: EmbeddableStart['getEmbeddableFactories']; overlays?: CoreStart['overlays']; @@ -168,9 +168,10 @@ export class EmbeddablePanel extends React.Component<Props, State> { if (this.props.showBadges === false) { return; } - let badges = await this.props.getActions(PANEL_BADGE_TRIGGER, { - embeddable: this.props.embeddable, - }); + let badges = + (await this.props.getActions?.(PANEL_BADGE_TRIGGER, { + embeddable: this.props.embeddable, + })) ?? []; const { disabledActions } = this.props.embeddable.getInput(); if (disabledActions) { @@ -191,9 +192,10 @@ export class EmbeddablePanel extends React.Component<Props, State> { if (this.props.showNotifications === false) { return; } - let notifications = await this.props.getActions(PANEL_NOTIFICATION_TRIGGER, { - embeddable: this.props.embeddable, - }); + let notifications = + (await this.props.getActions?.(PANEL_NOTIFICATION_TRIGGER, { + embeddable: this.props.embeddable, + })) ?? []; const { disabledActions } = this.props.embeddable.getInput(); if (disabledActions) { @@ -430,9 +432,10 @@ export class EmbeddablePanel extends React.Component<Props, State> { }; private getActionContextMenuPanel = async () => { - let regularActions = await this.props.getActions(CONTEXT_MENU_TRIGGER, { - embeddable: this.props.embeddable, - }); + let regularActions = + (await this.props.getActions?.(CONTEXT_MENU_TRIGGER, { + embeddable: this.props.embeddable, + })) ?? []; const { disabledActions } = this.props.embeddable.getInput(); if (disabledActions) { diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx index 667230807ddfb..d3f99f68fad01 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx @@ -154,7 +154,7 @@ export function PanelHeader({ if (!showPanelBar) { return ( - <div data-test-subj="dashboardPanelTitle__wrapper" className={classes}> + <div className={classes}> <PanelOptionsMenu getActionContextMenuPanel={getActionContextMenuPanel} isViewMode={isViewMode} @@ -214,25 +214,23 @@ export function PanelHeader({ }; return ( - <span data-test-subj="dashboardPanelTitle__wrapper"> - <figcaption - className={classes} - data-test-subj={`embeddablePanelHeading-${(title || '').replace(/\s/g, '')}`} - > - <h2 data-test-subj="dashboardPanelTitle" className="embPanel__title embPanel__dragger"> - <EuiScreenReaderOnly>{getAriaLabel()}</EuiScreenReaderOnly> - {renderTitle()} - {renderBadges(badges, embeddable)} - </h2> - {renderNotifications(notifications, embeddable)} - <PanelOptionsMenu - isViewMode={isViewMode} - getActionContextMenuPanel={getActionContextMenuPanel} - closeContextMenu={closeContextMenu} - title={title} - index={index} - /> - </figcaption> - </span> + <figcaption + className={classes} + data-test-subj={`embeddablePanelHeading-${(title || '').replace(/\s/g, '')}`} + > + <h2 data-test-subj="dashboardPanelTitle" className="embPanel__title embPanel__dragger"> + <EuiScreenReaderOnly>{getAriaLabel()}</EuiScreenReaderOnly> + {renderTitle()} + {renderBadges(badges, embeddable)} + </h2> + {renderNotifications(notifications, embeddable)} + <PanelOptionsMenu + isViewMode={isViewMode} + getActionContextMenuPanel={getActionContextMenuPanel} + closeContextMenu={closeContextMenu} + title={title} + index={index} + /> + </figcaption> ); } diff --git a/src/plugins/embeddable/tsconfig.json b/src/plugins/embeddable/tsconfig.json index b7a6ff3252d6a..e1edfc039f360 100644 --- a/src/plugins/embeddable/tsconfig.json +++ b/src/plugins/embeddable/tsconfig.json @@ -7,6 +7,7 @@ "declarationMap": true }, "include": [ + ".storybook/**/*", "common/**/*", "public/**/*", "server/**/*" diff --git a/src/plugins/event_annotation/common/event_annotation_group/index.ts b/src/plugins/event_annotation/common/event_annotation_group/index.ts index a3a36505b1c2d..0d0c755a6cf5d 100644 --- a/src/plugins/event_annotation/common/event_annotation_group/index.ts +++ b/src/plugins/event_annotation/common/event_annotation_group/index.ts @@ -8,15 +8,18 @@ import type { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; import { i18n } from '@kbn/i18n'; +import { IndexPatternExpressionType } from '@kbn/data-views-plugin/common'; import type { EventAnnotationOutput } from '../manual_event_annotation/types'; export interface EventAnnotationGroupOutput { type: 'event_annotation_group'; annotations: EventAnnotationOutput[]; + index?: IndexPatternExpressionType; } export interface EventAnnotationGroupArgs { annotations: EventAnnotationOutput[]; + index?: IndexPatternExpressionType; } export function eventAnnotationGroup(): ExpressionFunctionDefinition< @@ -34,6 +37,13 @@ export function eventAnnotationGroup(): ExpressionFunctionDefinition< defaultMessage: 'Event annotation group', }), args: { + index: { + types: ['index_pattern'], + required: false, + help: i18n.translate('eventAnnotation.group.args.annotationConfigs.index.help', { + defaultMessage: 'Data view retrieved with indexPatternLoad', + }), + }, annotations: { types: ['manual_point_event_annotation', 'manual_range_event_annotation'], help: i18n.translate('eventAnnotation.group.args.annotationConfigs', { @@ -46,6 +56,7 @@ export function eventAnnotationGroup(): ExpressionFunctionDefinition< return { type: 'event_annotation_group', annotations: args.annotations, + index: args.index, }; }, }; diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/fetch_event_annotations.test.ts b/src/plugins/event_annotation/common/fetch_event_annotations/fetch_event_annotations.test.ts new file mode 100644 index 0000000000000..a0bf6e6c5c329 --- /dev/null +++ b/src/plugins/event_annotation/common/fetch_event_annotations/fetch_event_annotations.test.ts @@ -0,0 +1,145 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ExpressionValueSearchContext } from '@kbn/data-plugin/common'; +import { FetchEventAnnotationsArgs, fetchEventAnnotations } from '.'; + +const mockHandlers = { + abortSignal: jest.fn() as unknown as jest.Mocked<AbortSignal>, + getSearchContext: jest.fn(), + getSearchSessionId: jest.fn().mockReturnValue('abc123'), + getExecutionContext: jest.fn(), + inspectorAdapters: jest.fn(), + variables: {}, + types: {}, +}; + +const args = { + interval: '30m', + group: [ + { + type: 'event_annotation_group', + annotations: [ + { + type: 'manual_point_event_annotation', + time: '2022-07-05T11:12:00Z', + }, + { + type: 'manual_point_event_annotation', + time: '2022-07-05T01:18:00Z', + }, + { + type: 'manual_range_event_annotation', + time: '2022-07-03T05:00:00Z', + endTime: '2022-07-05T00:01:00Z', + }, + ], + }, + { + type: 'event_annotation_group', + annotations: [ + { + type: 'manual_point_event_annotation', + time: '2022-07-05T04:34:00Z', + label: 'custom', + color: '#9170b8', + lineWidth: 3, + lineStyle: 'dotted', + icon: 'triangle', + textVisibility: true, + }, + { + type: 'manual_point_event_annotation', + time: '2022-07-05T05:55:00Z', + isHidden: true, + }, + { + type: 'manual_point_event_annotation', + time: '2022-08-05T12:48:10Z', + }, + { + type: 'manual_point_event_annotation', + time: '2022-06-05T12:48:10Z', + }, + { + type: 'manual_range_event_annotation', + time: '2022-06-03T05:00:00Z', + endTime: '2022-06-05T00:01:00Z', + }, + { + type: 'manual_range_event_annotation', + time: '2022-08-03T05:00:00Z', + endTime: '2022-08-05T00:01:00Z', + }, + { + type: 'manual_range_event_annotation', + time: '2022-06-03T05:00:00Z', + endTime: '2022-08-05T00:01:00Z', + label: 'Event range', + color: '#F04E981A', + outside: false, + }, + ], + }, + ], +} as FetchEventAnnotationsArgs; + +const input = { + type: 'kibana_context', + query: [], + filters: [], + timeRange: { + type: 'timerange', + from: '2022-07-01T00:00:00Z', + to: '2022-07-31T00:00:00Z', + }, +} as ExpressionValueSearchContext; + +describe('fetchEventAnnotations', () => { + test('Sorts annotations by time, assigns correct timebuckets, filters out hidden and out of range annotations', async () => { + const result = await fetchEventAnnotations().fn(input, args, mockHandlers).toPromise(); + expect(result!.rows).toEqual([ + { + type: 'range', + time: '2022-06-03T05:00:00Z', + endTime: '2022-08-05T00:01:00Z', + label: 'Event range', + color: '#F04E981A', + outside: false, + timebucket: '2022-06-03T05:00:00.000Z', + }, + { + type: 'range', + time: '2022-07-03T05:00:00Z', + endTime: '2022-07-05T00:01:00Z', + timebucket: '2022-07-03T05:00:00.000Z', + }, + { + type: 'point', + time: '2022-07-05T01:18:00Z', + timebucket: '2022-07-05T01:00:00.000Z', + }, + { + type: 'point', + time: '2022-07-05T04:34:00Z', + label: 'custom', + color: '#9170b8', + lineWidth: 3, + lineStyle: 'dotted', + icon: 'triangle', + textVisibility: true, + timebucket: '2022-07-05T04:30:00.000Z', + }, + { + type: 'point', + time: '2022-07-05T11:12:00Z', + timebucket: '2022-07-05T11:00:00.000Z', + }, + ]); + }); +}); diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/index.ts b/src/plugins/event_annotation/common/fetch_event_annotations/index.ts new file mode 100644 index 0000000000000..92408b52846e0 --- /dev/null +++ b/src/plugins/event_annotation/common/fetch_event_annotations/index.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { defer, switchMap, Observable } from 'rxjs'; +import { i18n } from '@kbn/i18n'; +import { ExpressionValueSearchContext, parseEsInterval } from '@kbn/data-plugin/common'; +import type { ExpressionFunctionDefinition, Datatable } from '@kbn/expressions-plugin/common'; +import moment from 'moment'; +import { ESCalendarInterval, ESFixedInterval, roundDateToESInterval } from '@elastic/charts'; +import { EventAnnotationGroupOutput } from '../event_annotation_group'; +import { annotationColumns, EventAnnotationOutput } from '../manual_event_annotation/types'; +import { filterOutOfTimeRange, isManualPointAnnotation, sortByTime } from './utils'; + +export interface FetchEventAnnotationsDatatable { + annotations: EventAnnotationOutput[]; + type: 'fetch_event_annotations'; +} + +export type FetchEventAnnotationsOutput = Observable<Datatable>; + +export interface FetchEventAnnotationsArgs { + group: EventAnnotationGroupOutput[]; + interval: string; +} + +export type FetchEventAnnotationsExpressionFunctionDefinition = ExpressionFunctionDefinition< + 'fetch_event_annotations', + ExpressionValueSearchContext | null, + FetchEventAnnotationsArgs, + FetchEventAnnotationsOutput +>; + +export function fetchEventAnnotations(): FetchEventAnnotationsExpressionFunctionDefinition { + return { + name: 'fetch_event_annotations', + aliases: [], + type: 'datatable', + inputTypes: ['kibana_context', 'null'], + help: i18n.translate('eventAnnotation.fetchEventAnnotations.description', { + defaultMessage: 'Fetch event annotations', + }), + args: { + group: { + types: ['event_annotation_group'], + help: i18n.translate('eventAnnotation.fetchEventAnnotations.args.annotationConfigs', { + defaultMessage: 'Annotation configs', + }), + multi: true, + }, + interval: { + required: true, + types: ['string'], + help: i18n.translate('eventAnnotation.fetchEventAnnotations.args.interval.help', { + defaultMessage: 'Interval to use for this aggregation', + }), + }, + }, + fn: (input, args) => { + return defer(async () => { + const annotations = args.group + .flatMap((group) => group.annotations) + .filter( + (annotation) => + !annotation.isHidden && filterOutOfTimeRange(annotation, input?.timeRange) + ); + // TODO: fetching for Query annotations goes here + + return { annotations }; + }).pipe( + switchMap(({ annotations }) => { + const datatable: Datatable = { + type: 'datatable', + columns: annotationColumns, + rows: annotations.sort(sortByTime).map((annotation) => { + const initialDate = moment(annotation.time).valueOf(); + const snappedDate = roundDateToESInterval( + initialDate, + parseEsInterval(args.interval) as ESCalendarInterval | ESFixedInterval, + 'start', + 'UTC' + ); + return { + ...annotation, + type: isManualPointAnnotation(annotation) ? 'point' : 'range', + timebucket: moment(snappedDate).toISOString(), + }; + }), + }; + + return new Observable<Datatable>((subscriber) => { + subscriber.next(datatable); + subscriber.complete(); + }); + }) + ); + }, + }; +} diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts b/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts new file mode 100644 index 0000000000000..8590a095864e1 --- /dev/null +++ b/src/plugins/event_annotation/common/fetch_event_annotations/utils.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { TimeRange } from '@kbn/data-plugin/common'; + +import { + EventAnnotationOutput, + ManualPointEventAnnotationOutput, + ManualRangeEventAnnotationOutput, +} from '../manual_event_annotation/types'; + +export const isRangeAnnotation = ( + annotation: EventAnnotationOutput +): annotation is ManualRangeEventAnnotationOutput => { + return 'endTime' in annotation; +}; + +export const isManualPointAnnotation = ( + annotation: EventAnnotationOutput +): annotation is ManualPointEventAnnotationOutput => { + return 'time' in annotation && !('endTime' in annotation); +}; + +export const filterOutOfTimeRange = (annotation: EventAnnotationOutput, timerange?: TimeRange) => { + if (!timerange) { + return false; + } + if (isRangeAnnotation(annotation)) { + return !(annotation.time >= timerange.to || annotation.endTime < timerange.from); + } + if (isManualPointAnnotation(annotation)) { + return annotation.time >= timerange.from && annotation.time <= timerange.to; + } +}; + +export const sortByTime = (a: EventAnnotationOutput, b: EventAnnotationOutput) => { + return a.time.localeCompare(b.time); +}; diff --git a/src/plugins/event_annotation/common/index.ts b/src/plugins/event_annotation/common/index.ts index 50d7c8b851776..62d6164057759 100644 --- a/src/plugins/event_annotation/common/index.ts +++ b/src/plugins/event_annotation/common/index.ts @@ -17,6 +17,8 @@ export type { export { manualPointEventAnnotation, manualRangeEventAnnotation } from './manual_event_annotation'; export { eventAnnotationGroup } from './event_annotation_group'; export type { EventAnnotationGroupArgs } from './event_annotation_group'; +export { fetchEventAnnotations } from './fetch_event_annotations'; +export type { FetchEventAnnotationsArgs } from './fetch_event_annotations'; export type { EventAnnotationConfig, RangeEventAnnotationConfig, diff --git a/src/plugins/event_annotation/common/manual_event_annotation/types.ts b/src/plugins/event_annotation/common/manual_event_annotation/types.ts index 208383734924c..520addf8602c8 100644 --- a/src/plugins/event_annotation/common/manual_event_annotation/types.ts +++ b/src/plugins/event_annotation/common/manual_event_annotation/types.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { DatatableColumn } from '@kbn/expressions-plugin'; import { PointStyleProps, RangeStyleProps } from '../types'; export type ManualPointEventAnnotationArgs = { @@ -29,3 +30,18 @@ export type EventAnnotationArgs = ManualPointEventAnnotationArgs | ManualRangeEv export type EventAnnotationOutput = | ManualPointEventAnnotationOutput | ManualRangeEventAnnotationOutput; + +export const annotationColumns: DatatableColumn[] = [ + { id: 'time', name: 'time', meta: { type: 'string' } }, + { id: 'endTime', name: 'endTime', meta: { type: 'string' } }, + { id: 'timebucket', name: 'timebucket', meta: { type: 'string' } }, + { id: 'type', name: 'type', meta: { type: 'string' } }, + { id: 'label', name: 'label', meta: { type: 'string' } }, + { id: 'color', name: 'color', meta: { type: 'string' } }, + { id: 'lineStyle', name: 'lineStyle', meta: { type: 'string' } }, + { id: 'lineWidth', name: 'lineWidth', meta: { type: 'number' } }, + { id: 'icon', name: 'icon', meta: { type: 'string' } }, + { id: 'textVisibility', name: 'textVisibility', meta: { type: 'boolean' } }, + { id: 'outside', name: 'outside', meta: { type: 'number' } }, + { id: 'skippedAnnotationsCount', name: 'skippedAnnotationsCount', meta: { type: 'number' } }, +]; diff --git a/src/plugins/event_annotation/jest.config.js b/src/plugins/event_annotation/jest.config.js new file mode 100644 index 0000000000000..61269c91a8bfd --- /dev/null +++ b/src/plugins/event_annotation/jest.config.js @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['<rootDir>/src/plugins/event_annotation'], + coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/event_ann', + coverageReporters: ['text', 'html'], + collectCoverageFrom: ['<rootDir>/src/plugins/event_ann/{common,public,server}/**/*.{ts,tsx}'], +}; diff --git a/src/plugins/event_annotation/kibana.json b/src/plugins/event_annotation/kibana.json index 5a0c49be09ba3..d981af8ab165b 100644 --- a/src/plugins/event_annotation/kibana.json +++ b/src/plugins/event_annotation/kibana.json @@ -8,7 +8,8 @@ "common" ], "requiredPlugins": [ - "expressions" + "expressions", + "data" ], "owner": { "name": "Vis Editors", diff --git a/src/plugins/event_annotation/public/plugin.ts b/src/plugins/event_annotation/public/plugin.ts index 9314151375f20..138b925d44baa 100644 --- a/src/plugins/event_annotation/public/plugin.ts +++ b/src/plugins/event_annotation/public/plugin.ts @@ -12,6 +12,7 @@ import { manualPointEventAnnotation, manualRangeEventAnnotation, eventAnnotationGroup, + fetchEventAnnotations, } from '../common'; import { EventAnnotationService } from './event_annotation_service'; @@ -35,6 +36,7 @@ export class EventAnnotationPlugin dependencies.expressions.registerFunction(manualPointEventAnnotation); dependencies.expressions.registerFunction(manualRangeEventAnnotation); dependencies.expressions.registerFunction(eventAnnotationGroup); + dependencies.expressions.registerFunction(fetchEventAnnotations); return this.eventAnnotationService; } diff --git a/src/plugins/event_annotation/tsconfig.json b/src/plugins/event_annotation/tsconfig.json index ca3d65a13b214..31f9c45e1e85b 100644 --- a/src/plugins/event_annotation/tsconfig.json +++ b/src/plugins/event_annotation/tsconfig.json @@ -17,6 +17,9 @@ }, { "path": "../expressions/tsconfig.json" - } + }, + { + "path": "../data/tsconfig.json" + }, ] } \ No newline at end of file diff --git a/src/plugins/expressions/common/expression_types/specs/error.ts b/src/plugins/expressions/common/expression_types/specs/error.ts index b170675b8f489..23bee609efd07 100644 --- a/src/plugins/expressions/common/expression_types/specs/error.ts +++ b/src/plugins/expressions/common/expression_types/specs/error.ts @@ -22,8 +22,14 @@ export type ExpressionValueError = ExpressionValueBoxed< } >; -export const isExpressionValueError = (value: unknown): value is ExpressionValueError => - getType(value) === 'error'; +export const isExpressionValueError = (value: unknown): value is ExpressionValueError => { + try { + return getType(value) === 'error'; + } catch (e) { + // nothing to be here + } + return false; +}; /** * @deprecated diff --git a/src/plugins/expressions/public/loader.test.ts b/src/plugins/expressions/public/loader.test.ts index f2d156c4af681..4cddfd660ed04 100644 --- a/src/plugins/expressions/public/loader.test.ts +++ b/src/plugins/expressions/public/loader.test.ts @@ -20,7 +20,7 @@ import { ExecutionContract, } from '../common'; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-commonjs const { __getLastExecution, __getLastRenderMode } = require('./services'); const element = null as unknown as HTMLElement; diff --git a/src/plugins/expressions/public/react_expression_renderer/use_expression_renderer.ts b/src/plugins/expressions/public/react_expression_renderer/use_expression_renderer.ts index 0894cd21e708a..bb2c716313a1c 100644 --- a/src/plugins/expressions/public/react_expression_renderer/use_expression_renderer.ts +++ b/src/plugins/expressions/public/react_expression_renderer/use_expression_renderer.ts @@ -11,7 +11,11 @@ import { useRef, useEffect, useLayoutEffect, useReducer } from 'react'; import { Observable } from 'rxjs'; import { filter } from 'rxjs/operators'; import useUpdateEffect from 'react-use/lib/useUpdateEffect'; -import { ExpressionAstExpression, IInterpreterRenderHandlers } from '../../common'; +import { + ExpressionAstExpression, + IInterpreterRenderHandlers, + isExpressionValueError, +} from '../../common'; import { ExpressionLoader } from '../loader'; import { IExpressionLoaderParams, ExpressionRenderError, ExpressionRendererEvent } from '../types'; import { useDebouncedValue } from './use_debounced_value'; @@ -122,7 +126,11 @@ export function useExpressionRenderer( useEffect(() => { const subscription = expressionLoaderRef.current?.data$.subscribe(({ partial, result }) => { - setState({ isEmpty: false }); + setState({ + isEmpty: false, + ...(!isExpressionValueError(result) ? { error: null } : {}), + }); + onData$?.(result, expressionLoaderRef.current?.inspect(), partial); }); diff --git a/src/plugins/home/public/application/components/recently_accessed.test.js b/src/plugins/home/public/application/components/recently_accessed.test.js index 95f151923f425..f517e1afef8c5 100644 --- a/src/plugins/home/public/application/components/recently_accessed.test.js +++ b/src/plugins/home/public/application/components/recently_accessed.test.js @@ -27,7 +27,7 @@ const createRecentlyAccessed = (length) => { test('render', () => { const component = shallow(<RecentlyAccessed recentlyAccessed={createRecentlyAccessed(2)} />); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('more popover', () => { diff --git a/src/plugins/home/public/application/components/synopsis.test.js b/src/plugins/home/public/application/components/synopsis.test.js index 74530ec7de821..c3dcf37517af7 100644 --- a/src/plugins/home/public/application/components/synopsis.test.js +++ b/src/plugins/home/public/application/components/synopsis.test.js @@ -20,7 +20,7 @@ test('render', () => { url="link_to_item" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('props', () => { @@ -34,7 +34,7 @@ describe('props', () => { iconType="logoApache" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('iconUrl', () => { @@ -47,7 +47,7 @@ describe('props', () => { iconUrl="icon_url" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('isBeta', () => { @@ -60,6 +60,6 @@ describe('props', () => { isBeta={true} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); }); diff --git a/src/plugins/home/public/application/components/tutorial/content.test.js b/src/plugins/home/public/application/components/tutorial/content.test.js index f8a75d0a04f1c..a758568b456b1 100644 --- a/src/plugins/home/public/application/components/tutorial/content.test.js +++ b/src/plugins/home/public/application/components/tutorial/content.test.js @@ -17,5 +17,5 @@ test('should render content with markdown', () => { text={'I am *some* [content](https://en.wikipedia.org/wiki/Content) with `markdown`'} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/home/public/application/components/tutorial/instruction_set.test.js b/src/plugins/home/public/application/components/tutorial/instruction_set.test.js index 8c0ce306d9c05..75f0a0095ccb5 100644 --- a/src/plugins/home/public/application/components/tutorial/instruction_set.test.js +++ b/src/plugins/home/public/application/components/tutorial/instruction_set.test.js @@ -46,7 +46,7 @@ test('render', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('statusCheckState', () => { @@ -72,7 +72,7 @@ describe('statusCheckState', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('checking status', () => { @@ -89,7 +89,7 @@ describe('statusCheckState', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('failed status check - error', () => { @@ -106,7 +106,7 @@ describe('statusCheckState', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('failed status check - no data', () => { @@ -123,7 +123,7 @@ describe('statusCheckState', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('successful status check', () => { @@ -140,6 +140,6 @@ describe('statusCheckState', () => { isCloudEnabled={false} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); }); diff --git a/src/plugins/home/public/application/components/tutorial/introduction.test.js b/src/plugins/home/public/application/components/tutorial/introduction.test.js index 6f7b6b31289ed..c004f551aed89 100644 --- a/src/plugins/home/public/application/components/tutorial/introduction.test.js +++ b/src/plugins/home/public/application/components/tutorial/introduction.test.js @@ -23,7 +23,7 @@ test('render', () => { basePath={basePathMock} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('props', () => { @@ -36,7 +36,7 @@ describe('props', () => { iconType="logoElastic" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('exportedFieldsUrl', () => { @@ -48,7 +48,7 @@ describe('props', () => { exportedFieldsUrl="exported_fields_url" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('previewUrl', () => { @@ -60,7 +60,7 @@ describe('props', () => { previewUrl="preview_image_url" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('isBeta', () => { @@ -72,7 +72,7 @@ describe('props', () => { isBeta={true} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('Beats badge should show', () => { diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.test.js b/src/plugins/home/public/application/components/tutorial/tutorial.test.js index 9bfe100c4ce60..3d0fde31aadbc 100644 --- a/src/plugins/home/public/application/components/tutorial/tutorial.test.js +++ b/src/plugins/home/public/application/components/tutorial/tutorial.test.js @@ -149,7 +149,7 @@ test('should render ELASTIC_CLOUD instructions when isCloudEnabled is true', asy ); await loadTutorialPromise; component.update(); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('custom status check', () => { diff --git a/src/plugins/kibana_overview/public/components/synopsis/synopsis.test.js b/src/plugins/kibana_overview/public/components/synopsis/synopsis.test.js index 74530ec7de821..c3dcf37517af7 100644 --- a/src/plugins/kibana_overview/public/components/synopsis/synopsis.test.js +++ b/src/plugins/kibana_overview/public/components/synopsis/synopsis.test.js @@ -20,7 +20,7 @@ test('render', () => { url="link_to_item" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); describe('props', () => { @@ -34,7 +34,7 @@ describe('props', () => { iconType="logoApache" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('iconUrl', () => { @@ -47,7 +47,7 @@ describe('props', () => { iconUrl="icon_url" /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('isBeta', () => { @@ -60,6 +60,6 @@ describe('props', () => { isBeta={true} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); }); diff --git a/src/plugins/kibana_react/public/notifications/create_notifications.test.tsx b/src/plugins/kibana_react/public/notifications/create_notifications.test.tsx index 518849569a46a..0b2c0a0478d53 100644 --- a/src/plugins/kibana_react/public/notifications/create_notifications.test.tsx +++ b/src/plugins/kibana_react/public/notifications/create_notifications.test.tsx @@ -8,7 +8,6 @@ import * as React from 'react'; import { createNotifications } from './create_notifications'; -// eslint-disable-next-lien import { notificationServiceMock } from '@kbn/core/public/mocks'; test('throws if no overlays service provided', () => { diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index 653319c91b5f9..c96a634c61115 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -171,6 +171,10 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = { type: 'long', _meta: { description: 'Non-default value of setting.' }, }, + 'discover:sampleRowsPerPage': { + type: 'long', + _meta: { description: 'Non-default value of setting.' }, + }, 'discover:maxDocFieldsDisplayed': { type: 'long', _meta: { description: 'Non-default value of setting.' }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index de22ac0cecb8a..94110686c6d9f 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -73,6 +73,7 @@ export interface UsageStats { 'discover:searchOnPageLoad': boolean; 'doc_table:hideTimeColumn': boolean; 'discover:sampleSize': number; + 'discover:sampleRowsPerPage': number; defaultColumns: string[]; 'context:defaultSize': number; 'context:tieBreakerFields': string[]; diff --git a/src/plugins/kibana_utils/demos/state_containers/counter.ts b/src/plugins/kibana_utils/demos/state_containers/counter.ts index de0b75084ae1e..62b3f90f2a465 100644 --- a/src/plugins/kibana_utils/demos/state_containers/counter.ts +++ b/src/plugins/kibana_utils/demos/state_containers/counter.ts @@ -26,6 +26,6 @@ const container = createStateContainer( container.transitions.increment(5); container.transitions.double(); -console.log(container.selectors.count()); // eslint-disable-line +console.log(container.selectors.count()); // eslint-disable-line no-console export const result = container.selectors.count(); diff --git a/src/plugins/kibana_utils/demos/state_containers/todomvc.ts b/src/plugins/kibana_utils/demos/state_containers/todomvc.ts index 850e394871994..a7e5f54cca0a8 100644 --- a/src/plugins/kibana_utils/demos/state_containers/todomvc.ts +++ b/src/plugins/kibana_utils/demos/state_containers/todomvc.ts @@ -76,6 +76,6 @@ container.transitions.add({ container.transitions.complete(0); container.transitions.complete(1); -console.log(container.selectors.todos()); // eslint-disable-line +console.log(container.selectors.todos()); // eslint-disable-line no-console export const result = container.selectors.todos(); diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 0932c785b9d5d..61e340646879b 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -8020,6 +8020,12 @@ "description": "Non-default value of setting." } }, + "discover:sampleRowsPerPage": { + "type": "long", + "_meta": { + "description": "Non-default value of setting." + } + }, "discover:maxDocFieldsDisplayed": { "type": "long", "_meta": { diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts index 2d563f20a583a..1adeb09c60c7c 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts @@ -344,7 +344,7 @@ export class DrilldownManagerState { title: toastDrilldownsCRUDError, }); } - })().catch(console.error); // eslint-disable-line + })().catch(console.error); // eslint-disable-line no-console }; /** diff --git a/src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts b/src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts index 095cda269c49e..e11d8ce009e17 100644 --- a/src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts +++ b/src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts @@ -141,7 +141,7 @@ export class DynamicActionManager { for (const event of events) this.reviveAction(event); this.ui.transitions.finishFetching(events); })().catch((error) => { - /* eslint-disable */ + /* eslint-disable no-console */ console.log('Dynamic action manager storage reload failed.'); console.error(error); /* eslint-enable */ diff --git a/src/plugins/unified_search/public/actions/index.ts b/src/plugins/unified_search/public/actions/index.ts index 3a8d41b649951..5101844b4ed94 100644 --- a/src/plugins/unified_search/public/actions/index.ts +++ b/src/plugins/unified_search/public/actions/index.ts @@ -8,3 +8,4 @@ export type { ApplyGlobalFilterActionContext } from './apply_filter_action'; export { ACTION_GLOBAL_APPLY_FILTER } from './apply_filter_action'; +export { UPDATE_FILTER_REFERENCES_ACTION } from './update_filter_references_action'; diff --git a/src/plugins/unified_search/public/actions/update_filter_references_action.test.ts b/src/plugins/unified_search/public/actions/update_filter_references_action.test.ts new file mode 100644 index 0000000000000..87bb97d12bd24 --- /dev/null +++ b/src/plugins/unified_search/public/actions/update_filter_references_action.test.ts @@ -0,0 +1,164 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FilterManager } from '@kbn/data-plugin/public'; +import { FilterStateStore } from '@kbn/es-query'; +import { coreMock } from '@kbn/core/public/mocks'; +import { + createUpdateFilterReferencesAction, + UpdateFilterReferencesActionContext, +} from './update_filter_references_action'; +import { updateFilterReferencesTrigger } from '../triggers/update_filter_references_trigger'; +import { mockFilter } from '../mocks/get_stub_filter'; + +describe('createUpdateFilterReferencesAction', () => { + let filterManager: FilterManager; + let executeActionFn: (context: UpdateFilterReferencesActionContext) => Promise<void>; + const trigger = updateFilterReferencesTrigger; + + beforeEach(async () => { + filterManager = new FilterManager(coreMock.createStart().uiSettings); + executeActionFn = createUpdateFilterReferencesAction(filterManager).execute; + }); + + /** + Scenario: Change filter reference when adjusting 1 layer + Given I am configuring one layer: L1 by D1 data view + Given I am adding a filter F1 by D1 + When I change D1 to D2 on L1 + Then Data view reference for F1 should be updated to D2 + **/ + test('Scenario: Change filter reference when adjusting 1 layer', async () => { + const f1 = mockFilter('D1', FilterStateStore.GLOBAL_STATE, true, true, 'f1', ''); + filterManager.setFilters([f1]); + + await executeActionFn({ + trigger, + fromDataView: 'D1', + toDataView: 'D2', + usedDataViews: ['D1'], + }); + + expect(filterManager.getFilters().map(({ meta }) => meta.index)).toMatchInlineSnapshot(` + Array [ + "D2", + ] + `); + }); + + /** + Scenario: Change filter reference when adjusting 2 or more layers + Given I am configuring 2 layers: L1 by D1 + L2 by D2 + Given I am adding 2 filters: F1 by D1 + F2 by D2 + When I change D1 to D3 on L1 + Then Data view reference for F1 should be updated to D3 + **/ + test('Scenario: Change filter reference when adjusting 2 or more layers', async () => { + const f1 = mockFilter('D1', FilterStateStore.GLOBAL_STATE, true, true, 'f1', ''); + const f2 = mockFilter('D2', FilterStateStore.GLOBAL_STATE, true, true, 'f2', ''); + filterManager.setFilters([f1, f2]); + + await executeActionFn({ + trigger, + fromDataView: 'D1', + toDataView: 'D3', + usedDataViews: ['D1', 'D2'], + }); + + expect(filterManager.getFilters().map(({ meta }) => meta.index)).toMatchInlineSnapshot(` + Array [ + "D3", + "D2", + ] + `); + }); + + /** + Scenario: change references only for incompatible cases. + Given I am configuring 3 layers: L1 by D1 + L2 by D1 + L3 by D2 + Given I am adding 2 filters: F1 by D1 + F2 by D2 + When I change D1 to D2 on L1 + Then Data view reference should not be updated + Note: Important case! + **/ + test('Scenario: change references only for incompatible cases', async () => { + const f1 = mockFilter('D1', FilterStateStore.GLOBAL_STATE, true, true, 'f1', ''); + const f2 = mockFilter('D2', FilterStateStore.GLOBAL_STATE, true, true, 'f2', ''); + filterManager.setFilters([f1, f2]); + + await executeActionFn({ + trigger, + fromDataView: 'D1', + toDataView: 'D3', + usedDataViews: ['D1', 'D1', 'D2'], + }); + + expect(filterManager.getFilters().map(({ meta }) => meta.index)).toMatchInlineSnapshot(` + Array [ + "D1", + "D2", + ] + `); + }); + + /** + Scenario: Change filter reference when removing one of configured layers + Given I am configuring 2 layers: L1 by D1 + L2 by D2 + Given I am adding 2 filters: F1 by D1 + F2 by D2 + When I remove L1 + Then Data view reference for F1 should be updated to D2 + Note: should take the first of the available configured Data Views + **/ + test('Scenario: Change filter reference when removing one of configured layers', async () => { + const f1 = mockFilter('D1', FilterStateStore.GLOBAL_STATE, true, true, 'f1', ''); + const f2 = mockFilter('D2', FilterStateStore.GLOBAL_STATE, true, true, 'f2', ''); + filterManager.setFilters([f1, f2]); + + await executeActionFn({ + trigger, + fromDataView: 'D1', + toDataView: undefined, + usedDataViews: ['D1', 'D2'], + }); + + expect(filterManager.getFilters().map(({ meta }) => meta.index)).toMatchInlineSnapshot(` + Array [ + "D2", + "D2", + ] + `); + }); + + /** + Scenario: Change filter reference when removing all layers (one layer was configured) + Given I am configuring one layer: L1 by D1 + Given I am adding a filter F1 by D1 + Given I am changing the Unified Search Data View to D2 + When I remove all layers + Then Data view reference for F1 should be updated to D2 + Note: Unified Search Data View should be used by default + **/ + test('Scenario: Change filter reference when removing all layers (one layer was configured)', async () => { + const f1 = mockFilter('D1', FilterStateStore.GLOBAL_STATE, true, true, 'f1', ''); + filterManager.setFilters([f1]); + + await executeActionFn({ + trigger, + fromDataView: 'D1', + toDataView: undefined, + usedDataViews: ['D1'], + defaultDataView: 'D2', + }); + + expect(filterManager.getFilters().map(({ meta }) => meta.index)).toMatchInlineSnapshot(` + Array [ + "D2", + ] + `); + }); +}); diff --git a/src/plugins/unified_search/public/actions/update_filter_references_action.ts b/src/plugins/unified_search/public/actions/update_filter_references_action.ts new file mode 100644 index 0000000000000..8bbda790379b0 --- /dev/null +++ b/src/plugins/unified_search/public/actions/update_filter_references_action.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Action, ActionExecutionMeta, createAction } from '@kbn/ui-actions-plugin/public'; +import { FilterManager } from '@kbn/data-plugin/public'; + +export const UPDATE_FILTER_REFERENCES_ACTION = 'UPDATE_FILTER_REFERENCES_ACTION'; + +export interface UpdateFilterReferencesActionContext extends ActionExecutionMeta { + /** The initial data view of the editable layer **/ + fromDataView: string; + /** New data view of the editable layer + * @description undefined - in case of removing the layer + */ + toDataView?: string | undefined; + /** List of all Data Views used in all layers **/ + usedDataViews: string[] | []; + /** Index to use by default if all layers are cleared **/ + defaultDataView?: string; +} + +export function createUpdateFilterReferencesAction(filterManager: FilterManager): Action { + return createAction<UpdateFilterReferencesActionContext>({ + type: UPDATE_FILTER_REFERENCES_ACTION, + id: UPDATE_FILTER_REFERENCES_ACTION, + execute: async ({ fromDataView, toDataView, usedDataViews, defaultDataView }) => { + const countOfInitialDataView = usedDataViews.filter((i) => i === fromDataView).length; + const filters = filterManager.getFilters(); + + /** no action needed **/ + if (countOfInitialDataView > 1 || !filters.length || !fromDataView) { + return; + } + + /** removing layer **/ + if (fromDataView && !toDataView) { + if (usedDataViews.length > 1) { + toDataView = usedDataViews.filter((item) => item !== fromDataView)[0]; + } + if (!toDataView && defaultDataView) { + toDataView = defaultDataView; + } + } + + if (toDataView) { + filterManager.setFilters( + filters.map((filter) => { + if (filter.meta.index === fromDataView) { + return { + ...filter, + meta: { + ...filter.meta, + index: toDataView, + }, + }; + } else { + return filter; + } + }) + ); + } + }, + }); +} diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index c217b8c52b06f..c7e19429c66e3 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -166,7 +166,9 @@ export function ChangeDataView({ panelItems.push( <DataViewsList dataViewsList={dataViewsList} - onChangeDataView={(newId) => { + onChangeDataView={async (newId) => { + const dataView = await data.dataViews.get(newId); + await data.dataViews.refreshFields(dataView); onChangeDataView(newId); setPopoverIsOpen(false); }} diff --git a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx index 847140fd8e272..f869aeeb07a32 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx @@ -315,10 +315,10 @@ export function FilterItem(props: FilterItemProps) { try { label.title = getDisplayValueFromFilter(filter, indexPatterns); } catch (e) { - label.status = FILTER_ITEM_ERROR; + label.status = FILTER_ITEM_WARNING; label.title = props.intl.formatMessage({ - id: 'unifiedSearch.filter.filterBar.labelErrorText', - defaultMessage: `Error`, + id: 'unifiedSearch.filter.filterBar.labelWarningText', + defaultMessage: `Warning`, }); label.message = e.message; } diff --git a/src/plugins/unified_search/public/index.ts b/src/plugins/unified_search/public/index.ts index bc7974b42efb3..e20b08f9e0e39 100755 --- a/src/plugins/unified_search/public/index.ts +++ b/src/plugins/unified_search/public/index.ts @@ -19,7 +19,8 @@ export { DataViewsList } from './dataview_picker/dataview_list'; export { DataViewPicker } from './dataview_picker'; export type { ApplyGlobalFilterActionContext } from './actions'; -export { ACTION_GLOBAL_APPLY_FILTER } from './actions'; +export { ACTION_GLOBAL_APPLY_FILTER, UPDATE_FILTER_REFERENCES_ACTION } from './actions'; +export { UPDATE_FILTER_REFERENCES_TRIGGER } from './triggers'; /* * Autocomplete query suggestions: diff --git a/src/plugins/unified_search/public/test_helpers/get_stub_filter.ts b/src/plugins/unified_search/public/mocks/get_stub_filter.ts similarity index 92% rename from src/plugins/unified_search/public/test_helpers/get_stub_filter.ts rename to src/plugins/unified_search/public/mocks/get_stub_filter.ts index 4e0a5037158b6..9bb67b7046d8b 100644 --- a/src/plugins/unified_search/public/test_helpers/get_stub_filter.ts +++ b/src/plugins/unified_search/public/mocks/get_stub_filter.ts @@ -8,7 +8,8 @@ import { type Filter, FilterStateStore } from '@kbn/es-query'; -export function getFilter( +export function mockFilter( + index: string, store: FilterStateStore, disabled: boolean, negated: boolean, @@ -20,7 +21,7 @@ export function getFilter( store, }, meta: { - index: 'logstash-*', + index, disabled, negate: negated, alias: null, diff --git a/packages/kbn-pm/index.d.ts b/src/plugins/unified_search/public/mocks/index.ts similarity index 93% rename from packages/kbn-pm/index.d.ts rename to src/plugins/unified_search/public/mocks/index.ts index de0577ee3ed83..4860e8ce3d9d2 100644 --- a/packages/kbn-pm/index.d.ts +++ b/src/plugins/unified_search/public/mocks/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export * from './src'; +export * from './mocks'; diff --git a/src/plugins/unified_search/public/mocks.ts b/src/plugins/unified_search/public/mocks/mocks.ts similarity index 89% rename from src/plugins/unified_search/public/mocks.ts rename to src/plugins/unified_search/public/mocks/mocks.ts index e119c58e89f3f..029a215ff7180 100644 --- a/src/plugins/unified_search/public/mocks.ts +++ b/src/plugins/unified_search/public/mocks/mocks.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { UnifiedSearchPublicPlugin } from './plugin'; -import { AutocompleteStart, AutocompleteSetup } from './autocomplete'; +import type { UnifiedSearchPublicPlugin } from '../plugin'; +import type { AutocompleteStart, AutocompleteSetup } from '../autocomplete'; export type Setup = jest.Mocked<ReturnType<UnifiedSearchPublicPlugin['setup']>>; export type Start = jest.Mocked<ReturnType<UnifiedSearchPublicPlugin['start']>>; diff --git a/src/plugins/unified_search/public/plugin.ts b/src/plugins/unified_search/public/plugin.ts index 59c327449d354..5161076a03b70 100755 --- a/src/plugins/unified_search/public/plugin.ts +++ b/src/plugins/unified_search/public/plugin.ts @@ -9,6 +9,7 @@ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/cor import { Storage, IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { APPLY_FILTER_TRIGGER } from '@kbn/data-plugin/public'; +import { UPDATE_FILTER_REFERENCES_TRIGGER, updateFilterReferencesTrigger } from './triggers'; import { ConfigSchema } from '../config'; import { setIndexPatterns, setTheme, setOverlays, setAutocomplete } from './services'; import { AutocompleteService } from './autocomplete/autocomplete_service'; @@ -21,7 +22,8 @@ import type { UnifiedSearchPublicPluginStart, } from './types'; import { createFilterAction } from './actions/apply_filter_action'; -import { ACTION_GLOBAL_APPLY_FILTER } from './actions'; +import { createUpdateFilterReferencesAction } from './actions/update_filter_references_action'; +import { ACTION_GLOBAL_APPLY_FILTER, UPDATE_FILTER_REFERENCES_ACTION } from './actions'; import './index.scss'; @@ -43,10 +45,15 @@ export class UnifiedSearchPublicPlugin { uiActions, data, usageCollection }: UnifiedSearchSetupDependencies ): UnifiedSearchPluginSetup { const { query } = data; + + uiActions.registerTrigger(updateFilterReferencesTrigger); + uiActions.registerAction( createFilterAction(query.filterManager, query.timefilter.timefilter, core.theme) ); + uiActions.registerAction(createUpdateFilterReferencesAction(query.filterManager)); + return { autocomplete: this.autocomplete.setup(core, { timefilter: query.timefilter, @@ -78,6 +85,11 @@ export class UnifiedSearchPublicPlugin uiActions.getAction(ACTION_GLOBAL_APPLY_FILTER) ); + uiActions.addTriggerAction( + UPDATE_FILTER_REFERENCES_TRIGGER, + uiActions.getAction(UPDATE_FILTER_REFERENCES_ACTION) + ); + return { ui: { IndexPatternSelect: createIndexPatternSelect(dataViews), diff --git a/src/plugins/unified_search/public/search_bar/lib/populate_state_from_saved_query.test.ts b/src/plugins/unified_search/public/search_bar/lib/populate_state_from_saved_query.test.ts index 8cbab63956384..e401d98a1f7ab 100644 --- a/src/plugins/unified_search/public/search_bar/lib/populate_state_from_saved_query.test.ts +++ b/src/plugins/unified_search/public/search_bar/lib/populate_state_from_saved_query.test.ts @@ -9,8 +9,8 @@ import { populateStateFromSavedQuery } from './populate_state_from_saved_query'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { DataPublicPluginStart, SavedQuery } from '@kbn/data-plugin/public'; -import { getFilter } from '../../test_helpers/get_stub_filter'; import { FilterStateStore } from '@kbn/es-query'; +import { mockFilter } from '../../mocks/get_stub_filter'; describe('populateStateFromSavedQuery', () => { let dataMock: jest.Mocked<DataPublicPluginStart>; @@ -45,7 +45,7 @@ describe('populateStateFromSavedQuery', () => { const savedQuery: SavedQuery = { ...baseSavedQuery, }; - const f1 = getFilter(FilterStateStore.APP_STATE, false, false, 'age', 34); + const f1 = mockFilter('D1', FilterStateStore.APP_STATE, false, false, 'age', 34); savedQuery.attributes.filters = [f1]; populateStateFromSavedQuery(dataMock.query, savedQuery); expect(dataMock.query.queryString.setQuery).toHaveBeenCalled(); @@ -53,12 +53,12 @@ describe('populateStateFromSavedQuery', () => { }); it('should preserve global filters', async () => { - const globalFilter = getFilter(FilterStateStore.GLOBAL_STATE, false, false, 'age', 34); + const globalFilter = mockFilter('D1', FilterStateStore.GLOBAL_STATE, false, false, 'age', 34); dataMock.query.filterManager.getGlobalFilters = jest.fn().mockReturnValue([globalFilter]); const savedQuery: SavedQuery = { ...baseSavedQuery, }; - const f1 = getFilter(FilterStateStore.APP_STATE, false, false, 'age', 34); + const f1 = mockFilter('D1', FilterStateStore.APP_STATE, false, false, 'age', 34); savedQuery.attributes.filters = [f1]; populateStateFromSavedQuery(dataMock.query, savedQuery); expect(dataMock.query.queryString.setQuery).toHaveBeenCalled(); diff --git a/packages/kbn-bazel-runner/src/index.ts b/src/plugins/unified_search/public/triggers/index.ts similarity index 87% rename from packages/kbn-bazel-runner/src/index.ts rename to src/plugins/unified_search/public/triggers/index.ts index fb88a9744f522..6e6d3a40d82f2 100644 --- a/packages/kbn-bazel-runner/src/index.ts +++ b/src/plugins/unified_search/public/triggers/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export * from './bazel_runner'; +export * from './update_filter_references_trigger'; diff --git a/src/plugins/unified_search/public/triggers/update_filter_references_trigger.ts b/src/plugins/unified_search/public/triggers/update_filter_references_trigger.ts new file mode 100644 index 0000000000000..3c2177f4b64b2 --- /dev/null +++ b/src/plugins/unified_search/public/triggers/update_filter_references_trigger.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { Trigger } from '@kbn/ui-actions-plugin/public'; + +export const UPDATE_FILTER_REFERENCES_TRIGGER = 'UPDATE_FILTER_REFERENCES_TRIGGER'; +export const updateFilterReferencesTrigger: Trigger = { + id: UPDATE_FILTER_REFERENCES_TRIGGER, + title: i18n.translate('unifiedSearch.triggers.updateFilterReferencesTrigger', { + defaultMessage: 'Update filter references', + }), + description: i18n.translate('unifiedSearch.triggers.updateFilterReferencesTriggerDescription', { + defaultMessage: 'Update filter references', + }), +}; diff --git a/src/plugins/vis_types/timeseries/common/fields_utils.ts b/src/plugins/vis_types/timeseries/common/fields_utils.ts index 65125f616155e..d5c2dfdc68811 100644 --- a/src/plugins/vis_types/timeseries/common/fields_utils.ts +++ b/src/plugins/vis_types/timeseries/common/fields_utils.ts @@ -94,7 +94,8 @@ export const createCachedFieldValueFormatter = ( return convert(cachedFormatter); } - if (dataView && !excludedFieldFormatsIds.includes(dataView.fieldFormatMap?.[fieldName]?.id)) { + const formatId = dataView?.fieldFormatMap?.[fieldName]?.id as FIELD_FORMAT_IDS; + if (dataView && !excludedFieldFormatsIds.includes(formatId)) { const field = dataView.fields.getByName(fieldName); if (field) { const formatter = dataView.getFormatterForField(field); diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/index.test.ts b/src/plugins/vis_types/timeseries/public/trigger_action/index.test.ts index 4a22f8ed7db18..83a2fec94ccec 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/index.test.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/index.test.ts @@ -247,6 +247,37 @@ describe('triggerTSVBtoLensConfiguration', () => { otherBucket: false, orderDirection: 'desc', orderBy: { type: 'alphabetical' }, + includeIsRegex: false, + excludeIsRegex: false, + parentFormat: { + id: 'terms', + }, + }); + }); + + test('should return include exclude information if the chart is broken down by terms', async () => { + const modelWithTerms = { + ...model, + series: [ + { + ...model.series[0], + split_mode: 'terms', + terms_size: 6, + terms_direction: 'desc', + terms_order_by: '_key', + terms_include: 't.*', + }, + ] as unknown as Series[], + }; + const triggerOptions = await triggerTSVBtoLensConfiguration(modelWithTerms); + expect(triggerOptions?.layers[0]?.termsParams).toStrictEqual({ + size: 6, + otherBucket: false, + orderDirection: 'desc', + orderBy: { type: 'alphabetical' }, + includeIsRegex: true, + include: ['t.*'], + excludeIsRegex: false, parentFormat: { id: 'terms', }, diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts b/src/plugins/vis_types/timeseries/public/trigger_action/index.ts index 91af800ca16a1..f384bc6d6562c 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/index.ts @@ -141,6 +141,10 @@ export const triggerTSVBtoLensConfiguration = async ( ...(layer.split_mode === 'terms' && { termsParams: { size: layer.terms_size ?? 10, + ...(layer.terms_include && { include: [layer.terms_include] }), + includeIsRegex: Boolean(layer.terms_include), + ...(layer.terms_exclude && { exclude: [layer.terms_exclude] }), + excludeIsRegex: Boolean(layer.terms_exclude), otherBucket: false, orderDirection: layer.terms_direction ?? 'desc', orderBy: layer.terms_order_by === '_key' ? { type: 'alphabetical' } : { type: 'column' }, diff --git a/src/plugins/visualizations/public/vis.test.ts b/src/plugins/visualizations/public/vis.test.ts index 864a45996625e..9aae534f8e7c0 100644 --- a/src/plugins/visualizations/public/vis.test.ts +++ b/src/plugins/visualizations/public/vis.test.ts @@ -21,11 +21,11 @@ jest.mock('./services', () => { destroy() {} } - // eslint-disable-next-line + // eslint-disable-next-line @typescript-eslint/no-var-requires const { BaseVisType } = require('./vis_types/base_vis_type'); - // eslint-disable-next-line + // eslint-disable-next-line @typescript-eslint/no-var-requires,@kbn/imports/uniform_imports const { SearchSource } = require('../../data/common/search/search_source'); - // eslint-disable-next-line + // eslint-disable-next-line @typescript-eslint/no-var-requires,@kbn/imports/uniform_imports const stubIndexPattern = require('../../data/common/stubs'); const visType = new BaseVisType({ name: 'pie', diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx index 16d6269a9eaf5..0fb7f9b818260 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx +++ b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx @@ -233,7 +233,7 @@ export const getTopNavConfig = ( return { id }; } catch (error) { - // eslint-disable-next-line + // eslint-disable-next-line no-console console.error(error); toastNotifications.addDanger({ title: i18n.translate( diff --git a/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx b/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx index 9dcb444368896..6bc982a824de1 100644 --- a/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx +++ b/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx @@ -227,7 +227,11 @@ const ToolsGroup = ({ visType, onVisTypeSelected, showExperimental }: VisCardPro <EuiFlexItem> <EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}> <EuiFlexItem grow={false}> - <EuiLink data-test-subj={`visType-${visType.name}`} onClick={onClick}> + <EuiLink + data-test-subj={`visType-${visType.name}`} + data-vis-stage={visType.stage} + onClick={onClick} + > {'titleInWizard' in visType && visType.titleInWizard ? visType.titleInWizard : visType.title} diff --git a/test/analytics/tests/instrumented_events/from_the_browser/click.ts b/test/analytics/tests/instrumented_events/from_the_browser/click.ts index dcf405825e90b..08027a6158761 100644 --- a/test/analytics/tests/instrumented_events/from_the_browser/click.ts +++ b/test/analytics/tests/instrumented_events/from_the_browser/click.ts @@ -13,12 +13,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const ebtUIHelper = getService('kibana_ebt_ui'); const { common } = getPageObjects(['common']); - // FLAKY: https://github.com/elastic/kibana/issues/133800 - describe.skip('General "click"', () => { + describe('General "click"', () => { beforeEach(async () => { - await common.navigateToApp('home'); - // Just clicking the top-nav-button and expecting it's still there... we're just testing the click event generation - await common.clickAndValidate('toggleNavButton', 'toggleNavButton'); + // Navigating to `home` with the Welcome prompt because some runs were flaky + // as we handle the Welcome screen only if the login prompt pops up. + // Otherwise, it stays in the Welcome screen :/ + await common.navigateToApp('home', { disableWelcomePrompt: false }); + // Clicking the button skipWelcomeScreen. + await common.clickAndValidate('skipWelcomeScreen', 'headerGlobalNav'); }); it('should emit a "click" event', async () => { @@ -27,10 +29,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(event.properties.target).to.be.an('array'); const targets = event.properties.target as string[]; expect(targets.includes('DIV')).to.be(true); - expect(targets.includes('id=kibana-body')).to.be(true); - expect(targets.includes('data-test-subj=kibanaChrome')).to.be(true); + expect(targets.includes('class=homWelcome')).to.be(true); + expect(targets.includes('data-test-subj=homeWelcomeInterstitial')).to.be(true); expect(targets.includes('BUTTON')).to.be(true); - expect(targets.includes('data-test-subj=toggleNavButton')).to.be(true); + expect(targets.includes('data-test-subj=skipWelcomeScreen')).to.be(true); }); }); } diff --git a/test/api_integration/apis/saved_objects_management/find.ts b/test/api_integration/apis/saved_objects_management/find.ts index e945d0f1f001a..ca891986f609a 100644 --- a/test/api_integration/apis/saved_objects_management/find.ts +++ b/test/api_integration/apis/saved_objects_management/find.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); describe('find', () => { @@ -194,14 +193,18 @@ export default function ({ getService }: FtrProviderContext) { }); describe('meta attributes injected properly', () => { - before(() => - esArchiver.load('test/api_integration/fixtures/es_archiver/management/saved_objects/search') - ); - after(() => - esArchiver.unload( - 'test/api_integration/fixtures/es_archiver/management/saved_objects/search' - ) - ); + before(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/search.json' + ); + }); + after(async () => { + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/search.json' + ); + await kibanaServer.savedObjects.cleanStandardList(); + }); it('should inject meta attributes for searches', async () => await supertest diff --git a/test/api_integration/apis/saved_objects_management/scroll_count.ts b/test/api_integration/apis/saved_objects_management/scroll_count.ts index ffb275e8656f0..94e301a085d70 100644 --- a/test/api_integration/apis/saved_objects_management/scroll_count.ts +++ b/test/api_integration/apis/saved_objects_management/scroll_count.ts @@ -15,19 +15,22 @@ const defaultTypes = ['visualization', 'index-pattern', 'search', 'dashboard']; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest') as SuperTest<Test>; + const kibanaServer = getService('kibanaServer'); const esArchiver = getService('esArchiver'); describe('scroll_count', () => { describe('with less than 10k objects', () => { before(async () => { - await esArchiver.load( - 'test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/scroll_count.json' ); }); after(async () => { - await esArchiver.unload( - 'test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count' + await kibanaServer.importExport.unload( + 'test/api_integration/fixtures/kbn_archiver/saved_objects/scroll_count.json' ); + await kibanaServer.savedObjects.cleanStandardList(); }); it('returns the count for each included types', async () => { diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json deleted file mode 100644 index 349545be44316..0000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/data.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "type": "doc", - "value": { - "id": "index-pattern:8963ca30-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "index-pattern": { - "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", - "title": "saved_objects*" - }, - "migrationVersion": { - "index-pattern": "7.11.0" - }, - "references": [ - ], - "type": "index-pattern", - "updated_at": "2018-03-28T01:08:34.290Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:7.0.0-alpha1", - "index": ".kibana", - "source": { - "config": { - "buildNum": 8467, - "defaultIndex": "8963ca30-3224-11e8-a572-ffca06da1357", - "telemetry:optIn": false - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2018-03-28T01:08:39.248Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:960372e0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "8963ca30-3224-11e8-a572-ffca06da1357", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "_source" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "_score", - "desc" - ] - ], - "title": "OneRecord", - "version": 1 - }, - "type": "search", - "updated_at": "2018-03-28T01:08:55.182Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:a42c0580-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "960372e0-3224-11e8-a572-ffca06da1357", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2018-03-28T01:09:18.936Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - }, - "savedSearchRefName": "search_0", - "title": "VisualizationFromSavedSearch", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "version": 1, - "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:add810b0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "8963ca30-3224-11e8-a572-ffca06da1357", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-03-28T01:09:35.163Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Amazing Visualization", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:b70c7ae0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", - "timeRestore": false, - "title": "Dashboard", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "add810b0-3224-11e8-a572-ffca06da1357", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "a42c0580-3224-11e8-a572-ffca06da1357", - "name": "panel_1", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-03-28T01:09:50.606Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:d70c7ae0-3224-11e8-a572-ffca82da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", - "timeRestore": false, - "title": "Amazing Dashboard", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "add810b0-3224-11e8-a572-ffca06da1357", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "a42c0580-3224-11e8-a572-ffca06da1357", - "name": "panel_1", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-03-28T01:09:50.606Z" - }, - "type": "_doc" - } -} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json deleted file mode 100644 index 619e300016043..0000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count/mappings.json +++ /dev/null @@ -1,472 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana_$KIBANA_PACKAGE_VERSION": {}, - ".kibana": {} - }, - "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", - "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", - "config": "c63748b75f39d0c54de12d12c1ccbc20", - "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", - "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", - "dashboard": "40554caf09725935e2c02e02563a2d07", - "index-pattern": "45915a1ad866812242df474eb0479052", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "db2c00e39b36f40930a3b9fc71c823e1", - "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", - "visualization": "f819cf6636b75c9e76ba733a0c6ef355" - } - }, - "dynamic": "strict", - "properties": { - "application_usage_daily": { - "dynamic": "false", - "properties": { - "timestamp": { - "type": "date" - } - } - }, - "application_usage_totals": { - "dynamic": "false", - "type": "object" - }, - "application_usage_transactional": { - "dynamic": "false", - "type": "object" - }, - "config": { - "dynamic": "false", - "properties": { - "buildNum": { - "type": "keyword" - } - } - }, - "core-usage-stats": { - "dynamic": "false", - "type": "object" - }, - "coreMigrationVersion": { - "type": "keyword" - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "optionsJSON": { - "index": false, - "type": "text" - }, - "panelsJSON": { - "index": false, - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "pause": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "section": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "value": { - "doc_values": false, - "index": false, - "type": "integer" - } - } - }, - "timeFrom": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "timeRestore": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "timeTo": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "dynamic": "false", - "properties": { - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "legacy-url-alias": { - "dynamic": "false", - "properties": { - "disabled": { - "type": "boolean" - }, - "sourceId": { - "type": "keyword" - }, - "targetType": { - "type": "keyword" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "config": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "dashboard": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "search": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "visualization": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "namespace": { - "type": "keyword" - }, - "namespaces": { - "type": "keyword" - }, - "originId": { - "type": "keyword" - }, - "query": { - "properties": { - "description": { - "type": "text" - }, - "filters": { - "enabled": false, - "type": "object" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "index": false, - "type": "keyword" - } - } - }, - "timefilter": { - "enabled": false, - "type": "object" - }, - "title": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "sample-data-telemetry": { - "properties": { - "installCount": { - "type": "long" - }, - "unInstallCount": { - "type": "long" - } - } - }, - "search": { - "properties": { - "columns": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "description": { - "type": "text" - }, - "grid": { - "enabled": false, - "type": "object" - }, - "hideChart": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "sort": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "search-telemetry": { - "dynamic": "false", - "type": "object" - }, - "server": { - "dynamic": "false", - "type": "object" - }, - "telemetry": { - "properties": { - "allowChangingOptInStatus": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "lastReported": { - "type": "date" - }, - "lastVersionChecked": { - "type": "keyword" - }, - "reportFailureCount": { - "type": "integer" - }, - "reportFailureVersion": { - "type": "keyword" - }, - "sendUsageFrom": { - "type": "keyword" - }, - "userHasSeenNotice": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "ui-counter": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "usage-counters": { - "dynamic": "false", - "properties": { - "domainId": { - "type": "keyword" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "savedSearchRefName": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "index": false, - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "index": false, - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1", - "priority": "10", - "refresh_interval": "1s", - "routing_partition_size": "1" - } - } - } -} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json deleted file mode 100644 index 05116741dbe5c..0000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/data.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "type": "doc", - "value": { - "id": "index-pattern:8963ca30-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "index-pattern": { - "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", - "title": "saved_objects*" - }, - "migrationVersion": { - "index-pattern": "7.11.0" - }, - "references": [ - ], - "type": "index-pattern", - "updated_at": "2018-03-28T01:08:34.290Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:7.0.0-alpha1", - "index": ".kibana", - "source": { - "config": { - "buildNum": 8467, - "defaultIndex": "8963ca30-3224-11e8-a572-ffca06da1357", - "telemetry:optIn": false - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2018-03-28T01:08:39.248Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:960372e0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "8963ca30-3224-11e8-a572-ffca06da1357", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "_source" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "_score", - "desc" - ] - ], - "title": "OneRecord", - "version": 1 - }, - "type": "search", - "updated_at": "2018-03-28T01:08:55.182Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:a42c0580-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "960372e0-3224-11e8-a572-ffca06da1357", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2018-03-28T01:09:18.936Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - }, - "savedSearchRefName": "search_0", - "title": "VisualizationFromSavedSearch", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "version": 1, - "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:add810b0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "8963ca30-3224-11e8-a572-ffca06da1357", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-03-28T01:09:35.163Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Visualization", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:b70c7ae0-3224-11e8-a572-ffca06da1357", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", - "timeRestore": false, - "title": "Dashboard", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "add810b0-3224-11e8-a572-ffca06da1357", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "a42c0580-3224-11e8-a572-ffca06da1357", - "name": "panel_1", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-03-28T01:09:50.606Z" - }, - "type": "_doc" - } -} \ No newline at end of file diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json deleted file mode 100644 index e9ec4e680d74e..0000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/search/mappings.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana_$KIBANA_PACKAGE_VERSION": {}, - ".kibana": {} - }, - "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", - "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", - "config": "c63748b75f39d0c54de12d12c1ccbc20", - "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", - "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", - "dashboard": "40554caf09725935e2c02e02563a2d07", - "index-pattern": "45915a1ad866812242df474eb0479052", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "db2c00e39b36f40930a3b9fc71c823e1", - "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", - "visualization": "f819cf6636b75c9e76ba733a0c6ef355" - } - }, - "dynamic": "strict", - "properties": { - "application_usage_daily": { - "dynamic": "false", - "properties": { - "timestamp": { - "type": "date" - } - } - }, - "application_usage_totals": { - "dynamic": "false", - "type": "object" - }, - "application_usage_transactional": { - "dynamic": "false", - "type": "object" - }, - "config": { - "dynamic": "false", - "properties": { - "buildNum": { - "type": "keyword" - } - } - }, - "core-usage-stats": { - "dynamic": "false", - "type": "object" - }, - "coreMigrationVersion": { - "type": "keyword" - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "optionsJSON": { - "index": false, - "type": "text" - }, - "panelsJSON": { - "index": false, - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "pause": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "section": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "value": { - "doc_values": false, - "index": false, - "type": "integer" - } - } - }, - "timeFrom": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "timeRestore": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "timeTo": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "graph-workspace": { - "dynamic": "false", - "type": "object" - }, - "index-pattern": { - "dynamic": "false", - "properties": { - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "legacy-url-alias": { - "dynamic": "false", - "properties": { - "disabled": { - "type": "boolean" - }, - "sourceId": { - "type": "keyword" - }, - "targetType": { - "type": "keyword" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "config": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "dashboard": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "search": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "visualization": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "namespace": { - "type": "keyword" - }, - "namespaces": { - "type": "keyword" - }, - "originId": { - "type": "keyword" - }, - "query": { - "properties": { - "description": { - "type": "text" - }, - "filters": { - "enabled": false, - "type": "object" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "index": false, - "type": "keyword" - } - } - }, - "timefilter": { - "enabled": false, - "type": "object" - }, - "title": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "sample-data-telemetry": { - "properties": { - "installCount": { - "type": "long" - }, - "unInstallCount": { - "type": "long" - } - } - }, - "search": { - "properties": { - "columns": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "description": { - "type": "text" - }, - "grid": { - "enabled": false, - "type": "object" - }, - "hideChart": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "sort": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "search-telemetry": { - "dynamic": "false", - "type": "object" - }, - "server": { - "dynamic": "false", - "type": "object" - }, - "telemetry": { - "properties": { - "allowChangingOptInStatus": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "lastReported": { - "type": "date" - }, - "lastVersionChecked": { - "type": "keyword" - }, - "reportFailureCount": { - "type": "integer" - }, - "reportFailureVersion": { - "type": "keyword" - }, - "sendUsageFrom": { - "type": "keyword" - }, - "userHasSeenNotice": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "ui-counter": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "usage-counters": { - "dynamic": "false", - "properties": { - "domainId": { - "type": "keyword" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "savedSearchRefName": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "index": false, - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "index": false, - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1", - "priority": "10", - "refresh_interval": "1s", - "routing_partition_size": "1" - } - } - } -} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/scroll_count.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/scroll_count.json new file mode 100644 index 0000000000000..3601351744617 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/scroll_count.json @@ -0,0 +1,178 @@ +{ + "attributes": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "saved_objects*" + }, + "coreMigrationVersion": "8.4.0", + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-03-28T01:08:34.290Z", + "version": "WzE0LDFd" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "_score", + "desc" + ] + ], + "title": "OneRecord", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-03-28T01:08:55.182Z", + "version": "WzE2LDFd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "VisualizationFromSavedSearch", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:18.936Z", + "version": "WzE3LDFd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Amazing Visualization", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:35.163Z", + "version": "WzE4LDFd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "b70c7ae0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "dashboard": "8.3.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z", + "version": "WzE5LDFd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Amazing Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "d70c7ae0-3224-11e8-a572-ffca82da1357", + "migrationVersion": { + "dashboard": "8.3.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z", + "version": "WzIwLDFd" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/search.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/search.json new file mode 100644 index 0000000000000..7bd1b73a9ba19 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/search.json @@ -0,0 +1,143 @@ +{ + "attributes": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "saved_objects*" + }, + "coreMigrationVersion": "8.4.0", + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-03-28T01:08:34.290Z", + "version": "WzEyLDFd" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "_score", + "desc" + ] + ], + "title": "OneRecord", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-03-28T01:08:55.182Z", + "version": "WzE0LDFd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "VisualizationFromSavedSearch", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:18.936Z", + "version": "WzE1LDFd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:35.163Z", + "version": "WzE2LDFd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "b70c7ae0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "dashboard": "8.3.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z", + "version": "WzE3LDFd" +} \ No newline at end of file diff --git a/test/functional/apps/console/_console.ts b/test/functional/apps/console/_console.ts index 4f7c3664721e8..9d31a09078261 100644 --- a/test/functional/apps/console/_console.ts +++ b/test/functional/apps/console/_console.ts @@ -12,10 +12,11 @@ import { FtrProviderContext } from '../../ftr_provider_context'; const DEFAULT_REQUEST = ` -GET _search +# Click the Variables button, above, to create your own variables. +GET \${exampleVariable1} // _search { "query": { - "match_all": {} + "\${exampleVariable2}": {} // match_all } } @@ -51,6 +52,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('default request response should include `"timed_out" : false`', async () => { const expectedResponseContains = `"timed_out": false`; + await PageObjects.console.selectAllRequests(); await PageObjects.console.clickPlay(); await retry.try(async () => { const actualResponse = await PageObjects.console.getResponse(); diff --git a/test/functional/apps/console/_variables.ts b/test/functional/apps/console/_variables.ts new file mode 100644 index 0000000000000..0918cb6fb846d --- /dev/null +++ b/test/functional/apps/console/_variables.ts @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default ({ getService, getPageObjects }: FtrProviderContext) => { + const retry = getService('retry'); + const log = getService('log'); + const PageObjects = getPageObjects(['common', 'console', 'header']); + + describe('Console variables', function testConsoleVariables() { + this.tags('includeFirefox'); + before(async () => { + log.debug('navigateTo console'); + await PageObjects.common.navigateToApp('console'); + await retry.try(async () => { + await PageObjects.console.collapseHelp(); + await PageObjects.console.clearTextArea(); + }); + }); + + it('should allow creating a new variable', async () => { + await PageObjects.console.addNewVariable({ name: 'index1', value: 'test' }); + const variables = await PageObjects.console.getVariables(); + log.debug(variables); + expect(variables).to.contain('index1'); + }); + + it('should allow removing a variable', async () => { + await PageObjects.console.addNewVariable({ name: 'index2', value: 'test' }); + await PageObjects.console.removeVariables(); + const variables = await PageObjects.console.getVariables(); + expect(variables).to.eql([]); + }); + + describe('with variables in url', () => { + it('should send a successful request', async () => { + await PageObjects.console.addNewVariable({ name: 'index3', value: '_search' }); + await PageObjects.console.enterRequest('\n GET ${index3}'); + await PageObjects.console.clickPlay(); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.try(async () => { + const status = await PageObjects.console.getResponseStatus(); + expect(status).to.eql(200); + }); + }); + }); + + describe('with variables in request body', () => { + it('should send a successful request', async () => { + await PageObjects.console.addNewVariable({ name: 'query1', value: '{"match_all": {}}' }); + await PageObjects.console.enterRequest('\n GET _search'); + await PageObjects.console.pressEnter(); + await PageObjects.console.enterText(`{\n\t"query": "\${query1}"`); + await PageObjects.console.pressEnter(); + await PageObjects.console.clickPlay(); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.try(async () => { + const status = await PageObjects.console.getResponseStatus(); + expect(status).to.eql(200); + }); + }); + }); + }); +}; diff --git a/test/functional/apps/console/index.js b/test/functional/apps/console/index.js index f827a043176a8..6222110ba489e 100644 --- a/test/functional/apps/console/index.js +++ b/test/functional/apps/console/index.js @@ -21,6 +21,7 @@ export default function ({ getService, loadTestFile }) { loadTestFile(require.resolve('./_autocomplete')); loadTestFile(require.resolve('./_vector_tile')); loadTestFile(require.resolve('./_comments')); + loadTestFile(require.resolve('./_variables')); } }); } diff --git a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts index c96e596a88ecf..c94ad298ef43f 100644 --- a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts @@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); + const testSubjects = getService('testSubjects'); describe('create and add embeddables', () => { before(async () => { @@ -133,6 +134,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('visualize:enableLabs advanced setting', () => { const LAB_VIS_NAME = 'Rendering Test: input control'; + let experimentalTypes: string[] = []; + + before(async () => { + // get the data-test-subj values for all experimental visualizations for later tests + await PageObjects.visualize.gotoVisualizationLandingPage(); + await PageObjects.visualize.clickNewVisualization(); + const experimentalTypeWrappers = await PageObjects.visualize.getExperimentalTypeLinks(); + experimentalTypes = await Promise.all( + experimentalTypeWrappers.map((element) => element.getAttribute('data-test-subj')) + ); + }); + it('should display lab visualizations in add panel', async () => { await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); @@ -141,6 +154,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(exists).to.be(true); }); + it('should display lab visualizations in editor menu', async () => { + await dashboardAddPanel.clickEditorMenuButton(); + for (const dataTestSubj of experimentalTypes) { + await testSubjects.existOrFail(dataTestSubj); + } + }); + describe('is false', () => { before(async () => { await PageObjects.header.clickStackManagement(); @@ -157,6 +177,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(exists).to.be(false); }); + it('should not display lab visualizations in editor menu', async () => { + await dashboardAddPanel.clickEditorMenuButton(); + for (const dataTestSubj of experimentalTypes) { + expect(await testSubjects.exists(dataTestSubj)).to.be(false); + } + }); + after(async () => { await PageObjects.header.clickStackManagement(); await PageObjects.settings.clickKibanaSettings(); diff --git a/test/functional/apps/dashboard/group1/embeddable_rendering.ts b/test/functional/apps/dashboard/group1/embeddable_rendering.ts index 42f2e9a24f3d0..f57b1f1fda83a 100644 --- a/test/functional/apps/dashboard/group1/embeddable_rendering.ts +++ b/test/functional/apps/dashboard/group1/embeddable_rendering.ts @@ -99,8 +99,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardExpect.vegaTextsDoNotExist(['5,000']); }; - // FLAKY: https://github.com/elastic/kibana/issues/132865 - describe.skip('dashboard embeddable rendering', function describeIndexTests() { + describe('dashboard embeddable rendering', function describeIndexTests() { before(async () => { await security.testUser.setRoles(['kibana_admin', 'animals', 'test_logstash_reader']); await kibanaServer.savedObjects.cleanStandardList(); diff --git a/test/functional/apps/dashboard/group1/url_field_formatter.ts b/test/functional/apps/dashboard/group1/url_field_formatter.ts index 2295693098ba7..ec6b39d7dc659 100644 --- a/test/functional/apps/dashboard/group1/url_field_formatter.ts +++ b/test/functional/apps/dashboard/group1/url_field_formatter.ts @@ -11,18 +11,19 @@ import { WebElementWrapper } from '../../../services/lib/web_element_wrapper'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { common, dashboard, settings, timePicker, visChart } = getPageObjects([ + const { common, dashboard, settings, visChart, discover } = getPageObjects([ 'common', 'dashboard', 'settings', - 'timePicker', 'visChart', + 'discover', ]); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const browser = getService('browser'); const fieldName = 'clientip'; const deployment = getService('deployment'); + const retry = getService('retry'); const clickFieldAndCheckUrl = async (fieldLink: WebElementWrapper) => { const fieldValue = await fieldLink.getVisibleText(); @@ -35,8 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(currentUrl).to.equal(fieldUrl); }; - // FLAKY: https://github.com/elastic/kibana/issues/133973 - describe.skip('Changing field formatter to Url', () => { + describe('Changing field formatter to Url', () => { before(async function () { await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.importExport.load( @@ -68,12 +68,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('applied on discover', async () => { + const from = 'Sep 19, 2017 @ 06:31:44.000'; + const to = 'Sep 23, 2018 @ 18:31:44.000'; + await common.setTime({ from, to }); await common.navigateToApp('discover'); - await timePicker.setAbsoluteRange( - 'Sep 19, 2017 @ 06:31:44.000', - 'Sep 23, 2018 @ 18:31:44.000' - ); + await discover.selectIndexPattern('logstash-*'); await testSubjects.click('docTableExpandToggleColumn'); + await retry.waitForWithTimeout(`${fieldName} is visible`, 30000, async () => { + return await testSubjects.isDisplayed(`tableDocViewRow-${fieldName}-value`); + }); const fieldLink = await testSubjects.find(`tableDocViewRow-${fieldName}-value`); await clickFieldAndCheckUrl(fieldLink); }); diff --git a/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts b/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts index bb49225f32d81..f2476f7516611 100644 --- a/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts +++ b/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts @@ -229,8 +229,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(hasBadFieldFilter).to.be(true); }); - it('filter with non-existent field renders in error mode', async function () { - const hasBadFieldFilter = await filterBar.hasFilter('baad-field', 'error', false); + it('filter with non-existent field renders in warning mode', async function () { + const hasBadFieldFilter = await filterBar.hasFilter('baad-field', 'warn', false); expect(hasBadFieldFilter).to.be(true); }); diff --git a/test/functional/apps/dashboard/group6/create_and_add_embeddables.ts b/test/functional/apps/dashboard/group6/create_and_add_embeddables.ts deleted file mode 100644 index c96e596a88ecf..0000000000000 --- a/test/functional/apps/dashboard/group6/create_and_add_embeddables.ts +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import expect from '@kbn/expect'; - -import { VisualizeConstants } from '@kbn/visualizations-plugin/common/constants'; -import { VISUALIZE_ENABLE_LABS_SETTING } from '@kbn/visualizations-plugin/common/constants'; -import { FtrProviderContext } from '../../../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); - const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'settings', 'common']); - const browser = getService('browser'); - const kibanaServer = getService('kibanaServer'); - const dashboardAddPanel = getService('dashboardAddPanel'); - - describe('create and add embeddables', () => { - before(async () => { - await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.importExport.load( - 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' - ); - await kibanaServer.uiSettings.replace({ - defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', - }); - }); - - it('ensure toolbar popover closes on add', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.clickNewDashboard(); - await PageObjects.dashboard.switchToEditMode(); - await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAddNewEmbeddableLink('LOG_STREAM_EMBEDDABLE'); - await dashboardAddPanel.expectEditorMenuClosed(); - }); - - after(async () => { - await kibanaServer.savedObjects.cleanStandardList(); - }); - - describe('add new visualization link', () => { - before(async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.preserveCrossAppState(); - await PageObjects.dashboard.loadSavedDashboard('few panels'); - }); - - it('adds new visualization via the top nav link', async () => { - const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await PageObjects.dashboard.switchToEditMode(); - await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAggBasedVisualizations(); - await PageObjects.visualize.clickAreaChart(); - await PageObjects.visualize.clickNewSearch(); - await PageObjects.visualize.saveVisualizationExpectSuccess( - 'visualization from top nav add new panel', - { redirectToOrigin: true } - ); - await retry.try(async () => { - const panelCount = await PageObjects.dashboard.getPanelCount(); - expect(panelCount).to.eql(originalPanelCount + 1); - }); - await PageObjects.dashboard.waitForRenderComplete(); - }); - - it('adds a new visualization', async () => { - const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAggBasedVisualizations(); - await PageObjects.visualize.clickAreaChart(); - await PageObjects.visualize.clickNewSearch(); - await PageObjects.visualize.saveVisualizationExpectSuccess( - 'visualization from add new link', - { redirectToOrigin: true } - ); - - await retry.try(async () => { - const panelCount = await PageObjects.dashboard.getPanelCount(); - expect(panelCount).to.eql(originalPanelCount + 1); - }); - await PageObjects.dashboard.waitForRenderComplete(); - }); - - it('adds a new timelion visualization', async () => { - // adding this case, as the timelion agg-based viz doesn't need the `clickNewSearch()` step - const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAggBasedVisualizations(); - await PageObjects.visualize.clickTimelion(); - await PageObjects.visualize.saveVisualizationExpectSuccess( - 'timelion visualization from add new link', - { redirectToOrigin: true } - ); - - await retry.try(async () => { - const panelCount = await PageObjects.dashboard.getPanelCount(); - expect(panelCount).to.eql(originalPanelCount + 1); - }); - await PageObjects.dashboard.waitForRenderComplete(); - }); - - it('adds a markdown visualization via the quick button', async () => { - const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await dashboardAddPanel.clickMarkdownQuickButton(); - await PageObjects.visualize.saveVisualizationExpectSuccess( - 'visualization from markdown quick button', - { redirectToOrigin: true } - ); - - await retry.try(async () => { - const panelCount = await PageObjects.dashboard.getPanelCount(); - expect(panelCount).to.eql(originalPanelCount + 1); - }); - await PageObjects.dashboard.waitForRenderComplete(); - }); - - it('saves the listing page instead of the visualization to the app link', async () => { - await PageObjects.header.clickVisualize(true); - const currentUrl = await browser.getCurrentUrl(); - expect(currentUrl).not.to.contain(VisualizeConstants.EDIT_PATH); - }); - - after(async () => { - await PageObjects.header.clickDashboard(); - }); - }); - - describe('visualize:enableLabs advanced setting', () => { - const LAB_VIS_NAME = 'Rendering Test: input control'; - - it('should display lab visualizations in add panel', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.clickNewDashboard(); - const exists = await dashboardAddPanel.panelAddLinkExists(LAB_VIS_NAME); - await dashboardAddPanel.closeAddPanel(); - expect(exists).to.be(true); - }); - - describe('is false', () => { - before(async () => { - await PageObjects.header.clickStackManagement(); - await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING); - }); - - it('should not display lab visualizations in add panel', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.clickNewDashboard(); - - const exists = await dashboardAddPanel.panelAddLinkExists(LAB_VIS_NAME); - await dashboardAddPanel.closeAddPanel(); - expect(exists).to.be(false); - }); - - after(async () => { - await PageObjects.header.clickStackManagement(); - await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING); - await PageObjects.header.clickDashboard(); - }); - }); - }); - }); -} diff --git a/test/functional/apps/dashboard_elements/controls/controls_callout.ts b/test/functional/apps/dashboard_elements/controls/controls_callout.ts index 0883957c37d8a..886b15a61edc0 100644 --- a/test/functional/apps/dashboard_elements/controls/controls_callout.ts +++ b/test/functional/apps/dashboard_elements/controls/controls_callout.ts @@ -39,7 +39,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { const panelCount = await dashboard.getPanelCount(); if (panelCount > 0) { - const panels = await dashboard.getAllPanels(); + const panels = await dashboard.getDashboardPanels(); for (const panel of panels) { await dashboardPanelActions.removePanel(panel); } diff --git a/test/functional/apps/discover/_data_grid_pagination.ts b/test/functional/apps/discover/_data_grid_pagination.ts index 7b0fc40e94ab8..fa0e2a0b430ff 100644 --- a/test/functional/apps/discover/_data_grid_pagination.ts +++ b/test/functional/apps/discover/_data_grid_pagination.ts @@ -10,6 +10,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { + const browser = getService('browser'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dataGrid = getService('dataGrid'); @@ -20,6 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover data grid pagination', function describeIndexTests() { before(async () => { + await browser.setWindowSize(1200, 2000); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); }); @@ -27,6 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace({}); + await kibanaServer.savedObjects.clean({ types: ['search'] }); }); beforeEach(async function () { @@ -62,5 +65,55 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('discoverTableSampleSizeSettingsLink'); }); }); + + it('should update pagination when rows per page is changed', async () => { + const rows = await dataGrid.getDocTableRows(); + expect(rows.length).to.be.above(0); + await testSubjects.existOrFail('pagination-button-0'); // first page + await testSubjects.existOrFail('pagination-button-4'); // last page + await testSubjects.click('tablePaginationPopoverButton'); + await retry.try(async function () { + return testSubjects.exists('tablePagination-500-rows'); + }); + await testSubjects.click('tablePagination-500-rows'); + await retry.try(async function () { + return !testSubjects.exists('pagination-button-1'); // only page 0 is left + }); + await testSubjects.existOrFail('discoverTableFooter'); + }); + + it('should render exact number of rows which where configured in the saved search or in settings', async () => { + await kibanaServer.uiSettings.update({ + ...defaultSettings, + 'discover:sampleSize': 12, + 'discover:sampleRowsPerPage': 6, + hideAnnouncements: true, + }); + + // first render is based on settings value + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + expect((await dataGrid.getDocTableRows()).length).to.be(6); + await dataGrid.checkCurrentRowsPerPageToBe(6); + + // now we change it via popover + await dataGrid.changeRowsPerPageTo(10); + + // save as a new search + const savedSearchTitle = 'search with saved rowsPerPage'; + await PageObjects.discover.saveSearch(savedSearchTitle); + + // start a new search session + await testSubjects.click('discoverNewButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect((await dataGrid.getDocTableRows()).length).to.be(6); // as in settings + await dataGrid.checkCurrentRowsPerPageToBe(6); + + // open the saved search + await PageObjects.discover.loadSavedSearch(savedSearchTitle); + await PageObjects.discover.waitUntilSearchingHasFinished(); + expect((await dataGrid.getDocTableRows()).length).to.be(10); // as in the saved search + await dataGrid.checkCurrentRowsPerPageToBe(10); + }); }); } diff --git a/test/functional/apps/discover/embeddable/saved_search_embeddable.ts b/test/functional/apps/discover/embeddable/saved_search_embeddable.ts new file mode 100644 index 0000000000000..3b31dd7a559bc --- /dev/null +++ b/test/functional/apps/discover/embeddable/saved_search_embeddable.ts @@ -0,0 +1,81 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const browser = getService('browser'); + const dataGrid = getService('dataGrid'); + const dashboardAddPanel = getService('dashboardAddPanel'); + const filterBar = getService('filterBar'); + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'timePicker', 'discover']); + + describe('discover saved search embeddable', () => { + before(async () => { + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); + await kibanaServer.uiSettings.replace({ + defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', + }); + await PageObjects.common.navigateToApp('dashboard'); + await filterBar.ensureFieldEditorModalIsClosed(); + await PageObjects.dashboard.gotoDashboardLandingPage(); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.timePicker.setAbsoluteRange( + 'Sep 22, 2015 @ 00:00:00.000', + 'Sep 23, 2015 @ 00:00:00.000' + ); + }); + + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + + const addSearchEmbeddableToDashboard = async () => { + await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.dashboard.waitForRenderComplete(); + const rows = await dataGrid.getDocTableRows(); + expect(rows.length).to.be.above(0); + }; + + const refreshDashboardPage = async () => { + await browser.refresh(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.dashboard.waitForRenderComplete(); + }; + + it('can save a search embeddable with a defined rows per page number', async function () { + const dashboardName = 'Dashboard with a Paginated Saved Search'; + await addSearchEmbeddableToDashboard(); + await dataGrid.checkCurrentRowsPerPageToBe(100); + + await PageObjects.dashboard.saveDashboard(dashboardName, { + waitDialogIsClosed: true, + exitFromEditMode: false, + }); + + await refreshDashboardPage(); + + await dataGrid.checkCurrentRowsPerPageToBe(100); + + await dataGrid.changeRowsPerPageTo(10); + + await PageObjects.dashboard.saveDashboard(dashboardName); + await refreshDashboardPage(); + + await dataGrid.checkCurrentRowsPerPageToBe(10); + }); + }); +} diff --git a/test/functional/apps/discover/index.ts b/test/functional/apps/discover/index.ts index 803ca1fec57cd..e6a40d79d41b0 100644 --- a/test/functional/apps/discover/index.ts +++ b/test/functional/apps/discover/index.ts @@ -68,6 +68,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_data_view_editor')); loadTestFile(require.resolve('./_hide_announcements')); loadTestFile(require.resolve('./classic/_hide_announcements')); + loadTestFile(require.resolve('./embeddable/saved_search_embeddable')); } }); } diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index 3a5c8e3d84db4..e242e70b966a1 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -7,6 +7,7 @@ */ import { Key } from 'selenium-webdriver'; +import { asyncForEach } from '@kbn/std'; import { FtrService } from '../ftr_provider_context'; import { WebElementWrapper } from '../services/lib/web_element_wrapper'; @@ -14,7 +15,6 @@ export class ConsolePageObject extends FtrService { private readonly testSubjects = this.ctx.getService('testSubjects'); private readonly retry = this.ctx.getService('retry'); private readonly find = this.ctx.getService('find'); - log = this.ctx.getService('log'); public async getVisibleTextFromAceEditor(editor: WebElementWrapper) { const lines = await editor.findAllByClassName('ace_line_group'); @@ -48,6 +48,54 @@ export class ConsolePageObject extends FtrService { await this.testSubjects.click('consoleSettingsButton'); } + public async openVariablesModal() { + await this.testSubjects.click('consoleVariablesButton'); + } + + public async closeVariablesModal() { + await this.testSubjects.click('variablesCancelButton'); + } + + public async addNewVariable({ name, value }: { name: string; value: string }) { + await this.openVariablesModal(); + + // while the variables form opens/loads this may fail, so retry for a while + await this.retry.try(async () => { + await this.testSubjects.click('variablesAddButton'); + + const variableNameInputs = await this.testSubjects.findAll('variablesNameInput'); + await variableNameInputs[variableNameInputs.length - 1].type(name); + + const variableValueInputs = await this.testSubjects.findAll('variablesValueInput'); + await variableValueInputs[variableValueInputs.length - 1].type(value); + }); + + await this.testSubjects.click('variablesSaveButton'); + } + + public async removeVariables() { + await this.openVariablesModal(); + + // while the variables form opens/loads this may fail, so retry for a while + await this.retry.try(async () => { + const buttons = await this.testSubjects.findAll('variablesRemoveButton'); + await asyncForEach(buttons, async (button) => { + await button.click(); + }); + }); + await this.testSubjects.click('variablesSaveButton'); + } + + public async getVariables() { + await this.openVariablesModal(); + const inputs = await this.testSubjects.findAll('variablesNameInput'); + const variables = await Promise.all( + inputs.map(async (input) => await input.getAttribute('value')) + ); + await this.closeVariablesModal(); + return variables; + } + public async setFontSizeSetting(newSize: number) { await this.openSettings(); diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index 7ff6bff172f58..7ba25a89ce84a 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -566,7 +566,9 @@ export class DashboardPageObject extends FtrService { return await Promise.all(titleObjects.map(async (title) => await title.getVisibleText())); } - // returns an array of Boolean values - true if the panel title is visible in view mode, false if it is not + /** + * @return An array of boolean values - true if the panel title is visible in view mode, false if it is not + */ public async getVisibilityOfPanelTitles() { this.log.debug('in getVisibilityOfPanels'); // only works if the dashboard is in view mode @@ -575,9 +577,12 @@ export class DashboardPageObject extends FtrService { await this.clickCancelOutOfEditMode(); } const visibilities: boolean[] = []; - const titleObjects = await this.testSubjects.findAll('dashboardPanelTitle__wrapper'); - for (const titleObject of titleObjects) { - const exists = !(await titleObject.elementHasClass('embPanel__header--floater')); + const panels = await this.getDashboardPanels(); + for (const panel of panels) { + const exists = await this.find.descendantExistsByCssSelector( + 'figcaption.embPanel__header', + panel + ); visibilities.push(exists); } // return to edit mode if a switch to view mode above was necessary @@ -606,11 +611,6 @@ export class DashboardPageObject extends FtrService { return panels.length; } - public async getAllPanels() { - this.log.debug('getAllPanels'); - return await this.testSubjects.findAll('embeddablePanel'); - } - public getTestVisualizations() { return [ { name: PIE_CHART_VIS_NAME, description: 'PieChart' }, diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index 089298687bce6..fbd4310489fef 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -325,4 +325,23 @@ export class DataGridService extends FtrService { public async hasNoResults() { return await this.find.existsByCssSelector('.euiDataGrid__noResults'); } + + public async checkCurrentRowsPerPageToBe(value: number) { + await this.retry.try(async () => { + return ( + (await this.testSubjects.getVisibleText('tablePaginationPopoverButton')) === + `Rows per page: ${value}` + ); + }); + } + + public async changeRowsPerPageTo(newValue: number) { + await this.testSubjects.click('tablePaginationPopoverButton'); + const option = `tablePagination-${newValue}-rows`; + await this.retry.try(async () => { + return this.testSubjects.exists(option); + }); + await this.testSubjects.click(option); + await this.checkCurrentRowsPerPageToBe(newValue); + } } diff --git a/test/functional/services/lib/web_element_wrapper/custom_cheerio_api.ts b/test/functional/services/lib/web_element_wrapper/custom_cheerio_api.ts index c01e07fd07624..e0013c76d3aac 100644 --- a/test/functional/services/lib/web_element_wrapper/custom_cheerio_api.ts +++ b/test/functional/services/lib/web_element_wrapper/custom_cheerio_api.ts @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable @kbn/eslint/require-license-header,@typescript-eslint/unified-signatures */ /** * Type interfaces extracted from node_modules/@types/cheerio/index.d.ts diff --git a/test/interpreter_functional/snapshots/baseline/combined_test2.json b/test/interpreter_functional/snapshots/baseline/combined_test2.json index 7e51931665a65..98eb526aa75f6 100644 --- a/test/interpreter_functional/snapshots/baseline/combined_test2.json +++ b/test/interpreter_functional/snapshots/baseline/combined_test2.json @@ -1 +1 @@ -{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file +{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/combined_test3.json b/test/interpreter_functional/snapshots/baseline/combined_test3.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/baseline/combined_test3.json +++ b/test/interpreter_functional/snapshots/baseline/combined_test3.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/final_output_test.json b/test/interpreter_functional/snapshots/baseline/final_output_test.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/baseline/final_output_test.json +++ b/test/interpreter_functional/snapshots/baseline/final_output_test.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_all_data.json b/test/interpreter_functional/snapshots/baseline/metric_all_data.json index d88af7db80e0a..1c7a6cb857ed1 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_all_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_all_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"bytes","params":null},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"bytes","params":null},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_empty_data.json b/test/interpreter_functional/snapshots/baseline/metric_empty_data.json index 75922f0e30344..1f93a487bee2b 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_empty_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_empty_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json b/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json index b28a8eeff2de4..78135325fac66 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json b/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json index 096482423cd81..4ff228305a1d6 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json +++ b/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":{"colors":["rgb(0,0,0,0)","rgb(100, 100, 100)"],"continuity":"none","gradient":false,"range":"number","rangeMax":10000,"rangeMin":0,"stops":[0,10000]},"percentageMode":true,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":{"colors":["rgb(0,0,0,0)","rgb(100, 100, 100)"],"continuity":"none","gradient":false,"range":"number","rangeMax":10000,"rangeMin":0,"stops":[0,10000]},"percentageMode":true,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json b/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json index e417a1fb95d1f..7a91e2cae2bab 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/partial_test_1.json b/test/interpreter_functional/snapshots/baseline/partial_test_1.json index 0e26456967962..6e12a10d1e283 100644 --- a/test/interpreter_functional/snapshots/baseline/partial_test_1.json +++ b/test/interpreter_functional/snapshots/baseline/partial_test_1.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/partial_test_2.json b/test/interpreter_functional/snapshots/baseline/partial_test_2.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/baseline/partial_test_2.json +++ b/test/interpreter_functional/snapshots/baseline/partial_test_2.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/step_output_test2.json b/test/interpreter_functional/snapshots/baseline/step_output_test2.json index 7e51931665a65..98eb526aa75f6 100644 --- a/test/interpreter_functional/snapshots/baseline/step_output_test2.json +++ b/test/interpreter_functional/snapshots/baseline/step_output_test2.json @@ -1 +1 @@ -{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file +{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/step_output_test3.json b/test/interpreter_functional/snapshots/baseline/step_output_test3.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/baseline/step_output_test3.json +++ b/test/interpreter_functional/snapshots/baseline/step_output_test3.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/tagcloud_all_data.json b/test/interpreter_functional/snapshots/baseline/tagcloud_all_data.json index d373194db261d..cb14c6ea89407 100644 --- a/test/interpreter_functional/snapshots/baseline/tagcloud_all_data.json +++ b/test/interpreter_functional/snapshots/baseline/tagcloud_all_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/tagcloud_empty_data.json b/test/interpreter_functional/snapshots/baseline/tagcloud_empty_data.json index 864aa3538477e..0910e67409423 100644 --- a/test/interpreter_functional/snapshots/baseline/tagcloud_empty_data.json +++ b/test/interpreter_functional/snapshots/baseline/tagcloud_empty_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/tagcloud_fontsize.json b/test/interpreter_functional/snapshots/baseline/tagcloud_fontsize.json index 461bdae0e172c..a79f7d88a9479 100644 --- a/test/interpreter_functional/snapshots/baseline/tagcloud_fontsize.json +++ b/test/interpreter_functional/snapshots/baseline/tagcloud_fontsize.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/tagcloud_metric_data.json b/test/interpreter_functional/snapshots/baseline/tagcloud_metric_data.json index 4eb2297db5425..f340c5b653e35 100644 --- a/test/interpreter_functional/snapshots/baseline/tagcloud_metric_data.json +++ b/test/interpreter_functional/snapshots/baseline/tagcloud_metric_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/tagcloud_options.json b/test/interpreter_functional/snapshots/baseline/tagcloud_options.json index d7892c9197b7f..ecbafbbc0afba 100644 --- a/test/interpreter_functional/snapshots/baseline/tagcloud_options.json +++ b/test/interpreter_functional/snapshots/baseline/tagcloud_options.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/combined_test2.json b/test/interpreter_functional/snapshots/session/combined_test2.json index 7e51931665a65..98eb526aa75f6 100644 --- a/test/interpreter_functional/snapshots/session/combined_test2.json +++ b/test/interpreter_functional/snapshots/session/combined_test2.json @@ -1 +1 @@ -{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file +{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/combined_test3.json b/test/interpreter_functional/snapshots/session/combined_test3.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/session/combined_test3.json +++ b/test/interpreter_functional/snapshots/session/combined_test3.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/final_output_test.json b/test/interpreter_functional/snapshots/session/final_output_test.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/session/final_output_test.json +++ b/test/interpreter_functional/snapshots/session/final_output_test.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_all_data.json b/test/interpreter_functional/snapshots/session/metric_all_data.json index d88af7db80e0a..1c7a6cb857ed1 100644 --- a/test/interpreter_functional/snapshots/session/metric_all_data.json +++ b/test/interpreter_functional/snapshots/session/metric_all_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"bytes","params":null},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"bytes","params":null},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_empty_data.json b/test/interpreter_functional/snapshots/session/metric_empty_data.json index 75922f0e30344..1f93a487bee2b 100644 --- a/test/interpreter_functional/snapshots/session/metric_empty_data.json +++ b/test/interpreter_functional/snapshots/session/metric_empty_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_invalid_data.json b/test/interpreter_functional/snapshots/session/metric_invalid_data.json new file mode 100644 index 0000000000000..daf08c67211cc --- /dev/null +++ b/test/interpreter_functional/snapshots/session/metric_invalid_data.json @@ -0,0 +1 @@ +"[legacyMetricVis] > [visdimension] > Provided column name or index is invalid: 0" \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json b/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json index b28a8eeff2de4..78135325fac66 100644 --- a/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json +++ b/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_percentage_mode.json b/test/interpreter_functional/snapshots/session/metric_percentage_mode.json index 096482423cd81..4ff228305a1d6 100644 --- a/test/interpreter_functional/snapshots/session/metric_percentage_mode.json +++ b/test/interpreter_functional/snapshots/session/metric_percentage_mode.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":{"colors":["rgb(0,0,0,0)","rgb(100, 100, 100)"],"continuity":"none","gradient":false,"range":"number","rangeMax":10000,"rangeMin":0,"stops":[0,10000]},"percentageMode":true,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":{"colors":["rgb(0,0,0,0)","rgb(100, 100, 100)"],"continuity":"none","gradient":false,"range":"number","rangeMax":10000,"rangeMin":0,"stops":[0,10000]},"percentageMode":true,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_single_metric_data.json b/test/interpreter_functional/snapshots/session/metric_single_metric_data.json index e417a1fb95d1f..7a91e2cae2bab 100644 --- a/test/interpreter_functional/snapshots/session/metric_single_metric_data.json +++ b/test/interpreter_functional/snapshots/session/metric_single_metric_data.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/partial_test_1.json b/test/interpreter_functional/snapshots/session/partial_test_1.json index 0e26456967962..6e12a10d1e283 100644 --- a/test/interpreter_functional/snapshots/session/partial_test_1.json +++ b/test/interpreter_functional/snapshots/session/partial_test_1.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/partial_test_2.json b/test/interpreter_functional/snapshots/session/partial_test_2.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/session/partial_test_2.json +++ b/test/interpreter_functional/snapshots/session/partial_test_2.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/step_output_test2.json b/test/interpreter_functional/snapshots/session/step_output_test2.json index 7e51931665a65..98eb526aa75f6 100644 --- a/test/interpreter_functional/snapshots/session/step_output_test2.json +++ b/test/interpreter_functional/snapshots/session/step_output_test2.json @@ -1 +1 @@ -{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file +{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/step_output_test3.json b/test/interpreter_functional/snapshots/session/step_output_test3.json index 17357fe60664e..49daaed3c5b85 100644 --- a/test/interpreter_functional/snapshots/session/step_output_test3.json +++ b/test/interpreter_functional/snapshots/session/step_output_test3.json @@ -1 +1 @@ -{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"legacyMetricVis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"autoScale":null,"colorFullBackground":false,"labels":{"position":"bottom","show":true,"style":{"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:24px;line-height:1","spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"24px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}},"metricColorMode":"None","palette":null,"percentageMode":false,"style":{"bgColor":false,"css":"font-family:'Open Sans', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:center;font-size:60px;line-height:1","labelColor":false,"spec":{"fontFamily":"'Open Sans', Helvetica, Arial, sans-serif","fontSize":"60px","fontStyle":"normal","fontWeight":"normal","lineHeight":"1","textAlign":"center","textDecoration":"none"},"type":"style"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_all_data.json b/test/interpreter_functional/snapshots/session/tagcloud_all_data.json index d373194db261d..cb14c6ea89407 100644 --- a/test/interpreter_functional/snapshots/session/tagcloud_all_data.json +++ b/test/interpreter_functional/snapshots/session/tagcloud_all_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_empty_data.json b/test/interpreter_functional/snapshots/session/tagcloud_empty_data.json index 864aa3538477e..0910e67409423 100644 --- a/test/interpreter_functional/snapshots/session/tagcloud_empty_data.json +++ b/test/interpreter_functional/snapshots/session/tagcloud_empty_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_fontsize.json b/test/interpreter_functional/snapshots/session/tagcloud_fontsize.json index 461bdae0e172c..a79f7d88a9479 100644 --- a/test/interpreter_functional/snapshots/session/tagcloud_fontsize.json +++ b/test/interpreter_functional/snapshots/session/tagcloud_fontsize.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_invalid_data.json b/test/interpreter_functional/snapshots/session/tagcloud_invalid_data.json new file mode 100644 index 0000000000000..d163fcefecabe --- /dev/null +++ b/test/interpreter_functional/snapshots/session/tagcloud_invalid_data.json @@ -0,0 +1 @@ +"[tagcloud] > [visdimension] > Provided column name or index is invalid: 0" \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_metric_data.json b/test/interpreter_functional/snapshots/session/tagcloud_metric_data.json index 4eb2297db5425..f340c5b653e35 100644 --- a/test/interpreter_functional/snapshots/session/tagcloud_metric_data.json +++ b/test/interpreter_functional/snapshots/session/tagcloud_metric_data.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/tagcloud_options.json b/test/interpreter_functional/snapshots/session/tagcloud_options.json index d7892c9197b7f..ecbafbbc0afba 100644 --- a/test/interpreter_functional/snapshots/session/tagcloud_options.json +++ b/test/interpreter_functional/snapshots/session/tagcloud_options.json @@ -1 +1 @@ -{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file +{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"2","indexPatternId":"logstash-*","params":{"excludeIsRegex":true,"field":"response.raw","includeIsRegex":true,"missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"hasPrecisionError":false,"id":"1","indexPatternId":"logstash-*","params":{"emptyAsNull":false},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"meta":{"source":"logstash-*","statistics":{"totalCount":14004},"type":"esaggs"},"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"ariaLabel":null,"bucket":{"accessor":1,"format":{"id":"number"},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"custom","params":{"colors":["#882E72","#B178A6","#D6C1DE","#1965B0","#5289C7","#7BAFDE","#4EB265","#90C987","#CAE0AB","#F7EE55","#F6C141","#F1932D","#E8601C","#DC050C"],"continuity":"above","gradient":false,"range":"percent","rangeMax":null,"rangeMin":0,"stops":[]},"type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}} \ No newline at end of file diff --git a/test/scripts/checks/kbn_pm_dist.sh b/test/scripts/checks/kbn_pm_dist.sh deleted file mode 100644 index 3116404280cca..0000000000000 --- a/test/scripts/checks/kbn_pm_dist.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -source src/dev/ci_setup/setup_env.sh - -### -### rebuild kbn-pm distributable to ensure it's not out of date -### -echo " -- building kbn-pm distributable" -yarn kbn run build -i @kbn/pm - -### -### verify no git modifications -### -GIT_CHANGES="$(git ls-files --modified)" -if [ "$GIT_CHANGES" ]; then - echo -e "\n${RED}ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:${C_RESET}\n" - echo -e "$GIT_CHANGES\n" - exit 1 -fi diff --git a/test/scripts/checks/test_projects.sh b/test/scripts/checks/test_projects.sh index be3fe4c4be9d0..ee74616a958fa 100755 --- a/test/scripts/checks/test_projects.sh +++ b/test/scripts/checks/test_projects.sh @@ -3,4 +3,4 @@ source src/dev/ci_setup/setup_env.sh checks-reporter-with-killswitch "Test Projects" \ - yarn kbn run test --exclude kibana --oss --skip-kibana-plugins --skip-missing + yarn kbn run-in-packages test diff --git a/tsconfig.base.json b/tsconfig.base.json index c4a2d579dee9a..1c0c40e18f999 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -281,6 +281,8 @@ "@kbn/third-party-lens-navigation-prompt-plugin/*": ["x-pack/examples/third_party_lens_navigation_prompt/*"], "@kbn/third-party-vis-lens-example-plugin": ["x-pack/examples/third_party_vis_lens_example"], "@kbn/third-party-vis-lens-example-plugin/*": ["x-pack/examples/third_party_vis_lens_example/*"], + "@kbn/triggers-actions-ui-example-plugin": ["x-pack/examples/triggers_actions_ui_example"], + "@kbn/triggers-actions-ui-example-plugin/*": ["x-pack/examples/triggers_actions_ui_example/*"], "@kbn/ui-actions-enhanced-examples-plugin": ["x-pack/examples/ui_actions_enhanced_examples"], "@kbn/ui-actions-enhanced-examples-plugin/*": ["x-pack/examples/ui_actions_enhanced_examples/*"], "@kbn/actions-plugin": ["x-pack/plugins/actions"], diff --git a/x-pack/examples/triggers_actions_ui_example/kibana.json b/x-pack/examples/triggers_actions_ui_example/kibana.json new file mode 100644 index 0000000000000..0440d0520a538 --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/kibana.json @@ -0,0 +1,20 @@ +{ + "id": "triggersActionsUiExample", + "version": "0.0.1", + "kibanaVersion": "kibana", + "owner": { + "name": "Response Ops", + "githubTeam": "response-ops" + }, + "server": false, + "ui": true, + "requiredPlugins": [ + "triggersActionsUi", + "data", + "alerting", + "developerExamples", + "kibanaReact" + ], + "optionalPlugins": [], + "requiredBundles": [] +} diff --git a/x-pack/examples/triggers_actions_ui_example/public/application.tsx b/x-pack/examples/triggers_actions_ui_example/public/application.tsx new file mode 100644 index 0000000000000..dea85d98b839a --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/application.tsx @@ -0,0 +1,150 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { BrowserRouter as Router, Route } from 'react-router-dom'; +import { EuiPage, EuiTitle, EuiText, EuiSpacer } from '@elastic/eui'; +import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { TriggersActionsUiExamplePublicStartDeps } from './plugin'; + +import { Page } from './components/page'; +import { Sidebar } from './components/sidebar'; + +import { RulesListSandbox } from './components/rules_list_sandbox'; +import { RulesListNotifyBadgeSandbox } from './components/rules_list_notify_badge_sandbox'; +import { RuleTagBadgeSandbox } from './components/rule_tag_badge_sandbox'; +import { RuleTagFilterSandbox } from './components/rule_tag_filter_sandbox'; +import { RuleEventLogListSandbox } from './components/rule_event_log_list_sandbox'; +import { RuleStatusDropdownSandbox } from './components/rule_status_dropdown_sandbox'; +import { RuleStatusFilterSandbox } from './components/rule_status_filter_sandbox'; + +export interface TriggersActionsUiExampleComponentParams { + http: CoreStart['http']; + basename: string; + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + data: DataPublicPluginStart; +} + +const TriggersActionsUiExampleApp = ({ + basename, + triggersActionsUi, +}: TriggersActionsUiExampleComponentParams) => { + return ( + <Router basename={basename}> + <EuiPage> + <Sidebar /> + <Route + exact + path="/" + render={() => ( + <Page title="Home" isHome> + <EuiTitle size="l"> + <h1>Welcome to the Triggers Actions UI plugin example</h1> + </EuiTitle> + <EuiSpacer /> + <EuiText> + This example plugin displays the shareable components in the Triggers Actions UI + plugin. It also serves as a sandbox to run functional tests to ensure the shareable + components are functioning correctly outside of their original plugin. + </EuiText> + </Page> + )} + /> + <Route + path="/rules_list" + render={() => ( + <Page title="Rules List"> + <RulesListSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rules_list_notify_badge" + render={() => ( + <Page title="Rule List Notify Badge"> + <RulesListNotifyBadgeSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rule_tag_badge" + render={() => ( + <Page title="Rule Tag Badge"> + <RuleTagBadgeSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rule_tag_filter" + render={() => ( + <Page title="Rule Tag Filter"> + <RuleTagFilterSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rule_event_log_list" + render={() => ( + <Page title="Run History List"> + <RuleEventLogListSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rule_status_dropdown" + render={() => ( + <Page title="Rule Status Dropdown"> + <RuleStatusDropdownSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + <Route + path="/rule_status_filter" + render={() => ( + <Page title="Rule Status Filter"> + <RuleStatusFilterSandbox triggersActionsUi={triggersActionsUi} /> + </Page> + )} + /> + </EuiPage> + </Router> + ); +}; + +export const renderApp = ( + core: CoreStart, + deps: TriggersActionsUiExamplePublicStartDeps, + { appBasePath, element }: AppMountParameters +) => { + const { http } = core; + const { triggersActionsUi } = deps; + const { ruleTypeRegistry, actionTypeRegistry } = triggersActionsUi; + ReactDOM.render( + <KibanaContextProvider + services={{ + ...core, + ...deps, + ruleTypeRegistry, + actionTypeRegistry, + }} + > + <TriggersActionsUiExampleApp + basename={appBasePath} + http={http} + triggersActionsUi={deps.triggersActionsUi} + data={deps.data} + /> + </KibanaContextProvider>, + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx new file mode 100644 index 0000000000000..9b143624ec82c --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { useHistory } from 'react-router-dom'; + +import { + EuiPageContent, + EuiPageContentBody, + EuiPageBody, + EuiPageHeader, + EuiPageHeaderSection, + EuiTitle, + EuiBreadcrumbs, + EuiSpacer, +} from '@elastic/eui'; + +interface PageProps { + title: string; + crumb?: string; + isHome?: boolean; +} + +export const Page: React.FC<PageProps> = (props) => { + const { title, crumb, isHome, children } = props; + + const history = useHistory(); + + const breadcrumbs: Array<{ + text: string; + onClick?: () => void; + }> = [ + { + text: crumb ?? title, + }, + ]; + if (!isHome) { + breadcrumbs.splice(0, 0, { + text: 'Home', + onClick: () => { + history.push(`/`); + }, + }); + } + + return ( + <EuiPageBody> + <EuiPageHeader> + <EuiPageHeaderSection> + <EuiTitle size="l"> + <h1>{title}</h1> + </EuiTitle> + </EuiPageHeaderSection> + </EuiPageHeader> + <EuiBreadcrumbs responsive={false} breadcrumbs={breadcrumbs} /> + <EuiSpacer /> + <EuiPageContent> + <EuiPageContentBody>{children}</EuiPageContentBody> + </EuiPageContent> + </EuiPageBody> + ); +}; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_event_log_list_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_event_log_list_sandbox.tsx similarity index 73% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_event_log_list_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rule_event_log_list_sandbox.tsx index ba45800e49bcb..ade66375a9cf7 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_event_log_list_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_event_log_list_sandbox.tsx @@ -6,10 +6,14 @@ */ import React from 'react'; -import { getRuleEventLogListLazy } from '../../../common/get_rule_event_log_list'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -export const RuleEventLogListSandbox = () => { - const props: any = { +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} + +export const RuleEventLogListSandbox = ({ triggersActionsUi }: SandboxProps) => { + const componenProps: any = { rule: { id: 'test', }, @@ -40,5 +44,7 @@ export const RuleEventLogListSandbox = () => { }), }; - return <div style={{ height: '400px' }}>{getRuleEventLogListLazy(props)}</div>; + return ( + <div style={{ height: '400px' }}>{triggersActionsUi.getRuleEventLogList(componenProps)}</div> + ); }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_dropdown_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_status_dropdown_sandbox.tsx similarity index 76% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_dropdown_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rule_status_dropdown_sandbox.tsx index 0cbbc8f0ee9f8..b1b0644f5dc10 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_dropdown_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_status_dropdown_sandbox.tsx @@ -5,16 +5,20 @@ * 2.0. */ -import React, { useState } from 'react'; +import { useState } from 'react'; import moment from 'moment'; -import { getRuleStatusDropdownLazy } from '../../../common/get_rule_status_dropdown'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -export const RuleStatusDropdownSandbox: React.FC<{}> = () => { +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} + +export const RuleStatusDropdownSandbox = ({ triggersActionsUi }: SandboxProps) => { const [enabled, setEnabled] = useState(true); const [isSnoozedUntil, setIsSnoozedUntil] = useState<Date | null>(null); const [muteAll, setMuteAll] = useState(false); - return getRuleStatusDropdownLazy({ + return triggersActionsUi.getRuleStatusDropdown({ rule: { enabled, isSnoozedUntil, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_filter_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_status_filter_sandbox.tsx similarity index 64% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_filter_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rule_status_filter_sandbox.tsx index 99ddd8daf16ac..95c63ba290f53 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_status_filter_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_status_filter_sandbox.tsx @@ -6,17 +6,23 @@ */ import React, { useState } from 'react'; -import { RuleStatusFilterProps } from '../../../types'; -import { getRuleStatusFilterLazy } from '../../../common/get_rule_status_filter'; +import { + TriggersAndActionsUIPublicPluginStart, + RuleStatusFilterProps, +} from '@kbn/triggers-actions-ui-plugin/public'; -export const RuleStatusFilterSandbox = () => { +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} + +export const RuleStatusFilterSandbox = ({ triggersActionsUi }: SandboxProps) => { const [selectedStatuses, setSelectedStatuses] = useState< RuleStatusFilterProps['selectedStatuses'] >([]); return ( <div style={{ flex: 1 }}> - {getRuleStatusFilterLazy({ + {triggersActionsUi.getRuleStatusFilter({ selectedStatuses, onChange: setSelectedStatuses, })} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_badge_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_badge_sandbox.tsx similarity index 71% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_badge_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_badge_sandbox.tsx index 097fb00969d27..378a7478f7623 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_badge_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_badge_sandbox.tsx @@ -12,16 +12,20 @@ */ import React, { useState } from 'react'; -import { getRuleTagBadgeLazy } from '../../../common/get_rule_tag_badge'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; + +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} const tags = ['tag1', 'tag2', 'tag3', 'tag4']; -export const RuleTagBadgeSandbox = () => { +export const RuleTagBadgeSandbox = ({ triggersActionsUi }: SandboxProps) => { const [isOpen, setIsOpen] = useState<boolean>(false); return ( <div style={{ flex: 1 }}> - {getRuleTagBadgeLazy({ + {triggersActionsUi.getRuleTagBadge({ isOpen, tags, onClick: () => setIsOpen(true), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_filter_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_filter_sandbox.tsx similarity index 68% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_filter_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_filter_sandbox.tsx index 58603fdb8f178..4601333db643d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rule_tag_filter_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_tag_filter_sandbox.tsx @@ -6,14 +6,18 @@ */ import React, { useState } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import { getRuleTagFilterLazy } from '../../../common/get_rule_tag_filter'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -export const RuleTagFilterSandbox = () => { +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} + +export const RuleTagFilterSandbox = ({ triggersActionsUi }: SandboxProps) => { const [selectedTags, setSelectedTags] = useState<string[]>([]); return ( <div style={{ flex: 1 }}> - {getRuleTagFilterLazy({ + {triggersActionsUi.getRuleTagFilter({ tags: ['tag1', 'tag2', 'tag3', 'tag4'], selectedTags, onChange: setSelectedTags, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rules_list_notify_badge_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rules_list_notify_badge_sandbox.tsx similarity index 82% rename from x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rules_list_notify_badge_sandbox.tsx rename to x-pack/examples/triggers_actions_ui_example/public/components/rules_list_notify_badge_sandbox.tsx index ab28366aa8b47..86f929853dc8a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/rules_list_notify_badge_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rules_list_notify_badge_sandbox.tsx @@ -6,8 +6,14 @@ */ import React, { useState } from 'react'; -import { RuleTableItem } from '../../../types'; -import { getRulesListNotifyBadgeLazy } from '../../../common/get_rules_list_notify_badge'; +import { + TriggersAndActionsUIPublicPluginStart, + RuleTableItem, +} from '@kbn/triggers-actions-ui-plugin/public'; + +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} const mockRule: RuleTableItem = { id: '1', @@ -41,13 +47,13 @@ const mockRule: RuleTableItem = { enabledInLicense: true, }; -export const RulesListNotifyBadgeSandbox = () => { +export const RulesListNotifyBadgeSandbox = ({ triggersActionsUi }: SandboxProps) => { const [isOpen, setIsOpen] = useState<boolean>(false); const [isLoading, setIsLoading] = useState<boolean>(false); return ( <div style={{ flex: 1 }}> - {getRulesListNotifyBadgeLazy({ + {triggersActionsUi.getRulesListNotifyBadge({ rule: mockRule, isOpen, isLoading, diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/rules_list_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rules_list_sandbox.tsx new file mode 100644 index 0000000000000..b1d5ee4677884 --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rules_list_sandbox.tsx @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; + +interface SandboxProps { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; +} + +const style = { + flex: 1, +}; + +export const RulesListSandbox = ({ triggersActionsUi }: SandboxProps) => { + return <div style={style}>{triggersActionsUi.getRulesList({})}</div>; +}; diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx new file mode 100644 index 0000000000000..908cba88001ad --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx @@ -0,0 +1,68 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { useHistory } from 'react-router-dom'; +import { EuiPageSideBar, EuiSideNav } from '@elastic/eui'; + +export const Sidebar = () => { + const history = useHistory(); + return ( + <EuiPageSideBar> + <EuiSideNav + items={[ + { + name: 'Component Sandboxes', + id: 'component_sandboxes', + items: [ + { + id: 'home', + name: 'Home', + onClick: () => history.push('/'), + }, + { + id: 'rules_list', + name: 'Rules List', + onClick: () => history.push(`/rules_list`), + }, + { + id: 'rules_list_notify_badge', + name: 'Rules List Notify Badge', + onClick: () => history.push(`/rules_list_notify_badge`), + }, + { + id: 'rule_tag_badge', + name: 'Rule Tag Badge', + onClick: () => history.push(`/rule_tag_badge`), + }, + { + id: 'rule_tag_filter', + name: 'Rule Tag Filter', + onClick: () => history.push(`/rule_tag_filter`), + }, + { + id: 'rule_event_log_list', + name: 'Run History List', + onClick: () => history.push(`/rule_event_log_list`), + }, + { + id: 'rule_status_dropdown', + name: 'Rule Status Dropdown', + onClick: () => history.push(`/rule_status_dropdown`), + }, + { + id: 'rule_status_filter', + name: 'Rule Status Filter', + onClick: () => history.push(`/rule_status_filter`), + }, + ], + }, + ]} + /> + </EuiPageSideBar> + ); +}; diff --git a/x-pack/examples/triggers_actions_ui_example/public/index.ts b/x-pack/examples/triggers_actions_ui_example/public/index.ts new file mode 100644 index 0000000000000..d7f0620e7a4d2 --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TriggersActionsUiExamplePlugin } from './plugin'; + +export const plugin = () => new TriggersActionsUiExamplePlugin(); diff --git a/x-pack/examples/triggers_actions_ui_example/public/plugin.tsx b/x-pack/examples/triggers_actions_ui_example/public/plugin.tsx new file mode 100644 index 0000000000000..15bee6d23795c --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/public/plugin.tsx @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Plugin, CoreSetup, AppMountParameters, AppNavLinkStatus } from '@kbn/core/public'; +import { PluginSetupContract as AlertingSetup } from '@kbn/alerting-plugin/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; + +import { + TriggersAndActionsUIPublicPluginSetup, + TriggersAndActionsUIPublicPluginStart, +} from '@kbn/triggers-actions-ui-plugin/public'; + +export interface TriggersActionsUiExamplePublicSetupDeps { + alerting: AlertingSetup; + triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; + developerExamples: DeveloperExamplesSetup; +} + +export interface TriggersActionsUiExamplePublicStartDeps { + alerting: AlertingSetup; + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + data: DataPublicPluginStart; +} + +export class TriggersActionsUiExamplePlugin + implements Plugin<void, void, TriggersActionsUiExamplePublicSetupDeps> +{ + public setup( + core: CoreSetup<TriggersActionsUiExamplePublicStartDeps, void>, + setup: TriggersActionsUiExamplePublicSetupDeps + ) { + const { developerExamples } = setup; + + core.application.register({ + id: 'triggersActionsUiExample', + title: 'Triggers Actions UI Example', + navLinkStatus: AppNavLinkStatus.hidden, + async mount(params: AppMountParameters) { + const [coreStart, devStart] = await core.getStartServices(); + const { renderApp } = await import('./application'); + return renderApp(coreStart, devStart, params); + }, + }); + + developerExamples.register({ + appId: 'triggersActionsUiExample', + title: 'Shared Reusable Alerting Components', + description: + 'Sandbox for shared reusable alerting components (triggers actions UI shareable components)', + }); + } + public start() {} + public stop() {} +} diff --git a/x-pack/examples/triggers_actions_ui_example/tsconfig.json b/x-pack/examples/triggers_actions_ui_example/tsconfig.json new file mode 100644 index 0000000000000..f9a5d7110d7ce --- /dev/null +++ b/x-pack/examples/triggers_actions_ui_example/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types" + }, + "include": [ + "index.ts", + "public/**/*.ts", + "public/**/*.tsx", + "server/**/*.ts", + "../../../typings/**/*", + ], + "exclude": [], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../plugins/alerting/tsconfig.json" }, + { "path": "../../plugins/triggers_actions_ui/tsconfig.json" }, + { "path": "../../../examples/developer_examples/tsconfig.json" }, + ] +} diff --git a/x-pack/packages/ml/agg_utils/src/get_agg_intervals.ts b/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts similarity index 73% rename from x-pack/packages/ml/agg_utils/src/get_agg_intervals.ts rename to x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts index 67a6f28497d6e..1d6b3f781f901 100644 --- a/x-pack/packages/ml/agg_utils/src/get_agg_intervals.ts +++ b/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts @@ -7,7 +7,6 @@ import { get } from 'lodash'; -import type { Client } from '@elastic/elasticsearch'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; @@ -16,39 +15,14 @@ import { stringHash } from '@kbn/ml-string-hash'; import { buildSamplerAggregation } from './build_sampler_aggregation'; import { getSamplerAggregationsResponsePath } from './get_sampler_aggregations_response_path'; - -// TODO Temporary type definition until we can import from `@kbn/core`. -// Copied from src/core/server/elasticsearch/client/types.ts -// as these types aren't part of any package yet. Once they are, remove this completely - -/** - * Client used to query the elasticsearch cluster. - * @deprecated At some point use the one from src/core/server/elasticsearch/client/types.ts when it is made into a package. If it never is, then keep using this one. - * @public - */ -type ElasticsearchClient = Omit< - Client, - 'connectionPool' | 'serializer' | 'extend' | 'close' | 'diagnostic' ->; +import type { ElasticsearchClient, HistogramField, NumericColumnStatsMap } from './types'; const MAX_CHART_COLUMNS = 20; -interface HistogramField { - fieldName: string; - type: string; -} - -interface NumericColumnStats { - interval: number; - min: number; - max: number; -} -type NumericColumnStatsMap = Record<string, NumericColumnStats>; - /** * Returns aggregation intervals for the supplied document fields. */ -export const getAggIntervals = async ( +export const fetchAggIntervals = async ( client: ElasticsearchClient, indexPattern: string, query: estypes.QueryDslQueryContainer, diff --git a/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts b/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts new file mode 100644 index 0000000000000..1e8e2667c0aac --- /dev/null +++ b/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts @@ -0,0 +1,254 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import get from 'lodash/get'; + +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +import { KBN_FIELD_TYPES } from '@kbn/field-types'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { stringHash } from '@kbn/ml-string-hash'; + +import { buildSamplerAggregation } from './build_sampler_aggregation'; +import { fetchAggIntervals } from './fetch_agg_intervals'; +import { getSamplerAggregationsResponsePath } from './get_sampler_aggregations_response_path'; +import type { + AggCardinality, + ElasticsearchClient, + HistogramField, + NumericColumnStats, + NumericColumnStatsMap, +} from './types'; + +const MAX_CHART_COLUMNS = 20; + +interface AggHistogram { + histogram: { + field: string; + interval: number; + }; +} + +interface AggTerms { + terms: { + field: string; + size: number; + }; +} + +interface NumericDataItem { + key: number; + key_as_string?: string; + doc_count: number; +} + +/** + * Interface to describe the data structure returned for numeric based charts. + */ +export interface NumericChartData { + data: NumericDataItem[]; + id: string; + interval: number; + stats: [number, number]; + type: 'numeric'; +} + +/** + * Numeric based histogram field interface, limited to `date` and `number`. + */ +export interface NumericHistogramField extends HistogramField { + type: KBN_FIELD_TYPES.DATE | KBN_FIELD_TYPES.NUMBER; +} +type NumericHistogramFieldWithColumnStats = NumericHistogramField & NumericColumnStats; + +function isNumericHistogramField(arg: unknown): arg is NumericHistogramField { + return ( + isPopulatedObject(arg, ['fieldName', 'type']) && + (arg.type === KBN_FIELD_TYPES.DATE || arg.type === KBN_FIELD_TYPES.NUMBER) + ); +} +function isNumericHistogramFieldWithColumnStats( + arg: unknown +): arg is NumericHistogramFieldWithColumnStats { + return ( + isPopulatedObject(arg, ['fieldName', 'type', 'min', 'max', 'interval']) && + (arg.type === KBN_FIELD_TYPES.DATE || arg.type === KBN_FIELD_TYPES.NUMBER) + ); +} + +interface OrdinalDataItem { + key: string; + key_as_string?: string; + doc_count: number; +} + +interface OrdinalChartData { + type: 'ordinal' | 'boolean'; + cardinality: number; + data: OrdinalDataItem[]; + id: string; +} + +interface OrdinalHistogramField extends HistogramField { + type: KBN_FIELD_TYPES.STRING | KBN_FIELD_TYPES.BOOLEAN; +} + +function isOrdinalHistogramField(arg: unknown): arg is OrdinalHistogramField { + return ( + isPopulatedObject(arg, ['fieldName', 'type']) && + (arg.type === KBN_FIELD_TYPES.STRING || arg.type === KBN_FIELD_TYPES.BOOLEAN) + ); +} + +interface UnsupportedChartData { + id: string; + type: 'unsupported'; +} + +interface UnsupportedHistogramField extends HistogramField { + type: Exclude< + KBN_FIELD_TYPES, + KBN_FIELD_TYPES.STRING | KBN_FIELD_TYPES.BOOLEAN | KBN_FIELD_TYPES.DATE | KBN_FIELD_TYPES.NUMBER + >; +} + +type ChartRequestAgg = AggHistogram | AggCardinality | AggTerms; + +/** + * All types of histogram field definitions for fetching histogram data. + */ +export type FieldsForHistograms = Array< + | NumericHistogramField + | NumericHistogramFieldWithColumnStats + | OrdinalHistogramField + | UnsupportedHistogramField +>; + +/** + * Fetches data to be used in mini histogram charts. Supports auto-identifying + * the histogram interval and min/max values. + * + * @param client Elasticsearch Client + * @param indexPattern index pattern to be queried + * @param query Elasticsearch query + * @param fields the fields the histograms should be generated for + * @param samplerShardSize shard_size parameter of the sampler aggregation + * @param runtimeMappings optional runtime mappings + * @returns an array of histogram data for each supplied field + */ +export const fetchHistogramsForFields = async ( + client: ElasticsearchClient, + indexPattern: string, + query: any, + fields: FieldsForHistograms, + samplerShardSize: number, + runtimeMappings?: estypes.MappingRuntimeFields +) => { + const aggIntervals = { + ...(await fetchAggIntervals( + client, + indexPattern, + query, + fields.filter((f) => !isNumericHistogramFieldWithColumnStats(f)), + samplerShardSize, + runtimeMappings + )), + ...fields.filter(isNumericHistogramFieldWithColumnStats).reduce((p, field) => { + const { interval, min, max, fieldName } = field; + p[stringHash(fieldName)] = { interval, min, max }; + + return p; + }, {} as NumericColumnStatsMap), + }; + + const chartDataAggs = fields.reduce((aggs, field) => { + const id = stringHash(field.fieldName); + if (isNumericHistogramField(field)) { + if (aggIntervals[id] !== undefined) { + aggs[`${id}_histogram`] = { + histogram: { + field: field.fieldName, + interval: aggIntervals[id].interval !== 0 ? aggIntervals[id].interval : 1, + }, + }; + } + } else if (isOrdinalHistogramField(field)) { + if (field.type === KBN_FIELD_TYPES.STRING) { + aggs[`${id}_cardinality`] = { + cardinality: { + field: field.fieldName, + }, + }; + } + aggs[`${id}_terms`] = { + terms: { + field: field.fieldName, + size: MAX_CHART_COLUMNS, + }, + }; + } + return aggs; + }, {} as Record<string, ChartRequestAgg>); + + if (Object.keys(chartDataAggs).length === 0) { + return []; + } + + const body = await client.search( + { + index: indexPattern, + size: 0, + body: { + query, + aggs: buildSamplerAggregation(chartDataAggs, samplerShardSize), + size: 0, + ...(isPopulatedObject(runtimeMappings) ? { runtime_mappings: runtimeMappings } : {}), + }, + }, + { maxRetries: 0 } + ); + + const aggsPath = getSamplerAggregationsResponsePath(samplerShardSize); + const aggregations = aggsPath.length > 0 ? get(body.aggregations, aggsPath) : body.aggregations; + + return fields.map((field) => { + const id = stringHash(field.fieldName); + + if (isNumericHistogramField(field)) { + if (aggIntervals[id] === undefined) { + return { + type: 'numeric', + data: [], + interval: 0, + stats: [0, 0], + id: field.fieldName, + } as NumericChartData; + } + + return { + data: aggregations[`${id}_histogram`].buckets, + interval: aggIntervals[id].interval, + stats: [aggIntervals[id].min, aggIntervals[id].max], + type: 'numeric', + id: field.fieldName, + } as NumericChartData; + } else if (isOrdinalHistogramField(field)) { + return { + type: field.type === KBN_FIELD_TYPES.STRING ? 'ordinal' : 'boolean', + cardinality: + field.type === KBN_FIELD_TYPES.STRING ? aggregations[`${id}_cardinality`].value : 2, + data: aggregations[`${id}_terms`].buckets, + id: field.fieldName, + } as OrdinalChartData; + } + + return { + type: 'unsupported', + id: field.fieldName, + } as UnsupportedChartData; + }); +}; diff --git a/x-pack/packages/ml/agg_utils/src/index.ts b/x-pack/packages/ml/agg_utils/src/index.ts index 80283c975c66d..ecab763d3e12e 100644 --- a/x-pack/packages/ml/agg_utils/src/index.ts +++ b/x-pack/packages/ml/agg_utils/src/index.ts @@ -6,7 +6,19 @@ */ export { buildSamplerAggregation } from './build_sampler_aggregation'; -export { getAggIntervals } from './get_agg_intervals'; +export { fetchAggIntervals } from './fetch_agg_intervals'; +export { fetchHistogramsForFields } from './fetch_histograms_for_fields'; export { getSamplerAggregationsResponsePath } from './get_sampler_aggregations_response_path'; -export type { NumberValidationResult } from './validate_number'; export { numberValidator } from './validate_number'; + +export type { FieldsForHistograms } from './fetch_histograms_for_fields'; +export type { + AggCardinality, + ChangePoint, + ChangePointHistogram, + ChangePointHistogramItem, + HistogramField, + NumericColumnStats, + NumericColumnStatsMap, +} from './types'; +export type { NumberValidationResult } from './validate_number'; diff --git a/x-pack/packages/ml/agg_utils/src/types.ts b/x-pack/packages/ml/agg_utils/src/types.ts new file mode 100644 index 0000000000000..352616d74cb3e --- /dev/null +++ b/x-pack/packages/ml/agg_utils/src/types.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Client } from '@elastic/elasticsearch'; +import { KBN_FIELD_TYPES } from '@kbn/field-types'; + +// TODO Temporary type definition until we can import from `@kbn/core`. +// Copied from src/core/server/elasticsearch/client/types.ts +// as these types aren't part of any package yet. Once they are, remove this completely + +/** + * Client used to query the elasticsearch cluster. + * @deprecated At some point use the one from src/core/server/elasticsearch/client/types.ts when it is made into a package. If it never is, then keep using this one. + * @public + */ +export type ElasticsearchClient = Omit< + Client, + 'connectionPool' | 'serializer' | 'extend' | 'close' | 'diagnostic' +>; + +interface FieldAggCardinality { + field: string; + percent?: any; +} + +interface ScriptAggCardinality { + script: any; +} + +/** + * Interface for cardinality aggregation. + */ +export interface AggCardinality { + cardinality: FieldAggCardinality | ScriptAggCardinality; +} + +/** + * Field/value pair definition. + */ +export interface FieldValuePair { + fieldName: string; + // For dynamic fieldValues we only identify fields as `string`, + // but for example `http.response.status_code` which is part of + // of the list of predefined field candidates is of type long/number. + fieldValue: string | number; +} + +/** + * Interface to describe attributes used for histograms. + */ +export interface NumericColumnStats { + interval: number; + min: number; + max: number; +} + +/** + * Record/Map of histogram attributes where the key is the aggregation name. + */ +export type NumericColumnStatsMap = Record<string, NumericColumnStats>; + +/** + * Parameters to identify which histogram data needs to be generated for a field. + */ +export interface HistogramField { + fieldName: string; + type: KBN_FIELD_TYPES; +} + +/** + * Change point meta data for a field/value pair. + */ +export interface ChangePoint extends FieldValuePair { + doc_count: number; + bg_count: number; + score: number; + pValue: number | null; + normalizedScore: number; + histogram?: ChangePointHistogramItem[]; +} + +/** + * Change point histogram data item. + */ +export interface ChangePointHistogramItem { + doc_count_overall: number; + doc_count_change_point: number; + key: number; + key_as_string: string; +} + +/** + * Change point histogram data for a field/value pair. + */ +export interface ChangePointHistogram extends FieldValuePair { + histogram: ChangePointHistogramItem[]; +} diff --git a/x-pack/plugins/actions/server/builtin_action_types/es_index.test.ts b/x-pack/plugins/actions/server/builtin_action_types/es_index.test.ts index 98093b685cab2..4dfcccdbc13f7 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/es_index.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/es_index.test.ts @@ -19,8 +19,7 @@ import { ESIndexActionTypeExecutorOptions, } from './es_index'; import { AlertHistoryEsIndexConnectorId } from '../../common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; const ACTION_TYPE_ID = '.index'; diff --git a/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts b/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts index 9fff9f9299ead..532cefec75f20 100644 --- a/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts +++ b/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { getExecutionsPerDayCount, getInUseTotalCount, getTotalCount } from './actions_telemetry'; diff --git a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts index be380d966e250..78ec9c7c33432 100644 --- a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts +++ b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/actions.ts @@ -5,10 +5,11 @@ * 2.0. */ -import type { ChangePoint } from '../../types'; +import type { ChangePoint, ChangePointHistogram } from '@kbn/ml-agg-utils'; export const API_ACTION_NAME = { ADD_CHANGE_POINTS: 'add_change_points', + ADD_CHANGE_POINTS_HISTOGRAM: 'add_change_points_histogram', ERROR: 'error', RESET: 'reset', UPDATE_LOADING_STATE: 'update_loading_state', @@ -29,6 +30,20 @@ export function addChangePointsAction( }; } +interface ApiActionAddChangePointsHistogram { + type: typeof API_ACTION_NAME.ADD_CHANGE_POINTS_HISTOGRAM; + payload: ChangePointHistogram[]; +} + +export function addChangePointsHistogramAction( + payload: ApiActionAddChangePointsHistogram['payload'] +): ApiActionAddChangePointsHistogram { + return { + type: API_ACTION_NAME.ADD_CHANGE_POINTS_HISTOGRAM, + payload, + }; +} + interface ApiActionError { type: typeof API_ACTION_NAME.ERROR; payload: string; @@ -69,6 +84,7 @@ export function updateLoadingStateAction( export type AiopsExplainLogRateSpikesApiAction = | ApiActionAddChangePoints + | ApiActionAddChangePointsHistogram | ApiActionError | ApiActionReset | ApiActionUpdateLoadingState; diff --git a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts index fcf5ce818f4d3..e03a527eb576f 100644 --- a/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts +++ b/x-pack/plugins/aiops/common/api/explain_log_rate_spikes/index.ts @@ -7,6 +7,7 @@ export { addChangePointsAction, + addChangePointsHistogramAction, errorAction, resetAction, updateLoadingStateAction, diff --git a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts index 43735f586b88b..483de40e685d6 100644 --- a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts +++ b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts @@ -38,6 +38,7 @@ describe('streamReducer', () => { bg_count: 100, score: 0.1, pValue: 0.01, + normalizedScore: 0.123, }, ]) ); diff --git a/x-pack/plugins/aiops/common/api/stream_reducer.ts b/x-pack/plugins/aiops/common/api/stream_reducer.ts index 97c767a43ec47..5e37df418c6ab 100644 --- a/x-pack/plugins/aiops/common/api/stream_reducer.ts +++ b/x-pack/plugins/aiops/common/api/stream_reducer.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ChangePoint } from '../types'; +import type { ChangePoint } from '@kbn/ml-agg-utils'; import { API_ACTION_NAME, AiopsExplainLogRateSpikesApiAction } from './explain_log_rate_spikes'; @@ -34,6 +34,17 @@ export function streamReducer( switch (action.type) { case API_ACTION_NAME.ADD_CHANGE_POINTS: return { ...state, changePoints: [...state.changePoints, ...action.payload] }; + case API_ACTION_NAME.ADD_CHANGE_POINTS_HISTOGRAM: + const changePoints = state.changePoints.map((cp) => { + const cpHistogram = action.payload.find( + (h) => h.fieldName === cp.fieldName && h.fieldValue && cp.fieldName + ); + if (cpHistogram) { + cp.histogram = cpHistogram.histogram; + } + return cp; + }); + return { ...state, changePoints }; case API_ACTION_NAME.RESET: return initialState; case API_ACTION_NAME.UPDATE_LOADING_STATE: diff --git a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_wrapper.tsx b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_wrapper.tsx index 8c254be451515..27ffcffc3cf61 100644 --- a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_wrapper.tsx +++ b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_wrapper.tsx @@ -52,17 +52,9 @@ export interface ExplainLogRateSpikesWrapperProps { export const ExplainLogRateSpikesWrapper: FC<ExplainLogRateSpikesWrapperProps> = ({ dataView }) => { const [globalState, setGlobalState] = useUrlState('_g'); - const { docStats, timefilter } = useData(dataView, setGlobalState); + const { docStats, timefilter, earliest, latest } = useData(dataView, setGlobalState); const [windowParameters, setWindowParameters] = useState<WindowParameters | undefined>(); - const activeBounds = timefilter.getActiveBounds(); - let earliest: number | undefined; - let latest: number | undefined; - if (activeBounds !== undefined) { - earliest = activeBounds.min?.valueOf(); - latest = activeBounds.max?.valueOf(); - } - useEffect(() => { if (globalState?.time !== undefined) { timefilter.setTime({ diff --git a/x-pack/plugins/transform/server/shared_imports.ts b/x-pack/plugins/aiops/public/components/mini_histogram/index.ts similarity index 79% rename from x-pack/plugins/transform/server/shared_imports.ts rename to x-pack/plugins/aiops/public/components/mini_histogram/index.ts index dbb216a541694..d3a7d590d80dc 100644 --- a/x-pack/plugins/transform/server/shared_imports.ts +++ b/x-pack/plugins/aiops/public/components/mini_histogram/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { getHistogramsForFields } from '@kbn/ml-plugin/server'; +export { MiniHistogram } from './mini_histogram'; diff --git a/x-pack/plugins/aiops/public/components/mini_histogram/mini_histogram.tsx b/x-pack/plugins/aiops/public/components/mini_histogram/mini_histogram.tsx new file mode 100644 index 0000000000000..8eaa9d7e7215e --- /dev/null +++ b/x-pack/plugins/aiops/public/components/mini_histogram/mini_histogram.tsx @@ -0,0 +1,70 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { FC } from 'react'; + +import { Chart, BarSeries, PartialTheme, ScaleType, Settings } from '@elastic/charts'; + +import type { ChangePointHistogramItem } from '@kbn/ml-agg-utils'; + +interface MiniHistogramProps { + chartData: ChangePointHistogramItem[]; + label: string; +} + +export const MiniHistogram: FC<MiniHistogramProps> = ({ chartData, label }) => { + const theme: PartialTheme = { + chartMargins: { + left: 0, + right: 0, + top: 0, + bottom: 0, + }, + chartPaddings: { + left: 0, + right: 0, + top: 0, + bottom: 0, + }, + scales: { + barsPadding: 0.1, + }, + }; + + return ( + <div + style={{ + width: '80px', + height: '24px', + margin: '0px', + }} + > + <Chart> + <Settings theme={theme} showLegend={false} /> + <BarSeries + id="doc_count_overall" + xScaleType={ScaleType.Time} + yScaleType={ScaleType.Linear} + xAccessor={'key'} + yAccessors={['doc_count_overall']} + data={chartData} + stackAccessors={[0]} + /> + <BarSeries + id={label} + xScaleType={ScaleType.Time} + yScaleType={ScaleType.Linear} + xAccessor={'key'} + yAccessors={['doc_count_change_point']} + data={chartData} + stackAccessors={[0]} + color={['orange']} + /> + </Chart> + </div> + ); +}; diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx index 9e125f4d47305..2df67e1a45bb1 100644 --- a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx @@ -6,10 +6,12 @@ */ import React, { FC, useCallback, useMemo, useState } from 'react'; -import { EuiBadge, EuiBasicTable, EuiBasicTableColumn, RIGHT_ALIGNMENT } from '@elastic/eui'; +import { EuiBadge, EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ChangePoint } from '../../../common/types'; -import { ImpactBar } from './impact_bar'; +import type { ChangePoint } from '@kbn/ml-agg-utils'; + +import { MiniHistogram } from '../mini_histogram'; + import { getFailedTransactionsCorrelationImpactLabel } from './get_failed_transactions_correlation_impact_label'; const PAGINATION_SIZE_OPTIONS = [5, 10, 20, 50]; @@ -29,25 +31,45 @@ export const SpikeAnalysisTable: FC<Props> = ({ changePointData, error, loading const columns: Array<EuiBasicTableColumn<ChangePoint>> = [ { - field: 'score', + field: 'fieldName', + name: i18n.translate( + 'xpack.aiops.correlations.failedTransactions.correlationsTable.fieldNameLabel', + { defaultMessage: 'Field name' } + ), + sortable: true, + }, + { + field: 'fieldValue', + name: i18n.translate( + 'xpack.aiops.correlations.failedTransactions.correlationsTable.fieldValueLabel', + { defaultMessage: 'Field value' } + ), + render: (_, { fieldValue }) => String(fieldValue).slice(0, 50), + sortable: true, + }, + { + field: 'pValue', name: ( <> {i18n.translate( - 'xpack.aiops.correlations.failedTransactions.correlationsTable.pValueLabel', + 'xpack.aiops.correlations.failedTransactions.correlationsTable.logRateLabel', { - defaultMessage: 'Score', + defaultMessage: 'Log rate', } )} </> ), - align: RIGHT_ALIGNMENT, - render: (_, { score }) => { - return ( - <> - <ImpactBar size="m" value={Number(score.toFixed(2))} label={score.toFixed(2)} /> - </> - ); + render: (_, { histogram, fieldName, fieldValue }) => { + return histogram ? ( + <MiniHistogram chartData={histogram} label={`${fieldName}:${fieldValue}`} /> + ) : null; }, + sortable: false, + }, + { + field: 'pValue', + name: 'p-value', + render: (pValue: number) => pValue.toPrecision(3), sortable: true, }, { @@ -68,29 +90,6 @@ export const SpikeAnalysisTable: FC<Props> = ({ changePointData, error, loading }, sortable: true, }, - { - field: 'fieldName', - name: i18n.translate( - 'xpack.aiops.correlations.failedTransactions.correlationsTable.fieldNameLabel', - { defaultMessage: 'Field name' } - ), - sortable: true, - }, - { - field: 'fieldValue', - name: i18n.translate( - 'xpack.aiops.correlations.failedTransactions.correlationsTable.fieldValueLabel', - { defaultMessage: 'Field value' } - ), - render: (_, { fieldValue }) => String(fieldValue).slice(0, 50), - sortable: true, - }, - { - field: 'pValue', - name: 'p-value', - render: (pValue: number) => pValue.toPrecision(3), - sortable: true, - }, ]; const onChange = useCallback((tableSettings) => { @@ -105,7 +104,12 @@ export const SpikeAnalysisTable: FC<Props> = ({ changePointData, error, loading const itemCount = changePointData?.length ?? 0; return { - pageOfItems: changePointData?.slice(pageStart, pageStart + pageSize), + pageOfItems: changePointData + // Temporary default sorting by ascending pValue until we add native table sorting + ?.sort((a, b) => { + return (a?.pValue ?? 1) - (b?.pValue ?? 0); + }) + .slice(pageStart, pageStart + pageSize), pagination: { pageIndex, pageSize, @@ -119,7 +123,7 @@ export const SpikeAnalysisTable: FC<Props> = ({ changePointData, error, loading <EuiBasicTable compressed columns={columns} - items={pageOfItems ?? []} + items={pageOfItems} noItemsMessage={noDataText} onChange={onChange} pagination={pagination} diff --git a/x-pack/plugins/aiops/public/hooks/use_data.ts b/x-pack/plugins/aiops/public/hooks/use_data.ts index 85be019d14e50..6c16c74b274de 100644 --- a/x-pack/plugins/aiops/public/hooks/use_data.ts +++ b/x-pack/plugins/aiops/public/hooks/use_data.ts @@ -24,6 +24,9 @@ export const useData = ( const { services } = useAiOpsKibana(); const { uiSettings } = services; const [lastRefresh, setLastRefresh] = useState(0); + const [fieldStatsRequest, setFieldStatsRequest] = useState< + DocumentStatsSearchStrategyParams | undefined + >(); const _timeBuckets = useMemo(() => { return new TimeBuckets({ @@ -39,47 +42,31 @@ export const useData = ( autoRefreshSelector: true, }); - const fieldStatsRequest: DocumentStatsSearchStrategyParams | undefined = useMemo( - () => { - // Obtain the interval to use for date histogram aggregations - // (such as the document count chart). Aim for 75 bars. - const buckets = _timeBuckets; - const tf = timefilter; - if (!buckets || !tf || !currentDataView) return; - const activeBounds = tf.getActiveBounds(); - let earliest: number | undefined; - let latest: number | undefined; - if (activeBounds !== undefined && currentDataView.timeFieldName !== undefined) { - earliest = activeBounds.min?.valueOf(); - latest = activeBounds.max?.valueOf(); - } - const bounds = tf.getActiveBounds(); - const BAR_TARGET = 75; - buckets.setInterval('auto'); - if (bounds) { - buckets.setBounds(bounds); - buckets.setBarTarget(BAR_TARGET); - } - const aggInterval = buckets.getInterval(); + const { docStats } = useDocumentCountStats(fieldStatsRequest, lastRefresh); - return { - earliest, - latest, - intervalMs: aggInterval?.asMilliseconds(), + function updateFieldStatsRequest() { + const timefilterActiveBounds = timefilter.getActiveBounds(); + if (timefilterActiveBounds !== undefined) { + const BAR_TARGET = 75; + _timeBuckets.setInterval('auto'); + _timeBuckets.setBounds(timefilterActiveBounds); + _timeBuckets.setBarTarget(BAR_TARGET); + setFieldStatsRequest({ + earliest: timefilterActiveBounds.min?.valueOf(), + latest: timefilterActiveBounds.max?.valueOf(), + intervalMs: _timeBuckets.getInterval()?.asMilliseconds(), index: currentDataView.title, timeFieldName: currentDataView.timeFieldName, runtimeFieldMap: currentDataView.getRuntimeMappings(), - }; - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [_timeBuckets, timefilter, currentDataView.id, lastRefresh] - ); - const { docStats } = useDocumentCountStats(fieldStatsRequest, lastRefresh); + }); + setLastRefresh(Date.now()); + } + } useEffect(() => { const timeUpdateSubscription = merge( - timefilter.getTimeUpdate$(), timefilter.getAutoRefreshFetch$(), + timefilter.getTimeUpdate$(), aiopsRefresh$ ).subscribe(() => { if (onUpdate) { @@ -88,7 +75,19 @@ export const useData = ( refreshInterval: timefilter.getRefreshInterval(), }); } - setLastRefresh(Date.now()); + updateFieldStatsRequest(); + }); + return () => { + timeUpdateSubscription.unsubscribe(); + }; + }); + + // This hook listens just for an initial update of the timefilter to be switched on. + useEffect(() => { + const timeUpdateSubscription = timefilter.getEnabledUpdated$().subscribe(() => { + if (fieldStatsRequest === undefined) { + updateFieldStatsRequest(); + } }); return () => { timeUpdateSubscription.unsubscribe(); @@ -98,5 +97,7 @@ export const useData = ( return { docStats, timefilter, + earliest: fieldStatsRequest?.earliest, + latest: fieldStatsRequest?.latest, }; }; diff --git a/x-pack/plugins/aiops/public/hooks/use_document_count_stats.ts b/x-pack/plugins/aiops/public/hooks/use_document_count_stats.ts index e474d5ab9c474..06c82c95fcf50 100644 --- a/x-pack/plugins/aiops/public/hooks/use_document_count_stats.ts +++ b/x-pack/plugins/aiops/public/hooks/use_document_count_stats.ts @@ -72,7 +72,7 @@ export function useDocumentCountStats<TParams extends DocumentStatsSearchStrateg try { const resp: any = await lastValueFrom( data.search.search({ - params: getDocumentCountStatsRequest(searchParams).body, + params: getDocumentCountStatsRequest(searchParams), }) ); const documentCountStats = processDocumentCountStats(resp?.rawResponse, searchParams); diff --git a/x-pack/plugins/aiops/public/hooks/use_storage.ts b/x-pack/plugins/aiops/public/hooks/use_storage.ts index ef8bf85f2507d..59325a529728b 100644 --- a/x-pack/plugins/aiops/public/hooks/use_storage.ts +++ b/x-pack/plugins/aiops/public/hooks/use_storage.ts @@ -8,7 +8,7 @@ import { useCallback, useState } from 'react'; import { useAiOpsKibana } from '../kibana_context'; -export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiop.frozenDataTierPreference'; +export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiops.frozenDataTierPreference'; export type AiOps = Partial<{ [AIOPS_FROZEN_TIER_PREFERENCE]: 'exclude_frozen' | 'include_frozen'; diff --git a/x-pack/plugins/aiops/public/hooks/use_time_filter.ts b/x-pack/plugins/aiops/public/hooks/use_time_filter.ts index d840a65deb34e..1dcdf3a2539b6 100644 --- a/x-pack/plugins/aiops/public/hooks/use_time_filter.ts +++ b/x-pack/plugins/aiops/public/hooks/use_time_filter.ts @@ -21,15 +21,15 @@ export const useTimefilter = ({ const { timefilter } = services.data.query.timefilter; useEffect(() => { - if (timeRangeSelector === true) { + if (timeRangeSelector === true && !timefilter.isTimeRangeSelectorEnabled()) { timefilter.enableTimeRangeSelector(); - } else if (timeRangeSelector === false) { + } else if (timeRangeSelector === false && timefilter.isTimeRangeSelectorEnabled()) { timefilter.disableTimeRangeSelector(); } - if (autoRefreshSelector === true) { + if (autoRefreshSelector === true && !timefilter.isAutoRefreshSelectorEnabled()) { timefilter.enableAutoRefreshSelector(); - } else if (autoRefreshSelector === false) { + } else if (autoRefreshSelector === false && timefilter.isAutoRefreshSelectorEnabled()) { timefilter.disableAutoRefreshSelector(); } }, [timeRangeSelector, autoRefreshSelector, timefilter]); diff --git a/x-pack/plugins/aiops/public/types.ts b/x-pack/plugins/aiops/public/types.ts index fae18dc1d3106..453142258be2d 100755 --- a/x-pack/plugins/aiops/public/types.ts +++ b/x-pack/plugins/aiops/public/types.ts @@ -17,5 +17,5 @@ export type AiopsPluginSetup = ReturnType<AiopsPlugin['setup']>; */ export type AiopsPluginStart = ReturnType<AiopsPlugin['start']>; -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type AppPluginStartDependencies = {}; diff --git a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts index ce70c8eb386af..65ed2065d7ade 100644 --- a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts +++ b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts @@ -7,13 +7,18 @@ import { chunk } from 'lodash'; +import { asyncForEach } from '@kbn/std'; import type { IRouter } from '@kbn/core/server'; +import { KBN_FIELD_TYPES } from '@kbn/field-types'; import type { Logger } from '@kbn/logging'; import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; import { streamFactory } from '@kbn/aiops-utils'; +import type { ChangePoint, NumericChartData, NumericHistogramField } from '@kbn/ml-agg-utils'; +import { fetchHistogramsForFields } from '@kbn/ml-agg-utils'; import { addChangePointsAction, + addChangePointsHistogramAction, aiopsExplainLogRateSpikesSchema, errorAction, resetAction, @@ -21,7 +26,6 @@ import { AiopsExplainLogRateSpikesApiAction, } from '../../common/api/explain_log_rate_spikes'; import { API_ENDPOINT } from '../../common/api'; -import type { ChangePoint } from '../../common/types'; import type { AiopsLicense } from '../types'; @@ -30,7 +34,8 @@ import { fetchChangePointPValues } from './queries/fetch_change_point_p_values'; // Overall progress is a float from 0 to 1. const LOADED_FIELD_CANDIDATES = 0.2; -const PROGRESS_STEP_P_VALUES = 0.8; +const PROGRESS_STEP_P_VALUES = 0.6; +const PROGRESS_STEP_HISTOGRAMS = 0.2; export const defineExplainLogRateSpikesRoute = ( router: IRouter<DataRequestHandlerContext>, @@ -151,6 +156,105 @@ export const defineExplainLogRateSpikesRoute = ( } } + if (changePoints?.length === 0) { + push( + updateLoadingStateAction({ + ccsWarning: false, + loaded: 1, + loadingState: `Done.`, + }) + ); + + end(); + return; + } + + const histogramFields: [NumericHistogramField] = [ + { fieldName: request.body.timeFieldName, type: KBN_FIELD_TYPES.DATE }, + ]; + + const [overallTimeSeries] = (await fetchHistogramsForFields( + client, + request.body.index, + { match_all: {} }, + // fields + histogramFields, + // samplerShardSize + -1, + undefined + )) as [NumericChartData]; + + // time series filtered by fields + if (changePoints) { + await asyncForEach(changePoints, async (cp, index) => { + if (changePoints) { + const histogramQuery = { + bool: { + filter: [ + { + term: { [cp.fieldName]: cp.fieldValue }, + }, + ], + }, + }; + + const [cpTimeSeries] = (await fetchHistogramsForFields( + client, + request.body.index, + histogramQuery, + // fields + [ + { + fieldName: request.body.timeFieldName, + type: KBN_FIELD_TYPES.DATE, + interval: overallTimeSeries.interval, + min: overallTimeSeries.stats[0], + max: overallTimeSeries.stats[1], + }, + ], + // samplerShardSize + -1, + undefined + )) as [NumericChartData]; + + const histogram = + overallTimeSeries.data.map((o, i) => { + const current = cpTimeSeries.data.find( + (d1) => d1.key_as_string === o.key_as_string + ) ?? { + doc_count: 0, + }; + return { + key: o.key, + key_as_string: o.key_as_string ?? '', + doc_count_change_point: current.doc_count, + doc_count_overall: Math.max(0, o.doc_count - current.doc_count), + }; + }) ?? []; + + const { fieldName, fieldValue } = cp; + + loaded += (1 / changePoints.length) * PROGRESS_STEP_HISTOGRAMS; + push( + updateLoadingStateAction({ + ccsWarning: false, + loaded, + loadingState: `Loading histogram data.`, + }) + ); + push( + addChangePointsHistogramAction([ + { + fieldName, + fieldValue, + histogram, + }, + ]) + ); + } + }); + } + end(); })(); diff --git a/x-pack/plugins/aiops/server/routes/queries/fetch_change_point_p_values.ts b/x-pack/plugins/aiops/server/routes/queries/fetch_change_point_p_values.ts index 240eda6e328b5..dc60e608c9035 100644 --- a/x-pack/plugins/aiops/server/routes/queries/fetch_change_point_p_values.ts +++ b/x-pack/plugins/aiops/server/routes/queries/fetch_change_point_p_values.ts @@ -8,9 +8,9 @@ import { uniqBy } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ElasticsearchClient } from '@kbn/core/server'; +import { ChangePoint } from '@kbn/ml-agg-utils'; import { SPIKE_ANALYSIS_THRESHOLD } from '../../../common/constants'; import type { AiopsExplainLogRateSpikesSchema } from '../../../common/api/explain_log_rate_spikes'; -import { ChangePoint } from '../../../common/types'; import { getQueryWithParams } from './get_query_with_params'; import { getRequestBase } from './get_request_base'; @@ -109,6 +109,13 @@ export const fetchChangePointPValues = async ( for (const bucket of overallResult.buckets) { const pValue = Math.exp(-bucket.score); + // Scale the score into a value from 0 - 1 + // using a concave piecewise linear function in -log(p-value) + const normalizedScore = + 0.5 * Math.min(Math.max((bucket.score - 3.912) / 2.995, 0), 1) + + 0.25 * Math.min(Math.max((bucket.score - 6.908) / 6.908, 0), 1) + + 0.25 * Math.min(Math.max((bucket.score - 13.816) / 101.314, 0), 1); + if (typeof pValue === 'number' && pValue < SPIKE_ANALYSIS_THRESHOLD) { result.push({ fieldName, @@ -117,6 +124,7 @@ export const fetchChangePointPValues = async ( bg_count: bucket.doc_count, score: bucket.score, pValue, + normalizedScore, }); } } diff --git a/x-pack/plugins/aiops/server/routes/queries/get_query_with_params.ts b/x-pack/plugins/aiops/server/routes/queries/get_query_with_params.ts index 8c87dddaa28b4..1b53e5424b3db 100644 --- a/x-pack/plugins/aiops/server/routes/queries/get_query_with_params.ts +++ b/x-pack/plugins/aiops/server/routes/queries/get_query_with_params.ts @@ -7,7 +7,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { FieldValuePair } from '../../../common/types'; +import type { FieldValuePair } from '@kbn/ml-agg-utils'; import type { AiopsExplainLogRateSpikesSchema } from '../../../common/api/explain_log_rate_spikes'; import { getFilters } from './get_filters'; diff --git a/x-pack/plugins/alerting/common/rule_snooze_type.ts b/x-pack/plugins/alerting/common/rule_snooze_type.ts index 335f1b4180727..17a4d3721bd62 100644 --- a/x-pack/plugins/alerting/common/rule_snooze_type.ts +++ b/x-pack/plugins/alerting/common/rule_snooze_type.ts @@ -14,6 +14,7 @@ export interface RuleSnoozeSchedule { rRule: SnoozeRRule; // For scheduled/recurring snoozes, `id` uniquely identifies them so that they can be displayed, modified, and deleted individually id?: string; + skipRecurrences?: string[]; } // Type signature of has to be repeated here to avoid issues with SavedObject compatibility @@ -22,6 +23,7 @@ export type RuleSnooze = Array<{ duration: number; rRule: SnoozeRRule; id?: string; + skipRecurrences?: string[]; }>; // An iCal RRULE to define a recurrence schedule, see https://github.com/jakubroztocil/rrule for the spec diff --git a/x-pack/plugins/alerting/server/lib/is_rule_snoozed.test.ts b/x-pack/plugins/alerting/server/lib/is_rule_snoozed.test.ts index 5ceab8acaa817..21fe92a72a3dd 100644 --- a/x-pack/plugins/alerting/server/lib/is_rule_snoozed.test.ts +++ b/x-pack/plugins/alerting/server/lib/is_rule_snoozed.test.ts @@ -17,6 +17,7 @@ const DATE_2019_PLUS_6_HOURS = '2019-01-01T06:00:00.000Z'; const DATE_2020 = '2020-01-01T00:00:00.000Z'; const DATE_2020_MINUS_1_HOUR = '2019-12-31T23:00:00.000Z'; const DATE_2020_MINUS_1_MONTH = '2019-12-01T00:00:00.000Z'; +const DATE_2020_MINUS_6_HOURS = '2019-12-31T18:00:00.000Z'; const NOW = DATE_2020; @@ -315,4 +316,59 @@ describe('isRuleSnoozed', () => { ]; expect(isRuleSnoozed({ snoozeSchedule: snoozeScheduleB, muteAll: false })).toBe(true); }); + + test('returns as expected for a manually skipped recurring snooze', () => { + const snoozeScheduleA = [ + { + duration: 60 * 1000, + rRule: { + dtstart: DATE_2019, + tzid: 'UTC', + freq: RRule.DAILY, + interval: 1, + } as RRuleRecord, + skipRecurrences: [DATE_2020], + }, + ]; + expect(isRuleSnoozed({ snoozeSchedule: snoozeScheduleA, muteAll: false })).toBe(false); + const snoozeScheduleB = [ + { + duration: 60 * 1000, + rRule: { + dtstart: DATE_2019, + tzid: 'UTC', + freq: RRule.DAILY, + interval: 1, + } as RRuleRecord, + skipRecurrences: [DATE_2020_MINUS_1_MONTH], + }, + ]; + expect(isRuleSnoozed({ snoozeSchedule: snoozeScheduleB, muteAll: false })).toBe(true); + const snoozeScheduleC = [ + { + duration: 60 * 1000, + rRule: { + dtstart: DATE_2020, + tzid: 'UTC', + freq: RRule.DAILY, + interval: 1, + } as RRuleRecord, + skipRecurrences: [DATE_2020], + }, + ]; + expect(isRuleSnoozed({ snoozeSchedule: snoozeScheduleC, muteAll: false })).toBe(false); + const snoozeScheduleD = [ + { + duration: 2 * 60 * 60 * 1000, + rRule: { + dtstart: DATE_2020_MINUS_6_HOURS, + tzid: 'UTC', + freq: RRule.HOURLY, + interval: 5, + } as RRuleRecord, + skipRecurrences: [DATE_2020_MINUS_1_HOUR], + }, + ]; + expect(isRuleSnoozed({ snoozeSchedule: snoozeScheduleD, muteAll: false })).toBe(false); + }); }); diff --git a/x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts b/x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts index 450e484f777a1..787c6d93a8ca8 100644 --- a/x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts +++ b/x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts @@ -10,7 +10,7 @@ import { SanitizedRule, RuleTypeParams } from '../../common/rule'; import { isSnoozeActive } from './snooze/is_snooze_active'; type RuleSnoozeProps = Pick<SanitizedRule<RuleTypeParams>, 'muteAll' | 'snoozeSchedule'>; -type ActiveSnoozes = Array<{ snoozeEndTime: Date; id: string }>; +type ActiveSnoozes = Array<{ snoozeEndTime: Date; id: string; lastOccurrence?: Date }>; export function getActiveSnoozes(rule: RuleSnoozeProps): ActiveSnoozes | null { if (rule.snoozeSchedule == null) { diff --git a/x-pack/plugins/alerting/server/lib/snooze/is_snooze_active.ts b/x-pack/plugins/alerting/server/lib/snooze/is_snooze_active.ts index bbd886fbc62d9..e365c75df1bd0 100644 --- a/x-pack/plugins/alerting/server/lib/snooze/is_snooze_active.ts +++ b/x-pack/plugins/alerting/server/lib/snooze/is_snooze_active.ts @@ -19,11 +19,13 @@ export function isSnoozeActive(snooze: RuleSnoozeSchedule) { }; const startTimeMS = Date.parse(rRule.dtstart); const initialEndTime = startTimeMS + duration; + const isInitialStartSkipped = snooze.skipRecurrences?.includes(rRule.dtstart); // If now is during the first occurrence of the snooze const now = Date.now(); - if (now >= startTimeMS && now < initialEndTime) + if (now >= startTimeMS && now < initialEndTime && !isInitialStartSkipped) return { snoozeEndTime: new Date(initialEndTime), + lastOccurrence: new Date(rRule.dtstart), id, }; @@ -40,8 +42,11 @@ export function isSnoozeActive(snooze: RuleSnoozeSchedule) { const recurrenceRule = new RRule(rRuleOptions); const lastOccurrence = recurrenceRule.before(new Date(now), true); if (!lastOccurrence) return null; + // Check if the current recurrence has been skipped manually + if (snooze.skipRecurrences?.includes(lastOccurrence.toISOString())) return null; const lastOccurrenceEndTime = lastOccurrence.getTime() + duration; - if (now < lastOccurrenceEndTime) return { snoozeEndTime: new Date(lastOccurrenceEndTime), id }; + if (now < lastOccurrenceEndTime) + return { lastOccurrence, snoozeEndTime: new Date(lastOccurrenceEndTime), id }; } catch (e) { throw new Error(`Failed to process RRule ${rRule}: ${e}`); } diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.ts index 0a60fa24611aa..88634e3719e6f 100644 --- a/x-pack/plugins/alerting/server/rules_client/rules_client.ts +++ b/x-pack/plugins/alerting/server/rules_client/rules_client.ts @@ -2944,10 +2944,23 @@ function clearCurrentActiveSnooze(attributes: { snoozeSchedule?: RuleSnooze; mut // Now clear any scheduled snoozes that are currently active and never recur const activeSnoozes = getActiveSnoozes(attributes); const activeSnoozeIds = activeSnoozes?.map((s) => s.id) ?? []; + const recurringSnoozesToSkip: string[] = []; const clearedNonRecurringActiveSnoozes = clearedUnscheduledSnoozes.filter((s) => { if (!activeSnoozeIds.includes(s.id!)) return true; // Check if this is a recurring snooze, and return true if so - if (s.rRule.freq && s.rRule.count !== 1) return true; + if (s.rRule.freq && s.rRule.count !== 1) { + recurringSnoozesToSkip.push(s.id!); + return true; + } + }); + const clearedSnoozesAndSkippedRecurringSnoozes = clearedNonRecurringActiveSnoozes.map((s) => { + if (s.id && !recurringSnoozesToSkip.includes(s.id)) return s; + const currentRecurrence = activeSnoozes?.find((a) => a.id === s.id)?.lastOccurrence; + if (!currentRecurrence) return s; + return { + ...s, + skipRecurrences: (s.skipRecurrences ?? []).concat(currentRecurrence.toISOString()), + }; }); - return clearedNonRecurringActiveSnoozes; + return clearedSnoozesAndSkippedRecurringSnoozes; } diff --git a/x-pack/plugins/alerting/server/saved_objects/mappings.ts b/x-pack/plugins/alerting/server/saved_objects/mappings.ts index 31ad40117a7ec..ed1a75d4c0410 100644 --- a/x-pack/plugins/alerting/server/saved_objects/mappings.ts +++ b/x-pack/plugins/alerting/server/saved_objects/mappings.ts @@ -194,6 +194,10 @@ export const alertMappings: SavedObjectsTypeMappingDefinition = { duration: { type: 'long', }, + skipRecurrences: { + type: 'date', + format: 'strict_date_time', + }, rRule: { type: 'nested', properties: { diff --git a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap index 3e9f87b47bf55..e9ee276cb1253 100644 --- a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap @@ -13,6 +13,9 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the "properties": { "services_per_agent": { "properties": { + "android/java": { + "type": "long" + }, "dotnet": { "type": "long" }, @@ -83,6 +86,60 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the }, "agents": { "properties": { + "android/java": { + "properties": { + "agent": { + "properties": { + "version": { + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "name": { + "type": "keyword" + }, + "version": { + "type": "keyword" + }, + "composite": { + "type": "keyword" + } + } + }, + "language": { + "properties": { + "name": { + "type": "keyword" + }, + "version": { + "type": "keyword" + }, + "composite": { + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "name": { + "type": "keyword" + }, + "version": { + "type": "keyword" + }, + "composite": { + "type": "keyword" + } + } + } + } + } + } + }, "dotnet": { "properties": { "agent": { diff --git a/x-pack/plugins/apm/common/agent_name.test.ts b/x-pack/plugins/apm/common/agent_name.test.ts index e48fa502d33d1..fead02dc2af1b 100644 --- a/x-pack/plugins/apm/common/agent_name.test.ts +++ b/x-pack/plugins/apm/common/agent_name.test.ts @@ -9,6 +9,8 @@ import { isJavaAgentName, isRumAgentName, isIosAgentName, + isAndroidAgentName, + isMobileAgentName, isServerlessAgent, } from './agent_name'; @@ -60,13 +62,13 @@ describe('agent name helpers', () => { }); describe('isIosAgentName', () => { - describe('when the agent name is js-base', () => { + describe('when the agent name is iOS/swift', () => { it('returns true', () => { expect(isIosAgentName('iOS/swift')).toEqual(true); }); }); - describe('when the agent name is rum-js', () => { + describe('when the agent name is ios/swift', () => { it('returns true', () => { expect(isIosAgentName('ios/swift')).toEqual(true); }); @@ -74,7 +76,7 @@ describe('agent name helpers', () => { describe('when the agent name is opentelemetry/swift', () => { it('returns true', () => { - expect(isIosAgentName('opentelemetry/swift')).toEqual(true); + expect(isIosAgentName('opentelemetry/swift')).toEqual(false); }); }); @@ -85,6 +87,64 @@ describe('agent name helpers', () => { }); }); + describe('isAndroidAgentName', () => { + describe('when the agent name is android/java', () => { + it('returns true', () => { + expect(isAndroidAgentName('android/java')).toEqual(true); + }); + }); + + describe('when the agent name is opentelemetry/java', () => { + it('returns false', () => { + expect(isAndroidAgentName('opentelemetry/java')).toEqual(false); + }); + }); + + describe('when the agent name is something else', () => { + it('returns false', () => { + expect(isAndroidAgentName('not android')).toEqual(false); + }); + }); + }); + + describe('isMobileAgentName', () => { + describe('when the agent name is android/java', () => { + it('returns true', () => { + expect(isMobileAgentName('android/java')).toEqual(true); + }); + }); + + describe('when the agent name is iOS/swift', () => { + it('returns true', () => { + expect(isMobileAgentName('iOS/swift')).toEqual(true); + }); + }); + + describe('when the agent name is ios/swift', () => { + it('returns true', () => { + expect(isMobileAgentName('ios/swift')).toEqual(true); + }); + }); + + describe('when the agent name is opentelemetry/swift', () => { + it('returns true', () => { + expect(isMobileAgentName('opentelemetry/swift')).toEqual(false); + }); + }); + + describe('when the agent name is opentelemetry/java', () => { + it('returns false', () => { + expect(isMobileAgentName('opentelemetry/java')).toEqual(false); + }); + }); + + describe('when the agent name is something else', () => { + it('returns false', () => { + expect(isMobileAgentName('not mobile')).toEqual(false); + }); + }); + }); + describe('isServerlessAgent', () => { describe('when the runtime name is AWS_LAMBDA', () => { it('returns true', () => { diff --git a/x-pack/plugins/apm/common/agent_name.ts b/x-pack/plugins/apm/common/agent_name.ts index e8947d550a8fc..7902b57c7c72c 100644 --- a/x-pack/plugins/apm/common/agent_name.ts +++ b/x-pack/plugins/apm/common/agent_name.ts @@ -41,6 +41,7 @@ export const AGENT_NAMES: AgentName[] = [ 'python', 'ruby', 'rum-js', + 'android/java', ...OPEN_TELEMETRY_AGENT_NAMES, ]; @@ -64,27 +65,13 @@ export function isRumAgentName( return RUM_AGENT_NAMES.includes(agentName! as AgentName); } -export function normalizeAgentName<T extends string | undefined>( - agentName: T -): T | string { - if (isRumAgentName(agentName)) { - return 'rum-js'; - } - - if (isJavaAgentName(agentName)) { - return 'java'; - } - - if (isIosAgentName(agentName)) { - return 'ios'; - } - - return agentName; +export function isMobileAgentName(agentName?: string) { + return isIosAgentName(agentName) || isAndroidAgentName(agentName); } export function isIosAgentName(agentName?: string) { const lowercased = agentName && agentName.toLowerCase(); - return lowercased === 'ios/swift' || lowercased === 'opentelemetry/swift'; + return lowercased === 'ios/swift'; } export function isJRubyAgent(agentName?: string, runtimeName?: string) { @@ -94,3 +81,8 @@ export function isJRubyAgent(agentName?: string, runtimeName?: string) { export function isServerlessAgent(runtimeName?: string) { return runtimeName?.toLowerCase().startsWith('aws_lambda'); } + +export function isAndroidAgentName(agentName?: string) { + const lowercased = agentName && agentName.toLowerCase(); + return lowercased === 'android/java'; +} diff --git a/x-pack/plugins/apm/common/connections.ts b/x-pack/plugins/apm/common/connections.ts index 1fde50ce5489e..ca040c73afc59 100644 --- a/x-pack/plugins/apm/common/connections.ts +++ b/x-pack/plugins/apm/common/connections.ts @@ -9,7 +9,7 @@ import { Coordinate } from '../typings/timeseries'; export enum NodeType { service = 'service', - backend = 'backend', + dependency = 'dependency', } interface NodeBase { @@ -23,14 +23,14 @@ export interface ServiceNode extends NodeBase { environment: string; } -export interface BackendNode extends NodeBase { - type: NodeType.backend; - backendName: string; +export interface DependencyNode extends NodeBase { + type: NodeType.dependency; + dependencyName: string; spanType: string; spanSubtype: string; } -export type Node = ServiceNode | BackendNode; +export type Node = ServiceNode | DependencyNode; export interface ConnectionStatsItem { location: Node; @@ -67,5 +67,7 @@ export interface ConnectionStatsItemWithComparisonData { } export function getNodeName(node: Node) { - return node.type === NodeType.service ? node.serviceName : node.backendName; + return node.type === NodeType.service + ? node.serviceName + : node.dependencyName; } diff --git a/x-pack/plugins/apm/common/backends.ts b/x-pack/plugins/apm/common/dependencies.ts similarity index 87% rename from x-pack/plugins/apm/common/backends.ts rename to x-pack/plugins/apm/common/dependencies.ts index 53418fe7f9b62..51f0d505d5df8 100644 --- a/x-pack/plugins/apm/common/backends.ts +++ b/x-pack/plugins/apm/common/dependencies.ts @@ -21,17 +21,17 @@ export const kueryBarPlaceholder = i18n.translate( ); export const getKueryBarBoolFilter = ({ - backendName, + dependencyName, environment, }: { - backendName?: string; + dependencyName?: string; environment: string; }) => { return [ { term: { [PROCESSOR_EVENT]: ProcessorEvent.metric } }, { exists: { field: SPAN_DESTINATION_SERVICE_RESOURCE } }, - ...(backendName - ? [{ term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }] + ...(dependencyName + ? [{ term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName } }] : []), ...environmentQuery(environment), ]; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/feature_flag/comparison.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/feature_flag/comparison.ts index 198ac9d110556..5dfb121a921e6 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/feature_flag/comparison.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/feature_flag/comparison.ts @@ -49,7 +49,7 @@ describe('Comparison feature flag', () => { }); it('shows the comparison feature enabled in services overview', () => { - cy.visit('/app/apm/backends'); + cy.visit('/app/apm/dependencies'); cy.get('input[type="checkbox"]#comparison').should('be.checked'); cy.get('[data-test-subj="comparisonSelect"]').should('not.be.disabled'); }); @@ -89,7 +89,7 @@ describe('Comparison feature flag', () => { }); it('shows the comparison feature disabled in dependencies overview page', () => { - cy.visit('/app/apm/backends'); + cy.visit('/app/apm/dependencies'); cy.get('input[type="checkbox"]#comparison').should('not.be.checked'); cy.get('[data-test-subj="comparisonSelect"]').should('be.disabled'); }); diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/dependencies.spec.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/dependencies.spec.ts index 72a3a3854ce8d..67cf0c14e111e 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/dependencies.spec.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/dependencies.spec.ts @@ -60,9 +60,9 @@ describe('Dependencies', () => { describe.skip('dependency overview page', () => { it('shows dependency information and you can navigate to a page for an upstream service', () => { cy.visit( - `/app/apm/backends/overview?${new URLSearchParams({ + `/app/apm/dependencies/overview?${new URLSearchParams({ ...timeRange, - backendName: 'postgresql', + dependencyName: 'postgresql', })}` ); @@ -77,9 +77,9 @@ describe('Dependencies', () => { it('has no detectable a11y violations on load', () => { cy.visit( - `/app/apm/backends/overview?${new URLSearchParams({ + `/app/apm/dependencies/overview?${new URLSearchParams({ ...timeRange, - backendName: 'postgresql', + dependencyName: 'postgresql', })}` ); cy.contains('h1', 'postgresql'); diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/errors/error_details.spec.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/errors/error_details.spec.ts index 1911f86791cae..59c0d87029517 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/errors/error_details.spec.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/errors/error_details.spec.ts @@ -71,6 +71,15 @@ describe('Error details', () => { cy.get('[data-test-subj="errorDistribution"]').contains('Occurrences'); }); + it('shows top erroneous transactions table', () => { + cy.visit(errorDetailsPageHref); + cy.contains('Top 5 affected transactions'); + cy.get('[data-test-subj="topErroneousTransactionsTable"]') + .contains('a', 'GET /apple 🍎') + .click(); + cy.url().should('include', 'opbeans-java/transactions/view'); + }); + it('shows a Stacktrace and Metadata tabs', () => { cy.visit(errorDetailsPageHref); cy.contains('button', 'Exception stack trace'); diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/transaction_details/transaction_details.spec.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/transaction_details/transaction_details.spec.ts new file mode 100644 index 0000000000000..c5eeda6645ce8 --- /dev/null +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/read_only_user/transaction_details/transaction_details.spec.ts @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { synthtrace } from '../../../../synthtrace'; +import { opbeans } from '../../../fixtures/synthtrace/opbeans'; + +const start = '2021-10-10T00:00:00.000Z'; +const end = '2021-10-10T00:15:00.000Z'; + +const timeRange = { + rangeFrom: start, + rangeTo: end, +}; + +describe('Transaction details', () => { + before(async () => { + await synthtrace.index( + opbeans({ + from: new Date(start).getTime(), + to: new Date(end).getTime(), + }) + ); + }); + + after(async () => { + await synthtrace.clean(); + }); + + beforeEach(() => { + cy.loginAsViewerUser(); + cy.visit( + `/app/apm/services/opbeans-java/transactions/view?${new URLSearchParams({ + ...timeRange, + transactionName: 'GET /api/product', + })}` + ); + }); + + it('shows transaction name and transaction charts', () => { + cy.contains('h2', 'GET /api/product'); + cy.get('[data-test-subj="latencyChart"]'); + cy.get('[data-test-subj="throughput"]'); + cy.get('[data-test-subj="transactionBreakdownChart"]'); + cy.get('[data-test-subj="errorRate"]'); + }); + + it('shows top errors table', () => { + cy.contains('Top 5 errors'); + cy.get('[data-test-subj="topErrorsForTransactionTable"]') + .contains('a', '[MockError] Foo') + .click(); + cy.url().should('include', 'opbeans-java/errors'); + }); +}); diff --git a/x-pack/plugins/apm/public/components/app/backend_detail_operations/index.tsx b/x-pack/plugins/apm/public/components/app/backend_detail_operations/index.tsx deleted file mode 100644 index 7b4fd37973811..0000000000000 --- a/x-pack/plugins/apm/public/components/app/backend_detail_operations/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { useBackendDetailOperationsBreadcrumb } from '../../../hooks/use_backend_detail_operations_breadcrumb'; -import { BackendDetailOperationsList } from './backend_detail_operations_list'; - -export function BackendDetailOperations() { - useBackendDetailOperationsBreadcrumb(); - - return <BackendDetailOperationsList />; -} diff --git a/x-pack/plugins/apm/public/components/app/backend_detail_overview/index.tsx b/x-pack/plugins/apm/public/components/app/backend_detail_overview/index.tsx deleted file mode 100644 index 63b87f4efcbda..0000000000000 --- a/x-pack/plugins/apm/public/components/app/backend_detail_overview/index.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import { EuiSpacer } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; -import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; -import { useApmRouter } from '../../../hooks/use_apm_router'; -import { BackendDetailDependenciesTable } from './backend_detail_dependencies_table'; -import { BackendMetricCharts } from '../../shared/backend_metric_charts'; - -export function BackendDetailOverview() { - const { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - } = useApmParams('/backends/overview'); - - const apmRouter = useApmRouter(); - - useBreadcrumb([ - { - title: i18n.translate('xpack.apm.backendDetailOverview.breadcrumbTitle', { - defaultMessage: 'Overview', - }), - href: apmRouter.link('/backends/overview', { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - }), - }, - ]); - - return ( - <> - <ChartPointerEventContextProvider> - <BackendMetricCharts /> - </ChartPointerEventContextProvider> - <EuiSpacer size="l" /> - <BackendDetailDependenciesTable /> - </> - ); -} diff --git a/x-pack/plugins/apm/public/components/app/backend_detail_view/index.tsx b/x-pack/plugins/apm/public/components/app/backend_detail_view/index.tsx deleted file mode 100644 index 086e5dbea36a2..0000000000000 --- a/x-pack/plugins/apm/public/components/app/backend_detail_view/index.tsx +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import React from 'react'; -import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; -import { useApmParams } from '../../../hooks/use_apm_params'; -import { useApmRouter } from '../../../hooks/use_apm_router'; -import { DependenciesInventoryTitle } from '../../routing/home'; -import { BackendDetailTemplate } from '../../routing/templates/backend_detail_template'; - -export function BackendDetailView({ - children, -}: { - children: React.ReactChild; -}) { - const { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - } = useApmParams('/backends'); - - const apmRouter = useApmRouter(); - - useBreadcrumb([ - { - title: DependenciesInventoryTitle, - href: apmRouter.link('/backends/inventory', { - query: { - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - }), - }, - { - title: backendName, - href: apmRouter.link('/backends', { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - }), - }, - ]); - - return <BackendDetailTemplate>{children}</BackendDetailTemplate>; -} diff --git a/x-pack/plugins/apm/public/components/app/breadcrumb/index.tsx b/x-pack/plugins/apm/public/components/app/breadcrumb/index.tsx index 5cc1293d39f7d..d6afe4a7c1d19 100644 --- a/x-pack/plugins/apm/public/components/app/breadcrumb/index.tsx +++ b/x-pack/plugins/apm/public/components/app/breadcrumb/index.tsx @@ -18,7 +18,10 @@ export const Breadcrumb = ({ children: React.ReactElement; }) => { const { core } = useApmPluginContext(); - useBreadcrumb({ title, href: core.http.basePath.prepend('/app/apm' + href) }); + useBreadcrumb( + () => ({ title, href: core.http.basePath.prepend('/app/apm' + href) }), + [core.http.basePath, href, title] + ); return children; }; diff --git a/x-pack/plugins/apm/public/components/app/backend_inventory/backend_inventory_dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx similarity index 81% rename from x-pack/plugins/apm/public/components/app/backend_inventory/backend_inventory_dependencies_table/index.tsx rename to x-pack/plugins/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx index eff0f1c4474cc..87985db3addd4 100644 --- a/x-pack/plugins/apm/public/components/app/backend_inventory/backend_inventory_dependencies_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx @@ -14,10 +14,10 @@ import { getNodeName, NodeType } from '../../../../../common/connections'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { BackendLink } from '../../../shared/backend_link'; +import { DependencyLink } from '../../../shared/dependency_link'; import { DependenciesTable } from '../../../shared/dependencies_table'; -export function BackendInventoryDependenciesTable() { +export function DependenciesInventoryTable() { const { query: { rangeFrom, @@ -27,7 +27,7 @@ export function BackendInventoryDependenciesTable() { comparisonEnabled, offset, }, - } = useApmParams('/backends/inventory'); + } = useApmParams('/dependencies/inventory'); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); @@ -39,7 +39,7 @@ export function BackendInventoryDependenciesTable() { return; } - return callApmApi('GET /internal/apm/backends/top_backends', { + return callApmApi('GET /internal/apm/dependencies/top_dependencies', { params: { query: { start, @@ -59,19 +59,19 @@ export function BackendInventoryDependenciesTable() { ); const dependencies = - data?.backends.map((dependency) => { + data?.dependencies.map((dependency) => { const { location } = dependency; const name = getNodeName(location); - if (location.type !== NodeType.backend) { - throw new Error('Expected a backend node'); + if (location.type !== NodeType.dependency) { + throw new Error('Expected a dependency node'); } const link = ( - <BackendLink + <DependencyLink type={location.spanType} subtype={location.spanSubtype} query={{ - backendName: location.backendName, + dependencyName: location.dependencyName, comparisonEnabled, offset, environment, @@ -83,7 +83,7 @@ export function BackendInventoryDependenciesTable() { trackEvent({ app: 'apm', metricType: METRIC_TYPE.CLICK, - metric: 'backend_inventory_to_backend_detail', + metric: 'dependencies_inventory_to_dependency_detail', }); }} /> @@ -102,7 +102,7 @@ export function BackendInventoryDependenciesTable() { dependencies={dependencies} title={null} nameColumnTitle={i18n.translate( - 'xpack.apm.backendInventory.dependencyTableColumn', + 'xpack.apm.dependenciesInventory.dependencyTableColumn', { defaultMessage: 'Dependency', } diff --git a/x-pack/plugins/apm/public/components/app/backend_inventory/index.tsx b/x-pack/plugins/apm/public/components/app/dependencies_inventory/index.tsx similarity index 76% rename from x-pack/plugins/apm/public/components/app/backend_inventory/index.tsx rename to x-pack/plugins/apm/public/components/app/dependencies_inventory/index.tsx index f29724fa7cdcb..0e999f7e9aa46 100644 --- a/x-pack/plugins/apm/public/components/app/backend_inventory/index.tsx +++ b/x-pack/plugins/apm/public/components/app/dependencies_inventory/index.tsx @@ -10,15 +10,15 @@ import React from 'react'; import { getKueryBarBoolFilter, kueryBarPlaceholder, -} from '../../../../common/backends'; +} from '../../../../common/dependencies'; import { useApmParams } from '../../../hooks/use_apm_params'; import { SearchBar } from '../../shared/search_bar'; -import { BackendInventoryDependenciesTable } from './backend_inventory_dependencies_table'; +import { DependenciesInventoryTable } from './dependencies_inventory_table'; -export function BackendInventory() { +export function DependenciesInventory() { const { query: { environment }, - } = useApmParams('/backends/inventory'); + } = useApmParams('/dependencies/inventory'); const kueryBarBoolFilter = getKueryBarBoolFilter({ environment, }); @@ -31,7 +31,7 @@ export function BackendInventory() { kueryBarBoolFilter={kueryBarBoolFilter} /> <EuiSpacer size="s" /> - <BackendInventoryDependenciesTable /> + <DependenciesInventoryTable /> </> ); } diff --git a/x-pack/plugins/apm/public/components/app/backend_detail_operations/backend_detail_operations_list/index.tsx b/x-pack/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx similarity index 81% rename from x-pack/plugins/apm/public/components/app/backend_detail_operations/backend_detail_operations_list/index.tsx rename to x-pack/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx index 5b2c624af48b4..cbfbcac2c2de5 100644 --- a/x-pack/plugins/apm/public/components/app/backend_detail_operations/backend_detail_operations_list/index.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx @@ -21,36 +21,36 @@ import { EmptyMessage } from '../../../shared/empty_message'; import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; import { getComparisonEnabled } from '../../../shared/time_comparison/get_comparison_enabled'; import { TruncateWithTooltip } from '../../../shared/truncate_with_tooltip'; -import { BackendOperationDetailLink } from '../../backend_operation_detail_view/backend_operation_detail_link'; +import { DependencyOperationDetailLink } from '../../dependency_operation_detail_view/dependency_operation_detail_link'; interface OperationStatisticsItem extends SpanMetricGroup { spanName: string; } function OperationLink({ spanName }: { spanName: string }) { - const { query } = useApmParams('/backends/operations'); + const { query } = useApmParams('/dependencies/operations'); return ( <TruncateWithTooltip data-test-subj="apmOperationsListAppLink" text={spanName} - content={<BackendOperationDetailLink {...query} spanName={spanName} />} + content={<DependencyOperationDetailLink {...query} spanName={spanName} />} /> ); } -export function BackendDetailOperationsList() { +export function DependencyDetailOperationsList() { const { query: { rangeFrom, rangeTo, - backendName, + dependencyName, environment, kuery, comparisonEnabled: urlComparisonEnabled, offset, }, - } = useApmParams('/backends/operations'); + } = useApmParams('/dependencies/operations'); const { core } = useApmPluginContext(); @@ -68,10 +68,10 @@ export function BackendDetailOperationsList() { const primaryStatsFetch = useFetcher( (callApmApi) => { - return callApmApi('GET /internal/apm/backends/operations', { + return callApmApi('GET /internal/apm/dependencies/operations', { params: { query: { - backendName, + dependencyName, start, end, environment, @@ -80,7 +80,7 @@ export function BackendDetailOperationsList() { }, }); }, - [backendName, start, end, environment, kuery] + [dependencyName, start, end, environment, kuery] ); const comparisonStatsFetch = useFetcher( @@ -90,10 +90,10 @@ export function BackendDetailOperationsList() { operations: [], }); } - return callApmApi('GET /internal/apm/backends/operations', { + return callApmApi('GET /internal/apm/dependencies/operations', { params: { query: { - backendName, + dependencyName, start, end, offset, @@ -103,16 +103,14 @@ export function BackendDetailOperationsList() { }, }); }, - [backendName, start, end, offset, environment, kuery, comparisonEnabled] + [dependencyName, start, end, offset, environment, kuery, comparisonEnabled] ); const columns: Array<ITableColumn<OperationStatisticsItem>> = [ { name: i18n.translate( - 'xpack.apm.backendDetailOperationsList.spanNameColumnLabel', - { - defaultMessage: 'Span name', - } + 'xpack.apm.dependencyDetailOperationsList.spanNameColumnLabel', + { defaultMessage: 'Span name' } ), field: 'spanName', sortable: true, @@ -132,10 +130,8 @@ export function BackendDetailOperationsList() { const noItemsMessage = ( <EmptyMessage heading={i18n.translate( - 'xpack.apm.backendDetailOperationsList.notFoundLabel', - { - defaultMessage: 'No operations found', - } + 'xpack.apm.dependencyDetailOperationsList.notFoundLabel', + { defaultMessage: 'No operations found' } )} /> ); diff --git a/x-pack/plugins/apm/public/components/app/dependency_detail_operations/index.tsx b/x-pack/plugins/apm/public/components/app/dependency_detail_operations/index.tsx new file mode 100644 index 0000000000000..a7f2d26548dc2 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/dependency_detail_operations/index.tsx @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { useDependencyDetailOperationsBreadcrumb } from '../../../hooks/use_dependency_detail_operations_breadcrumb'; +import { DependencyDetailOperationsList } from './dependency_detail_operations_list'; + +export function DependencyDetailOperations() { + useDependencyDetailOperationsBreadcrumb(); + + return <DependencyDetailOperationsList />; +} diff --git a/x-pack/plugins/apm/public/components/app/backend_detail_overview/backend_detail_dependencies_table.tsx b/x-pack/plugins/apm/public/components/app/dependency_detail_overview/dependencies_detail_table.tsx similarity index 83% rename from x-pack/plugins/apm/public/components/app/backend_detail_overview/backend_detail_dependencies_table.tsx rename to x-pack/plugins/apm/public/components/app/dependency_detail_overview/dependencies_detail_table.tsx index 87733a69930d6..4a40e10fcf36d 100644 --- a/x-pack/plugins/apm/public/components/app/backend_detail_overview/backend_detail_dependencies_table.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_detail_overview/dependencies_detail_table.tsx @@ -17,10 +17,10 @@ import { useTimeRange } from '../../../hooks/use_time_range'; import { getComparisonEnabled } from '../../shared/time_comparison/get_comparison_enabled'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -export function BackendDetailDependenciesTable() { +export function DependenciesDetailTable() { const { query: { - backendName, + dependencyName, rangeFrom, rangeTo, kuery, @@ -28,7 +28,7 @@ export function BackendDetailDependenciesTable() { comparisonEnabled: urlComparisonEnabled, offset, }, - } = useApmParams('/backends/overview'); + } = useApmParams('/dependencies/overview'); const { core } = useApmPluginContext(); @@ -41,10 +41,10 @@ export function BackendDetailDependenciesTable() { const { data, status } = useFetcher( (callApmApi) => { - return callApmApi('GET /internal/apm/backends/upstream_services', { + return callApmApi('GET /internal/apm/dependencies/upstream_services', { params: { query: { - backendName, + dependencyName, start, end, environment, @@ -58,7 +58,7 @@ export function BackendDetailDependenciesTable() { }, }); }, - [start, end, environment, offset, backendName, kuery, comparisonEnabled] + [start, end, environment, offset, dependencyName, kuery, comparisonEnabled] ); const dependencies = @@ -97,14 +97,13 @@ export function BackendDetailDependenciesTable() { return ( <DependenciesTable dependencies={dependencies} - title={i18n.translate('xpack.apm.backendDetail.dependenciesTableTitle', { - defaultMessage: 'Upstream services', - })} + title={i18n.translate( + 'xpack.apm.dependencyDetail.dependenciesTableTitle', + { defaultMessage: 'Upstream services' } + )} nameColumnTitle={i18n.translate( - 'xpack.apm.backendDetail.dependenciesTableColumnBackend', - { - defaultMessage: 'Service', - } + 'xpack.apm.dependencyDetail.dependenciesTableColumn', + { defaultMessage: 'Service' } )} status={status} compact={false} diff --git a/x-pack/plugins/apm/public/components/app/dependency_detail_overview/index.tsx b/x-pack/plugins/apm/public/components/app/dependency_detail_overview/index.tsx new file mode 100644 index 0000000000000..e129088b23f68 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/dependency_detail_overview/index.tsx @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { EuiSpacer } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; +import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; +import { useApmParams } from '../../../hooks/use_apm_params'; +import { useApmRouter } from '../../../hooks/use_apm_router'; +import { DependenciesDetailTable } from './dependencies_detail_table'; +import { DependencyMetricCharts } from '../../shared/dependency_metric_charts'; + +export function DependencyDetailOverview() { + const { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + } = useApmParams('/dependencies/overview'); + + const apmRouter = useApmRouter(); + + useBreadcrumb( + () => [ + { + title: i18n.translate( + 'xpack.apm.dependencyDetailOverview.breadcrumbTitle', + { defaultMessage: 'Overview' } + ), + href: apmRouter.link('/dependencies/overview', { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + }), + }, + ], + [ + apmRouter, + comparisonEnabled, + dependencyName, + environment, + kuery, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + ] + ); + + return ( + <> + <ChartPointerEventContextProvider> + <DependencyMetricCharts /> + </ChartPointerEventContextProvider> + <EuiSpacer size="l" /> + <DependenciesDetailTable /> + </> + ); +} diff --git a/x-pack/plugins/apm/public/components/app/dependency_detail_view/index.tsx b/x-pack/plugins/apm/public/components/app/dependency_detail_view/index.tsx new file mode 100644 index 0000000000000..9ad1c2b6e19a0 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/dependency_detail_view/index.tsx @@ -0,0 +1,79 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; +import { useApmParams } from '../../../hooks/use_apm_params'; +import { useApmRouter } from '../../../hooks/use_apm_router'; +import { DependenciesInventoryTitle } from '../../routing/home/dependencies'; +import { DependencyDetailTemplate } from '../../routing/templates/dependency_detail_template'; + +export function DependencyDetailView({ + children, +}: { + children: React.ReactChild; +}) { + const { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + } = useApmParams('/dependencies'); + + const apmRouter = useApmRouter(); + + useBreadcrumb( + () => [ + { + title: DependenciesInventoryTitle, + href: apmRouter.link('/dependencies/inventory', { + query: { + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + }), + }, + { + title: dependencyName, + href: apmRouter.link('/dependencies', { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + }), + }, + ], + [ + apmRouter, + comparisonEnabled, + dependencyName, + environment, + kuery, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + ] + ); + return <DependencyDetailTemplate>{children}</DependencyDetailTemplate>; +} diff --git a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_link.tsx b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx similarity index 77% rename from x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_link.tsx rename to x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx index da3c4e0645f0c..9f6d8d9b27e61 100644 --- a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_link.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx @@ -10,14 +10,14 @@ import { TypeOf } from '@kbn/typed-react-router-config'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { ApmRoutes } from '../../routing/apm_route_config'; -type Query = TypeOf<ApmRoutes, '/backends/operation'>['query']; +type Query = TypeOf<ApmRoutes, '/dependencies/operation'>['query']; -export function BackendOperationDetailLink(query: Query) { +export function DependencyOperationDetailLink(query: Query) { const router = useApmRouter(); const { spanName } = query; - const link = router.link('/backends/operation', { + const link = router.link('/dependencies/operation', { query, }); diff --git a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_trace_list.tsx b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_trace_list.tsx similarity index 87% rename from x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_trace_list.tsx rename to x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_trace_list.tsx index d0069fcc7447f..cf51fe6cf75e5 100644 --- a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_detail_trace_list.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_trace_list.tsx @@ -28,18 +28,18 @@ import { ITableColumn, ManagedTable } from '../../shared/managed_table'; import { ServiceLink } from '../../shared/service_link'; import { TimestampTooltip } from '../../shared/timestamp_tooltip'; -type BackendSpan = ValuesType< - APIReturnType<'GET /internal/apm/backends/operations/spans'>['spans'] +type DependencySpan = ValuesType< + APIReturnType<'GET /internal/apm/dependencies/operations/spans'>['spans'] >; -export function BackendOperationDetailTraceList() { +export function DependencyOperationDetailTraceList() { const router = useApmRouter(); const theme = useTheme(); const { query: { - backendName, + dependencyName, spanName, comparisonEnabled, environment, @@ -52,7 +52,7 @@ export function BackendOperationDetailTraceList() { sampleRangeFrom, sampleRangeTo, }, - } = useApmParams('/backends/operation'); + } = useApmParams('/dependencies/operation'); function getTraceLink({ transactionName, @@ -101,10 +101,10 @@ export function BackendOperationDetailTraceList() { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - const columns: Array<ITableColumn<BackendSpan>> = [ + const columns: Array<ITableColumn<DependencySpan>> = [ { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListOutcomeColumn', + 'xpack.apm.dependencyOperationDetailTraceListOutcomeColumn', { defaultMessage: 'Outcome' } ), field: 'outcome', @@ -123,7 +123,7 @@ export function BackendOperationDetailTraceList() { }, { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListTraceIdColumn', + 'xpack.apm.dependencyOperationDetailTraceListTraceIdColumn', { defaultMessage: 'Trace' } ), field: 'traceId', @@ -154,7 +154,7 @@ export function BackendOperationDetailTraceList() { }, { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListServiceNameColumn', + 'xpack.apm.dependencyOperationDetailTraceListServiceNameColumn', { defaultMessage: 'Originating service' } ), field: 'serviceName', @@ -183,7 +183,7 @@ export function BackendOperationDetailTraceList() { }, { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListTransactionNameColumn', + 'xpack.apm.dependencyOperationDetailTraceListTransactionNameColumn', { defaultMessage: 'Transaction name' } ), field: 'transactionName', @@ -211,7 +211,7 @@ export function BackendOperationDetailTraceList() { }, { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListDurationColumn', + 'xpack.apm.dependencyOperationDetailTraceListDurationColumn', { defaultMessage: 'Duration' } ), field: 'duration', @@ -223,7 +223,7 @@ export function BackendOperationDetailTraceList() { }, { name: i18n.translate( - 'xpack.apm.backendOperationDetailTraceListTimestampColumn', + 'xpack.apm.dependencyOperationDetailTraceListTimestampColumn', { defaultMessage: 'Timestamp' } ), field: '@timestamp', @@ -237,10 +237,10 @@ export function BackendOperationDetailTraceList() { const { data = { spans: [] }, status } = useFetcher( (callApmApi) => { - return callApmApi('GET /internal/apm/backends/operations/spans', { + return callApmApi('GET /internal/apm/dependencies/operations/spans', { params: { query: { - backendName, + dependencyName, spanName, start, end, @@ -253,7 +253,7 @@ export function BackendOperationDetailTraceList() { }); }, [ - backendName, + dependencyName, spanName, start, end, @@ -269,7 +269,7 @@ export function BackendOperationDetailTraceList() { <EuiFlexItem> <EuiTitle size="xxs"> <EuiText> - {i18n.translate('xpack.apm.backendOperationDetailTraceList', { + {i18n.translate('xpack.apm.dependencyOperationDetailTraceList', { defaultMessage: 'Traces', })} </EuiText> diff --git a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_distribution_chart.tsx b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependendecy_operation_distribution_chart.tsx similarity index 82% rename from x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_distribution_chart.tsx rename to x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependendecy_operation_distribution_chart.tsx index 165b3da7ebe32..57fb735e0e982 100644 --- a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/backend_operation_distribution_chart.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/dependendecy_operation_distribution_chart.tsx @@ -16,18 +16,18 @@ import { useTimeRange } from '../../../hooks/use_time_range'; import { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; import { DurationDistributionChartWithScrubber } from '../../shared/charts/duration_distribution_chart_with_scrubber'; -export function BackendOperationDistributionChart() { +export function DependencyOperationDistributionChart() { const { clearChartSelection, selectSampleFromChartSelection } = useSampleChartSelection(); - // there is no "current" event in the backend operation detail view + // there is no "current" event in the dependency operation detail view const markerCurrentEvent = undefined; const euiTheme = useTheme(); const { query: { - backendName, + dependencyName, spanName, environment, kuery, @@ -36,7 +36,7 @@ export function BackendOperationDistributionChart() { sampleRangeFrom = 0, sampleRangeTo = 0, }, - } = useApmParams('/backends/operation'); + } = useApmParams('/dependencies/operation'); const selection: [number, number] | undefined = sampleRangeFrom >= 0 && sampleRangeTo > 0 @@ -47,11 +47,11 @@ export function BackendOperationDistributionChart() { const { status, data } = useFetcher( (callApmApi) => { - return callApmApi('GET /internal/apm/backends/charts/distribution', { + return callApmApi('GET /internal/apm/dependencies/charts/distribution', { params: { query: { percentileThreshold: DEFAULT_PERCENTILE_THRESHOLD, - backendName, + dependencyName, spanName, environment, kuery, @@ -61,7 +61,7 @@ export function BackendOperationDistributionChart() { }, }); }, - [backendName, spanName, environment, kuery, start, end] + [dependencyName, spanName, environment, kuery, start, end] ); const hasData = @@ -73,20 +73,16 @@ export function BackendOperationDistributionChart() { areaSeriesColor: euiTheme.eui.euiColorVis1, histogram: data?.allSpansDistribution.overallHistogram ?? [], id: i18n.translate( - 'xpack.apm.backendOperationDistributionChart.allSpansLegendLabel', - { - defaultMessage: 'All spans', - } + 'xpack.apm.dependencyOperationDistributionChart.allSpansLegendLabel', + { defaultMessage: 'All spans' } ), }, { areaSeriesColor: euiTheme.eui.euiColorVis7, histogram: data?.failedSpansDistribution?.overallHistogram ?? [], id: i18n.translate( - 'xpack.apm.backendOperationDistributionChart.failedSpansLegendLabel', - { - defaultMessage: 'Failed spans', - } + 'xpack.apm.dependencyOperationDistributionChart.failedSpansLegendLabel', + { defaultMessage: 'Failed spans' } ), }, ]; diff --git a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/index.tsx b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx similarity index 63% rename from x-pack/plugins/apm/public/components/app/backend_operation_detail_view/index.tsx rename to x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx index 9e82f4a71ee69..c824a61f019b2 100644 --- a/x-pack/plugins/apm/public/components/app/backend_operation_detail_view/index.tsx +++ b/x-pack/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx @@ -10,47 +10,47 @@ import React from 'react'; import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; -import { useBackendDetailOperationsBreadcrumb } from '../../../hooks/use_backend_detail_operations_breadcrumb'; -import { BackendMetricCharts } from '../../shared/backend_metric_charts'; +import { useDependencyDetailOperationsBreadcrumb } from '../../../hooks/use_dependency_detail_operations_breadcrumb'; +import { DependencyMetricCharts } from '../../shared/dependency_metric_charts'; import { DetailViewHeader } from '../../shared/detail_view_header'; -import { BackendOperationDistributionChart } from './backend_operation_distribution_chart'; -import { BackendOperationDetailTraceList } from './backend_operation_detail_trace_list'; +import { DependencyOperationDistributionChart } from './dependendecy_operation_distribution_chart'; +import { DependencyOperationDetailTraceList } from './dependency_operation_detail_trace_list'; -export function BackendOperationDetailView() { +export function DependencyOperationDetailView() { const router = useApmRouter(); const { query: { spanName, ...query }, - } = useApmParams('/backends/operation'); + } = useApmParams('/dependencies/operation'); - useBackendDetailOperationsBreadcrumb(); + useDependencyDetailOperationsBreadcrumb(); return ( <EuiFlexGroup direction="column"> <EuiFlexItem> <DetailViewHeader backLabel={i18n.translate( - 'xpack.apm.backendOperationDetailView.header.backLinkLabel', + 'xpack.apm.dependecyOperationDetailView.header.backLinkLabel', { defaultMessage: 'All operations' } )} - backHref={router.link('/backends/operations', { query })} + backHref={router.link('/dependencies/operations', { query })} title={spanName} /> </EuiFlexItem> <EuiSpacer size="s" /> <EuiFlexItem> <ChartPointerEventContextProvider> - <BackendMetricCharts /> + <DependencyMetricCharts /> </ChartPointerEventContextProvider> </EuiFlexItem> <EuiFlexItem> <EuiPanel hasBorder> - <BackendOperationDistributionChart /> + <DependencyOperationDistributionChart /> </EuiPanel> </EuiFlexItem> <EuiFlexItem> <EuiPanel hasBorder> - <BackendOperationDetailTraceList /> + <DependencyOperationDetailTraceList /> </EuiPanel> </EuiFlexItem> </EuiFlexGroup> diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx index bac23d55099a5..dcde173bffb11 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx +++ b/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx @@ -13,6 +13,7 @@ import { EuiSpacer, EuiText, EuiTitle, + EuiHorizontalRule, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; @@ -29,6 +30,7 @@ import { useTimeRange } from '../../../hooks/use_time_range'; import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { DetailView } from './detail_view'; import { ErrorDistribution } from './distribution'; +import { TopErroneousTransactions } from './top_erroneous_transactions'; const Titles = euiStyled.div` margin-bottom: ${({ theme }) => theme.eui.euiSizeL}; @@ -49,6 +51,7 @@ const Message = euiStyled.div` const Culprit = euiStyled.div` font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; + margin-bottom: ${({ theme }) => theme.eui.euiSizeS}; `; type ErrorDistributionAPIResponse = @@ -124,23 +127,36 @@ export function ErrorGroupDetails() { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - useBreadcrumb({ - title: groupId, - href: apmRouter.link('/services/{serviceName}/errors/{groupId}', { - path: { - serviceName, - groupId, - }, - query: { - rangeFrom, - rangeTo, - environment, - kuery, - serviceGroup, - comparisonEnabled, - }, + useBreadcrumb( + () => ({ + title: groupId, + href: apmRouter.link('/services/{serviceName}/errors/{groupId}', { + path: { + serviceName, + groupId, + }, + query: { + rangeFrom, + rangeTo, + environment, + kuery, + serviceGroup, + comparisonEnabled, + }, + }), }), - }); + [ + apmRouter, + comparisonEnabled, + environment, + groupId, + kuery, + rangeFrom, + rangeTo, + serviceGroup, + serviceName, + ] + ); const { data: errorGroupData } = useFetcher( (callApmApi) => { @@ -194,52 +210,69 @@ export function ErrorGroupDetails() { <EuiSpacer size={'m'} /> - <EuiPanel hasBorder={true}> - {showDetails && ( - <Titles> - <EuiText> - {logMessage && ( - <> - <Label> - {i18n.translate( - 'xpack.apm.errorGroupDetails.logMessageLabel', - { - defaultMessage: 'Log message', - } - )} - </Label> - <Message>{logMessage}</Message> - </> + {showDetails && ( + <Titles> + <EuiText> + {logMessage && ( + <> + <Label> + {i18n.translate( + 'xpack.apm.errorGroupDetails.logMessageLabel', + { + defaultMessage: 'Log message', + } + )} + </Label> + <Message>{logMessage}</Message> + </> + )} + <Label> + {i18n.translate( + 'xpack.apm.errorGroupDetails.exceptionMessageLabel', + { + defaultMessage: 'Exception message', + } )} - <Label> - {i18n.translate( - 'xpack.apm.errorGroupDetails.exceptionMessageLabel', - { - defaultMessage: 'Exception message', - } - )} - </Label> - <Message>{excMessage || NOT_AVAILABLE_LABEL}</Message> - <Label> - {i18n.translate('xpack.apm.errorGroupDetails.culpritLabel', { - defaultMessage: 'Culprit', - })} - </Label> - <Culprit>{culprit || NOT_AVAILABLE_LABEL}</Culprit> - </EuiText> - </Titles> - )} - <ErrorDistribution - fetchStatus={status} - distribution={showDetails ? errorDistributionData : emptyState} - title={i18n.translate( - 'xpack.apm.errorGroupDetails.occurrencesChartLabel', - { - defaultMessage: 'Occurrences', - } - )} - /> - </EuiPanel> + </Label> + <Message>{excMessage || NOT_AVAILABLE_LABEL}</Message> + <Label> + {i18n.translate('xpack.apm.errorGroupDetails.culpritLabel', { + defaultMessage: 'Culprit', + })} + </Label> + <Culprit>{culprit || NOT_AVAILABLE_LABEL}</Culprit> + + <Label> + {i18n.translate('xpack.apm.errorGroupDetails.occurrencesLabel', { + defaultMessage: 'Occurrences', + })} + </Label> + {errorGroupData.occurrencesCount} + </EuiText> + <EuiHorizontalRule /> + </Titles> + )} + <EuiFlexGroup> + <EuiFlexItem grow={3}> + <EuiPanel hasBorder={true}> + <ErrorDistribution + fetchStatus={status} + distribution={showDetails ? errorDistributionData : emptyState} + title={i18n.translate( + 'xpack.apm.errorGroupDetails.occurrencesChartLabel', + { + defaultMessage: 'Occurrences', + } + )} + /> + </EuiPanel> + </EuiFlexItem> + <EuiFlexItem grow={2}> + <EuiPanel hasBorder={true}> + <TopErroneousTransactions serviceName={serviceName} /> + </EuiPanel> + </EuiFlexItem> + </EuiFlexGroup> <EuiSpacer size="s" /> {showDetails && ( <DetailView diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx new file mode 100644 index 0000000000000..7b5dce8226aee --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx @@ -0,0 +1,208 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiBasicTable, + EuiBasicTableColumn, + EuiTitle, + RIGHT_ALIGNMENT, + EuiSpacer, +} from '@elastic/eui'; +import { ValuesType } from 'utility-types'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import { SparkPlot } from '../../../shared/charts/spark_plot'; +import { + ChartType, + getTimeSeriesColor, +} from '../../../shared/charts/helper/get_timeseries_color'; +import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { TransactionDetailLink } from '../../../shared/links/apm/transaction_detail_link'; +import { TruncateWithTooltip } from '../../../shared/truncate_with_tooltip'; +import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { asInteger } from '../../../../../common/utils/formatters'; + +type ErroneousTransactions = + APIReturnType<'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions'>; + +interface Props { + serviceName: string; +} + +const INITIAL_STATE: ErroneousTransactions = { + topErroneousTransactions: [], +}; + +export function TopErroneousTransactions({ serviceName }: Props) { + const { + query, + path: { groupId }, + } = useApmParams('/services/{serviceName}/errors/{groupId}'); + + const { rangeFrom, rangeTo, environment, kuery, offset, comparisonEnabled } = + query; + + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + + const { data = INITIAL_STATE, status } = useFetcher( + (callApmApi) => { + if (start && end) { + return callApmApi( + 'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions', + { + params: { + path: { + serviceName, + groupId, + }, + query: { + environment, + kuery, + start, + end, + numBuckets: 20, + offset: + comparisonEnabled && isTimeComparison(offset) + ? offset + : undefined, + }, + }, + } + ); + } + }, + [ + environment, + kuery, + serviceName, + start, + end, + groupId, + comparisonEnabled, + offset, + ] + ); + + const loading = + status === FETCH_STATUS.LOADING || status === FETCH_STATUS.NOT_INITIATED; + + const columns: Array< + EuiBasicTableColumn< + ValuesType<ErroneousTransactions['topErroneousTransactions']> + > + > = [ + { + field: 'transactionName', + width: '60%', + name: i18n.translate( + 'xpack.apm.errorGroupTopTransactions.column.transactionName', + { + defaultMessage: 'Transaction name', + } + ), + render: (_, { transactionName, transactionType }) => { + return ( + <TruncateWithTooltip + text={transactionName} + content={ + <TransactionDetailLink + serviceName={serviceName} + transactionName={transactionName} + transactionType={transactionType ?? ''} + comparisonEnabled={comparisonEnabled} + offset={offset} + > + {transactionName} + </TransactionDetailLink> + } + /> + ); + }, + }, + { + field: 'occurrences', + name: i18n.translate( + 'xpack.apm.errorGroupTopTransactions.column.occurrences', + { + defaultMessage: 'Error occurrences', + } + ), + align: RIGHT_ALIGNMENT, + dataType: 'number', + render: ( + _, + { occurrences, currentPeriodTimeseries, previousPeriodTimeseries } + ) => { + const { currentPeriodColor, previousPeriodColor } = getTimeSeriesColor( + ChartType.FAILED_TRANSACTION_RATE + ); + + return ( + <SparkPlot + isLoading={loading} + valueLabel={i18n.translate( + 'xpack.apm.errorGroupTopTransactions.column.occurrences.valueLabel', + { + defaultMessage: `{occurrences} occ.`, + values: { + occurrences: asInteger(occurrences), + }, + } + )} + series={currentPeriodTimeseries} + comparisonSeries={ + comparisonEnabled && isTimeComparison(offset) + ? previousPeriodTimeseries + : undefined + } + color={currentPeriodColor} + comparisonSeriesColor={previousPeriodColor} + /> + ); + }, + }, + ]; + + return ( + <> + <EuiTitle size="xs"> + <h3> + {i18n.translate('xpack.apm.errorGroupTopTransactions.title', { + defaultMessage: 'Top 5 affected transactions', + })} + </h3> + </EuiTitle> + <EuiSpacer size="m" /> + <EuiBasicTable + items={data.topErroneousTransactions} + columns={columns} + loading={loading} + data-test-subj="topErroneousTransactionsTable" + error={ + status === FETCH_STATUS.FAILURE + ? i18n.translate( + 'xpack.apm.errorGroupTopTransactions.errorMessage', + { defaultMessage: 'Failed to fetch' } + ) + : '' + } + noItemsMessage={ + loading + ? i18n.translate('xpack.apm.errorGroupTopTransactions.loading', { + defaultMessage: 'Loading...', + }) + : i18n.translate('xpack.apm.errorGroupTopTransactions.noResults', { + defaultMessage: 'No errors found associated with transactions', + }) + } + /> + </> + ); +} diff --git a/x-pack/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx b/x-pack/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx index 85f56a10399b6..93876d1df6004 100644 --- a/x-pack/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx +++ b/x-pack/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx @@ -66,6 +66,7 @@ export function ServiceDependenciesBreakdownChart({ annotations={[]} timeseries={timeseries} yAxisType="duration" + id="serviceDependenciesBreakdownChart" /> ); } diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/backend_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx similarity index 80% rename from x-pack/plugins/apm/public/components/app/service_map/popover/backend_contents.tsx rename to x-pack/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx index aa40ada254dd2..e7e678c4c528f 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/backend_contents.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx @@ -21,14 +21,15 @@ import { ApmRoutes } from '../../../routing/apm_route_config'; import { StatsList } from './stats_list'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; -type BackendReturn = APIReturnType<'GET /internal/apm/service-map/backend'>; +type DependencyReturn = + APIReturnType<'GET /internal/apm/service-map/dependency'>; -const INITIAL_STATE: Partial<BackendReturn> = { +const INITIAL_STATE: Partial<DependencyReturn> = { currentPeriod: undefined, previousPeriod: undefined, }; -export function BackendContents({ +export function DependencyContents({ elementData, environment, start, @@ -45,15 +46,15 @@ export function BackendContents({ const apmRouter = useApmRouter(); - const backendName = nodeData.label; + const dependencyName = nodeData.label; const { data = INITIAL_STATE, status } = useFetcher( (callApmApi) => { - if (backendName) { - return callApmApi('GET /internal/apm/service-map/backend', { + if (dependencyName) { + return callApmApi('GET /internal/apm/service-map/dependency', { params: { query: { - backendName, + dependencyName, environment, start, end, @@ -66,16 +67,16 @@ export function BackendContents({ }); } }, - [environment, backendName, start, end, offset, comparisonEnabled] + [environment, dependencyName, start, end, offset, comparisonEnabled] ); const isLoading = status === FETCH_STATUS.LOADING; - const detailsUrl = backendName - ? apmRouter.link('/backends/overview', { + const detailsUrl = dependencyName + ? apmRouter.link('/dependencies/overview', { query: { ...query, - backendName, - } as TypeOf<ApmRoutes, '/backends/overview'>['query'], + dependencyName, + } as TypeOf<ApmRoutes, '/dependencies/overview'>['query'], }) : undefined; @@ -96,7 +97,7 @@ export function BackendContents({ trackEvent({ app: 'apm', metricType: METRIC_TYPE.CLICK, - metric: 'service_map_to_backend_detail', + metric: 'service_map_to_dependency_detail', }); }} > diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx index 78543fa18cb7b..de00aa906b141 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/index.tsx @@ -31,7 +31,7 @@ import { useTheme } from '../../../../hooks/use_theme'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; import { CytoscapeContext } from '../cytoscape'; import { getAnimationOptions, popoverWidth } from '../cytoscape_options'; -import { BackendContents } from './backend_contents'; +import { DependencyContents } from './dependency_contents'; import { EdgeContents } from './edge_contents'; import { ExternalsListContents } from './externals_list_contents'; import { ResourceContents } from './resource_contents'; @@ -64,7 +64,7 @@ function getContentsComponent( return EdgeContents; } - return BackendContents; + return DependencyContents; } export interface ContentsProps { diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx index 44429ad67a141..0f96b77dcf1dc 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx @@ -99,7 +99,7 @@ const stories: Meta<Args> = { }; export default stories; -export const Backend: Story<Args> = () => { +export const Dependency: Story<Args> = () => { return ( <Popover environment={ENVIRONMENT_ALL.value} @@ -109,7 +109,7 @@ export const Backend: Story<Args> = () => { /> ); }; -Backend.args = { +Dependency.args = { nodeData: { 'span.subtype': 'postgresql', 'span.destination.service.resource': 'postgresql', @@ -119,7 +119,7 @@ Backend.args = { }, }; -export const BackendWithLongTitle: Story<Args> = () => { +export const DependencyWithLongTitle: Story<Args> = () => { return ( <Popover environment={ENVIRONMENT_ALL.value} @@ -129,7 +129,7 @@ export const BackendWithLongTitle: Story<Args> = () => { /> ); }; -BackendWithLongTitle.args = { +DependencyWithLongTitle.args = { nodeData: { 'span.subtype': 'http', 'span.destination.service.resource': diff --git a/x-pack/plugins/apm/public/components/app/service_map/popover/popover.test.tsx b/x-pack/plugins/apm/public/components/app/service_map/popover/popover.test.tsx index 417d239a852a8..6e4d6a9e6730c 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/popover/popover.test.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/popover/popover.test.tsx @@ -10,12 +10,13 @@ import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; import * as stories from './popover.stories'; -const { Backend, ExternalsList, Resource, Service } = composeStories(stories); +const { Dependency, ExternalsList, Resource, Service } = + composeStories(stories); describe('Popover', () => { - describe('with backend data', () => { + describe('with dependency data', () => { it('renders a dependency link', async () => { - render(<Backend />); + render(<Dependency />); await waitFor(() => { expect( diff --git a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx b/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx index 9e4fb9b67509f..b902c7f0f1cea 100644 --- a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx @@ -60,19 +60,22 @@ export function ServiceNodeMetrics() { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); - useBreadcrumb({ - title: getServiceNodeName(serviceNodeName), - href: apmRouter.link( - '/services/{serviceName}/nodes/{serviceNodeName}/metrics', - { - path: { - serviceName, - serviceNodeName, - }, - query, - } - ), - }); + useBreadcrumb( + () => ({ + title: getServiceNodeName(serviceNodeName), + href: apmRouter.link( + '/services/{serviceName}/nodes/{serviceNodeName}/metrics', + { + path: { + serviceName, + serviceNodeName, + }, + query, + } + ), + }), + [apmRouter, query, serviceName, serviceNodeName] + ); const { data } = useServiceMetricChartsFetcher({ serviceNodeName, diff --git a/x-pack/plugins/apm/public/components/app/service_overview/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/index.tsx index 708e04f25afa5..29ffb96c3128d 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/index.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import { isRumAgentName, - isIosAgentName, + isMobileAgentName, isServerlessAgent, } from '../../../../common/agent_name'; import { AnnotationsContextProvider } from '../../../context/annotations/annotations_context'; @@ -78,7 +78,7 @@ export function ServiceOverview() { : chartHeight; const rowDirection = isSingleColumn ? 'column' : 'row'; const isRumAgent = isRumAgentName(agentName); - const isIosAgent = isIosAgentName(agentName); + const isMobileAgent = isMobileAgentName(agentName); const isServerless = isServerlessAgent(runtimeName); const router = useApmRouter(); const dependenciesLink = router.link('/services/{serviceName}/dependencies', { @@ -199,7 +199,7 @@ export function ServiceOverview() { )} </EuiFlexGroup> </EuiFlexItem> - {!isRumAgent && !isIosAgent && !isServerless && ( + {!isRumAgent && !isMobileAgent && !isServerless && ( <EuiFlexItem> <EuiFlexGroup direction="column" diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx index 7fb66b60a1788..7bfdfb59a9c7d 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx @@ -16,7 +16,7 @@ import { useApmServiceContext } from '../../../../context/apm_service/use_apm_se import { useApmParams } from '../../../../hooks/use_apm_params'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { BackendLink } from '../../../shared/backend_link'; +import { DependencyLink } from '../../../shared/dependency_link'; import { DependenciesTable } from '../../../shared/dependencies_table'; import { ServiceLink } from '../../../shared/service_link'; @@ -83,12 +83,12 @@ export function ServiceOverviewDependenciesTable({ const { location } = dependency; const name = getNodeName(location); const itemLink = - location.type === NodeType.backend ? ( - <BackendLink + location.type === NodeType.dependency ? ( + <DependencyLink type={location.spanType} subtype={location.spanSubtype} query={{ - backendName: location.backendName, + dependencyName: location.dependencyName, comparisonEnabled, offset, environment, @@ -100,7 +100,7 @@ export function ServiceOverviewDependenciesTable({ trackEvent({ app: 'apm', metricType: METRIC_TYPE.CLICK, - metric: 'service_dependencies_to_backend_detail', + metric: 'service_dependencies_to_dependency_detail', }); }} /> diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx index 602bfaa811c3c..340dc4f80da84 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx @@ -20,7 +20,7 @@ import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ErrorOverviewLink } from '../../../shared/links/apm/error_overview_link'; import { OverviewTableContainer } from '../../../shared/overview_table_container'; -import { getColumns } from './get_columns'; +import { getColumns } from '../../../shared/errors_table/get_columns'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx index 1180cf7586db0..21261f5d32e64 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx @@ -80,6 +80,7 @@ export function getColumns({ 'xpack.apm.serviceOverview.instancesTableColumnNodeName', { defaultMessage: 'Node name' } ), + width: '30%', render: (_, item) => { const { serviceNodeName } = item; const isMissingServiceNodeName = diff --git a/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx b/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx index 62adbd0d68ac6..81b2ec53ddd33 100644 --- a/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx @@ -209,15 +209,13 @@ export function ApmIndices() { color="primary" iconType="spacesApp" title={ - <EuiText size="s"> - <FormattedMessage - id="xpack.apm.settings.apmIndices.spaceDescription" - defaultMessage="The index settings apply to the {spaceName} space." - values={{ - spaceName: <strong>{space?.name}</strong>, - }} - /> - </EuiText> + <FormattedMessage + id="xpack.apm.settings.apmIndices.spaceDescription" + defaultMessage="The index settings apply to the {spaceName} space." + values={{ + spaceName: <strong>{space?.name}</strong>, + }} + /> } /> </EuiFlexItem> diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx index d91ecf3cb9dab..255cacd0ce2c5 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx @@ -44,13 +44,16 @@ export function TransactionDetails() { replace(history, { query: { transactionType } }); } - useBreadcrumb({ - title: transactionName, - href: apmRouter.link('/services/{serviceName}/transactions/view', { - path, - query, + useBreadcrumb( + () => ({ + title: transactionName, + href: apmRouter.link('/services/{serviceName}/transactions/view', { + path, + query, + }), }), - }); + [apmRouter, path, query, transactionName] + ); const isServerless = isServerlessAgent(runtimeName); diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx new file mode 100644 index 0000000000000..a2413277c1d13 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx @@ -0,0 +1,204 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiBasicTable, + EuiFlexGroup, + EuiFlexItem, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import uuid from 'uuid'; +import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; +import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; +import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import { getColumns } from '../../../shared/errors_table/get_columns'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useTimeRange } from '../../../../hooks/use_time_range'; + +type ErrorGroupMainStatisticsByTransactionName = + APIReturnType<'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name'>; + +type ErrorGroupDetailedStatistics = + APIReturnType<'POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics'>; + +const INITIAL_STATE_MAIN_STATISTICS: { + items: ErrorGroupMainStatisticsByTransactionName['errorGroups']; + requestId?: string; +} = { + items: [], + requestId: undefined, +}; + +const INITIAL_STATE_DETAILED_STATISTICS: ErrorGroupDetailedStatistics = { + currentPeriod: {}, + previousPeriod: {}, +}; + +export function TopErrors() { + const { + query, + path: { serviceName }, + } = useApmParams('/services/{serviceName}/transactions/view'); + + const { + environment, + kuery, + rangeFrom, + rangeTo, + offset, + comparisonEnabled, + transactionName, + transactionType, + } = query; + + const { start, end } = useTimeRange({ rangeFrom, rangeTo }); + + const { data = INITIAL_STATE_MAIN_STATISTICS, status } = useFetcher( + (callApmApi) => { + if (start && end && transactionType) { + return callApmApi( + 'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name', + { + params: { + path: { serviceName }, + query: { + environment, + kuery, + start, + end, + transactionName, + transactionType, + maxNumberOfErrorGroups: 5, + }, + }, + } + ).then((response) => { + return { + // Everytime the main statistics is refetched, updates the requestId making the comparison API to be refetched. + requestId: uuid(), + items: response.errorGroups, + }; + }); + } + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [ + environment, + kuery, + start, + end, + serviceName, + transactionName, + transactionType, + // not used, but needed to trigger an update when offset is changed either manually by user or when time range is changed + offset, + // not used, but needed to trigger an update when comparison feature is disabled/enabled by user + comparisonEnabled, + ] + ); + + const { requestId, items } = data; + + const { + data: errorGroupDetailedStatistics = INITIAL_STATE_DETAILED_STATISTICS, + status: errorGroupDetailedStatisticsStatus, + } = useFetcher( + (callApmApi) => { + if (requestId && items.length && start && end) { + return callApmApi( + 'POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics', + { + params: { + path: { serviceName }, + query: { + environment, + kuery, + start, + end, + numBuckets: 20, + offset: + comparisonEnabled && isTimeComparison(offset) + ? offset + : undefined, + }, + body: { + groupIds: JSON.stringify( + items.map(({ groupId: groupId }) => groupId).sort() + ), + }, + }, + } + ); + } + }, + // only fetches agg results when requestId changes + // eslint-disable-next-line react-hooks/exhaustive-deps + [requestId], + { preservePreviousData: false } + ); + + const errorGroupDetailedStatisticsLoading = + errorGroupDetailedStatisticsStatus === FETCH_STATUS.LOADING; + + const columns = getColumns({ + serviceName, + errorGroupDetailedStatisticsLoading, + errorGroupDetailedStatistics, + comparisonEnabled, + query, + showErrorType: false, + }); + + return ( + <EuiFlexGroup + direction="column" + gutterSize="s" + data-test-subj="topErrorsForTransactionTable" + > + <EuiFlexItem> + <EuiTitle size="xs"> + <h2> + {i18n.translate('xpack.apm.transactionDetails.topErrors.title', { + defaultMessage: 'Top 5 errors', + })} + </h2> + </EuiTitle> + </EuiFlexItem> + <EuiFlexItem> + <EuiBasicTable + error={ + status === FETCH_STATUS.FAILURE + ? i18n.translate( + 'xpack.apm.transactionDetails.topErrors.errorMessage', + { defaultMessage: 'Failed to fetch errors' } + ) + : '' + } + noItemsMessage={ + status === FETCH_STATUS.LOADING + ? i18n.translate( + 'xpack.apm.transactionDetails.topErrors.loading', + { defaultMessage: 'Loading...' } + ) + : i18n.translate( + 'xpack.apm.transactionDetails.topErrors.noResults', + { + defaultMessage: + 'No errors found for this transaction group', + } + ) + } + columns={columns} + items={items} + loading={status === FETCH_STATUS.LOADING} + /> + </EuiFlexItem> + </EuiFlexGroup> + ); +} diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx index ecf121b777ff5..0b500cb79a746 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx @@ -19,7 +19,7 @@ import { NOT_AVAILABLE_LABEL } from '../../../../../../../../common/i18n'; import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; import { useAnyOfApmParams } from '../../../../../../../hooks/use_apm_params'; -import { BackendLink } from '../../../../../../shared/backend_link'; +import { DependencyLink } from '../../../../../../shared/dependency_link'; import { TransactionDetailLink } from '../../../../../../shared/links/apm/transaction_detail_link'; import { ServiceLink } from '../../../../../../shared/service_link'; import { StickyProperties } from '../../../../../../shared/sticky_properties'; @@ -112,10 +112,10 @@ export function StickySpanProperties({ span, transaction }: Props) { ), fieldName: SPAN_DESTINATION_SERVICE_RESOURCE, val: ( - <BackendLink + <DependencyLink query={{ ...query, - backendName: dependencyName, + dependencyName, }} subtype={span.span.subtype} type={span.span.type} @@ -123,7 +123,7 @@ export function StickySpanProperties({ span, transaction }: Props) { trackEvent({ app: 'apm', metricType: METRIC_TYPE.CLICK, - metric: 'span_flyout_to_backend_detail', + metric: 'span_flyout_to_dependency_detail', }); }} /> diff --git a/x-pack/plugins/apm/public/components/routing/app_root.tsx b/x-pack/plugins/apm/public/components/routing/app_root.tsx index 595b3c527ab20..0c8511cd1b277 100644 --- a/x-pack/plugins/apm/public/components/routing/app_root.tsx +++ b/x-pack/plugins/apm/public/components/routing/app_root.tsx @@ -39,7 +39,7 @@ import { apmRouter } from './apm_route_config'; import { TrackPageview } from './track_pageview'; import { RedirectWithDefaultEnvironment } from '../shared/redirect_with_default_environment'; import { RedirectWithOffset } from '../shared/redirect_with_offset'; -import { RedirectBackendsToBackendInventory } from './home/redirect_backends_to_backend_inventory'; +import { RedirectDependenciesToDependenciesInventory } from './home/redirect_dependencies_to_dependencies_inventory'; const storage = new Storage(localStorage); @@ -66,7 +66,7 @@ export function ApmAppRoot({ <i18nCore.Context> <TimeRangeIdContextProvider> <RouterProvider history={history} router={apmRouter as any}> - <RedirectBackendsToBackendInventory> + <RedirectDependenciesToDependenciesInventory> <RedirectWithDefaultEnvironment> <RedirectWithDefaultDateRange> <RedirectWithOffset> @@ -93,7 +93,7 @@ export function ApmAppRoot({ </RedirectWithOffset> </RedirectWithDefaultDateRange> </RedirectWithDefaultEnvironment> - </RedirectBackendsToBackendInventory> + </RedirectDependenciesToDependenciesInventory> </RouterProvider> </TimeRangeIdContextProvider> </i18nCore.Context> diff --git a/x-pack/plugins/apm/public/components/routing/home/dependencies.tsx b/x-pack/plugins/apm/public/components/routing/home/dependencies.tsx new file mode 100644 index 0000000000000..a20634c31912c --- /dev/null +++ b/x-pack/plugins/apm/public/components/routing/home/dependencies.tsx @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; +import { Outlet } from '@kbn/typed-react-router-config'; +import * as t from 'io-ts'; +import React from 'react'; +import { Redirect } from 'react-router-dom'; +import qs from 'query-string'; +import { page } from '.'; +import { offsetRt } from '../../../../common/comparison_rt'; +import { DependencyDetailOperations } from '../../app/dependency_detail_operations'; +import { DependencyDetailOverview } from '../../app/dependency_detail_overview'; +import { DependencyDetailView } from '../../app/dependency_detail_view'; +import { DependenciesInventory } from '../../app/dependencies_inventory'; +import { DependencyOperationDetailView } from '../../app/dependency_operation_detail_view'; +import { useApmParams } from '../../../hooks/use_apm_params'; + +export const DependenciesInventoryTitle = i18n.translate( + 'xpack.apm.views.dependenciesInventory.title', + { defaultMessage: 'Dependencies' } +); + +function RedirectDependenciesToDependenciesOverview() { + const { query } = useApmParams('/dependencies'); + const search = qs.stringify(query); + return <Redirect to={{ pathname: `/dependencies/overview`, search }} />; +} + +export const dependencies = { + ...page({ + path: '/dependencies/inventory', + title: DependenciesInventoryTitle, + element: <DependenciesInventory />, + params: t.partial({ + query: t.intersection([ + t.type({ + comparisonEnabled: toBooleanRt, + }), + offsetRt, + ]), + }), + }), + '/dependencies': { + element: ( + <DependencyDetailView> + <Outlet /> + </DependencyDetailView> + ), + params: t.partial({ + query: t.intersection([ + t.type({ + comparisonEnabled: toBooleanRt, + dependencyName: t.string, + }), + offsetRt, + ]), + }), + children: { + '/dependencies': { + element: <RedirectDependenciesToDependenciesOverview />, + }, + '/dependencies/operations': { + element: <DependencyDetailOperations />, + }, + '/dependencies/operation': { + params: t.type({ + query: t.intersection([ + t.type({ + spanName: t.string, + }), + t.partial({ + sampleRangeFrom: toNumberRt, + sampleRangeTo: toNumberRt, + }), + ]), + }), + element: <DependencyOperationDetailView />, + }, + '/dependencies/overview': { + element: <DependencyDetailOverview />, + }, + }, + }, +}; diff --git a/x-pack/plugins/apm/public/components/routing/home/index.tsx b/x-pack/plugins/apm/public/components/routing/home/index.tsx index 8642561fd19e8..6b9a996890d9a 100644 --- a/x-pack/plugins/apm/public/components/routing/home/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/home/index.tsx @@ -5,35 +5,30 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; +import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; import { Outlet, Route } from '@kbn/typed-react-router-config'; import * as t from 'io-ts'; import React, { ComponentProps } from 'react'; -import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; +import { offsetRt } from '../../../../common/comparison_rt'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { environmentRt } from '../../../../common/environment_rt'; import { TraceSearchType } from '../../../../common/trace_explorer'; -import { BackendDetailOverview } from '../../app/backend_detail_overview'; -import { BackendInventory } from '../../app/backend_inventory'; +import { TimeRangeMetadataContextProvider } from '../../../context/time_range_metadata/time_range_metadata_context'; import { Breadcrumb } from '../../app/breadcrumb'; import { ServiceInventory } from '../../app/service_inventory'; import { ServiceMapHome } from '../../app/service_map'; -import { TraceOverview } from '../../app/trace_overview'; -import { TraceExplorer } from '../../app/trace_explorer'; import { TopTracesOverview } from '../../app/top_traces_overview'; +import { TraceExplorer } from '../../app/trace_explorer'; +import { TraceOverview } from '../../app/trace_overview'; +import { TransactionTab } from '../../app/transaction_details/waterfall_with_summary/transaction_tabs'; +import { RedirectTo } from '../redirect_to'; +import { ServiceGroupsRedirect } from '../service_groups_redirect'; import { ApmMainTemplate } from '../templates/apm_main_template'; import { ServiceGroupTemplate } from '../templates/service_group_template'; -import { ServiceGroupsRedirect } from '../service_groups_redirect'; -import { RedirectTo } from '../redirect_to'; -import { offsetRt } from '../../../../common/comparison_rt'; -import { TransactionTab } from '../../app/transaction_details/waterfall_with_summary/transaction_tabs'; -import { BackendDetailOperations } from '../../app/backend_detail_operations'; -import { BackendDetailView } from '../../app/backend_detail_view'; -import { RedirectPathBackendDetailView } from './redirect_path_backend_detail_view'; -import { RedirectBackendsToBackendDetailOverview } from './redirect_backends_to_backend_detail_view'; -import { BackendOperationDetailView } from '../../app/backend_operation_detail_view'; -import { TimeRangeMetadataContextProvider } from '../../../context/time_range_metadata/time_range_metadata_context'; +import { dependencies } from './dependencies'; +import { legacyBackends } from './legacy_backends'; -function page< +export function page< TPath extends string, TChildren extends Record<string, Route> | undefined = undefined, TParams extends t.Type<any> | undefined = undefined @@ -136,13 +131,6 @@ export const ServiceMapTitle = i18n.translate( } ); -export const DependenciesInventoryTitle = i18n.translate( - 'xpack.apm.views.dependenciesInventory.title', - { - defaultMessage: 'Dependencies', - } -); - export const DependenciesOperationsTitle = i18n.translate( 'xpack.apm.views.dependenciesOperations.title', { @@ -242,74 +230,8 @@ export const home = { }, }, }), - ...page({ - path: '/backends/inventory', - title: DependenciesInventoryTitle, - element: <BackendInventory />, - params: t.partial({ - query: t.intersection([ - t.type({ - comparisonEnabled: toBooleanRt, - }), - offsetRt, - ]), - }), - }), - '/backends/{backendName}/overview': { - element: <RedirectPathBackendDetailView />, - params: t.type({ - path: t.type({ - backendName: t.string, - }), - }), - }, - '/backends': { - element: <Outlet />, - params: t.partial({ - query: t.intersection([ - t.type({ - comparisonEnabled: toBooleanRt, - backendName: t.string, - }), - offsetRt, - ]), - }), - children: { - '/backends': { - element: ( - <BackendDetailView> - <Outlet /> - </BackendDetailView> - ), - children: { - '/backends/operations': { - element: <BackendDetailOperations />, - }, - - '/backends/operation': { - params: t.type({ - query: t.intersection([ - t.type({ - spanName: t.string, - }), - t.partial({ - sampleRangeFrom: toNumberRt, - sampleRangeTo: toNumberRt, - }), - ]), - }), - element: <BackendOperationDetailView />, - }, - '/backends/overview': { - element: <BackendDetailOverview />, - }, - '/backends': { - element: <RedirectBackendsToBackendDetailOverview />, - }, - }, - }, - }, - }, + ...dependencies, + ...legacyBackends, '/': { element: ( <ServiceGroupsRedirect> diff --git a/x-pack/plugins/apm/public/components/routing/home/legacy_backends.tsx b/x-pack/plugins/apm/public/components/routing/home/legacy_backends.tsx new file mode 100644 index 0000000000000..90050f9dc46b8 --- /dev/null +++ b/x-pack/plugins/apm/public/components/routing/home/legacy_backends.tsx @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; +import { Outlet } from '@kbn/typed-react-router-config'; +import * as t from 'io-ts'; +import React from 'react'; +import { Redirect } from 'react-router-dom'; +import qs from 'query-string'; +import { offsetRt } from '../../../../common/comparison_rt'; +import { useApmParams } from '../../../hooks/use_apm_params'; + +function RedirectBackends({ to }: { to: string }) { + const { query } = useApmParams('/backends/*'); + const search = qs.stringify(query); + return <Redirect to={{ pathname: to, search }} />; +} + +function RedirectBackendsOverviewToDependenciesOverview() { + const { + path: { dependencyName }, + query, + } = useApmParams('/backends/{dependencyName}/overview'); + + const search = qs.stringify({ ...query, dependencyName }); + + return <Redirect to={{ pathname: `/dependencies/overview`, search }} />; +} + +export const legacyBackends = { + '/backends/inventory': { + element: <RedirectBackends to="/dependencies/inventory" />, + params: t.partial({ + query: t.intersection([ + t.type({ comparisonEnabled: toBooleanRt }), + offsetRt, + ]), + }), + }, + '/backends/{dependencyName}/overview': { + element: <RedirectBackendsOverviewToDependenciesOverview />, + params: t.type({ path: t.type({ dependencyName: t.string }) }), + }, + '/backends': { + element: <Outlet />, + params: t.partial({ + query: t.intersection([ + t.type({ + comparisonEnabled: toBooleanRt, + dependencyName: t.string, + }), + offsetRt, + ]), + }), + children: { + '/backends': { + element: <RedirectBackends to="/dependencies" />, + }, + '/backends/operations': { + element: <RedirectBackends to="/dependencies/operations" />, + }, + '/backends/operation': { + params: t.type({ + query: t.intersection([ + t.type({ spanName: t.string }), + t.partial({ + sampleRangeFrom: toNumberRt, + sampleRangeTo: toNumberRt, + }), + ]), + }), + element: <RedirectBackends to="/dependencies/operation" />, + }, + '/backends/overview': { + element: <RedirectBackends to="/dependencies/overview" />, + }, + }, + }, +}; diff --git a/x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_detail_view.tsx b/x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_detail_view.tsx deleted file mode 100644 index 34dfde53d210c..0000000000000 --- a/x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_detail_view.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import qs from 'query-string'; -import React from 'react'; -import { Redirect } from 'react-router-dom'; -import { useApmParams } from '../../../hooks/use_apm_params'; - -export function RedirectBackendsToBackendDetailOverview() { - const { query } = useApmParams('/backends'); - - const search = qs.stringify(query); - - return <Redirect to={{ pathname: `/backends/overview`, search }} />; -} diff --git a/x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_inventory.tsx b/x-pack/plugins/apm/public/components/routing/home/redirect_dependencies_to_dependencies_inventory.tsx similarity index 84% rename from x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_inventory.tsx rename to x-pack/plugins/apm/public/components/routing/home/redirect_dependencies_to_dependencies_inventory.tsx index 654b63a310d2f..4b2cdd257d7a4 100644 --- a/x-pack/plugins/apm/public/components/routing/home/redirect_backends_to_backend_inventory.tsx +++ b/x-pack/plugins/apm/public/components/routing/home/redirect_dependencies_to_dependencies_inventory.tsx @@ -9,7 +9,7 @@ import { useLocation, Redirect } from 'react-router-dom'; import qs from 'query-string'; import React from 'react'; -export function RedirectBackendsToBackendInventory({ +export function RedirectDependenciesToDependenciesInventory({ children, }: { children: React.ReactElement; @@ -19,7 +19,7 @@ export function RedirectBackendsToBackendInventory({ const query = qs.parse(location.search); const normalizedPathname = location.pathname.replace(/\/$/, ''); - if (normalizedPathname === '/backends' && !('backendName' in query)) { + if (normalizedPathname === '/dependencies' && !('dependencyName' in query)) { return ( <Redirect to={qs.stringifyUrl({ diff --git a/x-pack/plugins/apm/public/components/routing/home/redirect_path_backend_detail_view.tsx b/x-pack/plugins/apm/public/components/routing/home/redirect_path_backend_detail_view.tsx deleted file mode 100644 index 757ab0fff6cec..0000000000000 --- a/x-pack/plugins/apm/public/components/routing/home/redirect_path_backend_detail_view.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import qs from 'query-string'; -import React from 'react'; -import { Redirect } from 'react-router-dom'; -import { useApmParams } from '../../../hooks/use_apm_params'; - -export function RedirectPathBackendDetailView() { - const { - path: { backendName }, - query, - } = useApmParams('/backends/{backendName}/overview'); - - const search = qs.stringify({ ...query, backendName }); - - return <Redirect to={{ pathname: `/backends/overview`, search }} />; -} diff --git a/x-pack/plugins/apm/public/components/routing/service_detail/apm_service_wrapper.tsx b/x-pack/plugins/apm/public/components/routing/service_detail/apm_service_wrapper.tsx index ef929331f3c1c..cbc20077da29f 100644 --- a/x-pack/plugins/apm/public/components/routing/service_detail/apm_service_wrapper.tsx +++ b/x-pack/plugins/apm/public/components/routing/service_detail/apm_service_wrapper.tsx @@ -19,19 +19,22 @@ export function ApmServiceWrapper() { const router = useApmRouter(); - useBreadcrumb([ - { - title: ServiceInventoryTitle, - href: router.link('/services', { query }), - }, - { - title: serviceName, - href: router.link('/services/{serviceName}', { - query, - path: { serviceName }, - }), - }, - ]); + useBreadcrumb( + () => [ + { + title: ServiceInventoryTitle, + href: router.link('/services', { query }), + }, + { + title: serviceName, + href: router.link('/services/{serviceName}', { + query, + path: { serviceName }, + }), + }, + ], + [query, router, serviceName] + ); return <Outlet />; } diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx index 0fba7e3b99804..f7eb437f1d096 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.tsx @@ -12,7 +12,7 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import { createExploratoryViewUrl } from '@kbn/observability-plugin/public'; import { ALL_VALUES_SELECTED } from '@kbn/observability-plugin/public'; import { - isIosAgentName, + isMobileAgentName, isRumAgentName, } from '../../../../../common/agent_name'; import { @@ -49,7 +49,7 @@ export function AnalyzeDataButton() { const canShowDashboard = services.application?.capabilities.dashboard.show; if ( - (isRumAgentName(agentName) || isIosAgentName(agentName)) && + (isRumAgentName(agentName) || isMobileAgentName(agentName)) && rangeFrom && canShowDashboard && rangeTo diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx index 39cc5ee12dc54..7ac3b14e7faa9 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx @@ -17,7 +17,6 @@ describe('APM service template', () => { { agentName: 'java' }, { agentName: 'opentelemetry/java' }, { agentName: 'ios/swift' }, - { agentName: 'opentelemetry/swift' }, { agentName: 'ruby', runtimeName: 'jruby' }, { runtimeName: 'aws_lambda' }, ].map((input) => { diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx index da604911aec62..e8a4ccf0cce91 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx @@ -17,7 +17,7 @@ import { omit } from 'lodash'; import React from 'react'; import { enableInfrastructureView } from '@kbn/observability-plugin/public'; import { - isIosAgentName, + isMobileAgentName, isJavaAgentName, isJRubyAgent, isRumAgentName, @@ -36,6 +36,7 @@ import { ServiceIcons } from '../../../shared/service_icons'; import { ApmMainTemplate } from '../apm_main_template'; import { AnalyzeDataButton } from './analyze_data_button'; import { getAlertingCapabilities } from '../../../alerting/get_alerting_capabilities'; +import { TechnicalPreviewBadge } from '../../../shared/technical_preview_badge'; type Tab = NonNullable<EuiPageHeaderProps['tabs']>[0] & { key: @@ -86,13 +87,16 @@ function TemplateWithContext({ const tabs = useTabs({ selectedTab }); - useBreadcrumb({ - title, - href: router.link(`/services/{serviceName}/${selectedTab}` as const, { - path: { serviceName }, - query, + useBreadcrumb( + () => ({ + title, + href: router.link(`/services/{serviceName}/${selectedTab}` as const, { + path: { serviceName }, + query, + }), }), - }); + [query, router, selectedTab, serviceName, title] + ); return ( <ApmMainTemplate @@ -145,7 +149,7 @@ export function isMetricsTabHidden({ !agentName || isRumAgentName(agentName) || isJavaAgentName(agentName) || - isIosAgentName(agentName) || + isMobileAgentName(agentName) || isJRubyAgent(agentName, runtimeName) || isServerlessAgent(runtimeName) ); @@ -221,7 +225,7 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { defaultMessage: 'Dependencies', }), hidden: - !agentName || isRumAgentName(agentName) || isIosAgentName(agentName), + !agentName || isRumAgentName(agentName) || isMobileAgentName(agentName), }, { key: 'errors', @@ -286,7 +290,7 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { defaultMessage: 'Logs', }), hidden: - !agentName || isRumAgentName(agentName) || isIosAgentName(agentName), + !agentName || isRumAgentName(agentName) || isMobileAgentName(agentName), }, { key: 'profiling', @@ -330,9 +334,18 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { path: { serviceName }, query, }), - label: i18n.translate('xpack.apm.home.alertsTabLabel', { - defaultMessage: 'Alerts', - }), + label: ( + <EuiFlexGroup gutterSize="xs"> + <EuiFlexItem> + {i18n.translate('xpack.apm.home.alertsTabLabel', { + defaultMessage: 'Alerts', + })} + </EuiFlexItem> + <EuiFlexItem> + <TechnicalPreviewBadge icon="beaker" /> + </EuiFlexItem> + </EuiFlexGroup> + ), hidden: !(isAlertingAvailable && canReadAlerts), }, ]; diff --git a/x-pack/plugins/apm/public/components/routing/templates/backend_detail_template.tsx b/x-pack/plugins/apm/public/components/routing/templates/dependency_detail_template.tsx similarity index 74% rename from x-pack/plugins/apm/public/components/routing/templates/backend_detail_template.tsx rename to x-pack/plugins/apm/public/components/routing/templates/dependency_detail_template.tsx index 1ed738cba2e1f..57ff4ba98a04a 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/backend_detail_template.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/dependency_detail_template.tsx @@ -19,18 +19,18 @@ import { SearchBar } from '../../shared/search_bar'; import { getKueryBarBoolFilter, kueryBarPlaceholder, -} from '../../../../common/backends'; +} from '../../../../common/dependencies'; import { useOperationBreakdownEnabledSetting } from '../../../hooks/use_operations_breakdown_enabled_setting'; interface Props { children: React.ReactNode; } -export function BackendDetailTemplate({ children }: Props) { +export function DependencyDetailTemplate({ children }: Props) { const { query, - query: { backendName, rangeFrom, rangeTo, environment }, - } = useApmParams('/backends'); + query: { dependencyName, rangeFrom, rangeTo, environment }, + } = useApmParams('/dependencies'); const router = useApmRouter(); @@ -43,52 +43,53 @@ export function BackendDetailTemplate({ children }: Props) { const kueryBarBoolFilter = getKueryBarBoolFilter({ environment, - backendName, + dependencyName, }); - const backendMetadataFetch = useFetcher( + const dependencyMetadataFetch = useFetcher( (callApmApi) => { if (!start || !end) { return; } - return callApmApi('GET /internal/apm/backends/metadata', { + return callApmApi('GET /internal/apm/dependencies/metadata', { params: { query: { - backendName, + dependencyName, start, end, }, }, }); }, - [backendName, start, end] + [dependencyName, start, end] ); - const { data: { metadata } = {} } = backendMetadataFetch; + const { data: { metadata } = {} } = dependencyMetadataFetch; const tabs = isOperationsBreakdownFeatureEnabled ? [ { key: 'overview', - href: router.link('/backends/overview', { + href: router.link('/dependencies/overview', { query, }), - label: i18n.translate('xpack.apm.backendDetailOverview.title', { + label: i18n.translate('xpack.apm.DependencyDetailOverview.title', { defaultMessage: 'Overview', }), - isSelected: path === '/backends/overview', + isSelected: path === '/dependencies/overview', }, { key: 'operations', - href: router.link('/backends/operations', { + href: router.link('/dependencies/operations', { query, }), - label: i18n.translate('xpack.apm.backendDetailOperations.title', { + label: i18n.translate('xpack.apm.DependencyDetailOperations.title', { defaultMessage: 'Operations', }), isSelected: - path === '/backends/operations' || path === '/backends/operation', + path === '/dependencies/operations' || + path === '/dependencies/operation', }, ] : []; @@ -101,7 +102,7 @@ export function BackendDetailTemplate({ children }: Props) { <EuiFlexGroup alignItems="center"> <EuiFlexItem grow={false}> <EuiTitle size="l"> - <h1>{backendName}</h1> + <h1>{dependencyName}</h1> </EuiTitle> </EuiFlexItem> <EuiFlexItem grow={false}> diff --git a/x-pack/plugins/apm/public/components/routing/templates/service_group_template.tsx b/x-pack/plugins/apm/public/components/routing/templates/service_group_template.tsx index 8e22cf4633aeb..a891ab9bdcdce 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/service_group_template.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/service_group_template.tsx @@ -116,30 +116,33 @@ export function ServiceGroupTemplate({ const tabs = useTabs(serviceGroupContextTab); const selectedTab = tabs?.find(({ isSelected }) => isSelected); - useBreadcrumb([ - { - title: i18n.translate('xpack.apm.serviceGroups.breadcrumb.title', { - defaultMessage: 'Services', - }), - href: serviceGroupsLink, - }, - ...(selectedTab - ? [ - ...(serviceGroupName - ? [ - { - title: serviceGroupName, - href: router.link('/services', { query }), - }, - ] - : []), - { - title: selectedTab.label, - href: selectedTab.href, - } as { title: string; href: string }, - ] - : []), - ]); + useBreadcrumb( + () => [ + { + title: i18n.translate('xpack.apm.serviceGroups.breadcrumb.title', { + defaultMessage: 'Services', + }), + href: serviceGroupsLink, + }, + ...(selectedTab + ? [ + ...(serviceGroupName + ? [ + { + title: serviceGroupName, + href: router.link('/services', { query }), + }, + ] + : []), + { + title: selectedTab.label, + href: selectedTab.href, + } as { title: string; href: string }, + ] + : []), + ], + [query, router, selectedTab, serviceGroupName, serviceGroupsLink] + ); return ( <ApmMainTemplate pageTitle={isServiceGroupsEnabled ? serviceGroupsPageTitle : pageTitle} diff --git a/x-pack/plugins/apm/public/components/shared/agent_icon/get_agent_icon.ts b/x-pack/plugins/apm/public/components/shared/agent_icon/get_agent_icon.ts index 470c56e69efa4..4f44dd2b9ebc7 100644 --- a/x-pack/plugins/apm/public/components/shared/agent_icon/get_agent_icon.ts +++ b/x-pack/plugins/apm/public/components/shared/agent_icon/get_agent_icon.ts @@ -9,6 +9,7 @@ import { isIosAgentName, isRumAgentName, isJavaAgentName, + isAndroidAgentName, OPEN_TELEMETRY_AGENT_NAMES, } from '../../../../common/agent_name'; import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; @@ -31,6 +32,7 @@ import darkPhpIcon from './icons/php_dark.svg'; import darkRumJsIcon from './icons/rumjs_dark.svg'; import rustIcon from './icons/rust.svg'; import darkRustIcon from './icons/rust_dark.svg'; +import androidIcon from './icons/android.svg'; const agentIcons: { [key: string]: string } = { dotnet: dotNetIcon, @@ -47,6 +49,7 @@ const agentIcons: { [key: string]: string } = { ruby: rubyIcon, rum: rumJsIcon, rust: rustIcon, + android: androidIcon, }; const darkAgentIcons: { [key: string]: string } = { @@ -77,6 +80,10 @@ export function getAgentIconKey(agentName: string) { return 'ios'; } + if (isAndroidAgentName(lowercasedAgentName)) { + return 'android'; + } + // Remove "opentelemetry/" prefix const agentNameWithoutPrefix = lowercasedAgentName.replace( /^opentelemetry\//, diff --git a/x-pack/plugins/apm/public/components/shared/agent_icon/icons/android.svg b/x-pack/plugins/apm/public/components/shared/agent_icon/icons/android.svg new file mode 100644 index 0000000000000..4e8e564346840 --- /dev/null +++ b/x-pack/plugins/apm/public/components/shared/agent_icon/icons/android.svg @@ -0,0 +1,3 @@ +<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1274.37 718"> + <path fill="#3ddc84" d="M930.77,536.42a53.07,53.07,0,1,1,53.06-53.08,53.14,53.14,0,0,1-53.06,53.08m-586.54,0a53.07,53.07,0,1,1,53.06-53.08,53.13,53.13,0,0,1-53.06,53.08M949.8,216.77,1055.85,33.09A22.06,22.06,0,1,0,1017.64,11L910.25,197c-82.12-37.48-174.35-58.35-272.76-58.35S446.86,159.55,364.74,197L257.36,11a22.06,22.06,0,1,0-38.22,22.06L325.2,216.77C143.09,315.82,18.53,500.18.31,718H1274.69c-18.24-217.82-142.79-402.18-324.89-501.23"/> +</svg> \ No newline at end of file diff --git a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx index 6f2fd1072fad0..30353516b6222 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx @@ -54,6 +54,7 @@ interface Props { annotations: Annotation[]; timeseries?: Array<TimeSeries<Coordinate>>; yAxisType: 'duration' | 'percentage'; + id?: string; } const asPercentBound = (y: number | null) => asPercent(y, 1); @@ -65,6 +66,7 @@ export function BreakdownChart({ annotations, timeseries, yAxisType, + id, }: Props) { const history = useHistory(); const chartTheme = useChartTheme(); @@ -94,7 +96,12 @@ export function BreakdownChart({ const timeZone = getTimeZone(core.uiSettings); return ( - <ChartContainer height={height} hasData={!isEmpty} status={fetchStatus}> + <ChartContainer + height={height} + hasData={!isEmpty} + status={fetchStatus} + id={id} + > <Chart ref={chartRef}> <Settings tooltip={{ stickTo: 'top', showNullValues: true }} diff --git a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx index 1773f0a612729..7402f42e82a1b 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx @@ -91,7 +91,11 @@ export function TimeseriesChart({ const chartTheme = useChartTheme(); const { query: { comparisonEnabled, offset }, - } = useAnyOfApmParams('/services', '/backends/*', '/services/{serviceName}'); + } = useAnyOfApmParams( + '/services', + '/dependencies/*', + '/services/{serviceName}' + ); const anomalyChartTimeseries = getChartAnomalyTimeseries({ anomalyTimeseries, diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx index df65efd47aa02..35d52cab85ebf 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx @@ -68,6 +68,7 @@ export function TransactionBreakdownChart({ showAnnotations={showAnnotations} timeseries={timeseries} yAxisType="percentage" + id="transactionBreakdownChart" /> </EuiFlexItem> </EuiFlexGroup> diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx index c126249d65131..dca71ab547d40 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx @@ -5,7 +5,13 @@ * 2.0. */ -import { EuiFlexGrid, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; +import { + EuiFlexGrid, + EuiFlexItem, + EuiPanel, + EuiSpacer, + EuiFlexGroup, +} from '@elastic/eui'; import React from 'react'; import { AnnotationsContextProvider } from '../../../../context/annotations/annotations_context'; import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context'; @@ -14,6 +20,8 @@ import { LatencyChart } from '../latency_chart'; import { TransactionBreakdownChart } from '../transaction_breakdown_chart'; import { TransactionColdstartRateChart } from '../transaction_coldstart_rate_chart'; import { FailedTransactionRateChart } from '../failed_transaction_rate_chart'; +import { TopErrors } from '../../../app/transaction_details/top_errors'; +import { useBreakpoints } from '../../../../hooks/use_breakpoints'; export function TransactionCharts({ kuery, @@ -34,6 +42,49 @@ export function TransactionCharts({ comparisonEnabled?: boolean; offset?: string; }) { + // The default EuiFlexGroup breaks at 768, but we want to break at 1200 + const { isLarge } = useBreakpoints(); + const rowDirection = isLarge ? 'column' : 'row'; + + const latencyChart = ( + <EuiFlexItem data-cy={`transaction-duration-charts`}> + <EuiPanel hasBorder={true}> + <LatencyChart kuery={kuery} /> + </EuiPanel> + </EuiFlexItem> + ); + + const serviceOverviewThroughputChart = ( + <EuiFlexItem style={{ flexShrink: 1 }}> + <ServiceOverviewThroughputChart + kuery={kuery} + transactionName={transactionName} + /> + </EuiFlexItem> + ); + + const coldStartRateOrBreakdownChart = isServerlessContext ? ( + <EuiFlexItem> + <TransactionColdstartRateChart + kuery={kuery} + transactionName={transactionName} + environment={environment} + comparisonEnabled={comparisonEnabled} + offset={offset} + /> + </EuiFlexItem> + ) : ( + <EuiFlexItem> + <TransactionBreakdownChart kuery={kuery} environment={environment} /> + </EuiFlexItem> + ); + + const failedTransactionRateChart = ( + <EuiFlexItem grow={1}> + <FailedTransactionRateChart kuery={kuery} /> + </EuiFlexItem> + ); + return ( <> <AnnotationsContextProvider @@ -42,46 +93,40 @@ export function TransactionCharts({ end={end} > <ChartPointerEventContextProvider> - <EuiFlexGrid columns={2} gutterSize="s"> - <EuiFlexItem data-cy={`transaction-duration-charts`}> - <EuiPanel hasBorder={true}> - <LatencyChart kuery={kuery} /> - </EuiPanel> - </EuiFlexItem> - - <EuiFlexItem style={{ flexShrink: 1 }}> - <ServiceOverviewThroughputChart - kuery={kuery} - transactionName={transactionName} - /> - </EuiFlexItem> - </EuiFlexGrid> - - <EuiSpacer size="s" /> - - <EuiFlexGrid columns={2} gutterSize="s"> - <EuiFlexItem> - <FailedTransactionRateChart kuery={kuery} /> - </EuiFlexItem> - {isServerlessContext ? ( - <EuiFlexItem> - <TransactionColdstartRateChart - kuery={kuery} - transactionName={transactionName} - environment={environment} - comparisonEnabled={comparisonEnabled} - offset={offset} - /> - </EuiFlexItem> - ) : ( - <EuiFlexItem> - <TransactionBreakdownChart - kuery={kuery} - environment={environment} - /> - </EuiFlexItem> - )} - </EuiFlexGrid> + {transactionName ? ( + <> + <EuiFlexGrid columns={3} gutterSize="s"> + {latencyChart} + {serviceOverviewThroughputChart} + {coldStartRateOrBreakdownChart} + </EuiFlexGrid> + <EuiSpacer size="l" /> + <EuiFlexGroup + direction={rowDirection} + gutterSize="s" + responsive={false} + > + {failedTransactionRateChart} + <EuiFlexItem grow={2}> + <EuiPanel hasBorder={true}> + <TopErrors /> + </EuiPanel> + </EuiFlexItem> + </EuiFlexGroup> + </> + ) : ( + <> + <EuiFlexGrid columns={2} gutterSize="s"> + {latencyChart} + {serviceOverviewThroughputChart} + </EuiFlexGrid> + <EuiSpacer size="s" /> + <EuiFlexGrid columns={2} gutterSize="s"> + {failedTransactionRateChart} + {coldStartRateOrBreakdownChart} + </EuiFlexGrid> + </> + )} </ChartPointerEventContextProvider> </AnnotationsContextProvider> </> diff --git a/x-pack/plugins/apm/public/components/shared/dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/shared/dependencies_table/index.tsx index 99f50def4d417..718a978f1599e 100644 --- a/x-pack/plugins/apm/public/components/shared/dependencies_table/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependencies_table/index.tsx @@ -90,6 +90,7 @@ export function DependenciesTable(props: Props) { return <TruncateWithTooltip text={name} content={itemLink} />; }, sortable: true, + width: '30%', }, ...getSpanMetricColumns({ breakpoints, diff --git a/x-pack/plugins/apm/public/components/shared/backend_link.stories.tsx b/x-pack/plugins/apm/public/components/shared/dependency_link.stories.tsx similarity index 78% rename from x-pack/plugins/apm/public/components/shared/backend_link.stories.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_link.stories.tsx index 1eca596a86c67..f61e08ce0364c 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_link.stories.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_link.stories.tsx @@ -8,13 +8,13 @@ import { Story } from '@storybook/react'; import React, { ComponentProps, ComponentType } from 'react'; import { MockApmPluginContextWrapper } from '../../context/apm_plugin/mock_apm_plugin_context'; -import { BackendLink } from './backend_link'; +import { DependencyLink } from './dependency_link'; -type Args = ComponentProps<typeof BackendLink>; +type Args = ComponentProps<typeof DependencyLink>; export default { - title: 'shared/BackendLink', - component: BackendLink, + title: 'shared/DependencyLink', + component: DependencyLink, decorators: [ (StoryComponent: ComponentType) => { return ( @@ -27,11 +27,11 @@ export default { }; export const Example: Story<Args> = (args) => { - return <BackendLink {...args} />; + return <DependencyLink {...args} />; }; Example.args = { query: { - backendName: 'postgres', + dependencyName: 'postgres', environment: 'ENVIRONMENT_ALL', kuery: '', rangeFrom: 'now-15m', diff --git a/x-pack/plugins/apm/public/components/shared/backend_link.test.tsx b/x-pack/plugins/apm/public/components/shared/dependency_link.test.tsx similarity index 85% rename from x-pack/plugins/apm/public/components/shared/backend_link.test.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_link.test.tsx index 683fec3a41725..22576b545ada4 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_link.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_link.test.tsx @@ -8,11 +8,11 @@ import { composeStories } from '@storybook/testing-react'; import { render } from '@testing-library/react'; import React from 'react'; -import * as stories from './backend_link.stories'; +import * as stories from './dependency_link.stories'; const { Example } = composeStories(stories); -describe('BackendLink', () => { +describe('DependencyLink', () => { it('renders', () => { expect(() => render(<Example />)).not.toThrowError(); }); diff --git a/x-pack/plugins/apm/public/components/shared/backend_link.tsx b/x-pack/plugins/apm/public/components/shared/dependency_link.tsx similarity index 81% rename from x-pack/plugins/apm/public/components/shared/backend_link.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_link.tsx index ac93228c76bcd..77901974e81d2 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_link.tsx @@ -16,24 +16,19 @@ import { SpanIcon } from './span_icon'; const StyledLink = euiStyled(EuiLink)`${truncate('100%')};`; -interface BackendLinkProps { - query: TypeOf<ApmRoutes, '/backends/overview'>['query']; +interface Props { + query: TypeOf<ApmRoutes, '/dependencies/overview'>['query']; subtype?: string; type?: string; onClick?: React.ComponentProps<typeof EuiLink>['onClick']; } -export function BackendLink({ - query, - subtype, - type, - onClick, -}: BackendLinkProps) { +export function DependencyLink({ query, subtype, type, onClick }: Props) { const { link } = useApmRouter(); return ( <StyledLink - href={link('/backends/overview', { + href={link('/dependencies/overview', { query, })} onClick={onClick} @@ -43,7 +38,7 @@ export function BackendLink({ <SpanIcon type={type} subtype={subtype} /> </EuiFlexItem> <EuiFlexItem className="eui-textTruncate"> - <span className="eui-textTruncate">{query.backendName}</span> + <span className="eui-textTruncate">{query.dependencyName}</span> </EuiFlexItem> </EuiFlexGroup> </StyledLink> diff --git a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_error_rate_chart.tsx b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx similarity index 88% rename from x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_error_rate_chart.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx index 1d8834157f4ca..b5fbcb0608956 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_error_rate_chart.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx @@ -18,16 +18,16 @@ import { getTimeSeriesColor, } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { BackendMetricChartsRouteParams } from './backend_metric_charts_route_params'; +import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; function yLabelFormat(y?: number | null) { return asPercent(y || 0, 1); } -export function BackendFailedTransactionRateChart({ +export function DependencyFailedTransactionRateChart({ height, - backendName, + dependencyName, kuery, environment, rangeFrom, @@ -37,7 +37,7 @@ export function BackendFailedTransactionRateChart({ spanName, }: { height: number; -} & BackendMetricChartsRouteParams) { +} & DependencyMetricChartsRouteParams) { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const comparisonChartTheme = getComparisonChartTheme(); @@ -51,10 +51,10 @@ export function BackendFailedTransactionRateChart({ return; } - return callApmApi('GET /internal/apm/backends/charts/error_rate', { + return callApmApi('GET /internal/apm/dependencies/charts/error_rate', { params: { query: { - backendName, + dependencyName, start, end, offset: @@ -70,7 +70,7 @@ export function BackendFailedTransactionRateChart({ }); }, [ - backendName, + dependencyName, start, end, offset, @@ -96,7 +96,7 @@ export function BackendFailedTransactionRateChart({ data: data.currentTimeseries, type: 'linemark', color: currentPeriodColor, - title: i18n.translate('xpack.apm.backendErrorRateChart.chartTitle', { + title: i18n.translate('xpack.apm.dependencyErrorRateChart.chartTitle', { defaultMessage: 'Failed transaction rate', }), }); diff --git a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_latency_chart.tsx b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx similarity index 89% rename from x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_latency_chart.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx index 03a6fbc81e0fb..3932bbd6e2a54 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_latency_chart.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx @@ -22,12 +22,12 @@ import { getTimeSeriesColor, } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { BackendMetricChartsRouteParams } from './backend_metric_charts_route_params'; +import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; -export function BackendLatencyChart({ +export function DependencyLatencyChart({ height, - backendName, + dependencyName, rangeFrom, rangeTo, kuery, @@ -35,7 +35,7 @@ export function BackendLatencyChart({ offset, comparisonEnabled, spanName, -}: { height: number } & BackendMetricChartsRouteParams) { +}: { height: number } & DependencyMetricChartsRouteParams) { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const comparisonChartTheme = getComparisonChartTheme(); @@ -49,10 +49,10 @@ export function BackendLatencyChart({ return; } - return callApmApi('GET /internal/apm/backends/charts/latency', { + return callApmApi('GET /internal/apm/dependencies/charts/latency', { params: { query: { - backendName, + dependencyName, start, end, offset: @@ -68,7 +68,7 @@ export function BackendLatencyChart({ }); }, [ - backendName, + dependencyName, start, end, offset, @@ -95,7 +95,7 @@ export function BackendLatencyChart({ data: data.currentTimeseries, type: 'linemark', color: currentPeriodColor, - title: i18n.translate('xpack.apm.backendLatencyChart.chartTitle', { + title: i18n.translate('xpack.apm.dependencyLatencyChart.chartTitle', { defaultMessage: 'Latency', }), }); diff --git a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_metric_charts_route_params.ts b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts similarity index 81% rename from x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_metric_charts_route_params.ts rename to x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts index 7c947fe81db06..f348a257462e0 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_metric_charts_route_params.ts +++ b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts @@ -7,12 +7,12 @@ import { TypeOf } from '@kbn/typed-react-router-config'; import { ApmRoutes } from '../../routing/apm_route_config'; -export type BackendMetricChartsRouteParams = Pick< +export type DependencyMetricChartsRouteParams = Pick< { spanName?: string } & TypeOf< ApmRoutes, - '/backends/operation' | '/backends/overview' + '/dependencies/operation' | '/dependencies/overview' >['query'], - | 'backendName' + | 'dependencyName' | 'comparisonEnabled' | 'spanName' | 'rangeFrom' diff --git a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_throughput_chart.tsx b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx similarity index 86% rename from x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_throughput_chart.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx index bd461e49eeaf6..20a906ab291f3 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/backend_throughput_chart.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx @@ -18,12 +18,12 @@ import { getTimeSeriesColor, } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { BackendMetricChartsRouteParams } from './backend_metric_charts_route_params'; +import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; -export function BackendThroughputChart({ +export function DependencyThroughputChart({ height, - backendName, + dependencyName, rangeFrom, rangeTo, kuery, @@ -31,7 +31,7 @@ export function BackendThroughputChart({ offset, comparisonEnabled, spanName, -}: { height: number } & BackendMetricChartsRouteParams) { +}: { height: number } & DependencyMetricChartsRouteParams) { const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const comparisonChartTheme = getComparisonChartTheme(); @@ -45,10 +45,10 @@ export function BackendThroughputChart({ return; } - return callApmApi('GET /internal/apm/backends/charts/throughput', { + return callApmApi('GET /internal/apm/dependencies/charts/throughput', { params: { query: { - backendName, + dependencyName, start, end, offset: @@ -64,7 +64,7 @@ export function BackendThroughputChart({ }); }, [ - backendName, + dependencyName, start, end, offset, @@ -91,9 +91,10 @@ export function BackendThroughputChart({ data: data.currentTimeseries, type: 'linemark', color: currentPeriodColor, - title: i18n.translate('xpack.apm.backendThroughputChart.chartTitle', { - defaultMessage: 'Throughput', - }), + title: i18n.translate( + 'xpack.apm.dependencyThroughputChart.chartTitle', + { defaultMessage: 'Throughput' } + ), }); } diff --git a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/index.tsx b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx similarity index 63% rename from x-pack/plugins/apm/public/components/shared/backend_metric_charts/index.tsx rename to x-pack/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx index c13ddde4ff1fb..36004506c8438 100644 --- a/x-pack/plugins/apm/public/components/shared/backend_metric_charts/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx @@ -10,18 +10,18 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; -import { BackendFailedTransactionRateChart } from './backend_error_rate_chart'; -import { BackendLatencyChart } from './backend_latency_chart'; -import { BackendMetricChartsRouteParams } from './backend_metric_charts_route_params'; -import { BackendThroughputChart } from './backend_throughput_chart'; +import { DependencyFailedTransactionRateChart } from './dependency_failed_transaction_rate_chart'; +import { DependencyLatencyChart } from './dependency_latency_chart'; +import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; +import { DependencyThroughputChart } from './dependency_throughput_chart'; -export function BackendMetricCharts() { +export function DependencyMetricCharts() { const largeScreenOrSmaller = useBreakpoints().isLarge; const { query, query: { - backendName, + dependencyName, rangeFrom, rangeTo, kuery, @@ -29,12 +29,12 @@ export function BackendMetricCharts() { comparisonEnabled, offset, }, - } = useAnyOfApmParams('/backends/overview', '/backends/operation'); + } = useAnyOfApmParams('/dependencies/overview', '/dependencies/operation'); const spanName = 'spanName' in query ? query.spanName : undefined; - const props: BackendMetricChartsRouteParams = { - backendName, + const props: DependencyMetricChartsRouteParams = { + dependencyName, rangeFrom, rangeTo, kuery, @@ -53,24 +53,25 @@ export function BackendMetricCharts() { <EuiPanel hasBorder={true}> <EuiTitle size="xs"> <h2> - {i18n.translate('xpack.apm.backendDetailLatencyChartTitle', { + {i18n.translate('xpack.apm.dependencyDetailLatencyChartTitle', { defaultMessage: 'Latency', })} </h2> </EuiTitle> - <BackendLatencyChart height={200} {...props} /> + <DependencyLatencyChart height={200} {...props} /> </EuiPanel> </EuiFlexItem> <EuiFlexItem> <EuiPanel hasBorder={true}> <EuiTitle size="xs"> <h2> - {i18n.translate('xpack.apm.backendDetailThroughputChartTitle', { - defaultMessage: 'Throughput', - })} + {i18n.translate( + 'xpack.apm.dependencyDetailThroughputChartTitle', + { defaultMessage: 'Throughput' } + )} </h2> </EuiTitle> - <BackendThroughputChart height={200} {...props} /> + <DependencyThroughputChart height={200} {...props} /> </EuiPanel> </EuiFlexItem> <EuiFlexItem> @@ -78,12 +79,12 @@ export function BackendMetricCharts() { <EuiTitle size="xs"> <h2> {i18n.translate( - 'xpack.apm.backendDetailFailedTransactionRateChartTitle', + 'xpack.apm.dependencyDetailFailedTransactionRateChartTitle', { defaultMessage: 'Failed transaction rate' } )} </h2> </EuiTitle> - <BackendFailedTransactionRateChart height={200} {...props} /> + <DependencyFailedTransactionRateChart height={200} {...props} /> </EuiPanel> </EuiFlexItem> </EuiFlexGroup> diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/get_columns.tsx b/x-pack/plugins/apm/public/components/shared/errors_table/get_columns.tsx similarity index 53% rename from x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/get_columns.tsx rename to x-pack/plugins/apm/public/components/shared/errors_table/get_columns.tsx index 0af05ead4fb24..3a6913688498b 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/get_columns.tsx +++ b/x-pack/plugins/apm/public/components/shared/errors_table/get_columns.tsx @@ -5,32 +5,38 @@ * 2.0. */ -import { EuiBasicTableColumn, RIGHT_ALIGNMENT } from '@elastic/eui'; +import { + EuiBasicTableColumn, + RIGHT_ALIGNMENT, + CENTER_ALIGNMENT, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; -import { asInteger } from '../../../../../common/utils/formatters'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; -import { truncate } from '../../../../utils/style'; -import { SparkPlot } from '../../../shared/charts/spark_plot'; -import { ErrorDetailLink } from '../../../shared/links/apm/error_detail_link'; -import { ErrorOverviewLink } from '../../../shared/links/apm/error_overview_link'; -import { TimestampTooltip } from '../../../shared/timestamp_tooltip'; -import { TruncateWithTooltip } from '../../../shared/truncate_with_tooltip'; +import { isTimeComparison } from '../time_comparison/get_comparison_options'; +import { asInteger } from '../../../../common/utils/formatters'; +import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import { truncate } from '../../../utils/style'; +import { SparkPlot } from '../charts/spark_plot'; +import { ErrorDetailLink } from '../links/apm/error_detail_link'; +import { ErrorOverviewLink } from '../links/apm/error_overview_link'; +import { TimestampTooltip } from '../timestamp_tooltip'; +import { TruncateWithTooltip } from '../truncate_with_tooltip'; import { ChartType, getTimeSeriesColor, -} from '../../../shared/charts/helper/get_timeseries_color'; -import { ApmRoutes } from '../../../routing/apm_route_config'; +} from '../charts/helper/get_timeseries_color'; +import { ApmRoutes } from '../../routing/apm_route_config'; const ErrorLink = euiStyled(ErrorOverviewLink)` ${truncate('100%')}; `; -type ErrorGroupMainStatistics = - APIReturnType<'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics'>; +type ErrorGroupMainStatistics = APIReturnType< + | 'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics' + | 'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name' +>; type ErrorGroupDetailedStatistics = APIReturnType<'POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics'>; @@ -40,41 +46,50 @@ export function getColumns({ errorGroupDetailedStatistics, comparisonEnabled, query, + showErrorType = true, }: { serviceName: string; errorGroupDetailedStatisticsLoading: boolean; errorGroupDetailedStatistics: ErrorGroupDetailedStatistics; comparisonEnabled?: boolean; query: TypeOf<ApmRoutes, '/services/{serviceName}/errors'>['query']; + showErrorType?: boolean; }): Array<EuiBasicTableColumn<ErrorGroupMainStatistics['errorGroups'][0]>> { const { offset } = query; return [ - { - name: i18n.translate('xpack.apm.errorsTable.typeColumnLabel', { - defaultMessage: 'Type', - }), - field: 'type', - sortable: false, - render: (_, { type }) => { - return ( - <ErrorLink - title={type} - serviceName={serviceName} - query={ - { - ...query, - kuery: `error.exception.type:"${type}"`, - } as TypeOf<ApmRoutes, '/services/{serviceName}/errors'>['query'] - } - > - {type} - </ErrorLink> - ); - }, - }, + ...(showErrorType + ? [ + { + name: i18n.translate('xpack.apm.errorsTable.typeColumnLabel', { + defaultMessage: 'Type', + }), + field: 'type', + sortable: false, + render: (_, { type }) => { + return ( + <ErrorLink + title={type} + serviceName={serviceName} + query={ + { + ...query, + kuery: `error.exception.type:"${type}"`, + } as TypeOf< + ApmRoutes, + '/services/{serviceName}/errors' + >['query'] + } + > + {type} + </ErrorLink> + ); + }, + } as EuiBasicTableColumn<ErrorGroupMainStatistics['errorGroups'][0]>, + ] + : []), { field: 'name', - name: i18n.translate('xpack.apm.serviceOverview.errorsTableColumnName', { + name: i18n.translate('xpack.apm.errorsTable.columnName', { defaultMessage: 'Name', }), render: (_, { name, groupId: errorGroupId }) => { @@ -95,13 +110,10 @@ export function getColumns({ }, { field: 'lastSeen', - name: i18n.translate( - 'xpack.apm.serviceOverview.errorsTableColumnLastSeen', - { - defaultMessage: 'Last seen', - } - ), - align: RIGHT_ALIGNMENT, + name: i18n.translate('xpack.apm.errorsTable.columnLastSeen', { + defaultMessage: 'Last seen', + }), + align: showErrorType ? RIGHT_ALIGNMENT : CENTER_ALIGNMENT, render: (_, { lastSeen }) => { return ( <span style={{ overflow: 'hidden', whiteSpace: 'nowrap' }}> @@ -112,12 +124,9 @@ export function getColumns({ }, { field: 'occurrences', - name: i18n.translate( - 'xpack.apm.serviceOverview.errorsTableColumnOccurrences', - { - defaultMessage: 'Occurrences', - } - ), + name: i18n.translate('xpack.apm.errorsTable.columnOccurrences', { + defaultMessage: 'Occurrences', + }), align: RIGHT_ALIGNMENT, render: (_, { occurrences, groupId: errorGroupId }) => { const currentPeriodTimeseries = @@ -135,15 +144,12 @@ export function getColumns({ color={currentPeriodColor} isLoading={errorGroupDetailedStatisticsLoading} series={currentPeriodTimeseries} - valueLabel={i18n.translate( - 'xpack.apm.serviceOveriew.errorsTableOccurrences', - { - defaultMessage: `{occurrences} occ.`, - values: { - occurrences: asInteger(occurrences), - }, - } - )} + valueLabel={i18n.translate('xpack.apm.errorsTable.occurrences', { + defaultMessage: `{occurrences} occ.`, + values: { + occurrences: asInteger(occurrences), + }, + })} comparisonSeries={ comparisonEnabled && isTimeComparison(offset) ? previousPeriodTimeseries diff --git a/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts b/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts index 81aa567140ed4..68e5d7be00783 100644 --- a/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts +++ b/x-pack/plugins/apm/public/components/shared/is_route_with_time_range.ts @@ -20,8 +20,8 @@ export function isRouteWithTimeRange({ route.path === '/services' || route.path === '/traces' || route.path === '/service-map' || - route.path === '/backends' || - route.path === '/backends/inventory' || + route.path === '/dependencies' || + route.path === '/dependencies/inventory' || route.path === '/services/{serviceName}' || route.path === '/service-groups' || location.pathname === '/' || @@ -44,8 +44,8 @@ export function isRouteWithComparison({ return ( route.path === '/services' || route.path === '/service-map' || - route.path === '/backends' || - route.path === '/backends/inventory' || + route.path === '/dependencies' || + route.path === '/dependencies/inventory' || route.path === '/services/{serviceName}' || route.path === '/service-groups' || location.pathname === '/' || diff --git a/x-pack/plugins/apm/public/components/shared/time_comparison/index.tsx b/x-pack/plugins/apm/public/components/shared/time_comparison/index.tsx index ed157810f0617..6a72731a74236 100644 --- a/x-pack/plugins/apm/public/components/shared/time_comparison/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/time_comparison/index.tsx @@ -39,7 +39,11 @@ export function TimeComparison() { const { isSmall } = useBreakpoints(); const { query: { rangeFrom, rangeTo, comparisonEnabled, offset }, - } = useAnyOfApmParams('/services', '/backends/*', '/services/{serviceName}'); + } = useAnyOfApmParams( + '/services', + '/dependencies/*', + '/services/{serviceName}' + ); const location = useLocation(); const apmRouter = useApmRouter(); diff --git a/x-pack/plugins/apm/public/components/shared/transactions_table/get_columns.tsx b/x-pack/plugins/apm/public/components/shared/transactions_table/get_columns.tsx index 84670b8448f17..dd68dc94a2c1a 100644 --- a/x-pack/plugins/apm/public/components/shared/transactions_table/get_columns.tsx +++ b/x-pack/plugins/apm/public/components/shared/transactions_table/get_columns.tsx @@ -68,6 +68,7 @@ export function getColumns({ 'xpack.apm.serviceOverview.transactionsTableColumnName', { defaultMessage: 'Name' } ), + width: '30%', render: (_, { name, transactionType: type }) => { return ( <TruncateWithTooltip diff --git a/x-pack/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts b/x-pack/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts index 980c7986d098a..0c1294d7d9c93 100644 --- a/x-pack/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts +++ b/x-pack/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts @@ -10,7 +10,10 @@ import { useContext, useEffect, useRef } from 'react'; import { castArray } from 'lodash'; import { Breadcrumb, BreadcrumbsContext } from './context'; -export function useBreadcrumb(breadcrumb: Breadcrumb | Breadcrumb[]) { +export function useBreadcrumb( + callback: () => Breadcrumb | Breadcrumb[], + fnDeps: any[] +) { const api = useContext(BreadcrumbsContext); if (!api) { @@ -29,7 +32,7 @@ export function useBreadcrumb(breadcrumb: Breadcrumb | Breadcrumb[]) { matchedRoute.current = match?.route; if (matchedRoute.current) { - api.set(matchedRoute.current, castArray(breadcrumb)); + api.set(matchedRoute.current, castArray(callback())); } return () => { @@ -38,5 +41,5 @@ export function useBreadcrumb(breadcrumb: Breadcrumb | Breadcrumb[]) { } }; // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [match, ...fnDeps]); } diff --git a/x-pack/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx b/x-pack/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx index acb21a20620d0..53b8f3c5a55ab 100644 --- a/x-pack/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx +++ b/x-pack/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx @@ -38,7 +38,8 @@ export function TimeRangeMetadataContextProvider({ const routePath = useApmRoutePath(); const isOperationView = - routePath === '/backends/operation' || routePath === '/backends/operations'; + routePath === '/dependencies/operation' || + routePath === '/dependencies/operations'; const fetcherResult = useFetcher( (callApmApi) => { diff --git a/x-pack/plugins/apm/public/hooks/use_backend_detail_operations_breadcrumb.ts b/x-pack/plugins/apm/public/hooks/use_backend_detail_operations_breadcrumb.ts deleted file mode 100644 index c5235333e8426..0000000000000 --- a/x-pack/plugins/apm/public/hooks/use_backend_detail_operations_breadcrumb.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { useBreadcrumb } from '../context/breadcrumbs/use_breadcrumb'; -import { useAnyOfApmParams } from './use_apm_params'; -import { useApmRouter } from './use_apm_router'; - -export function useBackendDetailOperationsBreadcrumb() { - const { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - } = useAnyOfApmParams('/backends/operations', '/backends/operation'); - - const apmRouter = useApmRouter(); - - useBreadcrumb([ - { - title: i18n.translate( - 'xpack.apm.backendDetailOperations.breadcrumbTitle', - { defaultMessage: 'Operations' } - ), - href: apmRouter.link('/backends/operations', { - query: { - backendName, - rangeFrom, - rangeTo, - refreshInterval, - refreshPaused, - environment, - kuery, - comparisonEnabled, - }, - }), - }, - ]); -} diff --git a/x-pack/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts b/x-pack/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts new file mode 100644 index 0000000000000..a2db87adadc51 --- /dev/null +++ b/x-pack/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { useBreadcrumb } from '../context/breadcrumbs/use_breadcrumb'; +import { useAnyOfApmParams } from './use_apm_params'; +import { useApmRouter } from './use_apm_router'; + +export function useDependencyDetailOperationsBreadcrumb() { + const { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + } = useAnyOfApmParams('/dependencies/operations', '/dependencies/operation'); + + const apmRouter = useApmRouter(); + + useBreadcrumb( + () => [ + { + title: i18n.translate( + 'xpack.apm.dependencyDetailOperations.breadcrumbTitle', + { defaultMessage: 'Operations' } + ), + href: apmRouter.link('/dependencies/operations', { + query: { + dependencyName, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + environment, + kuery, + comparisonEnabled, + }, + }), + }, + ], + [ + apmRouter, + comparisonEnabled, + dependencyName, + environment, + kuery, + rangeFrom, + rangeTo, + refreshInterval, + refreshPaused, + ] + ); +} diff --git a/x-pack/plugins/apm/public/hooks/use_previous_period_text.ts b/x-pack/plugins/apm/public/hooks/use_previous_period_text.ts index 6a33b5c42a50f..822fa8d630230 100644 --- a/x-pack/plugins/apm/public/hooks/use_previous_period_text.ts +++ b/x-pack/plugins/apm/public/hooks/use_previous_period_text.ts @@ -19,7 +19,11 @@ const fallbackPreviousPeriodText = i18n.translate( export const usePreviousPeriodLabel = () => { const { query: { rangeFrom, rangeTo, offset }, - } = useAnyOfApmParams('/services', '/backends/*', '/services/{serviceName}'); + } = useAnyOfApmParams( + '/services', + '/dependencies/*', + '/services/{serviceName}' + ); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); diff --git a/x-pack/plugins/apm/public/plugin.ts b/x-pack/plugins/apm/public/plugin.ts index 9edc7fe6f5d28..69e35f1146536 100644 --- a/x-pack/plugins/apm/public/plugin.ts +++ b/x-pack/plugins/apm/public/plugin.ts @@ -178,7 +178,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> { { label: dependenciesTitle, app: 'apm', - path: '/backends/inventory', + path: '/dependencies/inventory', onClick: () => { const { usageCollection } = pluginsStart as { usageCollection?: UsageCollectionStart; @@ -188,7 +188,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> { usageCollection.reportUiCounter( 'apm', METRIC_TYPE.CLICK, - 'side_nav_backend' + 'side_nav_dependency' ); } }, @@ -299,9 +299,9 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> { { id: 'traces', title: tracesTitle, path: '/traces' }, { id: 'service-map', title: serviceMapTitle, path: '/service-map' }, { - id: 'backends', + id: 'dependencies', title: dependenciesTitle, - path: '/backends/inventory', + path: '/dependencies/inventory', }, ], diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts index 50bfdfbbfec14..4dd70c80af0ce 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -74,6 +74,7 @@ const apmPerAgentSchema: Pick< // TODO: Find a way for `@kbn/telemetry-tools` to understand and evaluate expressions. // In the meanwhile, we'll have to maintain these lists up to date (TS will remind us to update) services_per_agent: { + 'android/java': long, dotnet: long, 'iOS/swift': long, go: long, @@ -98,6 +99,7 @@ const apmPerAgentSchema: Pick< 'opentelemetry/webjs': long, }, agents: { + 'android/java': agentSchema, dotnet: agentSchema, 'iOS/swift': agentSchema, go: agentSchema, diff --git a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts index 4e3dd452276d5..bb3defa93ac0c 100644 --- a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts +++ b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts @@ -30,7 +30,7 @@ import { Node, NodeType } from '../../../../common/connections'; import { excludeRumExitSpansQuery } from '../exclude_rum_exit_spans_query'; type Destination = { - backendName: string; + dependencyName: string; spanId: string; spanType: string; spanSubtype: string; @@ -43,10 +43,10 @@ type Destination = { } ); -// This operation tries to find a service for a backend, by: +// This operation tries to find a service for a dependency, by: // - getting a span for each value of span.destination.service.resource (which indicates an outgoing call) // - for each span, find the transaction it creates -// - if there is a transaction, match the backend name (span.destination.service.resource) to a service +// - if there is a transaction, match the dependency name (span.destination.service.resource) to a service export const getDestinationMap = ({ setup, start, @@ -91,7 +91,7 @@ export const getDestinationMap = ({ size: 10000, sources: asMutableArray([ { - backendName: { + dependencyName: { terms: { field: SPAN_DESTINATION_SERVICE_RESOURCE }, }, }, @@ -130,7 +130,7 @@ export const getDestinationMap = ({ const spanId = sample[SPAN_ID] as string; destinationsBySpanId.set(spanId, { - backendName: bucket.key.backendName as string, + dependencyName: bucket.key.dependencyName as string, spanId, spanType: (sample[SPAN_TYPE] as string | null) || '', spanSubtype: (sample[SPAN_SUBTYPE] as string | null) || '', @@ -189,11 +189,11 @@ export const getDestinationMap = ({ } }); - const nodesByBackendName = new Map<string, Node>(); + const nodesBydependencyName = new Map<string, Node>(); destinationsBySpanId.forEach((destination) => { const existingDestination = - nodesByBackendName.get(destination.backendName) ?? {}; + nodesBydependencyName.get(destination.dependencyName) ?? {}; const mergedDestination = { ...existingDestination, @@ -211,17 +211,17 @@ export const getDestinationMap = ({ }; } else { node = { - backendName: mergedDestination.backendName, + dependencyName: mergedDestination.dependencyName, spanType: mergedDestination.spanType, spanSubtype: mergedDestination.spanSubtype, - id: objectHash({ backendName: mergedDestination.backendName }), - type: NodeType.backend, + id: objectHash({ dependencyName: mergedDestination.dependencyName }), + type: NodeType.dependency, }; } - nodesByBackendName.set(destination.backendName, node); + nodesBydependencyName.set(destination.dependencyName, node); }); - return nodesByBackendName; + return nodesBydependencyName; }); }; diff --git a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts index a0cd85c857a05..3f7fe3d168a9a 100644 --- a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts +++ b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts @@ -88,7 +88,7 @@ export const getStats = async ({ }, }, { - backendName: { + dependencyName: { terms: { field: SPAN_DESTINATION_SERVICE_RESOURCE, }, @@ -178,7 +178,7 @@ export const getStats = async ({ response.aggregations?.connections.buckets.map((bucket) => { const sample = bucket.sample.top[0].metrics; const serviceName = bucket.key.serviceName as string; - const backendName = bucket.key.backendName as string; + const dependencyName = bucket.key.dependencyName as string; return { from: { @@ -190,11 +190,11 @@ export const getStats = async ({ type: NodeType.service as const, }, to: { - id: objectHash({ backendName }), - backendName, + id: objectHash({ dependencyName }), + dependencyName, spanType: sample[SPAN_TYPE] as string, spanSubtype: (sample[SPAN_SUBTYPE] || '') as string, - type: NodeType.backend as const, + type: NodeType.dependency as const, }, value: { count: sum( diff --git a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/index.ts b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/index.ts index 5c1c628762edb..35d2a063325cf 100644 --- a/x-pack/plugins/apm/server/lib/connections/get_connection_stats/index.ts +++ b/x-pack/plugins/apm/server/lib/connections/get_connection_stats/index.ts @@ -53,7 +53,8 @@ export function getConnectionStats({ const statsWithLocationIds = allMetrics.map((statsItem) => { const { from, timeseries, value } = statsItem; - const to = destinationMap.get(statsItem.to.backendName) ?? statsItem.to; + const to = + destinationMap.get(statsItem.to.dependencyName) ?? statsItem.to; const location = collapseBy === 'upstream' ? from : to; diff --git a/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts b/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts index f906d6d95feb0..a7e41f86ded87 100644 --- a/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts +++ b/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts @@ -12,7 +12,7 @@ import type { import { PickByValue } from 'utility-types'; import { agentKeysRouteRepository } from '../agent_keys/route'; import { alertsChartPreviewRouteRepository } from '../alerts/route'; -import { backendsRouteRepository } from '../backends/route'; +import { dependencisRouteRepository } from '../dependencies/route'; import { correlationsRouteRepository } from '../correlations/route'; import { dataViewRouteRepository } from '../data_view/route'; import { debugTelemetryRoute } from '../debug_telemetry/route'; @@ -63,7 +63,7 @@ function getTypedGlobalApmServerRouteRepository() { ...customLinkRouteRepository, ...sourceMapsRouteRepository, ...apmFleetRouteRepository, - ...backendsRouteRepository, + ...dependencisRouteRepository, ...correlationsRouteRepository, ...fallbackToTransactionsRouteRepository, ...historicalDataRouteRepository, diff --git a/x-pack/plugins/apm/server/routes/backends/get_error_rate_charts_for_backend.ts b/x-pack/plugins/apm/server/routes/backends/get_error_rate_charts_for_backend.ts deleted file mode 100644 index a1890e103d412..0000000000000 --- a/x-pack/plugins/apm/server/routes/backends/get_error_rate_charts_for_backend.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - kqlQuery, - rangeQuery, - termQuery, -} from '@kbn/observability-plugin/server'; -import { EventOutcome } from '../../../common/event_outcome'; -import { - EVENT_OUTCOME, - SPAN_DESTINATION_SERVICE_RESOURCE, - SPAN_NAME, -} from '../../../common/elasticsearch_fieldnames'; -import { environmentQuery } from '../../../common/utils/environment_query'; -import { Setup } from '../../lib/helpers/setup_request'; -import { getMetricsDateHistogramParams } from '../../lib/helpers/metrics'; -import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { - getDocCountFieldForServiceDestinationStatistics, - getDocumentTypeFilterForServiceDestinationStatistics, - getProcessorEventForServiceDestinationStatistics, -} from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; - -export async function getErrorRateChartsForBackend({ - backendName, - spanName, - setup, - start, - end, - environment, - kuery, - searchServiceDestinationMetrics, - offset, -}: { - backendName: string; - spanName: string; - setup: Setup; - start: number; - end: number; - environment: string; - kuery: string; - searchServiceDestinationMetrics: boolean; - offset?: string; -}) { - const { apmEventClient } = setup; - - const { offsetInMs, startWithOffset, endWithOffset } = getOffsetInMs({ - start, - end, - offset, - }); - - const response = await apmEventClient.search('get_error_rate_for_backend', { - apm: { - events: [ - getProcessorEventForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - ], - }, - body: { - size: 0, - query: { - bool: { - filter: [ - ...environmentQuery(environment), - ...kqlQuery(kuery), - ...rangeQuery(startWithOffset, endWithOffset), - ...termQuery(SPAN_NAME, spanName || null), - ...getDocumentTypeFilterForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }, - { - terms: { - [EVENT_OUTCOME]: [EventOutcome.success, EventOutcome.failure], - }, - }, - ], - }, - }, - aggs: { - timeseries: { - date_histogram: getMetricsDateHistogramParams({ - start: startWithOffset, - end: endWithOffset, - metricsInterval: 60, - }), - aggs: { - ...(searchServiceDestinationMetrics - ? { - total_count: { - sum: { - field: getDocCountFieldForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - }, - }, - } - : {}), - failures: { - filter: { - term: { - [EVENT_OUTCOME]: EventOutcome.failure, - }, - }, - aggs: { - ...(searchServiceDestinationMetrics - ? { - total_count: { - sum: { - field: - getDocCountFieldForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - }, - }, - } - : {}), - }, - }, - }, - }, - }, - }, - }); - - return ( - response.aggregations?.timeseries.buckets.map((bucket) => { - const totalCount = bucket.total_count?.value ?? bucket.doc_count; - const failureCount = - bucket.failures.total_count?.value ?? bucket.failures.doc_count; - - return { - x: bucket.key + offsetInMs, - y: failureCount / totalCount, - }; - }) ?? [] - ); -} diff --git a/x-pack/plugins/apm/server/routes/backends/get_backend_latency_distribution.ts b/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts similarity index 92% rename from x-pack/plugins/apm/server/routes/backends/get_backend_latency_distribution.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts index c67b64273ae5b..ea7f5f53c7df4 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_backend_latency_distribution.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts @@ -18,9 +18,9 @@ import { Setup } from '../../lib/helpers/setup_request'; import { getOverallLatencyDistribution } from '../latency_distribution/get_overall_latency_distribution'; import { OverallLatencyDistributionResponse } from '../latency_distribution/types'; -export async function getBackendLatencyDistribution({ +export async function getDependencyLatencyDistribution({ setup, - backendName, + dependencyName, spanName, kuery, environment, @@ -29,7 +29,7 @@ export async function getBackendLatencyDistribution({ percentileThreshold, }: { setup: Setup; - backendName: string; + dependencyName: string; spanName: string; kuery: string; environment: Environment; @@ -54,7 +54,7 @@ export async function getBackendLatencyDistribution({ bool: { filter: [ ...termQuery(SPAN_NAME, spanName), - ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, backendName), + ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, dependencyName), ], }, }; diff --git a/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts b/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts new file mode 100644 index 0000000000000..97e117535a4f7 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts @@ -0,0 +1,148 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + kqlQuery, + rangeQuery, + termQuery, +} from '@kbn/observability-plugin/server'; +import { EventOutcome } from '../../../common/event_outcome'; +import { + EVENT_OUTCOME, + SPAN_DESTINATION_SERVICE_RESOURCE, + SPAN_NAME, +} from '../../../common/elasticsearch_fieldnames'; +import { environmentQuery } from '../../../common/utils/environment_query'; +import { Setup } from '../../lib/helpers/setup_request'; +import { getMetricsDateHistogramParams } from '../../lib/helpers/metrics'; +import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; +import { + getDocCountFieldForServiceDestinationStatistics, + getDocumentTypeFilterForServiceDestinationStatistics, + getProcessorEventForServiceDestinationStatistics, +} from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; + +export async function getErrorRateChartsForDependency({ + dependencyName, + spanName, + setup, + start, + end, + environment, + kuery, + searchServiceDestinationMetrics, + offset, +}: { + dependencyName: string; + spanName: string; + setup: Setup; + start: number; + end: number; + environment: string; + kuery: string; + searchServiceDestinationMetrics: boolean; + offset?: string; +}) { + const { apmEventClient } = setup; + + const { offsetInMs, startWithOffset, endWithOffset } = getOffsetInMs({ + start, + end, + offset, + }); + + const response = await apmEventClient.search( + 'get_error_rate_for_dependency', + { + apm: { + events: [ + getProcessorEventForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + ], + }, + body: { + size: 0, + query: { + bool: { + filter: [ + ...environmentQuery(environment), + ...kqlQuery(kuery), + ...rangeQuery(startWithOffset, endWithOffset), + ...termQuery(SPAN_NAME, spanName || null), + ...getDocumentTypeFilterForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName } }, + { + terms: { + [EVENT_OUTCOME]: [EventOutcome.success, EventOutcome.failure], + }, + }, + ], + }, + }, + aggs: { + timeseries: { + date_histogram: getMetricsDateHistogramParams({ + start: startWithOffset, + end: endWithOffset, + metricsInterval: 60, + }), + aggs: { + ...(searchServiceDestinationMetrics + ? { + total_count: { + sum: { + field: getDocCountFieldForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + }, + }, + } + : {}), + failures: { + filter: { + term: { + [EVENT_OUTCOME]: EventOutcome.failure, + }, + }, + aggs: { + ...(searchServiceDestinationMetrics + ? { + total_count: { + sum: { + field: + getDocCountFieldForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + }, + }, + } + : {}), + }, + }, + }, + }, + }, + }, + } + ); + + return ( + response.aggregations?.timeseries.buckets.map((bucket) => { + const totalCount = bucket.total_count?.value ?? bucket.doc_count; + const failureCount = + bucket.failures.total_count?.value ?? bucket.failures.doc_count; + + return { + x: bucket.key + offsetInMs, + y: failureCount / totalCount, + }; + }) ?? [] + ); +} diff --git a/x-pack/plugins/apm/server/routes/backends/get_latency_charts_for_backend.ts b/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts similarity index 94% rename from x-pack/plugins/apm/server/routes/backends/get_latency_charts_for_backend.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts index 1dfe61904112c..afbbd33fa6b9a 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_latency_charts_for_backend.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts @@ -25,8 +25,8 @@ import { getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; -export async function getLatencyChartsForBackend({ - backendName, +export async function getLatencyChartsForDependency({ + dependencyName, spanName, searchServiceDestinationMetrics, setup, @@ -36,7 +36,7 @@ export async function getLatencyChartsForBackend({ kuery, offset, }: { - backendName: string; + dependencyName: string; spanName: string; searchServiceDestinationMetrics: boolean; setup: Setup; @@ -54,7 +54,7 @@ export async function getLatencyChartsForBackend({ offset, }); - const response = await apmEventClient.search('get_latency_for_backend', { + const response = await apmEventClient.search('get_latency_for_dependency', { apm: { events: [ getProcessorEventForServiceDestinationStatistics( @@ -74,7 +74,7 @@ export async function getLatencyChartsForBackend({ ...getDocumentTypeFilterForServiceDestinationStatistics( searchServiceDestinationMetrics ), - { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }, + { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName } }, ], }, }, diff --git a/x-pack/plugins/apm/server/routes/backends/get_metadata_for_backend.ts b/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts similarity index 60% rename from x-pack/plugins/apm/server/routes/backends/get_metadata_for_backend.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts index 3392b4f2d1622..5c18d57d11c49 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_metadata_for_backend.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts @@ -11,42 +11,45 @@ import { ProcessorEvent } from '../../../common/processor_event'; import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/elasticsearch_fieldnames'; import { Setup } from '../../lib/helpers/setup_request'; -export async function getMetadataForBackend({ +export async function getMetadataForDependency({ setup, - backendName, + dependencyName, start, end, }: { setup: Setup; - backendName: string; + dependencyName: string; start: number; end: number; }) { const { apmEventClient } = setup; - const sampleResponse = await apmEventClient.search('get_backend_sample', { - apm: { - events: [ProcessorEvent.span], - }, - body: { - size: 1, - query: { - bool: { - filter: [ - { - term: { - [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName, + const sampleResponse = await apmEventClient.search( + 'get_metadata_for_dependency', + { + apm: { + events: [ProcessorEvent.span], + }, + body: { + size: 1, + query: { + bool: { + filter: [ + { + term: { + [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName, + }, }, - }, - ...rangeQuery(start, end), - ], + ...rangeQuery(start, end), + ], + }, + }, + sort: { + '@timestamp': 'desc', }, }, - sort: { - '@timestamp': 'desc', - }, - }, - }); + } + ); const sample = maybe(sampleResponse.hits.hits[0])?._source; diff --git a/x-pack/plugins/apm/server/routes/backends/get_throughput_charts_for_backend.ts b/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts similarity index 53% rename from x-pack/plugins/apm/server/routes/backends/get_throughput_charts_for_backend.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts index 55930ad918646..fd4dee60f932b 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_throughput_charts_for_backend.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts @@ -24,8 +24,8 @@ import { getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; -export async function getThroughputChartsForBackend({ - backendName, +export async function getThroughputChartsForDependency({ + dependencyName, spanName, setup, start, @@ -35,7 +35,7 @@ export async function getThroughputChartsForBackend({ searchServiceDestinationMetrics, offset, }: { - backendName: string; + dependencyName: string; spanName: string; setup: Setup; start: number; @@ -59,56 +59,59 @@ export async function getThroughputChartsForBackend({ minBucketSize: 60, }); - const response = await apmEventClient.search('get_throughput_for_backend', { - apm: { - events: [ - getProcessorEventForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - ], - }, - body: { - size: 0, - query: { - bool: { - filter: [ - ...environmentQuery(environment), - ...kqlQuery(kuery), - ...rangeQuery(startWithOffset, endWithOffset), - ...termQuery(SPAN_NAME, spanName || null), - ...getDocumentTypeFilterForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }, - ], - }, + const response = await apmEventClient.search( + 'get_throughput_for_dependency', + { + apm: { + events: [ + getProcessorEventForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + ], }, - aggs: { - timeseries: { - date_histogram: { - field: '@timestamp', - fixed_interval: intervalString, - min_doc_count: 0, - extended_bounds: { min: startWithOffset, max: endWithOffset }, + body: { + size: 0, + query: { + bool: { + filter: [ + ...environmentQuery(environment), + ...kqlQuery(kuery), + ...rangeQuery(startWithOffset, endWithOffset), + ...termQuery(SPAN_NAME, spanName || null), + ...getDocumentTypeFilterForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName } }, + ], }, - aggs: { - throughput: { - rate: { - ...(searchServiceDestinationMetrics - ? { - field: getDocCountFieldForServiceDestinationStatistics( - searchServiceDestinationMetrics - ), - } - : {}), - unit: 'minute', + }, + aggs: { + timeseries: { + date_histogram: { + field: '@timestamp', + fixed_interval: intervalString, + min_doc_count: 0, + extended_bounds: { min: startWithOffset, max: endWithOffset }, + }, + aggs: { + throughput: { + rate: { + ...(searchServiceDestinationMetrics + ? { + field: getDocCountFieldForServiceDestinationStatistics( + searchServiceDestinationMetrics + ), + } + : {}), + unit: 'minute', + }, }, }, }, }, }, - }, - }); + } + ); return ( response.aggregations?.timeseries.buckets.map((bucket) => { diff --git a/x-pack/plugins/apm/server/routes/backends/get_top_backends.ts b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependencies.ts similarity index 96% rename from x-pack/plugins/apm/server/routes/backends/get_top_backends.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_top_dependencies.ts index 573d4792be429..08e2f6183303e 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_top_backends.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependencies.ts @@ -12,7 +12,7 @@ import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; import { Setup } from '../../lib/helpers/setup_request'; -export async function getTopBackends({ +export async function getTopDependencies({ setup, start, end, diff --git a/x-pack/plugins/apm/server/routes/backends/get_top_backend_operations.ts b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts similarity index 75% rename from x-pack/plugins/apm/server/routes/backends/get_top_backend_operations.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts index d7e163bb1686e..dcf9ce40515c0 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_top_backend_operations.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts @@ -31,7 +31,7 @@ import { calculateImpactBuilder } from '../traces/calculate_impact_builder'; const MAX_NUM_OPERATIONS = 500; -export interface BackendOperation { +export interface DependencyOperation { spanName: string; latency: number | null; throughput: number; @@ -43,9 +43,9 @@ export interface BackendOperation { >; } -export async function getTopBackendOperations({ +export async function getTopDependencyOperations({ setup, - backendName, + dependencyName, start, end, offset, @@ -53,7 +53,7 @@ export async function getTopBackendOperations({ kuery, }: { setup: Setup; - backendName: string; + dependencyName: string; start: number; end: number; offset?: string; @@ -90,48 +90,51 @@ export async function getTopBackendOperations({ }, }; - const response = await apmEventClient.search('get_top_backend_operations', { - apm: { - events: [ProcessorEvent.span], - }, - body: { - size: 0, - query: { - bool: { - filter: [ - ...rangeQuery(startWithOffset, endWithOffset), - ...environmentQuery(environment), - ...kqlQuery(kuery), - ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, backendName), - ], - }, + const response = await apmEventClient.search( + 'get_top_dependency_operations', + { + apm: { + events: [ProcessorEvent.span], }, - aggs: { - operationName: { - terms: { - field: SPAN_NAME, - size: MAX_NUM_OPERATIONS, + body: { + size: 0, + query: { + bool: { + filter: [ + ...rangeQuery(startWithOffset, endWithOffset), + ...environmentQuery(environment), + ...kqlQuery(kuery), + ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, dependencyName), + ], }, - aggs: { - over_time: { - date_histogram: getMetricsDateHistogramParams({ - start: startWithOffset, - end: endWithOffset, - metricsInterval: 60, - }), - aggs, + }, + aggs: { + operationName: { + terms: { + field: SPAN_NAME, + size: MAX_NUM_OPERATIONS, }, - ...aggs, - total_time: { - sum: { - field: SPAN_DURATION, + aggs: { + over_time: { + date_histogram: getMetricsDateHistogramParams({ + start: startWithOffset, + end: endWithOffset, + metricsInterval: 60, + }), + aggs, + }, + ...aggs, + total_time: { + sum: { + field: SPAN_DURATION, + }, }, }, }, }, }, - }, - }); + } + ); const getImpact = calculateImpactBuilder( response.aggregations?.operationName.buckets.map( @@ -141,8 +144,8 @@ export async function getTopBackendOperations({ return ( response.aggregations?.operationName.buckets.map( - (bucket): BackendOperation => { - const timeseries: BackendOperation['timeseries'] = { + (bucket): DependencyOperation => { + const timeseries: DependencyOperation['timeseries'] = { latency: [], throughput: [], failureRate: [], diff --git a/x-pack/plugins/apm/server/routes/backends/get_top_backend_spans.ts b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts similarity index 90% rename from x-pack/plugins/apm/server/routes/backends/get_top_backend_spans.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts index e6d6b99986af9..86a6dfb0aaf8e 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_top_backend_spans.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts @@ -34,7 +34,7 @@ import { Setup } from '../../lib/helpers/setup_request'; const MAX_NUM_SPANS = 1000; -export interface BackendSpan { +export interface DependencySpan { '@timestamp': number; spanName: string; serviceName: string; @@ -47,9 +47,9 @@ export interface BackendSpan { outcome: EventOutcome; } -export async function getTopBackendSpans({ +export async function getTopDependencySpans({ setup, - backendName, + dependencyName, spanName, start, end, @@ -59,7 +59,7 @@ export async function getTopBackendSpans({ sampleRangeTo, }: { setup: Setup; - backendName: string; + dependencyName: string; spanName: string; start: number; end: number; @@ -67,11 +67,11 @@ export async function getTopBackendSpans({ kuery: string; sampleRangeFrom?: number; sampleRangeTo?: number; -}): Promise<BackendSpan[]> { +}): Promise<DependencySpan[]> { const { apmEventClient } = setup; const spans = ( - await apmEventClient.search('get_top_backend_spans', { + await apmEventClient.search('get_top_dependency_spans', { apm: { events: [ProcessorEvent.span], }, @@ -83,7 +83,7 @@ export async function getTopBackendSpans({ ...rangeQuery(start, end), ...environmentQuery(environment), ...kqlQuery(kuery), - ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, backendName), + ...termQuery(SPAN_DESTINATION_SERVICE_RESOURCE, dependencyName), ...termQuery(SPAN_NAME, spanName), ...((sampleRangeFrom ?? 0) >= 0 && (sampleRangeTo ?? 0) > 0 ? [ @@ -118,7 +118,7 @@ export async function getTopBackendSpans({ const transactionIds = compact(spans.map((span) => span.transaction?.id)); const transactions = ( - await apmEventClient.search('get_transactions_for_backend_spans', { + await apmEventClient.search('get_transactions_for_dependency_spans', { apm: { events: [ProcessorEvent.transaction], }, @@ -142,7 +142,7 @@ export async function getTopBackendSpans({ (transaction) => transaction.transaction.id ); - return spans.map((span): BackendSpan => { + return spans.map((span): DependencySpan => { const transaction = span.transaction ? transactionsById[span.transaction.id] : undefined; diff --git a/x-pack/plugins/apm/server/routes/backends/get_upstream_services_for_backend.ts b/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts similarity index 88% rename from x-pack/plugins/apm/server/routes/backends/get_upstream_services_for_backend.ts rename to x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts index c9ccb0ef476de..4d620619e2eb1 100644 --- a/x-pack/plugins/apm/server/routes/backends/get_upstream_services_for_backend.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts @@ -12,11 +12,11 @@ import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; import { Setup } from '../../lib/helpers/setup_request'; -export async function getUpstreamServicesForBackend({ +export async function getUpstreamServicesForDependency({ setup, start, end, - backendName, + dependencyName, numBuckets, kuery, environment, @@ -25,7 +25,7 @@ export async function getUpstreamServicesForBackend({ setup: Setup; start: number; end: number; - backendName: string; + dependencyName: string; numBuckets: number; kuery: string; environment: string; @@ -36,7 +36,7 @@ export async function getUpstreamServicesForBackend({ start, end, filter: [ - { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }, + { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName } }, ...environmentQuery(environment), ...kqlQuery(kuery), ], diff --git a/x-pack/plugins/apm/server/routes/backends/route.ts b/x-pack/plugins/apm/server/routes/dependencies/route.ts similarity index 73% rename from x-pack/plugins/apm/server/routes/backends/route.ts rename to x-pack/plugins/apm/server/routes/dependencies/route.ts index fe14bdf27af0a..22a8c44e0de5a 100644 --- a/x-pack/plugins/apm/server/routes/backends/route.ts +++ b/x-pack/plugins/apm/server/routes/dependencies/route.ts @@ -10,24 +10,27 @@ import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; import { setupRequest } from '../../lib/helpers/setup_request'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { getMetadataForBackend } from './get_metadata_for_backend'; -import { getLatencyChartsForBackend } from './get_latency_charts_for_backend'; -import { getTopBackends } from './get_top_backends'; -import { getUpstreamServicesForBackend } from './get_upstream_services_for_backend'; -import { getThroughputChartsForBackend } from './get_throughput_charts_for_backend'; -import { getErrorRateChartsForBackend } from './get_error_rate_charts_for_backend'; +import { getMetadataForDependency } from './get_metadata_for_dependency'; +import { getLatencyChartsForDependency } from './get_latency_charts_for_dependency'; +import { getTopDependencies } from './get_top_dependencies'; +import { getUpstreamServicesForDependency } from './get_upstream_services_for_dependency'; +import { getThroughputChartsForDependency } from './get_throughput_charts_for_dependency'; +import { getErrorRateChartsForDependency } from './get_error_rate_charts_for_dependency'; import { ConnectionStatsItemWithImpact } from '../../../common/connections'; import { offsetRt } from '../../../common/comparison_rt'; import { - BackendOperation, - getTopBackendOperations, -} from './get_top_backend_operations'; -import { getBackendLatencyDistribution } from './get_backend_latency_distribution'; + DependencyOperation, + getTopDependencyOperations, +} from './get_top_dependency_operations'; +import { getDependencyLatencyDistribution } from './get_dependency_latency_distribution'; import { OverallLatencyDistributionResponse } from '../latency_distribution/types'; -import { BackendSpan, getTopBackendSpans } from './get_top_backend_spans'; +import { + DependencySpan, + getTopDependencySpans, +} from './get_top_dependency_spans'; -const topBackendsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/top_backends', +const topDependenciesRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/top_dependencies', params: t.intersection([ t.type({ query: t.intersection([ @@ -47,7 +50,7 @@ const topBackendsRoute = createApmServerRoute({ handler: async ( resources ): Promise<{ - backends: Array<{ + dependencies: Array<{ currentStats: { latency: { value: number | null; @@ -103,17 +106,17 @@ const topBackendsRoute = createApmServerRoute({ const opts = { setup, start, end, numBuckets, environment, kuery }; - const [currentBackends, previousBackends] = await Promise.all([ - getTopBackends(opts), - offset ? getTopBackends({ ...opts, offset }) : Promise.resolve([]), + const [currentDependencies, previousDependencies] = await Promise.all([ + getTopDependencies(opts), + offset ? getTopDependencies({ ...opts, offset }) : Promise.resolve([]), ]); return { // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - backends: currentBackends.map((backend) => { - const { stats, ...rest } = backend; - const prev = previousBackends.find( - (item): boolean => item.location.id === backend.location.id + dependencies: currentDependencies.map((dependency) => { + const { stats, ...rest } = dependency; + const prev = previousDependencies.find( + (item): boolean => item.location.id === dependency.location.id ); return { ...rest, @@ -125,12 +128,12 @@ const topBackendsRoute = createApmServerRoute({ }, }); -const upstreamServicesForBackendRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/upstream_services', +const upstreamServicesForDependencyRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/upstream_services', params: t.intersection([ t.type({ query: t.intersection([ - t.type({ backendName: t.string }), + t.type({ dependencyName: t.string }), rangeRt, t.type({ numBuckets: toNumberRt }), ]), @@ -198,7 +201,7 @@ const upstreamServicesForBackendRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { query: { - backendName, + dependencyName, environment, offset, numBuckets, @@ -209,7 +212,7 @@ const upstreamServicesForBackendRoute = createApmServerRoute({ } = resources.params; const opts = { - backendName, + dependencyName, setup, start, end, @@ -219,9 +222,9 @@ const upstreamServicesForBackendRoute = createApmServerRoute({ }; const [currentServices, previousServices] = await Promise.all([ - getUpstreamServicesForBackend(opts), + getUpstreamServicesForDependency(opts), offset - ? getUpstreamServicesForBackend({ ...opts, offset }) + ? getUpstreamServicesForDependency({ ...opts, offset }) : Promise.resolve([]), ]); @@ -248,10 +251,10 @@ const upstreamServicesForBackendRoute = createApmServerRoute({ }, }); -const backendMetadataRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/metadata', +const dependencyMetadataRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/metadata', params: t.type({ - query: t.intersection([t.type({ backendName: t.string }), rangeRt]), + query: t.intersection([t.type({ dependencyName: t.string }), rangeRt]), }), options: { tags: ['access:apm'], @@ -264,10 +267,10 @@ const backendMetadataRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { params } = resources; - const { backendName, start, end } = params.query; + const { dependencyName, start, end } = params.query; - const metadata = await getMetadataForBackend({ - backendName, + const metadata = await getMetadataForDependency({ + dependencyName, setup, start, end, @@ -277,12 +280,12 @@ const backendMetadataRoute = createApmServerRoute({ }, }); -const backendLatencyChartsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/charts/latency', +const dependencyLatencyChartsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/charts/latency', params: t.type({ query: t.intersection([ t.type({ - backendName: t.string, + dependencyName: t.string, spanName: t.string, searchServiceDestinationMetrics: toBooleanRt, }), @@ -304,7 +307,7 @@ const backendLatencyChartsRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { params } = resources; const { - backendName, + dependencyName, searchServiceDestinationMetrics, spanName, kuery, @@ -315,8 +318,8 @@ const backendLatencyChartsRoute = createApmServerRoute({ } = params.query; const [currentTimeseries, comparisonTimeseries] = await Promise.all([ - getLatencyChartsForBackend({ - backendName, + getLatencyChartsForDependency({ + dependencyName, spanName, searchServiceDestinationMetrics, setup, @@ -326,8 +329,8 @@ const backendLatencyChartsRoute = createApmServerRoute({ environment, }), offset - ? getLatencyChartsForBackend({ - backendName, + ? getLatencyChartsForDependency({ + dependencyName, spanName, searchServiceDestinationMetrics, setup, @@ -344,12 +347,12 @@ const backendLatencyChartsRoute = createApmServerRoute({ }, }); -const backendThroughputChartsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/charts/throughput', +const dependencyThroughputChartsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/charts/throughput', params: t.type({ query: t.intersection([ t.type({ - backendName: t.string, + dependencyName: t.string, spanName: t.string, searchServiceDestinationMetrics: toBooleanRt, }), @@ -371,7 +374,7 @@ const backendThroughputChartsRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { params } = resources; const { - backendName, + dependencyName, searchServiceDestinationMetrics, spanName, kuery, @@ -382,8 +385,8 @@ const backendThroughputChartsRoute = createApmServerRoute({ } = params.query; const [currentTimeseries, comparisonTimeseries] = await Promise.all([ - getThroughputChartsForBackend({ - backendName, + getThroughputChartsForDependency({ + dependencyName, spanName, setup, start, @@ -393,8 +396,8 @@ const backendThroughputChartsRoute = createApmServerRoute({ searchServiceDestinationMetrics, }), offset - ? getThroughputChartsForBackend({ - backendName, + ? getThroughputChartsForDependency({ + dependencyName, spanName, setup, start, @@ -411,12 +414,12 @@ const backendThroughputChartsRoute = createApmServerRoute({ }, }); -const backendFailedTransactionRateChartsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/charts/error_rate', +const dependencyFailedTransactionRateChartsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/charts/error_rate', params: t.type({ query: t.intersection([ t.type({ - backendName: t.string, + dependencyName: t.string, spanName: t.string, searchServiceDestinationMetrics: toBooleanRt, }), @@ -438,7 +441,7 @@ const backendFailedTransactionRateChartsRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { params } = resources; const { - backendName, + dependencyName, spanName, searchServiceDestinationMetrics, kuery, @@ -449,8 +452,8 @@ const backendFailedTransactionRateChartsRoute = createApmServerRoute({ } = params.query; const [currentTimeseries, comparisonTimeseries] = await Promise.all([ - getErrorRateChartsForBackend({ - backendName, + getErrorRateChartsForDependency({ + dependencyName, spanName, setup, start, @@ -460,8 +463,8 @@ const backendFailedTransactionRateChartsRoute = createApmServerRoute({ searchServiceDestinationMetrics, }), offset - ? getErrorRateChartsForBackend({ - backendName, + ? getErrorRateChartsForDependency({ + dependencyName, spanName, setup, start, @@ -478,8 +481,8 @@ const backendFailedTransactionRateChartsRoute = createApmServerRoute({ }, }); -const backendOperationsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/operations', +const dependencyOperationsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/operations', options: { tags: ['access:apm'], }, @@ -489,19 +492,21 @@ const backendOperationsRoute = createApmServerRoute({ environmentRt, kueryRt, offsetRt, - t.type({ backendName: t.string }), + t.type({ dependencyName: t.string }), ]), }), - handler: async (resources): Promise<{ operations: BackendOperation[] }> => { + handler: async ( + resources + ): Promise<{ operations: DependencyOperation[] }> => { const setup = await setupRequest(resources); const { - query: { backendName, start, end, environment, kuery, offset }, + query: { dependencyName, start, end, environment, kuery, offset }, } = resources.params; - const operations = await getTopBackendOperations({ + const operations = await getTopDependencyOperations({ setup, - backendName, + dependencyName, start, end, offset, @@ -513,12 +518,12 @@ const backendOperationsRoute = createApmServerRoute({ }, }); -const backendLatencyDistributionChartsRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/charts/distribution', +const dependencyLatencyDistributionChartsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/charts/distribution', params: t.type({ query: t.intersection([ t.type({ - backendName: t.string, + dependencyName: t.string, spanName: t.string, percentileThreshold: toNumberRt, }), @@ -539,7 +544,7 @@ const backendLatencyDistributionChartsRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { params } = resources; const { - backendName, + dependencyName, spanName, percentileThreshold, kuery, @@ -548,9 +553,9 @@ const backendLatencyDistributionChartsRoute = createApmServerRoute({ end, } = params.query; - return getBackendLatencyDistribution({ + return getDependencyLatencyDistribution({ setup, - backendName, + dependencyName, spanName, percentileThreshold, kuery, @@ -561,8 +566,8 @@ const backendLatencyDistributionChartsRoute = createApmServerRoute({ }, }); -const topBackendSpansRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/backends/operations/spans', +const topDependencySpansRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/dependencies/operations/spans', options: { tags: ['access:apm'], }, @@ -571,16 +576,16 @@ const topBackendSpansRoute = createApmServerRoute({ rangeRt, environmentRt, kueryRt, - t.type({ backendName: t.string, spanName: t.string }), + t.type({ dependencyName: t.string, spanName: t.string }), t.partial({ sampleRangeFrom: toNumberRt, sampleRangeTo: toNumberRt }), ]), }), - handler: async (resources): Promise<{ spans: BackendSpan[] }> => { + handler: async (resources): Promise<{ spans: DependencySpan[] }> => { const setup = await setupRequest(resources); const { query: { - backendName, + dependencyName, spanName, start, end, @@ -591,9 +596,9 @@ const topBackendSpansRoute = createApmServerRoute({ }, } = resources.params; - const spans = await getTopBackendSpans({ + const spans = await getTopDependencySpans({ setup, - backendName, + dependencyName, spanName, start, end, @@ -607,14 +612,14 @@ const topBackendSpansRoute = createApmServerRoute({ }, }); -export const backendsRouteRepository = { - ...topBackendsRoute, - ...upstreamServicesForBackendRoute, - ...backendMetadataRoute, - ...backendLatencyChartsRoute, - ...backendThroughputChartsRoute, - ...backendFailedTransactionRateChartsRoute, - ...backendOperationsRoute, - ...backendLatencyDistributionChartsRoute, - ...topBackendSpansRoute, +export const dependencisRouteRepository = { + ...topDependenciesRoute, + ...upstreamServicesForDependencyRoute, + ...dependencyMetadataRoute, + ...dependencyLatencyChartsRoute, + ...dependencyThroughputChartsRoute, + ...dependencyFailedTransactionRateChartsRoute, + ...dependencyOperationsRoute, + ...dependencyLatencyDistributionChartsRoute, + ...topDependencySpansRoute, }; diff --git a/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts b/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts new file mode 100644 index 0000000000000..6017ad75c1230 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts @@ -0,0 +1,196 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + rangeQuery, + kqlQuery, + termQuery, +} from '@kbn/observability-plugin/server'; +import { keyBy } from 'lodash'; +import { + ERROR_GROUP_ID, + SERVICE_NAME, + TRANSACTION_NAME, + TRANSACTION_TYPE, +} from '../../../../common/elasticsearch_fieldnames'; +import { ProcessorEvent } from '../../../../common/processor_event'; +import { environmentQuery } from '../../../../common/utils/environment_query'; +import { Setup } from '../../../lib/helpers/setup_request'; +import { getBucketSize } from '../../../lib/helpers/get_bucket_size'; +import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; + +async function getTopErroneousTransactions({ + environment, + kuery, + serviceName, + groupId, + setup, + start, + end, + numBuckets, + offset, +}: { + environment: string; + kuery: string; + serviceName: string; + groupId: string; + setup: Setup; + start: number; + end: number; + numBuckets: number; + offset?: string; +}) { + const { apmEventClient } = setup; + + const { startWithOffset, endWithOffset, offsetInMs } = getOffsetInMs({ + start, + end, + offset, + }); + + const { intervalString } = getBucketSize({ + start: startWithOffset, + end: endWithOffset, + numBuckets, + }); + + const res = await apmEventClient.search('get_top_erroneous_transactions', { + apm: { + events: [ProcessorEvent.error], + }, + body: { + size: 0, + query: { + bool: { + filter: [ + ...termQuery(SERVICE_NAME, serviceName), + ...termQuery(ERROR_GROUP_ID, groupId), + ...rangeQuery(startWithOffset, endWithOffset), + ...environmentQuery(environment), + ...kqlQuery(kuery), + ], + }, + }, + aggs: { + top_five_transactions: { + terms: { + field: TRANSACTION_NAME, + size: 5, + }, + aggs: { + sample: { + top_hits: { + size: 1, + _source: [TRANSACTION_TYPE], + }, + }, + timeseries: { + date_histogram: { + field: '@timestamp', + fixed_interval: intervalString, + extended_bounds: { + min: startWithOffset, + max: endWithOffset, + }, + }, + }, + }, + }, + }, + }, + }); + + return ( + res.aggregations?.top_five_transactions.buckets.map( + ({ key, doc_count: docCount, sample, timeseries }) => ({ + transactionName: key as string, + transactionType: sample.hits.hits[0]._source.transaction?.type, + occurrences: docCount, + timeseries: timeseries.buckets.map((timeseriesBucket) => { + return { + x: timeseriesBucket.key + offsetInMs, + y: timeseriesBucket.doc_count, + }; + }), + }) + ) ?? [] + ); +} + +export async function getTopErroneousTransactionsPeriods({ + kuery, + serviceName, + setup, + numBuckets, + groupId, + environment, + start, + end, + offset, +}: { + kuery: string; + serviceName: string; + setup: Setup; + numBuckets: number; + groupId: string; + environment: string; + start: number; + end: number; + offset?: string; +}) { + const [currentPeriod, previousPeriod] = await Promise.all([ + getTopErroneousTransactions({ + environment, + kuery, + serviceName, + setup, + numBuckets, + groupId, + start, + end, + }), + offset + ? getTopErroneousTransactions({ + environment, + kuery, + serviceName, + setup, + numBuckets, + groupId, + start, + end, + offset, + }) + : [], + ]); + + const previousPeriodByTransactionName = keyBy( + previousPeriod, + 'transactionName' + ); + + return { + topErroneousTransactions: currentPeriod.map( + ({ transactionName, timeseries: currentPeriodTimeseries, ...rest }) => { + return { + ...rest, + transactionName, + currentPeriodTimeseries, + previousPeriodTimeseries: + previousPeriodByTransactionName[transactionName]?.timeseries ?? [], + }; + } + ), + }; +} diff --git a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts index 12d78e529fd74..99fcf1a6c3f8a 100644 --- a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts @@ -5,7 +5,12 @@ * 2.0. */ import { keyBy } from 'lodash'; -import { rangeQuery, kqlQuery } from '@kbn/observability-plugin/server'; +import { + rangeQuery, + kqlQuery, + termQuery, + termsQuery, +} from '@kbn/observability-plugin/server'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; import { Coordinate } from '../../../../typings/timeseries'; import { @@ -64,8 +69,8 @@ export async function getErrorGroupDetailedStatistics({ query: { bool: { filter: [ - { terms: { [ERROR_GROUP_ID]: groupIds } }, - { term: { [SERVICE_NAME]: serviceName } }, + ...termsQuery(ERROR_GROUP_ID, ...groupIds), + ...termQuery(SERVICE_NAME, serviceName), ...rangeQuery(startWithOffset, endWithOffset), ...environmentQuery(environment), ...kqlQuery(kuery), diff --git a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts index 4dce3280ec39c..0b6fea5c4c6a4 100644 --- a/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts +++ b/x-pack/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts @@ -6,7 +6,11 @@ */ import { AggregationsTermsAggregationOrder } from '@elastic/elasticsearch/lib/api/types'; -import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; +import { + kqlQuery, + rangeQuery, + termQuery, +} from '@kbn/observability-plugin/server'; import { ERROR_CULPRIT, ERROR_EXC_HANDLED, @@ -15,6 +19,8 @@ import { ERROR_GROUP_ID, ERROR_LOG_MESSAGE, SERVICE_NAME, + TRANSACTION_NAME, + TRANSACTION_TYPE, } from '../../../../common/elasticsearch_fieldnames'; import { ProcessorEvent } from '../../../../common/processor_event'; import { environmentQuery } from '../../../../common/utils/environment_query'; @@ -30,6 +36,9 @@ export async function getErrorGroupMainStatistics({ sortDirection = 'desc', start, end, + maxNumberOfErrorGroups = 500, + transactionName, + transactionType, }: { kuery: string; serviceName: string; @@ -39,6 +48,9 @@ export async function getErrorGroupMainStatistics({ sortDirection?: 'asc' | 'desc'; start: number; end: number; + maxNumberOfErrorGroups?: number; + transactionName?: string; + transactionType?: string; }) { const { apmEventClient } = setup; @@ -62,7 +74,9 @@ export async function getErrorGroupMainStatistics({ query: { bool: { filter: [ - { term: { [SERVICE_NAME]: serviceName } }, + ...termQuery(SERVICE_NAME, serviceName), + ...termQuery(TRANSACTION_NAME, transactionName), + ...termQuery(TRANSACTION_TYPE, transactionType), ...rangeQuery(start, end), ...environmentQuery(environment), ...kqlQuery(kuery), @@ -73,7 +87,7 @@ export async function getErrorGroupMainStatistics({ error_groups: { terms: { field: ERROR_GROUP_ID, - size: 500, + size: maxNumberOfErrorGroups, order, }, aggs: { diff --git a/x-pack/plugins/apm/server/routes/errors/route.ts b/x-pack/plugins/apm/server/routes/errors/route.ts index f49ab9aaca8e0..17faea2765daa 100644 --- a/x-pack/plugins/apm/server/routes/errors/route.ts +++ b/x-pack/plugins/apm/server/routes/errors/route.ts @@ -15,6 +15,7 @@ import { getErrorGroupMainStatistics } from './get_error_groups/get_error_group_ import { getErrorGroupPeriods } from './get_error_groups/get_error_group_detailed_statistics'; import { getErrorGroupSample } from './get_error_groups/get_error_group_sample'; import { offsetRt } from '../../../common/comparison_rt'; +import { getTopErroneousTransactionsPeriods } from './erroneous_transactions/get_top_erroneous_transactions'; const errorsMainStatisticsRoute = createApmServerRoute({ endpoint: @@ -68,6 +69,67 @@ const errorsMainStatisticsRoute = createApmServerRoute({ }, }); +const errorsMainStatisticsByTransactionNameRoute = createApmServerRoute({ + endpoint: + 'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name', + params: t.type({ + path: t.type({ + serviceName: t.string, + }), + query: t.intersection([ + t.type({ + transactionType: t.string, + transactionName: t.string, + maxNumberOfErrorGroups: toNumberRt, + }), + environmentRt, + kueryRt, + rangeRt, + ]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise<{ + errorGroups: Array<{ + groupId: string; + name: string; + lastSeen: number; + occurrences: number; + culprit: string | undefined; + handled: boolean | undefined; + type: string | undefined; + }>; + }> => { + const { params } = resources; + const setup = await setupRequest(resources); + const { serviceName } = params.path; + const { + environment, + kuery, + start, + end, + transactionName, + transactionType, + maxNumberOfErrorGroups, + } = params.query; + + const errorGroups = await getErrorGroupMainStatistics({ + environment, + kuery, + serviceName, + setup, + start, + end, + maxNumberOfErrorGroups, + transactionName, + transactionType, + }); + + return { errorGroups }; + }, +}); + const errorsDetailedStatisticsRoute = createApmServerRoute({ endpoint: 'POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics', @@ -205,9 +267,63 @@ const errorDistributionRoute = createApmServerRoute({ }, }); +const topErroneousTransactionsRoute = createApmServerRoute({ + endpoint: + 'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions', + params: t.type({ + path: t.type({ + serviceName: t.string, + groupId: t.string, + }), + query: t.intersection([ + environmentRt, + kueryRt, + rangeRt, + offsetRt, + t.type({ + numBuckets: toNumberRt, + }), + ]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise<{ + topErroneousTransactions: Array<{ + transactionName: string; + currentPeriodTimeseries: Array<{ x: number; y: number }>; + previousPeriodTimeseries: Array<{ x: number; y: number }>; + transactionType: string | undefined; + occurrences: number; + }>; + }> => { + const { params } = resources; + const setup = await setupRequest(resources); + + const { + path: { serviceName, groupId }, + query: { environment, kuery, numBuckets, start, end, offset }, + } = params; + + return await getTopErroneousTransactionsPeriods({ + environment, + groupId, + kuery, + serviceName, + setup, + start, + end, + numBuckets, + offset, + }); + }, +}); + export const errorsRouteRepository = { ...errorsMainStatisticsRoute, + ...errorsMainStatisticsByTransactionNameRoute, ...errorsDetailedStatisticsRoute, ...errorGroupsRoute, ...errorDistributionRoute, + ...topErroneousTransactionsRoute, }; diff --git a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts index 78b066a538699..9a54b03e72b62 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts @@ -14,18 +14,19 @@ import { } from '../../../common/elasticsearch_fieldnames'; import { ProcessorEvent } from '../../../common/processor_event'; import { Setup } from '../../lib/helpers/setup_request'; -import { MAX_NUMBER_OF_SERVICE_GROUPS } from '../../../common/service_groups'; export async function lookupServices({ setup, kuery, start, end, + maxNumberOfServices, }: { setup: Setup; kuery: string; start: number; end: number; + maxNumberOfServices: number; }) { const { apmEventClient } = setup; @@ -49,7 +50,7 @@ export async function lookupServices({ services: { terms: { field: SERVICE_NAME, - size: MAX_NUMBER_OF_SERVICE_GROUPS, + size: maxNumberOfServices, }, aggs: { environments: { diff --git a/x-pack/plugins/apm/server/routes/service_groups/route.ts b/x-pack/plugins/apm/server/routes/service_groups/route.ts index 160aea5abfe70..f1718f15cb0e0 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/route.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/route.ts @@ -6,6 +6,7 @@ */ import * as t from 'io-ts'; +import { apmServiceGroupMaxNumberOfServices } from '@kbn/observability-plugin/common'; import { setupRequest } from '../../lib/helpers/setup_request'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { kueryRt, rangeRt } from '../default_api_types'; @@ -28,8 +29,12 @@ const serviceGroupsRoute = createApmServerRoute({ resources ): Promise<{ serviceGroups: SavedServiceGroup[] }> => { const { context } = resources; - const savedObjectsClient = (await context.core).savedObjects.client; - const serviceGroups = await getServiceGroups({ savedObjectsClient }); + const { + savedObjects: { client: savedObjectsClient }, + } = await context.core; + const serviceGroups = await getServiceGroups({ + savedObjectsClient, + }); return { serviceGroups }; }, }); @@ -46,7 +51,9 @@ const serviceGroupRoute = createApmServerRoute({ }, handler: async (resources): Promise<{ serviceGroup: SavedServiceGroup }> => { const { context, params } = resources; - const savedObjectsClient = (await context.core).savedObjects.client; + const { + savedObjects: { client: savedObjectsClient }, + } = await context.core; const serviceGroup = await getServiceGroup({ savedObjectsClient, serviceGroupId: params.query.serviceGroup, @@ -75,13 +82,21 @@ const serviceGroupSaveRoute = createApmServerRoute({ handler: async (resources): Promise<void> => { const { context, params } = resources; const { start, end, serviceGroupId } = params.query; - const savedObjectsClient = (await context.core).savedObjects.client; - const setup = await setupRequest(resources); + const { + savedObjects: { client: savedObjectsClient }, + uiSettings: { client: uiSettingsClient }, + } = await context.core; + const [setup, maxNumberOfServices] = await Promise.all([ + setupRequest(resources), + uiSettingsClient.get<number>(apmServiceGroupMaxNumberOfServices), + ]); + const items = await lookupServices({ setup, kuery: params.body.kuery, start, end, + maxNumberOfServices, }); const serviceNames = items.map(({ serviceName }): string => serviceName); const serviceGroup: ServiceGroup = { @@ -126,14 +141,21 @@ const serviceGroupServicesRoute = createApmServerRoute({ handler: async ( resources ): Promise<{ items: Awaited<ReturnType<typeof lookupServices>> }> => { - const { params } = resources; + const { params, context } = resources; const { kuery = '', start, end } = params.query; - const setup = await setupRequest(resources); + const { + uiSettings: { client: uiSettingsClient }, + } = await context.core; + const [setup, maxNumberOfServices] = await Promise.all([ + setupRequest(resources), + uiSettingsClient.get<number>(apmServiceGroupMaxNumberOfServices), + ]); const items = await lookupServices({ setup, kuery, start, end, + maxNumberOfServices, }); return { items }; }, diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts index bb04a7f5ce689..c4ab0f12c8e69 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map.ts @@ -90,10 +90,17 @@ async function getConnectionData({ }); } -async function getServicesData(options: IEnvOptions) { - const { environment, setup, searchAggregatedTransactions, start, end } = - options; - +async function getServicesData( + options: IEnvOptions & { maxNumberOfServices: number } +) { + const { + environment, + setup, + searchAggregatedTransactions, + start, + end, + maxNumberOfServices, + } = options; const params = { apm: { events: [ @@ -117,7 +124,7 @@ async function getServicesData(options: IEnvOptions) { services: { terms: { field: SERVICE_NAME, - size: 500, + size: maxNumberOfServices, }, aggs: { agent_name: { @@ -156,7 +163,9 @@ async function getServicesData(options: IEnvOptions) { export type ConnectionsResponse = Awaited<ReturnType<typeof getConnectionData>>; export type ServicesResponse = Awaited<ReturnType<typeof getServicesData>>; -export function getServiceMap(options: IEnvOptions) { +export function getServiceMap( + options: IEnvOptions & { maxNumberOfServices: number } +) { return withApmSpan('get_service_map', async () => { const { logger } = options; const anomaliesPromise = getServiceAnomalies( diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts similarity index 93% rename from x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts rename to x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts index 76bccabc803ed..a757203b1c87b 100644 --- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts +++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts @@ -26,21 +26,21 @@ import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; interface Options { setup: Setup; environment: string; - backendName: string; + dependencyName: string; start: number; end: number; offset?: string; } -export function getServiceMapBackendNodeInfo({ +export function getServiceMapDependencyNodeInfo({ environment, - backendName, + dependencyName, setup, start, end, offset, }: Options): Promise<NodeStats> { - return withApmSpan('get_service_map_backend_node_stats', async () => { + return withApmSpan('get_service_map_dependency_node_stats', async () => { const { apmEventClient } = setup; const { offsetInMs, startWithOffset, endWithOffset } = getOffsetInMs({ start, @@ -67,7 +67,7 @@ export function getServiceMapBackendNodeInfo({ }; const response = await apmEventClient.search( - 'get_service_map_backend_node_stats', + 'get_service_map_dependency_node_stats', { apm: { events: [ProcessorEvent.metric], @@ -77,7 +77,9 @@ export function getServiceMapBackendNodeInfo({ query: { bool: { filter: [ - { term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: backendName } }, + { + term: { [SPAN_DESTINATION_SERVICE_RESOURCE]: dependencyName }, + }, ...rangeQuery(startWithOffset, endWithOffset), ...environmentQuery(environment), ], diff --git a/x-pack/plugins/apm/server/routes/service_map/route.ts b/x-pack/plugins/apm/server/routes/service_map/route.ts index e25dfb5bfa450..6dd1a85d2bd13 100644 --- a/x-pack/plugins/apm/server/routes/service_map/route.ts +++ b/x-pack/plugins/apm/server/routes/service_map/route.ts @@ -7,13 +7,14 @@ import Boom from '@hapi/boom'; import * as t from 'io-ts'; +import { apmServiceGroupMaxNumberOfServices } from '@kbn/observability-plugin/common'; import { isActivePlatinumLicense } from '../../../common/license_check'; import { invalidLicenseMessage } from '../../../common/service_map'; import { notifyFeatureUsage } from '../../feature'; import { getSearchAggregatedTransactions } from '../../lib/helpers/transactions'; import { setupRequest } from '../../lib/helpers/setup_request'; import { getServiceMap } from './get_service_map'; -import { getServiceMapBackendNodeInfo } from './get_service_map_backend_node_info'; +import { getServiceMapDependencyNodeInfo } from './get_service_map_dependency_node_info'; import { getServiceMapServiceNodeInfo } from './get_service_map_service_node_info'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, rangeRt } from '../default_api_types'; @@ -109,8 +110,11 @@ const serviceMapRoute = createApmServerRoute({ }, } = params; - const savedObjectsClient = (await context.core).savedObjects.client; - const [setup, serviceGroup] = await Promise.all([ + const { + savedObjects: { client: savedObjectsClient }, + uiSettings: { client: uiSettingsClient }, + } = await context.core; + const [setup, serviceGroup, maxNumberOfServices] = await Promise.all([ setupRequest(resources), serviceGroupId ? getServiceGroup({ @@ -118,6 +122,7 @@ const serviceMapRoute = createApmServerRoute({ serviceGroupId, }) : Promise.resolve(null), + uiSettingsClient.get<number>(apmServiceGroupMaxNumberOfServices), ]); const serviceNames = [ @@ -140,6 +145,7 @@ const serviceMapRoute = createApmServerRoute({ logger, start, end, + maxNumberOfServices, }); }, }); @@ -206,11 +212,11 @@ const serviceMapServiceNodeRoute = createApmServerRoute({ }, }); -const serviceMapBackendNodeRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/service-map/backend', +const serviceMapDependencyNodeRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/service-map/dependency', params: t.type({ query: t.intersection([ - t.type({ backendName: t.string }), + t.type({ dependencyName: t.string }), environmentRt, rangeRt, offsetRt, @@ -237,15 +243,15 @@ const serviceMapBackendNodeRoute = createApmServerRoute({ const setup = await setupRequest(resources); const { - query: { backendName, environment, start, end, offset }, + query: { dependencyName, environment, start, end, offset }, } = params; - const commonProps = { environment, setup, backendName, start, end }; + const commonProps = { environment, setup, dependencyName, start, end }; const [currentPeriod, previousPeriod] = await Promise.all([ - getServiceMapBackendNodeInfo(commonProps), + getServiceMapDependencyNodeInfo(commonProps), offset - ? getServiceMapBackendNodeInfo({ ...commonProps, offset }) + ? getServiceMapDependencyNodeInfo({ ...commonProps, offset }) : undefined, ]); @@ -256,5 +262,5 @@ const serviceMapBackendNodeRoute = createApmServerRoute({ export const serviceMapRouteRepository = { ...serviceMapRoute, ...serviceMapServiceNodeRoute, - ...serviceMapBackendNodeRoute, + ...serviceMapDependencyNodeRoute, }; diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts index 4fd1974687c0b..c500782f4d002 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts @@ -22,6 +22,7 @@ export async function getSortedAndFilteredServices({ environment, logger, serviceGroup, + maxNumberOfServices, }: { setup: Setup; start: number; @@ -29,6 +30,7 @@ export async function getSortedAndFilteredServices({ environment: Environment; logger: Logger; serviceGroup: ServiceGroup | null; + maxNumberOfServices: number; }) { const { apmEventClient } = setup; @@ -48,7 +50,7 @@ export async function getSortedAndFilteredServices({ ], }, body: { - size: 500, + size: maxNumberOfServices, field: SERVICE_NAME, }, } diff --git a/x-pack/plugins/apm/server/routes/services/route.ts b/x-pack/plugins/apm/server/routes/services/route.ts index ce9184d8397f5..52ba901fd62c5 100644 --- a/x-pack/plugins/apm/server/routes/services/route.ts +++ b/x-pack/plugins/apm/server/routes/services/route.ts @@ -16,6 +16,7 @@ import { } from '@kbn/ml-plugin/server'; import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; import { Annotation } from '@kbn/observability-plugin/common/annotations'; +import { apmServiceGroupMaxNumberOfServices } from '@kbn/observability-plugin/common'; import { latencyAggregationTypeRt } from '../../../common/latency_aggregation_types'; import { ProfilingValueType } from '../../../common/profiling'; import { getSearchAggregatedTransactions } from '../../lib/helpers/transactions'; @@ -1220,14 +1221,17 @@ const sortedAndFilteredServicesRoute = createApmServerRoute({ }; } - const savedObjectsClient = (await resources.context.core).savedObjects - .client; + const { + savedObjects: { client: savedObjectsClient }, + uiSettings: { client: uiSettingsClient }, + } = await resources.context.core; - const [setup, serviceGroup] = await Promise.all([ + const [setup, serviceGroup, maxNumberOfServices] = await Promise.all([ setupRequest(resources), serviceGroupId ? getServiceGroup({ savedObjectsClient, serviceGroupId }) : Promise.resolve(null), + uiSettingsClient.get<number>(apmServiceGroupMaxNumberOfServices), ]); return { services: await getSortedAndFilteredServices({ @@ -1237,6 +1241,7 @@ const sortedAndFilteredServicesRoute = createApmServerRoute({ environment, logger: resources.logger, serviceGroup, + maxNumberOfServices, }), }; }, diff --git a/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts b/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts index 6376d047baf39..2e29ba07d327f 100644 --- a/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts +++ b/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts @@ -15,7 +15,8 @@ export type ElasticAgentName = | 'python' | 'dotnet' | 'ruby' - | 'php'; + | 'php' + | 'android/java'; export type OpenTelemetryAgentName = | 'otlp' diff --git a/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts b/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts index c8db59efb780c..e4eb4f2842008 100644 --- a/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts +++ b/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts @@ -6,7 +6,8 @@ */ import { getTemplateStrings } from './template_strings'; -import { loadTemplates } from '../../server/templates'; // eslint-disable-line +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { loadTemplates } from '../../server/templates'; import { TagStrings } from '../tags'; diff --git a/x-pack/plugins/canvas/public/components/element_content/element_content.tsx b/x-pack/plugins/canvas/public/components/element_content/element_content.tsx index 0a9e935aa2320..147c7c05ecf12 100644 --- a/x-pack/plugins/canvas/public/components/element_content/element_content.tsx +++ b/x-pack/plugins/canvas/public/components/element_content/element_content.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { omitBy, isNil } from 'lodash'; -// @ts-expect-error Untyped library -import Style from 'style-it'; +import { css } from '@emotion/react'; import { ExpressionRenderer } from '@kbn/expressions-plugin'; import { getType } from '@kbn/interpreter'; @@ -56,9 +55,9 @@ export const ElementContent = (props: Props) => { const containerStyle = omitBy(renderable.containerStyle, isNil); - return Style.it( - renderable.css, + return ( <div + css={css(renderable.css)} // TODO: 'canvas__element' was added for BWC, It can be removed after a while className={'canvas__element canvasElement'} style={{ ...containerStyle, width, height }} @@ -74,7 +73,6 @@ export const ElementContent = (props: Props) => { renderFn={renderFunction.render} reuseNode={renderFunction.reuseDomNode} config={renderable.value} - css={renderable.css} // This is an actual CSS stylesheet string, it will be scoped by RenderElement width={width} height={height} handlers={handlers} diff --git a/x-pack/plugins/canvas/public/components/export_app/export_app.component.tsx b/x-pack/plugins/canvas/public/components/export_app/export_app.component.tsx index c3facb9268961..5b70d5703b50e 100644 --- a/x-pack/plugins/canvas/public/components/export_app/export_app.component.tsx +++ b/x-pack/plugins/canvas/public/components/export_app/export_app.component.tsx @@ -7,8 +7,7 @@ import React, { FC, useEffect } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error untyped library -import Style from 'style-it'; +import { css } from '@emotion/react'; // @ts-expect-error untyped local import { WorkpadPage } from '../workpad_page'; import { RoutingLink } from '../routing'; @@ -33,9 +32,12 @@ export const ExportApp: FC<Props> = ({ workpad, selectedPageIndex, initializeWor <div className="canvasLayout__stageHeader"> <RoutingLink to={`/workpad/${id}`}>Edit Workpad</RoutingLink> </div> - {Style.it( - workpad.css, - <div className="canvasExport__stageContent" data-shared-items-count={pageElementCount}> + { + <div + css={css(workpad.css)} + className="canvasExport__stageContent" + data-shared-items-count={pageElementCount} + > <WorkpadPage isSelected key={activePage.id} @@ -46,7 +48,7 @@ export const ExportApp: FC<Props> = ({ workpad, selectedPageIndex, initializeWor unregisterLayout={() => {}} /> </div> - )} + } </div> </div> ); diff --git a/x-pack/plugins/canvas/public/components/export_app/export_app.test.tsx b/x-pack/plugins/canvas/public/components/export_app/export_app.test.tsx index 8d9ea9e8b4185..c4b4db35c2d31 100644 --- a/x-pack/plugins/canvas/public/components/export_app/export_app.test.tsx +++ b/x-pack/plugins/canvas/public/components/export_app/export_app.test.tsx @@ -10,10 +10,6 @@ import { mount } from 'enzyme'; import { ExportApp } from './export_app.component'; import { CanvasWorkpad } from '../../../types'; -jest.mock('style-it', () => ({ - it: (css: string, Component: any) => Component, -})); - jest.mock('../workpad_page', () => ({ WorkpadPage: (props: any) => <div>Page</div>, })); diff --git a/x-pack/plugins/canvas/public/components/page_manager/page_manager.component.tsx b/x-pack/plugins/canvas/public/components/page_manager/page_manager.component.tsx index 7743d508842ad..3522edf9d176c 100644 --- a/x-pack/plugins/canvas/public/components/page_manager/page_manager.component.tsx +++ b/x-pack/plugins/canvas/public/components/page_manager/page_manager.component.tsx @@ -20,8 +20,6 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -// @ts-expect-error untyped dependency -import Style from 'style-it'; import { ConfirmModal } from '../confirm_modal'; import { RoutingLink } from '../routing'; import { WorkpadRoutingContext } from '../../routes/workpad'; @@ -178,7 +176,7 @@ export class PageManager extends Component<Props, State> { }; renderPage = (page: CanvasPage, i: number) => { - const { isWriteable, selectedPage, workpadCSS } = this.props; + const { isWriteable, selectedPage } = this.props; const pageNumber = i + 1; return ( @@ -201,12 +199,9 @@ export class PageManager extends Component<Props, State> { <WorkpadRoutingContext.Consumer> {({ getUrl }) => ( <RoutingLink to={getUrl(pageNumber)}> - {Style.it( - workpadCSS, - <div> - <PagePreview height={100} page={page} onRemove={this.onConfirmRemove} /> - </div> - )} + <div> + <PagePreview height={100} page={page} onRemove={this.onConfirmRemove} /> + </div> </RoutingLink> )} </WorkpadRoutingContext.Consumer> diff --git a/x-pack/plugins/canvas/public/components/workpad/workpad.component.tsx b/x-pack/plugins/canvas/public/components/workpad/workpad.component.tsx index 740f71eab085a..0d403ec960c80 100644 --- a/x-pack/plugins/canvas/public/components/workpad/workpad.component.tsx +++ b/x-pack/plugins/canvas/public/components/workpad/workpad.component.tsx @@ -6,8 +6,7 @@ */ import React, { FC } from 'react'; -// @ts-expect-error -import Style from 'style-it'; +import { css } from '@emotion/react'; // @ts-expect-error import { WorkpadPage } from '../workpad_page'; import { Fullscreen } from '../fullscreen'; @@ -125,9 +124,9 @@ export const Workpad: FC<Props> = ({ : {}; // NOTE: the data-shared-* attributes here are used for reporting - return Style.it( - workpadCss || DEFAULT_WORKPAD_CSS, + return ( <div + css={css(workpadCss || DEFAULT_WORKPAD_CSS)} className={`canvasWorkpad ${isFullscreenProp ? 'fullscreen' : ''}`} style={fsStyle} data-shared-items-count={totalElementCount} diff --git a/x-pack/plugins/canvas/public/components/workpad_header/editor_menu/editor_menu.tsx b/x-pack/plugins/canvas/public/components/workpad_header/editor_menu/editor_menu.tsx index 8c10efe1b10d9..ed34b2818b531 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/editor_menu/editor_menu.tsx +++ b/x-pack/plugins/canvas/public/components/workpad_header/editor_menu/editor_menu.tsx @@ -5,10 +5,14 @@ * 2.0. */ -import React, { FC, useCallback } from 'react'; +import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation } from 'react-router-dom'; import { BaseVisType, VisGroups, VisTypeAlias } from '@kbn/visualizations-plugin/public'; -import { EmbeddableFactoryDefinition, EmbeddableInput } from '@kbn/embeddable-plugin/public'; +import { + EmbeddableFactory, + EmbeddableFactoryDefinition, + EmbeddableInput, +} from '@kbn/embeddable-plugin/public'; import { trackCanvasUiMetric, METRIC_TYPE } from '../../../lib/ui_metric'; import { useEmbeddablesService, @@ -27,6 +31,11 @@ interface Props { addElement: (element: Partial<ElementSpec>) => void; } +interface UnwrappedEmbeddableFactory { + factory: EmbeddableFactory; + isEditable: boolean; +} + export const EditorMenu: FC<Props> = ({ addElement }) => { const embeddablesService = useEmbeddablesService(); const { pathname, search, hash } = useLocation(); @@ -35,6 +44,26 @@ export const EditorMenu: FC<Props> = ({ addElement }) => { const visualizationsService = useVisualizationsService(); const IS_DARK_THEME = platformService.getUISetting('theme:darkMode'); + const embeddableFactories = useMemo( + () => (embeddablesService ? Array.from(embeddablesService.getEmbeddableFactories()) : []), + [embeddablesService] + ); + + const [unwrappedEmbeddableFactories, setUnwrappedEmbeddableFactories] = useState< + UnwrappedEmbeddableFactory[] + >([]); + + useEffect(() => { + Promise.all( + embeddableFactories.map<Promise<UnwrappedEmbeddableFactory>>(async (factory) => ({ + factory, + isEditable: await factory.isEditable(), + })) + ).then((factories) => { + setUnwrappedEmbeddableFactories(factories); + }); + }, [embeddableFactories]); + const createNewVisType = useCallback( (visType?: BaseVisType | VisTypeAlias) => () => { let path = ''; @@ -113,18 +142,17 @@ export const EditorMenu: FC<Props> = ({ addElement }) => { a === b ? 0 : a ? -1 : 1 ); - const factories = embeddablesService - ? Array.from(embeddablesService.getEmbeddableFactories()).filter( - ({ type, isEditable, canCreateNew, isContainerType }) => - // @ts-expect-error ts 4.5 upgrade - isEditable() && - !isContainerType && - canCreateNew() && - !['visualization', 'ml'].some((factoryType) => { - return type.includes(factoryType); - }) - ) - : []; + const factories = unwrappedEmbeddableFactories + .filter( + ({ isEditable, factory: { type, canCreateNew, isContainerType } }) => + isEditable && + !isContainerType && + canCreateNew() && + !['visualization', 'ml'].some((factoryType) => { + return type.includes(factoryType); + }) + ) + .map(({ factory }) => factory); const promotedVisTypes = getVisTypesByGroup(VisGroups.PROMOTED); diff --git a/x-pack/plugins/canvas/server/collectors/workpad_collector.ts b/x-pack/plugins/canvas/server/collectors/workpad_collector.ts index 72c0206226090..6ab5f62f8f5d2 100644 --- a/x-pack/plugins/canvas/server/collectors/workpad_collector.ts +++ b/x-pack/plugins/canvas/server/collectors/workpad_collector.ts @@ -251,7 +251,7 @@ export function summarizeWorkpads(workpadDocs: CanvasWorkpad[]): WorkpadTelemetr try { pages = { count: workpad.pages.length }; } catch (err) { - // eslint-disable-next-line + // eslint-disable-next-line no-console console.warn(err, workpad); } const elementCounts = workpad.pages.reduce<number[]>( diff --git a/x-pack/plugins/canvas/shareable_runtime/api/__snapshots__/shareable.test.tsx.snap b/x-pack/plugins/canvas/shareable_runtime/api/__snapshots__/shareable.test.tsx.snap index 5fabff58521fa..fd505ff44c177 100644 --- a/x-pack/plugins/canvas/shareable_runtime/api/__snapshots__/shareable.test.tsx.snap +++ b/x-pack/plugins/canvas/shareable_runtime/api/__snapshots__/shareable.test.tsx.snap @@ -36,7 +36,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with default propertie class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -92,7 +93,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with default propertie class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -308,7 +310,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with height specified class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -364,7 +367,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with height specified class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -580,7 +584,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with page specified 2` class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -636,7 +641,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with page specified 2` class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -853,7 +859,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with width and height class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -909,7 +916,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with width and height class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -1125,7 +1133,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with width specified 2 class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div @@ -1181,7 +1190,8 @@ exports[`Canvas Shareable Workpad API Placed successfully with width specified 2 class="root" > <div - class="container s2042575598" + class="container" + css="css-159kt7d" style="overflow: hidden;" > <div diff --git a/x-pack/plugins/canvas/shareable_runtime/components/rendered_element.tsx b/x-pack/plugins/canvas/shareable_runtime/components/rendered_element.tsx index 2488aaac9c2e8..b7721636037cb 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/rendered_element.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/rendered_element.tsx @@ -6,8 +6,7 @@ */ import React, { FC, PureComponent } from 'react'; -// @ts-expect-error untyped library -import Style from 'style-it'; +import { css as emotionCss } from '@emotion/css'; import { AnyExpressionFunctionDefinition } from '@kbn/expressions-plugin'; import { Positionable } from '../../public/components/positionable/positionable'; import { elementToShape } from '../../public/components/workpad_page/positioning_utils'; @@ -81,16 +80,13 @@ export class RenderedElementComponent extends PureComponent<Props> { return ( <Positionable height={height} width={width} transformMatrix={shape.transformMatrix}> <div className={css.root}> - {Style.it( - elementCSS, - <div className={css.container} style={{ ...containerStyle }}> - <div className={css.content}> - <div className={css.renderContainer}> - <div key={id} ref={this.ref} data-renderer={as} className={css.render} /> - </div> + <div css={emotionCss(elementCSS)} className={css.container} style={{ ...containerStyle }}> + <div className={css.content}> + <div className={css.renderContainer}> + <div key={id} ref={this.ref} data-renderer={as} className={css.render} /> </div> </div> - )} + </div> </div> </Positionable> ); diff --git a/x-pack/plugins/canvas/shareable_runtime/css_modules.d.ts b/x-pack/plugins/canvas/shareable_runtime/css_modules.d.ts index 7ee839be83252..f31b017814cf9 100644 --- a/x-pack/plugins/canvas/shareable_runtime/css_modules.d.ts +++ b/x-pack/plugins/canvas/shareable_runtime/css_modules.d.ts @@ -7,6 +7,6 @@ declare module '*.module.scss' { const styles: { [className: string]: string }; - // eslint-disable-next-line + // eslint-disable-next-line import/no-default-export export default styles; } diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js index 09a0999194490..bc757a9d67bb7 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js +++ b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js @@ -9,7 +9,7 @@ require('../../../../src/setup_node_env'); const path = require('path'); const webpack = require('webpack'); -const { stringifyRequest } = require('loader-utils'); // eslint-disable-line +const { stringifyRequest } = require('loader-utils'); const { CiStatsPlugin } = require('./webpack/ci_stats_plugin'); const { @@ -78,8 +78,8 @@ module.exports = { { loader: 'postcss-loader', options: { - config: { - path: require.resolve('./postcss.config.js'), + postcssOptions: { + config: require.resolve('./postcss.config.js'), }, }, }, @@ -111,8 +111,8 @@ module.exports = { { loader: 'postcss-loader', options: { - config: { - path: require.resolve('@kbn/optimizer/postcss.config.js'), + postcssOptions: { + config: require.resolve('@kbn/optimizer/postcss.config.js'), }, }, }, @@ -142,8 +142,8 @@ module.exports = { loader: 'postcss-loader', options: { sourceMap: !isProd, - config: { - path: require.resolve('./postcss.config'), + postcssOptions: { + config: require.resolve('./postcss.config'), }, }, }, diff --git a/x-pack/plugins/canvas/storybook/canvas_webpack.ts b/x-pack/plugins/canvas/storybook/canvas_webpack.ts index e8ce5ff03b812..a8d967ec73ef6 100644 --- a/x-pack/plugins/canvas/storybook/canvas_webpack.ts +++ b/x-pack/plugins/canvas/storybook/canvas_webpack.ts @@ -30,7 +30,9 @@ export const canvasWebpack = { { loader: 'postcss-loader', options: { - path: resolve(KIBANA_ROOT, 'src/optimize/postcss.config.js'), + postcssOptions: { + config: resolve(KIBANA_ROOT, 'packages/kbn-optimizer/postcss.config.js'), + }, }, }, { diff --git a/x-pack/plugins/cases/common/constants.ts b/x-pack/plugins/cases/common/constants.ts index cc2cfb5e873ff..77a5bb8e583da 100644 --- a/x-pack/plugins/cases/common/constants.ts +++ b/x-pack/plugins/cases/common/constants.ts @@ -106,6 +106,7 @@ export const MAX_ALERTS_PER_CASE = 1000 as const; */ export const SECURITY_SOLUTION_OWNER = 'securitySolution' as const; export const OBSERVABILITY_OWNER = 'observability' as const; +export const GENERAL_CASES_OWNER = APP_ID; export const OWNER_INFO = { [SECURITY_SOLUTION_OWNER]: { @@ -116,6 +117,10 @@ export const OWNER_INFO = { label: 'Observability', iconType: 'logoObservability', }, + [GENERAL_CASES_OWNER]: { + label: 'Stack', + iconType: 'casesApp', + }, } as const; /** @@ -150,3 +155,12 @@ export const CASES_TELEMETRY_TASK_NAME = 'cases-telemetry-task'; */ export const CASE_TELEMETRY_SAVED_OBJECT = 'cases-telemetry'; export const CASE_TELEMETRY_SAVED_OBJECT_ID = 'cases-telemetry'; + +/** + * Cases UI Capabilities + */ +export const CREATE_CASES_CAPABILITY = 'create_cases' as const; +export const READ_CASES_CAPABILITY = 'read_cases' as const; +export const UPDATE_CASES_CAPABILITY = 'update_cases' as const; +export const DELETE_CASES_CAPABILITY = 'delete_cases' as const; +export const PUSH_CASES_CAPABILITY = 'push_cases' as const; diff --git a/x-pack/plugins/cases/common/index.ts b/x-pack/plugins/cases/common/index.ts index 79a5aa4eb7ddd..e246c98f71c75 100644 --- a/x-pack/plugins/cases/common/index.ts +++ b/x-pack/plugins/cases/common/index.ts @@ -15,12 +15,27 @@ // For example, constants below could eventually be in a "kbn-cases-constants" instead. // See: https://docs.elastic.dev/kibana-dev-docs/key-concepts/platform-intro#public-plugin-api -export { CASES_URL, SECURITY_SOLUTION_OWNER } from './constants'; +export { + CASES_URL, + SECURITY_SOLUTION_OWNER, + CREATE_CASES_CAPABILITY, + DELETE_CASES_CAPABILITY, + PUSH_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from './constants'; export { CommentType, CaseStatuses, getCasesFromAlertsUrl, throwErrors } from './api'; -export type { Case, Ecs, CasesFeatures, CaseViewRefreshPropInterface } from './ui/types'; +export type { + Case, + Ecs, + CasesFeatures, + CaseViewRefreshPropInterface, + CasesPermissions, +} from './ui/types'; export { StatusAll } from './ui/types'; export { getCreateConnectorUrl, getAllConnectorsUrl } from './utils/connectors_api'; +export { createUICapabilities } from './utils/capabilities'; diff --git a/x-pack/plugins/cases/common/ui/types.ts b/x-pack/plugins/cases/common/ui/types.ts index 65dc8b124c2b1..59ca060bba78e 100644 --- a/x-pack/plugins/cases/common/ui/types.ts +++ b/x-pack/plugins/cases/common/ui/types.ts @@ -6,6 +6,12 @@ */ import type { SavedObjectsResolveResponse } from '@kbn/core/public'; +import { + CREATE_CASES_CAPABILITY, + DELETE_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from '..'; import { CasePatchRequest, CaseStatuses, @@ -24,6 +30,7 @@ import { CommentResponseExternalReferenceType, CommentResponseTypePersistableState, } from '../api'; +import { PUSH_CASES_CAPABILITY } from '../constants'; import { SnakeToCamelCase } from '../types'; type DeepRequired<T> = { [K in keyof T]: DeepRequired<T[K]> } & Required<T>; @@ -229,3 +236,20 @@ export interface Ecs { export type CaseActionConnector = ActionConnector; export type UseFetchAlertData = (alertIds: string[]) => [boolean, Record<string, unknown>]; + +export interface CasesPermissions { + all: boolean; + create: boolean; + read: boolean; + update: boolean; + delete: boolean; + push: boolean; +} + +export interface CasesCapabilities { + [CREATE_CASES_CAPABILITY]: boolean; + [READ_CASES_CAPABILITY]: boolean; + [UPDATE_CASES_CAPABILITY]: boolean; + [DELETE_CASES_CAPABILITY]: boolean; + [PUSH_CASES_CAPABILITY]: boolean; +} diff --git a/x-pack/plugins/cases/common/utils/capabilities.ts b/x-pack/plugins/cases/common/utils/capabilities.ts new file mode 100644 index 0000000000000..a508d11201966 --- /dev/null +++ b/x-pack/plugins/cases/common/utils/capabilities.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + CREATE_CASES_CAPABILITY, + DELETE_CASES_CAPABILITY, + PUSH_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from '../constants'; + +/** + * Return the UI capabilities for each type of operation. These strings must match the values defined in the UI + * here: x-pack/plugins/cases/public/client/helpers/capabilities.ts + */ +export const createUICapabilities = () => ({ + all: [ + CREATE_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, + PUSH_CASES_CAPABILITY, + ] as const, + read: [READ_CASES_CAPABILITY] as const, + delete: [DELETE_CASES_CAPABILITY] as const, +}); diff --git a/x-pack/plugins/cases/common/utils/index.ts b/x-pack/plugins/cases/common/utils/index.ts index 072c2b10dc225..b8be12831200e 100644 --- a/x-pack/plugins/cases/common/utils/index.ts +++ b/x-pack/plugins/cases/common/utils/index.ts @@ -6,3 +6,4 @@ */ export * from './connectors_api'; +export * from './capabilities'; diff --git a/x-pack/plugins/cases/public/client/helpers/can_use_cases.test.ts b/x-pack/plugins/cases/public/client/helpers/can_use_cases.test.ts index ea3b508e3113c..9898f9c374c78 100644 --- a/x-pack/plugins/cases/public/client/helpers/can_use_cases.test.ts +++ b/x-pack/plugins/cases/public/client/helpers/can_use_cases.test.ts @@ -6,124 +6,91 @@ */ import type { ApplicationStart } from '@kbn/core/public'; +import { + allCasesCapabilities, + allCasesPermissions, + noCasesCapabilities, + noCasesPermissions, + readCasesCapabilities, + readCasesPermissions, + writeCasesCapabilities, + writeCasesPermissions, +} from '../../common/mock'; import { canUseCases } from './can_use_cases'; type CasesCapabilities = Pick< ApplicationStart['capabilities'], - 'securitySolutionCases' | 'observabilityCases' + 'securitySolutionCases' | 'observabilityCases' | 'generalCases' >; const hasAll: CasesCapabilities = { - securitySolutionCases: { - crud_cases: true, - read_cases: true, - }, - observabilityCases: { - crud_cases: true, - read_cases: true, - }, + securitySolutionCases: allCasesCapabilities(), + observabilityCases: allCasesCapabilities(), + generalCases: allCasesCapabilities(), }; const hasNone: CasesCapabilities = { - securitySolutionCases: { - crud_cases: false, - read_cases: false, - }, - observabilityCases: { - crud_cases: false, - read_cases: false, - }, + securitySolutionCases: noCasesCapabilities(), + observabilityCases: noCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasSecurity = { - securitySolutionCases: { - crud_cases: true, - read_cases: true, - }, - observabilityCases: { - crud_cases: false, - read_cases: false, - }, +const hasSecurity: CasesCapabilities = { + securitySolutionCases: allCasesCapabilities(), + observabilityCases: noCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasObservability = { - securitySolutionCases: { - crud_cases: false, - read_cases: false, - }, - observabilityCases: { - crud_cases: true, - read_cases: true, - }, +const hasObservability: CasesCapabilities = { + securitySolutionCases: noCasesCapabilities(), + observabilityCases: allCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasObservabilityCrudTrue = { - securitySolutionCases: { - crud_cases: false, - read_cases: false, - }, - observabilityCases: { - crud_cases: true, - read_cases: false, - }, +const hasObservabilityWriteTrue: CasesCapabilities = { + securitySolutionCases: noCasesCapabilities(), + observabilityCases: writeCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasSecurityCrudTrue = { - securitySolutionCases: { - crud_cases: false, - read_cases: false, - }, - observabilityCases: { - crud_cases: true, - read_cases: false, - }, +const hasSecurityWriteTrue: CasesCapabilities = { + securitySolutionCases: writeCasesCapabilities(), + observabilityCases: noCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasObservabilityReadTrue = { - securitySolutionCases: { - crud_cases: false, - read_cases: false, - }, - observabilityCases: { - crud_cases: false, - read_cases: true, - }, +const hasObservabilityReadTrue: CasesCapabilities = { + securitySolutionCases: noCasesCapabilities(), + observabilityCases: readCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasSecurityReadTrue = { - securitySolutionCases: { - crud_cases: false, - read_cases: true, - }, - observabilityCases: { - crud_cases: false, - read_cases: false, - }, +const hasSecurityReadTrue: CasesCapabilities = { + securitySolutionCases: readCasesCapabilities(), + observabilityCases: noCasesCapabilities(), + generalCases: noCasesCapabilities(), }; -const hasSecurityAsCrudAndObservabilityAsRead = { - securitySolutionCases: { - crud_cases: true, - }, - observabilityCases: { - read_cases: true, - }, +const hasSecurityWriteAndObservabilityRead: CasesCapabilities = { + securitySolutionCases: writeCasesCapabilities(), + observabilityCases: readCasesCapabilities(), + generalCases: noCasesCapabilities(), }; describe('canUseCases', () => { - it.each([hasAll, hasSecurity, hasObservability, hasSecurityAsCrudAndObservabilityAsRead])( - 'returns true for both crud and read, if a user has access to both on any solution', + it.each([hasAll, hasSecurity, hasObservability, hasSecurityWriteAndObservabilityRead])( + 'returns true for all permissions, if a user has access to both on any solution', (capability) => { const permissions = canUseCases(capability)(); - expect(permissions).toStrictEqual({ crud: true, read: true }); + expect(permissions).toStrictEqual(allCasesPermissions()); } ); - it.each([hasObservabilityCrudTrue, hasSecurityCrudTrue])( - 'returns true for only crud, if a user has access to only crud on any solution', + it.each([hasObservabilityWriteTrue, hasSecurityWriteTrue])( + 'returns true for only write, if a user has access to only write on any solution', (capability) => { const permissions = canUseCases(capability)(); - expect(permissions).toStrictEqual({ crud: true, read: false }); + expect(permissions).toStrictEqual(writeCasesPermissions()); } ); @@ -131,15 +98,15 @@ describe('canUseCases', () => { 'returns true for only read, if a user has access to only read on any solution', (capability) => { const permissions = canUseCases(capability)(); - expect(permissions).toStrictEqual({ crud: false, read: true }); + expect(permissions).toStrictEqual(readCasesPermissions()); } ); it.each([hasNone, {}])( - 'returns false for both, if a user has access to no solution', + 'returns false for all permissions, if a user has access to no solution', (capability) => { const permissions = canUseCases(capability)(); - expect(permissions).toStrictEqual({ crud: false, read: false }); + expect(permissions).toStrictEqual(noCasesPermissions()); } ); }); diff --git a/x-pack/plugins/cases/public/client/helpers/can_use_cases.ts b/x-pack/plugins/cases/public/client/helpers/can_use_cases.ts index d34e2c9bf5912..13504cb2605cf 100644 --- a/x-pack/plugins/cases/public/client/helpers/can_use_cases.ts +++ b/x-pack/plugins/cases/public/client/helpers/can_use_cases.ts @@ -6,9 +6,19 @@ */ import type { ApplicationStart } from '@kbn/core/public'; -import { OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER } from '../../../common/constants'; +import { + FEATURE_ID, + GENERAL_CASES_OWNER, + OBSERVABILITY_OWNER, + SECURITY_SOLUTION_OWNER, +} from '../../../common/constants'; +import { getUICapabilities } from './capabilities'; +import { CasesPermissions } from '../../../common'; -export type CasesOwners = typeof SECURITY_SOLUTION_OWNER | typeof OBSERVABILITY_OWNER; +export type CasesOwners = + | typeof SECURITY_SOLUTION_OWNER + | typeof OBSERVABILITY_OWNER + | typeof GENERAL_CASES_OWNER; /* * Returns an object denoting the current user's ability to read and crud cases. @@ -16,14 +26,44 @@ export type CasesOwners = typeof SECURITY_SOLUTION_OWNER | typeof OBSERVABILITY_ * then crud or read is set to true. * Permissions for a specific owners can be found by passing an owner array */ - export const canUseCases = (capabilities: Partial<ApplicationStart['capabilities']>) => ( - owners: CasesOwners[] = [OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER] - ): { crud: boolean; read: boolean } => ({ - crud: - (capabilities && owners.some((owner) => capabilities[`${owner}Cases`]?.crud_cases)) ?? false, - read: - (capabilities && owners.some((owner) => capabilities[`${owner}Cases`]?.read_cases)) ?? false, - }); + owners: CasesOwners[] = [OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER, GENERAL_CASES_OWNER] + ): CasesPermissions => { + const aggregatedPermissions = owners.reduce<CasesPermissions>( + (acc, owner) => { + const userCapabilitiesForOwner = getUICapabilities(capabilities[getFeatureID(owner)]); + + acc.create = acc.create || userCapabilitiesForOwner.create; + acc.read = acc.read || userCapabilitiesForOwner.read; + acc.update = acc.update || userCapabilitiesForOwner.update; + acc.delete = acc.delete || userCapabilitiesForOwner.delete; + acc.push = acc.push || userCapabilitiesForOwner.push; + const allFromAcc = acc.create && acc.read && acc.update && acc.delete && acc.push; + acc.all = acc.all || userCapabilitiesForOwner.all || allFromAcc; + + return acc; + }, + { + all: false, + create: false, + read: false, + update: false, + delete: false, + push: false, + } + ); + + return { + ...aggregatedPermissions, + }; + }; + +const getFeatureID = (owner: CasesOwners) => { + if (owner === GENERAL_CASES_OWNER) { + return FEATURE_ID; + } + + return `${owner}Cases`; +}; diff --git a/x-pack/plugins/cases/public/client/helpers/capabilities.test.ts b/x-pack/plugins/cases/public/client/helpers/capabilities.test.ts new file mode 100644 index 0000000000000..58d6d61e80324 --- /dev/null +++ b/x-pack/plugins/cases/public/client/helpers/capabilities.test.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getUICapabilities } from './capabilities'; + +describe('getUICapabilities', () => { + it('returns false for all fields when the feature cannot be found', () => { + expect(getUICapabilities(undefined)).toMatchInlineSnapshot(` + Object { + "all": false, + "create": false, + "delete": false, + "push": false, + "read": false, + "update": false, + } + `); + }); + + it('returns false for all fields when the capabilities are not passed in', () => { + expect(getUICapabilities()).toMatchInlineSnapshot(` + Object { + "all": false, + "create": false, + "delete": false, + "push": false, + "read": false, + "update": false, + } + `); + }); + + it('returns true for create when it is set to true in the ui capabilities', () => { + expect(getUICapabilities({ create_cases: true })).toMatchInlineSnapshot(` + Object { + "all": false, + "create": true, + "delete": false, + "push": false, + "read": false, + "update": false, + } + `); + }); + + it('returns false for all fields when the ui capabilities are false', () => { + expect( + getUICapabilities({ + create_cases: false, + read_cases: false, + update_cases: false, + delete_cases: false, + push_cases: false, + }) + ).toMatchInlineSnapshot(` + Object { + "all": false, + "create": false, + "delete": false, + "push": false, + "read": false, + "update": false, + } + `); + }); + + it('returns false for all fields when the ui capabilities is an empty object', () => { + expect(getUICapabilities({})).toMatchInlineSnapshot(` + Object { + "all": false, + "create": false, + "delete": false, + "push": false, + "read": false, + "update": false, + } + `); + }); + + it('returns false for the all field when a single field is false', () => { + expect( + getUICapabilities({ + create_cases: false, + read_cases: true, + update_cases: true, + delete_cases: true, + push_cases: true, + }) + ).toMatchInlineSnapshot(` + Object { + "all": false, + "create": false, + "delete": true, + "push": true, + "read": true, + "update": true, + } + `); + }); +}); diff --git a/x-pack/plugins/cases/public/client/helpers/capabilities.ts b/x-pack/plugins/cases/public/client/helpers/capabilities.ts index 652678d0add28..918f0c73c8ebd 100644 --- a/x-pack/plugins/cases/public/client/helpers/capabilities.ts +++ b/x-pack/plugins/cases/public/client/helpers/capabilities.ts @@ -5,19 +5,31 @@ * 2.0. */ -export interface CasesPermissions { - all: boolean; - read: boolean; -} +import { CasesPermissions } from '../../../common'; +import { + CREATE_CASES_CAPABILITY, + DELETE_CASES_CAPABILITY, + PUSH_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from '../../../common/constants'; export const getUICapabilities = ( - featureCapabilities: Partial<Record<string, boolean | Record<string, boolean>>> + featureCapabilities?: Partial<Record<string, boolean | Record<string, boolean>>> ): CasesPermissions => { - const read = !!featureCapabilities?.read_cases; - const all = !!featureCapabilities?.crud_cases; + const create = !!featureCapabilities?.[CREATE_CASES_CAPABILITY]; + const read = !!featureCapabilities?.[READ_CASES_CAPABILITY]; + const update = !!featureCapabilities?.[UPDATE_CASES_CAPABILITY]; + const deletePriv = !!featureCapabilities?.[DELETE_CASES_CAPABILITY]; + const push = !!featureCapabilities?.[PUSH_CASES_CAPABILITY]; + const all = create && read && update && deletePriv && push; return { all, + create, read, + update, + delete: deletePriv, + push, }; }; diff --git a/x-pack/plugins/cases/public/common/lib/kibana/hooks.test.tsx b/x-pack/plugins/cases/public/common/lib/kibana/hooks.test.tsx index 3fb2ccf2ddc6b..1ec28de4c3d3c 100644 --- a/x-pack/plugins/cases/public/common/lib/kibana/hooks.test.tsx +++ b/x-pack/plugins/cases/public/common/lib/kibana/hooks.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { useApplicationCapabilities } from './hooks'; -import { TestProviders } from '../../mock'; +import { allCasesPermissions, TestProviders } from '../../mock'; describe('hooks', () => { describe('useApplicationCapabilities', () => { @@ -23,7 +23,7 @@ describe('hooks', () => { expect(result.current).toEqual({ actions: { crud: true, read: true }, - generalCases: { all: true, read: true }, + generalCases: allCasesPermissions(), visualize: { crud: true, read: true }, dashboard: { crud: true, read: true }, }); diff --git a/x-pack/plugins/cases/public/common/lib/kibana/hooks.ts b/x-pack/plugins/cases/public/common/lib/kibana/hooks.ts index b144fcf9e24d2..86d137f55dc93 100644 --- a/x-pack/plugins/cases/public/common/lib/kibana/hooks.ts +++ b/x-pack/plugins/cases/public/common/lib/kibana/hooks.ts @@ -12,13 +12,14 @@ import { i18n } from '@kbn/i18n'; import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; import { NavigateToAppOptions } from '@kbn/core/public'; -import { CasesPermissions, getUICapabilities } from '../../../client/helpers/capabilities'; +import { getUICapabilities } from '../../../client/helpers/capabilities'; import { convertToCamelCase } from '../../../api/utils'; import { FEATURE_ID, DEFAULT_DATE_FORMAT, DEFAULT_DATE_FORMAT_TZ, } from '../../../../common/constants'; +import { CasesPermissions } from '../../../../common'; import { StartServices } from '../../../types'; import { useUiSetting, useKibana } from './kibana_react'; @@ -187,7 +188,11 @@ export const useApplicationCapabilities = (): UseApplicationCapabilities => { actions: { crud: !!capabilities.actions?.save, read: !!capabilities.actions?.show }, generalCases: { all: permissions.all, + create: permissions.create, read: permissions.read, + update: permissions.update, + delete: permissions.delete, + push: permissions.push, }, visualize: { crud: !!capabilities.visualize?.save, read: !!capabilities.visualize?.show }, dashboard: { @@ -203,7 +208,11 @@ export const useApplicationCapabilities = (): UseApplicationCapabilities => { capabilities.visualize?.save, capabilities.visualize?.show, permissions.all, + permissions.create, permissions.read, + permissions.update, + permissions.delete, + permissions.push, ] ); }; diff --git a/x-pack/plugins/cases/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/cases/public/common/lib/kibana/kibana_react.mock.ts index 49b7028a8f883..6e279a7798cf1 100644 --- a/x-pack/plugins/cases/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/cases/public/common/lib/kibana/kibana_react.mock.ts @@ -53,7 +53,13 @@ export const createStartServicesMock = (): StartServices => { services.application.capabilities = { ...services.application.capabilities, actions: { save: true, show: true }, - generalCases: { crud_cases: true, read_cases: true }, + generalCases: { + create_cases: true, + read_cases: true, + update_cases: true, + delete_cases: true, + push_cases: true, + }, visualize: { save: true, show: true }, dashboard: { show: true, createNew: true }, }; diff --git a/x-pack/plugins/cases/public/common/mock/test_providers.tsx b/x-pack/plugins/cases/public/common/mock/test_providers.tsx index 84bf68f7fa814..46dda67c23f7f 100644 --- a/x-pack/plugins/cases/public/common/mock/test_providers.tsx +++ b/x-pack/plugins/cases/public/common/mock/test_providers.tsx @@ -14,7 +14,7 @@ import { render as reactRender, RenderOptions, RenderResult } from '@testing-lib import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { QueryClient, QueryClientProvider } from 'react-query'; import { SECURITY_SOLUTION_OWNER } from '../../../common/constants'; -import { CasesFeatures } from '../../../common/ui/types'; +import { CasesCapabilities, CasesFeatures, CasesPermissions } from '../../../common/ui/types'; import { CasesProvider } from '../../components/cases_context'; import { createKibanaContextProviderMock, @@ -23,7 +23,6 @@ import { import { FieldHook } from '../shared_imports'; import { StartServices } from '../../types'; import { ReleasePhase } from '../../components/types'; -import { CasesPermissions } from '../../client/helpers/capabilities'; import { ExternalReferenceAttachmentTypeRegistry } from '../../client/attachment_framework/external_reference_registry'; import { PersistableStateAttachmentTypeRegistry } from '../../client/attachment_framework/persistable_state_registry'; @@ -101,19 +100,66 @@ export const testQueryClient = new QueryClient({ }, }); -export const buildCasesPermissions = (overrides: Partial<CasesPermissions> = {}) => { +export const allCasesPermissions = () => buildCasesPermissions(); +export const noCasesPermissions = () => + buildCasesPermissions({ read: false, create: false, update: false, delete: false, push: false }); +export const readCasesPermissions = () => + buildCasesPermissions({ read: true, create: false, update: false, delete: false, push: false }); +export const noCreateCasesPermissions = () => buildCasesPermissions({ create: false }); +export const noUpdateCasesPermissions = () => buildCasesPermissions({ update: false }); +export const noPushCasesPermissions = () => buildCasesPermissions({ push: false }); +export const noDeleteCasesPermissions = () => buildCasesPermissions({ delete: false }); +export const writeCasesPermissions = () => buildCasesPermissions({ read: false }); + +export const buildCasesPermissions = (overrides: Partial<Omit<CasesPermissions, 'all'>> = {}) => { + const create = overrides.create ?? true; const read = overrides.read ?? true; - const all = overrides.all ?? true; + const update = overrides.update ?? true; + const deletePermissions = overrides.delete ?? true; + const push = overrides.push ?? true; + const all = create && read && update && deletePermissions && push; return { all, + create, read, + update, + delete: deletePermissions, + push, }; }; -export const allCasesPermissions = () => buildCasesPermissions(); -export const noCasesPermissions = () => buildCasesPermissions({ read: false, all: false }); -export const readCasesPermissions = () => buildCasesPermissions({ all: false }); +export const allCasesCapabilities = () => buildCasesCapabilities(); +export const noCasesCapabilities = () => + buildCasesCapabilities({ + create_cases: false, + read_cases: false, + update_cases: false, + delete_cases: false, + push_cases: false, + }); +export const readCasesCapabilities = () => + buildCasesCapabilities({ + create_cases: false, + update_cases: false, + delete_cases: false, + push_cases: false, + }); +export const writeCasesCapabilities = () => { + return buildCasesCapabilities({ + read_cases: false, + }); +}; + +export const buildCasesCapabilities = (overrides?: Partial<CasesCapabilities>) => { + return { + create_cases: overrides?.create_cases ?? true, + read_cases: overrides?.read_cases ?? true, + update_cases: overrides?.update_cases ?? true, + delete_cases: overrides?.delete_cases ?? true, + push_cases: overrides?.push_cases ?? true, + }; +}; export const createAppMockRenderer = ({ features, diff --git a/x-pack/plugins/cases/public/components/add_comment/index.test.tsx b/x-pack/plugins/cases/public/components/add_comment/index.test.tsx index 18e02ff098314..8def93fef325d 100644 --- a/x-pack/plugins/cases/public/components/add_comment/index.test.tsx +++ b/x-pack/plugins/cases/public/components/add_comment/index.test.tsx @@ -10,7 +10,7 @@ import { mount } from 'enzyme'; import { waitFor, act } from '@testing-library/react'; import { noop } from 'lodash/fp'; -import { TestProviders } from '../../common/mock'; +import { noCreateCasesPermissions, TestProviders } from '../../common/mock'; import { CommentRequest, CommentType } from '../../../common/api'; import { SECURITY_SOLUTION_OWNER } from '../../../common/constants'; @@ -113,13 +113,13 @@ describe('AddComment ', () => { ).toBeTruthy(); }); - it('should hide the component when the user does not have crud permissions', () => { + it('should hide the component when the user does not have create permissions', () => { useCreateAttachmentsMock.mockImplementation(() => ({ ...defaultResponse, isLoading: true, })); const wrapper = mount( - <TestProviders permissions={{ all: false, read: false }}> + <TestProviders permissions={noCreateCasesPermissions()}> <AddComment {...{ ...addCommentProps }} /> </TestProviders> ); diff --git a/x-pack/plugins/cases/public/components/add_comment/index.tsx b/x-pack/plugins/cases/public/components/add_comment/index.tsx index 235917a504e2e..98e505b113ecd 100644 --- a/x-pack/plugins/cases/public/components/add_comment/index.tsx +++ b/x-pack/plugins/cases/public/components/add_comment/index.tsx @@ -147,7 +147,7 @@ export const AddComment = React.memo( return ( <span id="add-comment-permLink"> {isLoading && showLoading && <MySpinner data-test-subj="loading-spinner" size="xl" />} - {permissions.all && ( + {permissions.create && ( <Form form={form}> <UseField path={fieldName} diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx index e7d6d4e8d7729..35b15c4b21587 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx @@ -13,7 +13,12 @@ import { renderHook } from '@testing-library/react-hooks'; import userEvent from '@testing-library/user-event'; import '../../common/mock/match_media'; -import { AppMockRenderer, createAppMockRenderer, TestProviders } from '../../common/mock'; +import { + AppMockRenderer, + createAppMockRenderer, + noDeleteCasesPermissions, + TestProviders, +} from '../../common/mock'; import { casesStatus, useGetCasesMockState, mockCase, connectorsMock } from '../../containers/mock'; import { StatusAll } from '../../../common/ui/types'; @@ -503,6 +508,20 @@ describe('AllCasesListGeneric', () => { }); }); + it('should not render table utility bar when the user does not have permissions to delete', async () => { + const wrapper = mount( + <TestProviders permissions={noDeleteCasesPermissions()}> + <AllCasesList isSelectorView={true} /> + </TestProviders> + ); + await waitFor(() => { + expect(wrapper.find('[data-test-subj="case-table-selected-case-count"]').exists()).toBe( + false + ); + expect(wrapper.find('[data-test-subj="case-table-bulk-actions"]').exists()).toBe(false); + }); + }); + it('should render metrics when isSelectorView=false', async () => { const wrapper = mount( <TestProviders> diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx index 887a30212833e..7d63813440159 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx @@ -185,7 +185,11 @@ export const AllCasesList = React.memo<AllCasesListProps>( [deselectCases, setFilterOptions, refreshCases, setQueryParams] ); - const showActions = permissions.all && !isSelectorView; + /** + * At the time of changing this from all to delete the only bulk action we have is to delete. When we add more + * actions we'll need to revisit this to allow more granular checks around the bulk actions. + */ + const showActions = permissions.delete && !isSelectorView; const columns = useCasesColumns({ filterStatus: filterOptions.status ?? StatusAll, diff --git a/x-pack/plugins/cases/public/components/all_cases/columns.tsx b/x-pack/plugins/cases/public/components/all_cases/columns.tsx index 3476be64c09ff..e4a6927c2e840 100644 --- a/x-pack/plugins/cases/public/components/all_cases/columns.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/columns.tsx @@ -319,7 +319,7 @@ export const useCasesColumns = ({ return ( <StatusContextMenu currentStatus={theCase.status} - disabled={!permissions.all || isLoadingUpdateCase} + disabled={!permissions.update || isLoadingUpdateCase} onStatusChanged={(status) => handleDispatchUpdate({ updateKey: 'status', @@ -372,7 +372,7 @@ export const useCasesColumns = ({ }, ] : []), - ...(permissions.all && !isSelectorView + ...(permissions.delete && !isSelectorView ? [ { name: ( diff --git a/x-pack/plugins/cases/public/components/all_cases/header.test.tsx b/x-pack/plugins/cases/public/components/all_cases/header.test.tsx new file mode 100644 index 0000000000000..64e84affe14d5 --- /dev/null +++ b/x-pack/plugins/cases/public/components/all_cases/header.test.tsx @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { AppMockRenderer, buildCasesPermissions, createAppMockRenderer } from '../../common/mock'; +import { CasesTableHeader } from './header'; + +describe('CasesTableHeader', () => { + let appMockRender: AppMockRenderer; + + beforeEach(() => { + jest.clearAllMocks(); + appMockRender = createAppMockRenderer(); + }); + + it('displays the create new case button when the user has create privileges', () => { + appMockRender = createAppMockRenderer({ + permissions: buildCasesPermissions({ update: false, create: true }), + }); + const result = appMockRender.render(<CasesTableHeader actionsErrors={[]} />); + + expect(result.getByTestId('createNewCaseBtn')).toBeInTheDocument(); + }); + + it('does not display the create new case button when the user does not have create privileges', () => { + appMockRender = createAppMockRenderer({ + permissions: buildCasesPermissions({ create: false }), + }); + const result = appMockRender.render(<CasesTableHeader actionsErrors={[]} />); + + expect(result.queryByTestId('createNewCaseBtn')).not.toBeInTheDocument(); + }); + + it('displays the configure button when the user has update privileges', () => { + appMockRender = createAppMockRenderer({ + permissions: buildCasesPermissions({ create: false, update: true }), + }); + const result = appMockRender.render(<CasesTableHeader actionsErrors={[]} />); + + expect(result.getByTestId('configure-case-button')).toBeInTheDocument(); + }); + + it('does not display the configure button when the user does not have update privileges', () => { + appMockRender = createAppMockRenderer({ + permissions: buildCasesPermissions({ update: false }), + }); + const result = appMockRender.render(<CasesTableHeader actionsErrors={[]} />); + + expect(result.queryByTestId('configure-case-button')).not.toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/cases/public/components/all_cases/header.tsx b/x-pack/plugins/cases/public/components/all_cases/header.tsx index aeb8a25340811..a40a38a3be581 100644 --- a/x-pack/plugins/cases/public/components/all_cases/header.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/header.tsx @@ -6,12 +6,11 @@ */ import React, { FunctionComponent } from 'react'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFlexGroup } from '@elastic/eui'; import { HeaderPage } from '../header_page'; import * as i18n from './translations'; import { ErrorMessage } from '../use_push_to_service/callout/types'; import { NavButtons } from './nav_buttons'; -import { useCasesContext } from '../cases_context/use_cases_context'; interface OwnProps { actionsErrors: ErrorMessage[]; @@ -20,8 +19,6 @@ interface OwnProps { type Props = OwnProps; export const CasesTableHeader: FunctionComponent<Props> = ({ actionsErrors }) => { - const { permissions } = useCasesContext(); - return ( <HeaderPage title={i18n.PAGE_TITLE} border data-test-subj="cases-all-title"> <EuiFlexGroup @@ -30,11 +27,7 @@ export const CasesTableHeader: FunctionComponent<Props> = ({ actionsErrors }) => wrap={true} data-test-subj="all-cases-header" > - {permissions.all ? ( - <EuiFlexItem> - <NavButtons actionsErrors={actionsErrors} /> - </EuiFlexItem> - ) : null} + <NavButtons actionsErrors={actionsErrors} /> </EuiFlexGroup> </HeaderPage> ); diff --git a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx index fb9d4a62d82da..8e5263a31ff3d 100644 --- a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx @@ -10,7 +10,12 @@ import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; import { AllCases } from '.'; -import { TestProviders } from '../../common/mock'; +import { + AppMockRenderer, + createAppMockRenderer, + noCreateCasesPermissions, + TestProviders, +} from '../../common/mock'; import { useGetReporters } from '../../containers/use_get_reporters'; import { useGetActionLicense } from '../../containers/use_get_action_license'; import { casesStatus, connectorsMock, useGetCasesMockState } from '../../containers/mock'; @@ -79,8 +84,39 @@ describe('AllCases', () => { useGetCasesMock.mockReturnValue(defaultGetCases); }); + let appMockRender: AppMockRenderer; + beforeEach(() => { jest.clearAllMocks(); + appMockRender = createAppMockRenderer(); + }); + + describe('empty table', () => { + beforeEach(() => { + useGetCasesMock.mockReturnValue({ + ...defaultGetCases, + data: { + ...defaultGetCases.data, + cases: [], + total: 0, + }, + }); + }); + + it('should render the create new case link when the user has create privileges', async () => { + const result = appMockRender.render(<AllCases />); + await waitFor(() => { + expect(result.getByTestId('cases-table-add-case')).toBeInTheDocument(); + }); + }); + + it('should not render the create new case link when the user does not have create privileges', async () => { + appMockRender = createAppMockRenderer({ permissions: noCreateCasesPermissions() }); + const result = appMockRender.render(<AllCases />); + await waitFor(() => { + expect(result.queryByTestId('cases-table-add-case')).not.toBeInTheDocument(); + }); + }); }); it('should render the stats', async () => { diff --git a/x-pack/plugins/cases/public/components/all_cases/nav_buttons.tsx b/x-pack/plugins/cases/public/components/all_cases/nav_buttons.tsx index 5409cf092d8c9..5217c7022d907 100644 --- a/x-pack/plugins/cases/public/components/all_cases/nav_buttons.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/nav_buttons.tsx @@ -13,6 +13,7 @@ import * as i18n from './translations'; import { ConfigureCaseButton, LinkButton } from '../links'; import { ErrorMessage } from '../use_push_to_service/callout/types'; import { useCreateCaseNavigation } from '../../common/navigation'; +import { useCasesContext } from '../cases_context/use_cases_context'; const ButtonFlexGroup = styled(EuiFlexGroup)` ${({ theme }) => css` @@ -31,6 +32,7 @@ interface OwnProps { type Props = OwnProps; export const NavButtons: FunctionComponent<Props> = ({ actionsErrors }) => { + const { permissions } = useCasesContext(); const { getCreateCaseUrl, navigateToCreateCase } = useCreateCaseNavigation(); const navigateToCreateCaseClick = useCallback( (e) => { @@ -39,29 +41,40 @@ export const NavButtons: FunctionComponent<Props> = ({ actionsErrors }) => { }, [navigateToCreateCase] ); + + if (!permissions.create && !permissions.update) { + return null; + } + return ( - <ButtonFlexGroup responsive={false}> - <EuiFlexItem grow={false}> - <ConfigureCaseButton - label={i18n.CONFIGURE_CASES_BUTTON} - isDisabled={!isEmpty(actionsErrors)} - showToolTip={!isEmpty(actionsErrors)} - msgTooltip={!isEmpty(actionsErrors) ? <>{actionsErrors[0].description}</> : <></>} - titleTooltip={!isEmpty(actionsErrors) ? actionsErrors[0].title : ''} - /> - </EuiFlexItem> - <EuiFlexItem> - <LinkButton - fill - onClick={navigateToCreateCaseClick} - href={getCreateCaseUrl()} - iconType="plusInCircle" - data-test-subj="createNewCaseBtn" - > - {i18n.CREATE_CASE_TITLE} - </LinkButton> - </EuiFlexItem> - </ButtonFlexGroup> + <EuiFlexItem> + <ButtonFlexGroup responsive={false}> + {permissions.update && ( + <EuiFlexItem grow={false}> + <ConfigureCaseButton + label={i18n.CONFIGURE_CASES_BUTTON} + isDisabled={!isEmpty(actionsErrors)} + showToolTip={!isEmpty(actionsErrors)} + msgTooltip={!isEmpty(actionsErrors) ? <>{actionsErrors[0].description}</> : <></>} + titleTooltip={!isEmpty(actionsErrors) ? actionsErrors[0].title : ''} + /> + </EuiFlexItem> + )} + {permissions.create && ( + <EuiFlexItem> + <LinkButton + fill + onClick={navigateToCreateCaseClick} + href={getCreateCaseUrl()} + iconType="plusInCircle" + data-test-subj="createNewCaseBtn" + > + {i18n.CREATE_CASE_TITLE} + </LinkButton> + </EuiFlexItem> + )} + </ButtonFlexGroup> + </EuiFlexItem> ); }; NavButtons.displayName = 'NavButtons'; diff --git a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx index 312235b724b5a..b95b2fba0f14f 100644 --- a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx @@ -11,7 +11,7 @@ import userEvent from '@testing-library/user-event'; import React from 'react'; import AllCasesSelectorModal from '.'; import { Case, CaseStatuses, StatusAll } from '../../../../common'; -import { AppMockRenderer, createAppMockRenderer } from '../../../common/mock'; +import { allCasesPermissions, AppMockRenderer, createAppMockRenderer } from '../../../common/mock'; import { useCasesToast } from '../../../common/use_cases_toast'; import { alertComment } from '../../../containers/mock'; import { useCreateAttachments } from '../../../containers/use_create_attachments'; @@ -64,10 +64,7 @@ describe('use cases add to existing case modal hook', () => { externalReferenceAttachmentTypeRegistry, persistableStateAttachmentTypeRegistry, owner: ['test'], - permissions: { - all: true, - read: true, - }, + permissions: allCasesPermissions(), appId: 'test', appTitle: 'jest', basePath: '/jest', diff --git a/x-pack/plugins/cases/public/components/all_cases/table.tsx b/x-pack/plugins/cases/public/components/all_cases/table.tsx index 86f5ea1ad195c..afe653a50e4db 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table.tsx @@ -109,11 +109,11 @@ export const CasesTable: FunctionComponent<CasesTableProps> = ({ <EuiEmptyPrompt title={<h3>{i18n.NO_CASES}</h3>} titleSize="xs" - body={permissions.all ? i18n.NO_CASES_BODY : i18n.NO_CASES_BODY_READ_ONLY} + body={permissions.create ? i18n.NO_CASES_BODY : i18n.NO_CASES_BODY_READ_ONLY} actions={ - permissions.all && ( + permissions.create && ( <LinkButton - isDisabled={!permissions.all} + isDisabled={!permissions.create} fill size="s" onClick={navigateToCreateCaseClick} diff --git a/x-pack/plugins/cases/public/components/app/routes.test.tsx b/x-pack/plugins/cases/public/components/app/routes.test.tsx index d8191aa339e6a..205545b682857 100644 --- a/x-pack/plugins/cases/public/components/app/routes.test.tsx +++ b/x-pack/plugins/cases/public/components/app/routes.test.tsx @@ -10,9 +10,14 @@ import React from 'react'; import { MemoryRouterProps } from 'react-router'; import { render, screen, waitFor } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; -import { readCasesPermissions, TestProviders } from '../../common/mock'; +import { + noCreateCasesPermissions, + noUpdateCasesPermissions, + readCasesPermissions, + TestProviders, +} from '../../common/mock'; import { CasesRoutes } from './routes'; -import { CasesPermissions } from '../../client/helpers/capabilities'; +import { CasesPermissions } from '../../../common'; jest.mock('../all_cases', () => ({ AllCases: () => <div>{'All cases'}</div>, @@ -85,8 +90,8 @@ describe('Cases routes', () => { expect(screen.getByText('Create case')).toBeInTheDocument(); }); - it('shows the no privileges page if user is read only', () => { - renderWithRouter(['/cases/create'], readCasesPermissions()); + it('shows the no privileges page if the user does not have create privileges', () => { + renderWithRouter(['/cases/create'], noCreateCasesPermissions()); expect(screen.getByText('Privileges required')).toBeInTheDocument(); }); }); @@ -97,8 +102,8 @@ describe('Cases routes', () => { expect(screen.getByText('Configure cases')).toBeInTheDocument(); }); - it('shows the no privileges page if user is read only', () => { - renderWithRouter(['/cases/configure'], readCasesPermissions()); + it('shows the no privileges page if the user does not have update privileges', () => { + renderWithRouter(['/cases/configure'], noUpdateCasesPermissions()); expect(screen.getByText('Privileges required')).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/cases/public/components/app/routes.tsx b/x-pack/plugins/cases/public/components/app/routes.tsx index fae77ef94fb0e..6e952ce84ba1e 100644 --- a/x-pack/plugins/cases/public/components/app/routes.tsx +++ b/x-pack/plugins/cases/public/components/app/routes.tsx @@ -58,7 +58,7 @@ const CasesRoutesComponent: React.FC<CasesRoutesProps> = ({ </Route> <Route path={getCreateCasePath(basePath)}> - {permissions.all ? ( + {permissions.create ? ( <CreateCase onSuccess={onCreateCaseSuccess} onCancel={navigateToAllCases} @@ -70,7 +70,7 @@ const CasesRoutesComponent: React.FC<CasesRoutesProps> = ({ </Route> <Route path={getCasesConfigurePath(basePath)}> - {permissions.all ? ( + {permissions.update ? ( <ConfigureCases /> ) : ( <NoPrivilegesPage pageName={i18n.CONFIGURE_CASES_PAGE_NAME} /> diff --git a/x-pack/plugins/cases/public/components/app/use_available_owners.test.ts b/x-pack/plugins/cases/public/components/app/use_available_owners.test.ts index 3475cae722e43..a26647704785f 100644 --- a/x-pack/plugins/cases/public/components/app/use_available_owners.test.ts +++ b/x-pack/plugins/cases/public/components/app/use_available_owners.test.ts @@ -7,8 +7,13 @@ import { renderHook } from '@testing-library/react-hooks'; -import { OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER } from '../../../common/constants'; +import { APP_ID, OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER } from '../../../common/constants'; import { useKibana } from '../../common/lib/kibana'; +import { + allCasesCapabilities, + noCasesCapabilities, + readCasesCapabilities, +} from '../../common/mock'; import { useAvailableCasesOwners } from './use_available_owners'; jest.mock('../../common/lib/kibana'); @@ -16,30 +21,19 @@ jest.mock('../../common/lib/kibana'); const useKibanaMock = useKibana as jest.MockedFunction<typeof useKibana>; const hasAll = { - securitySolutionCases: { - crud_cases: true, - read_cases: true, - }, - observabilityCases: { - crud_cases: true, - read_cases: true, - }, + securitySolutionCases: allCasesCapabilities(), + observabilityCases: allCasesCapabilities(), + generalCases: allCasesCapabilities(), }; -const hasSecurityAsCrudAndObservabilityAsRead = { - securitySolutionCases: { - crud_cases: true, - }, - observabilityCases: { - read_cases: true, - }, +const secAllObsReadGenNone = { + securitySolutionCases: allCasesCapabilities(), + observabilityCases: readCasesCapabilities(), + generalCases: noCasesCapabilities(), }; const unrelatedFeatures = { - bogusCapability: { - crud_cases: true, - read_cases: true, - }, + bogusCapability: allCasesCapabilities(), }; const mockKibana = (permissionType: unknown = hasAll) => { @@ -57,7 +51,7 @@ describe('useAvailableCasesOwners correctly grabs user case permissions', () => mockKibana(); const { result } = renderHook(useAvailableCasesOwners); - expect(result.current).toEqual([SECURITY_SOLUTION_OWNER, OBSERVABILITY_OWNER]); + expect(result.current).toEqual([SECURITY_SOLUTION_OWNER, OBSERVABILITY_OWNER, APP_ID]); }); it('returns no owner types if user has access to none', () => { @@ -68,17 +62,17 @@ describe('useAvailableCasesOwners correctly grabs user case permissions', () => }); it('returns only the permission it should have with CRUD as default', () => { - mockKibana(hasSecurityAsCrudAndObservabilityAsRead); + mockKibana(secAllObsReadGenNone); const { result } = renderHook(useAvailableCasesOwners); expect(result.current).toEqual([SECURITY_SOLUTION_OWNER]); }); it('returns only the permission it should have with READ as default', () => { - mockKibana(hasSecurityAsCrudAndObservabilityAsRead); - const { result } = renderHook(() => useAvailableCasesOwners('read')); + mockKibana(secAllObsReadGenNone); + const { result } = renderHook(() => useAvailableCasesOwners(['read'])); - expect(result.current).toEqual([OBSERVABILITY_OWNER]); + expect(result.current).toEqual([SECURITY_SOLUTION_OWNER, OBSERVABILITY_OWNER]); }); it('returns no owners when the capabilities does not contain valid entries', () => { diff --git a/x-pack/plugins/cases/public/components/app/use_available_owners.ts b/x-pack/plugins/cases/public/components/app/use_available_owners.ts index 783e856bd36e9..8715af5d6fa68 100644 --- a/x-pack/plugins/cases/public/components/app/use_available_owners.ts +++ b/x-pack/plugins/cases/public/components/app/use_available_owners.ts @@ -5,27 +5,45 @@ * 2.0. */ +import { APP_ID, FEATURE_ID } from '../../../common/constants'; import { useKibana } from '../../common/lib/kibana'; +import { CasesPermissions } from '../../containers/types'; + +type Capability = Omit<keyof CasesPermissions, 'all'>; /** * - * @param level : 'crud' | 'read' (default: 'crud') - * - * `securitySolution` owner uses cases capability feature id: 'securitySolutionCases'; //owner - * `observability` owner uses cases capability feature id: 'observabilityCases'; - * both solutions use `crud_cases` and `read_cases` capability names + * @param capabilities : specifies the requirements for a valid owner, an owner will be included if it has the specified + * capabilities **/ -export const useAvailableCasesOwners = (level: 'crud' | 'read' = 'crud'): string[] => { - const { capabilities } = useKibana().services.application; - const capabilityName = `${level}_cases`; - return Object.entries(capabilities).reduce( - (availableOwners: string[], [featureId, capability]) => { - if (featureId.endsWith('Cases') && !!capability[capabilityName]) { - availableOwners.push(featureId.replace('Cases', '')); +export const useAvailableCasesOwners = ( + capabilities: Capability[] = ['create', 'read', 'update', 'delete', 'push'] +): string[] => { + const { capabilities: kibanaCapabilities } = useKibana().services.application; + + return Object.entries(kibanaCapabilities).reduce( + (availableOwners: string[], [featureId, kibananCapability]) => { + if (!featureId.endsWith('Cases')) { + return availableOwners; + } + for (const cap of capabilities) { + const hasCapability = !!kibananCapability[`${cap}_cases`]; + if (!hasCapability) { + return availableOwners; + } } + availableOwners.push(getOwnerFromFeatureID(featureId)); return availableOwners; }, [] ); }; + +const getOwnerFromFeatureID = (featureID: string) => { + if (featureID === FEATURE_ID) { + return APP_ID; + } + + return featureID.replace('Cases', ''); +}; diff --git a/x-pack/plugins/cases/public/components/app/use_readonly_header.ts b/x-pack/plugins/cases/public/components/app/use_readonly_header.ts index 08aa05ab98ffe..40c4d25468d15 100644 --- a/x-pack/plugins/cases/public/components/app/use_readonly_header.ts +++ b/x-pack/plugins/cases/public/components/app/use_readonly_header.ts @@ -10,6 +10,7 @@ import { useCallback, useEffect } from 'react'; import * as i18n from './translations'; import { useKibana } from '../../common/lib/kibana'; import { useCasesContext } from '../cases_context/use_cases_context'; +import { isReadOnlyPermissions } from '../../utils/permissions'; /** * This component places a read-only icon badge in the header if user only has read permissions @@ -20,7 +21,7 @@ export function useReadonlyHeader() { // if the user is read only then display the glasses badge in the global navigation header const setBadge = useCallback(() => { - if (!permissions.all && permissions.read) { + if (isReadOnlyPermissions(permissions)) { chrome.setBadge({ text: i18n.READ_ONLY_BADGE_TEXT, tooltip: i18n.READ_ONLY_BADGE_TOOLTIP, diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx index 308f6bc86f41a..8735b94d71b2c 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { useDeleteCases } from '../../containers/use_delete_cases'; -import { TestProviders } from '../../common/mock'; +import { noDeleteCasesPermissions, TestProviders } from '../../common/mock'; import { basicCase, basicPush } from '../../containers/mock'; import { Actions } from './actions'; import * as i18n from '../case_view/translations'; @@ -67,6 +67,17 @@ describe('CaseView actions', () => { expect(handleToggleModal).toHaveBeenCalled(); }); + it('does not show trash icon when user does not have deletion privileges', () => { + const wrapper = mount( + <TestProviders permissions={noDeleteCasesPermissions()}> + <Actions {...defaultProps} /> + </TestProviders> + ); + + expect(wrapper.find('[data-test-subj="confirm-delete-case-modal"]').exists()).toBeFalsy(); + expect(wrapper.find('button[data-test-subj="property-actions-ellipses"]').exists()).toBeFalsy(); + }); + it('toggle delete modal and confirm', () => { useDeleteCasesMock.mockImplementation(() => ({ ...defaultDeleteState, diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx index 3c78fa6f5fa4b..975cf89fc1031 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx @@ -7,6 +7,7 @@ import { isEmpty } from 'lodash/fp'; import React, { useMemo } from 'react'; +import { EuiFlexItem } from '@elastic/eui'; import * as i18n from '../case_view/translations'; import { useDeleteCases } from '../../containers/use_delete_cases'; import { ConfirmDeleteCaseModal } from '../confirm_delete_case'; @@ -14,6 +15,7 @@ import { PropertyActions } from '../property_actions'; import { Case } from '../../../common/ui/types'; import { CaseService } from '../../containers/use_get_case_user_actions'; import { useAllCasesNavigation } from '../../common/navigation'; +import { useCasesContext } from '../cases_context/use_cases_context'; interface CaseViewActions { caseData: Case; @@ -25,14 +27,19 @@ const ActionsComponent: React.FC<CaseViewActions> = ({ caseData, currentExternal const { handleToggleModal, handleOnDeleteConfirm, isDeleted, isDisplayConfirmDeleteModal } = useDeleteCases(); const { navigateToAllCases } = useAllCasesNavigation(); + const { permissions } = useCasesContext(); const propertyActions = useMemo( () => [ - { - iconType: 'trash', - label: i18n.DELETE_CASE(), - onClick: handleToggleModal, - }, + ...(permissions.delete + ? [ + { + iconType: 'trash', + label: i18n.DELETE_CASE(), + onClick: handleToggleModal, + }, + ] + : []), ...(currentExternalIncident != null && !isEmpty(currentExternalIncident?.externalUrl) ? [ { @@ -43,15 +50,20 @@ const ActionsComponent: React.FC<CaseViewActions> = ({ caseData, currentExternal ] : []), ], - [handleToggleModal, currentExternalIncident] + [handleToggleModal, currentExternalIncident, permissions.delete] ); if (isDeleted) { navigateToAllCases(); return null; } + + if (propertyActions.length === 0) { + return null; + } + return ( - <> + <EuiFlexItem grow={false} data-test-subj="case-view-actions"> <PropertyActions propertyActions={propertyActions} /> <ConfirmDeleteCaseModal caseTitle={caseData.title} @@ -59,7 +71,7 @@ const ActionsComponent: React.FC<CaseViewActions> = ({ caseData, currentExternal onCancel={handleToggleModal} onConfirm={handleOnDeleteConfirm.bind(null, [{ id: caseData.id, title: caseData.title }])} /> - </> + </EuiFlexItem> ); }; ActionsComponent.displayName = 'Actions'; diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx index f9c92c8222ccf..1802a063ca932 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx @@ -7,11 +7,17 @@ import React from 'react'; import { mount } from 'enzyme'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import { basicCase, caseUserActions, getAlertUserAction } from '../../containers/mock'; import { CaseActionBar, CaseActionBarProps } from '.'; -import { TestProviders } from '../../common/mock'; +import { + allCasesPermissions, + noDeleteCasesPermissions, + noUpdateCasesPermissions, + TestProviders, +} from '../../common/mock'; import { useGetCaseUserActions } from '../../containers/use_get_case_user_actions'; import { useRefreshCaseViewPage } from '../case_view/use_on_refresh_case_view_page'; @@ -188,4 +194,56 @@ describe('CaseActionBar', () => { expect(getByText('Case opened')).toBeInTheDocument(); }); + + it('should show the change status text when the user has update privileges', () => { + render( + <TestProviders> + <CaseActionBar {...defaultProps} /> + </TestProviders> + ); + + expect(screen.getByTitle('Change status')).toBeInTheDocument(); + }); + + it('should not show the change status text when the user does not have update privileges', () => { + render( + <TestProviders permissions={noUpdateCasesPermissions()}> + <CaseActionBar {...defaultProps} /> + </TestProviders> + ); + + expect(screen.queryByTitle('Change status')).not.toBeInTheDocument(); + }); + + it('should not show the sync alerts toggle when the user does not have update privileges', () => { + const { queryByText } = render( + <TestProviders permissions={noUpdateCasesPermissions()}> + <CaseActionBar {...defaultProps} /> + </TestProviders> + ); + + expect(queryByText('Sync alerts')).not.toBeInTheDocument(); + }); + + it('should not show the delete item in the menu when the user does not have delete privileges', () => { + const { queryByText, queryByTestId } = render( + <TestProviders permissions={noDeleteCasesPermissions()}> + <CaseActionBar {...defaultProps} /> + </TestProviders> + ); + + expect(queryByTestId('property-actions-ellipses')).not.toBeInTheDocument(); + expect(queryByText('Delete case')).not.toBeInTheDocument(); + }); + + it('should show the the delete item in the menu when the user does have delete privileges', () => { + const { queryByText } = render( + <TestProviders permissions={allCasesPermissions()}> + <CaseActionBar {...defaultProps} /> + </TestProviders> + ); + + userEvent.click(screen.getByTestId('property-actions-ellipses')); + expect(queryByText('Delete case')).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx index dbffb0c338248..36d0a0152171f 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx @@ -107,7 +107,7 @@ const CaseActionBarComponent: React.FC<CaseActionBarProps> = ({ <EuiDescriptionListDescription> <StatusContextMenu currentStatus={caseData.status} - disabled={!permissions.all || isLoading} + disabled={!permissions.update || isLoading} onStatusChanged={onStatusChanged} /> </EuiDescriptionListDescription> @@ -134,7 +134,7 @@ const CaseActionBarComponent: React.FC<CaseActionBarProps> = ({ responsive={false} justifyContent="spaceBetween" > - {permissions.all && isSyncAlertsEnabled && ( + {permissions.update && isSyncAlertsEnabled && ( <EuiFlexItem grow={false}> <EuiDescriptionListTitle> <EuiFlexGroup @@ -172,14 +172,7 @@ const CaseActionBarComponent: React.FC<CaseActionBarProps> = ({ </EuiButtonEmpty> </span> </EuiFlexItem> - {permissions.all && ( - <EuiFlexItem grow={false} data-test-subj="case-view-actions"> - <Actions - caseData={caseData} - currentExternalIncident={currentExternalIncident} - /> - </EuiFlexItem> - )} + <Actions caseData={caseData} currentExternalIncident={currentExternalIncident} /> </EuiFlexGroup> </EuiDescriptionList> </EuiFlexItem> diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx index f934cc88dc404..8a3a457bcfd00 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx @@ -13,7 +13,11 @@ import { getAlertUserAction, } from '../../../containers/mock'; import React from 'react'; -import { AppMockRenderer, createAppMockRenderer } from '../../../common/mock'; +import { + AppMockRenderer, + createAppMockRenderer, + noUpdateCasesPermissions, +} from '../../../common/mock'; import { CaseViewActivity } from './case_view_activity'; import { ConnectorTypes } from '../../../../common/api/connectors'; import { Case } from '../../../../common'; @@ -110,6 +114,30 @@ describe('Case View Page activity tab', () => { expect(useGetCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); }); + it('should not render the case view status button when the user does not have update permissions', () => { + appMockRender = createAppMockRenderer({ permissions: noUpdateCasesPermissions() }); + + const result = appMockRender.render(<CaseViewActivity {...caseProps} />); + expect(result.getByTestId('case-view-activity')).toBeTruthy(); + expect(result.getByTestId('user-actions')).toBeTruthy(); + expect(result.getByTestId('case-tags')).toBeTruthy(); + expect(result.getByTestId('connector-edit-header')).toBeTruthy(); + expect(result.queryByTestId('case-view-status-action-button')).not.toBeInTheDocument(); + expect(useGetCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + }); + + it('should disable the severity selector when the user does not have update permissions', () => { + appMockRender = createAppMockRenderer({ permissions: noUpdateCasesPermissions() }); + + const result = appMockRender.render(<CaseViewActivity {...caseProps} />); + expect(result.getByTestId('case-view-activity')).toBeTruthy(); + expect(result.getByTestId('user-actions')).toBeTruthy(); + expect(result.getByTestId('case-tags')).toBeTruthy(); + expect(result.getByTestId('connector-edit-header')).toBeTruthy(); + expect(result.getByTestId('case-severity-selection')).toBeDisabled(); + expect(useGetCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + }); + it('should show a loading when is fetching data is true and hide the user actions activity', () => { useGetCaseUserActionsMock.mockReturnValue({ ...defaultUseGetCaseUserActions, diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx index ccf0bd9b475b3..82ce1be7dc84b 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx @@ -133,7 +133,7 @@ export const CaseViewActivity = ({ onShowAlertDetails={onShowAlertDetails} onUpdateField={onUpdateField} statusActionButton={ - permissions.all ? ( + permissions.update ? ( <StatusActionButton status={caseData.status} onStatusChanged={changeStatus} @@ -149,7 +149,7 @@ export const CaseViewActivity = ({ </EuiFlexItem> <EuiFlexItem grow={2}> <SeveritySidebarSelector - isDisabled={!permissions.all} + isDisabled={!permissions.update} isLoading={isLoading} selectedSeverity={caseData.severity} onSeverityChange={onUpdateSeverity} diff --git a/x-pack/plugins/cases/public/components/cases_context/index.tsx b/x-pack/plugins/cases/public/components/cases_context/index.tsx index 161fcce7abcfb..627dec248b371 100644 --- a/x-pack/plugins/cases/public/components/cases_context/index.tsx +++ b/x-pack/plugins/cases/public/components/cases_context/index.tsx @@ -16,7 +16,7 @@ import { casesContextReducer, getInitialCasesContextState, } from './cases_context_reducer'; -import { CasesFeaturesAllRequired, CasesFeatures } from '../../containers/types'; +import { CasesFeaturesAllRequired, CasesFeatures, CasesPermissions } from '../../containers/types'; import { CasesGlobalComponents } from './cases_global_components'; import { ReleasePhase } from '../types'; import { ExternalReferenceAttachmentTypeRegistry } from '../../client/attachment_framework/external_reference_registry'; @@ -30,10 +30,7 @@ export interface CasesContextValue { owner: string[]; appId: string; appTitle: string; - permissions: { - all: boolean; - read: boolean; - }; + permissions: CasesPermissions; basePath: string; features: CasesFeaturesAllRequired; releasePhase: ReleasePhase; diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx index b6c46cbd91731..11af375d78965 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx @@ -10,7 +10,7 @@ import { ReactWrapper, mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; import { ConfigureCases } from '.'; -import { noCasesPermissions, TestProviders } from '../../common/mock'; +import { noUpdateCasesPermissions, TestProviders } from '../../common/mock'; import { Connectors } from './connectors'; import { ClosureOptions } from './closure_options'; @@ -188,10 +188,10 @@ describe('ConfigureCases', () => { expect(wrapper.find('[data-test-subj="edit-connector-flyout"]').exists()).toBe(false); }); - test('it disables correctly when the user cannot crud', () => { + test('it disables correctly when the user cannot update', () => { const newWrapper = mount(<ConfigureCases />, { wrappingComponent: TestProviders, - wrappingComponentProps: { permissions: noCasesPermissions() }, + wrappingComponentProps: { permissions: noUpdateCasesPermissions() }, }); expect(newWrapper.find('button[data-test-subj="dropdown-connectors"]').prop('disabled')).toBe( diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.tsx index bf75dd5a828cd..fbfadb6b1a7cd 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.tsx @@ -225,7 +225,7 @@ export const ConfigureCases: React.FC = React.memo(() => { <SectionWrapper> <ClosureOptions closureTypeSelected={closureType} - disabled={persistLoading || isLoadingConnectors || !permissions.all} + disabled={persistLoading || isLoadingConnectors || !permissions.update} onChangeClosureType={onChangeClosureType} /> </SectionWrapper> @@ -233,13 +233,13 @@ export const ConfigureCases: React.FC = React.memo(() => { <Connectors actionTypes={actionTypes} connectors={connectors ?? []} - disabled={persistLoading || isLoadingConnectors || !permissions.all} + disabled={persistLoading || isLoadingConnectors || !permissions.update} handleShowEditFlyout={onClickUpdateConnector} isLoading={isLoadingAny} mappings={mappings} onChangeConnector={onChangeConnector} selectedConnector={connector} - updateConnectorDisabled={updateConnectorDisabled || !permissions.all} + updateConnectorDisabled={updateConnectorDisabled || !permissions.update} /> </SectionWrapper> {ConnectorAddFlyout} diff --git a/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx b/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx index ee8c34faff078..9205dd357c762 100644 --- a/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx +++ b/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx @@ -15,6 +15,7 @@ import { AppMockRenderer, createAppMockRenderer, readCasesPermissions, + noPushCasesPermissions, TestProviders, } from '../../common/mock'; import { basicCase, basicPush, caseUserActions, connectorsMock } from '../../containers/mock'; @@ -362,6 +363,16 @@ describe('EditConnector ', () => { }); }); + it('does not show the push button if the user does not have push permissions', async () => { + const defaultProps = getDefaultProps(); + + appMockRender = createAppMockRenderer({ permissions: noPushCasesPermissions() }); + const result = appMockRender.render(<EditConnector {...defaultProps} />); + await waitFor(() => { + expect(result.queryByTestId('has-data-to-push-button')).toBe(null); + }); + }); + it('does not show the edit connectors pencil if the user does not have read access to actions', async () => { const defaultProps = getDefaultProps(); const props = { ...defaultProps, connectors: [] }; @@ -376,4 +387,16 @@ describe('EditConnector ', () => { expect(result.queryByTestId('connector-edit')).toBe(null); }); }); + + it('does not show the edit connectors pencil if the user does not have push permissions', async () => { + const defaultProps = getDefaultProps(); + const props = { ...defaultProps, connectors: [] }; + appMockRender = createAppMockRenderer({ permissions: noPushCasesPermissions() }); + + const result = appMockRender.render(<EditConnector {...props} />); + await waitFor(() => { + expect(result.getByTestId('connector-edit-header')).toBeInTheDocument(); + expect(result.queryByTestId('connector-edit')).toBe(null); + }); + }); }); diff --git a/x-pack/plugins/cases/public/components/edit_connector/index.tsx b/x-pack/plugins/cases/public/components/edit_connector/index.tsx index 0c691460ba007..cbfea7913dec7 100644 --- a/x-pack/plugins/cases/public/components/edit_connector/index.tsx +++ b/x-pack/plugins/cases/public/components/edit_connector/index.tsx @@ -288,7 +288,7 @@ export const EditConnector = React.memo( <h4>{i18n.CONNECTORS}</h4> </EuiFlexItem> {isLoading && <EuiLoadingSpinner data-test-subj="connector-loading" />} - {!isLoading && !editConnector && permissions.all && actionsReadCapabilities && ( + {!isLoading && !editConnector && permissions.push && actionsReadCapabilities && ( <EuiFlexItem data-test-subj="connector-edit" grow={false}> <EuiButtonIcon data-test-subj="connector-edit-button" @@ -316,7 +316,7 @@ export const EditConnector = React.memo( connectors, dataTestSubj: 'caseConnectors', defaultValue: selectedConnector, - disabled: !permissions.all, + disabled: !permissions.push, idAria: 'caseConnectors', isEdit: editConnector, isLoading, @@ -372,7 +372,7 @@ export const EditConnector = React.memo( {pushCallouts == null && !isLoading && !editConnector && - permissions.all && + permissions.push && actionsReadCapabilities && ( <EuiFlexItem data-test-subj="has-data-to-push-button" grow={false}> <span>{pushButton}</span> diff --git a/x-pack/plugins/cases/public/components/header_page/__snapshots__/editable_title.test.tsx.snap b/x-pack/plugins/cases/public/components/header_page/__snapshots__/editable_title.test.tsx.snap index 832b5477d17f7..bc4dba5843e62 100644 --- a/x-pack/plugins/cases/public/components/header_page/__snapshots__/editable_title.test.tsx.snap +++ b/x-pack/plugins/cases/public/components/header_page/__snapshots__/editable_title.test.tsx.snap @@ -44,7 +44,11 @@ exports[`EditableTitle renders 1`] = ` ], "permissions": Object { "all": true, + "create": true, + "delete": true, + "push": true, "read": true, + "update": true, }, "persistableStateAttachmentTypeRegistry": PersistableStateAttachmentTypeRegistry { "collection": Map {}, diff --git a/x-pack/plugins/cases/public/components/header_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/cases/public/components/header_page/__snapshots__/index.test.tsx.snap index cfb75e0c286f2..083975a40330e 100644 --- a/x-pack/plugins/cases/public/components/header_page/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/cases/public/components/header_page/__snapshots__/index.test.tsx.snap @@ -44,7 +44,11 @@ exports[`HeaderPage it renders 1`] = ` ], "permissions": Object { "all": true, + "create": true, + "delete": true, + "push": true, "read": true, + "update": true, }, "persistableStateAttachmentTypeRegistry": PersistableStateAttachmentTypeRegistry { "collection": Map {}, diff --git a/x-pack/plugins/cases/public/components/header_page/editable_title.tsx b/x-pack/plugins/cases/public/components/header_page/editable_title.tsx index c92e1122c53e8..7e0dd2f5fd1fc 100644 --- a/x-pack/plugins/cases/public/components/header_page/editable_title.tsx +++ b/x-pack/plugins/cases/public/components/header_page/editable_title.tsx @@ -118,7 +118,7 @@ const EditableTitleComponent: React.FC<EditableTitleProps> = ({ onSubmit, isLoad ) : ( <Title title={title} releasePhase={releasePhase}> {isLoading && <MySpinner data-test-subj="editable-title-loading" />} - {!isLoading && permissions.all && ( + {!isLoading && permissions.update && ( <MyEuiButtonIcon aria-label={i18n.EDIT_TITLE_ARIA(title as string)} iconType="pencil" diff --git a/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.test.tsx b/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.test.tsx index eb968834d765e..c53c096aaa821 100644 --- a/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.test.tsx @@ -25,7 +25,7 @@ describe('NoCases', () => { ); }); - it('displays a message without a link to create a case when the user does not have write permissions', () => { + it('displays a message without a link to create a case when the user does not have create permissions', () => { const wrapper = mount( <TestProviders permissions={readCasesPermissions()}> <NoCases /> diff --git a/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.tsx b/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.tsx index d39dfdbb2c50b..b9c842dba279f 100644 --- a/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.tsx +++ b/x-pack/plugins/cases/public/components/recent_cases/no_cases/index.tsx @@ -24,7 +24,7 @@ const NoCasesComponent = () => { [navigateToCreateCase] ); - return permissions.all ? ( + return permissions.create ? ( <> <span>{i18n.NO_CASES}</span> <LinkAnchor diff --git a/x-pack/plugins/cases/public/components/tag_list/index.test.tsx b/x-pack/plugins/cases/public/components/tag_list/index.test.tsx index 46633503dd734..cbe17b0d8b8e3 100644 --- a/x-pack/plugins/cases/public/components/tag_list/index.test.tsx +++ b/x-pack/plugins/cases/public/components/tag_list/index.test.tsx @@ -107,7 +107,7 @@ describe('TagList ', () => { expect(wrapper.find(`[data-test-subj="tag-pepsi"]`).last().exists()).toBeTruthy(); }); - it('does not render when the user does not have write permissions', () => { + it('does not render when the user does not have update permissions', () => { const wrapper = mount( <TestProviders permissions={readCasesPermissions()}> <TagList {...defaultProps} /> diff --git a/x-pack/plugins/cases/public/components/tag_list/index.tsx b/x-pack/plugins/cases/public/components/tag_list/index.tsx index 74fb2efcb4fad..c85f989f88281 100644 --- a/x-pack/plugins/cases/public/components/tag_list/index.tsx +++ b/x-pack/plugins/cases/public/components/tag_list/index.tsx @@ -104,7 +104,7 @@ export const TagList = React.memo(({ isLoading, onSubmit, tags }: TagListProps) <h4>{i18n.TAGS}</h4> </EuiFlexItem> {isLoading && <EuiLoadingSpinner data-test-subj="tag-list-loading" />} - {!isLoading && permissions.all && ( + {!isLoading && permissions.update && ( <EuiFlexItem data-test-subj="tag-list-edit" grow={false}> <EuiButtonIcon data-test-subj="tag-list-edit-button" diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx index c00ebc7b48045..f56a55fdeb7b1 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx @@ -11,7 +11,7 @@ import { render, screen } from '@testing-library/react'; import '../../common/mock/match_media'; import { usePushToService, ReturnUsePushToService, UsePushToService } from '.'; -import { readCasesPermissions, TestProviders } from '../../common/mock'; +import { noPushCasesPermissions, readCasesPermissions, TestProviders } from '../../common/mock'; import { CaseStatuses, ConnectorTypes } from '../../../common/api'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; import { basicPush, actionLicenses, connectorsMock } from '../../containers/mock'; @@ -280,6 +280,24 @@ describe('usePushToService', () => { }); describe('user does not have write permissions', () => { + it('disables the push button when the user does not have push permissions', async () => { + await act(async () => { + const { result, waitForNextUpdate } = renderHook<UsePushToService, ReturnUsePushToService>( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => ( + <TestProviders permissions={noPushCasesPermissions()}> {children}</TestProviders> + ), + } + ); + await waitForNextUpdate(); + + const { getByTestId } = render(result.current.pushButton); + + expect(getByTestId('push-to-external-service')).toBeDisabled(); + }); + }); + it('does not display a message when user does not have a premium license', async () => { useFetchActionLicenseMock.mockImplementation(() => ({ isLoading: false, diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx index 253170fdd955c..a9e8f7c176b74 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx @@ -76,7 +76,7 @@ export const usePushToService = ({ // these message require that the user do some sort of write action as a result of the message, readonly users won't // be able to perform such an action so let's not display the error to the user in that situation - if (!permissions.all) { + if (!permissions.update) { return errors; } @@ -114,7 +114,7 @@ export const usePushToService = ({ return errors; // eslint-disable-next-line react-hooks/exhaustive-deps - }, [actionLicense, caseStatus, connectors.length, connector, loadingLicense, permissions.all]); + }, [actionLicense, caseStatus, connectors.length, connector, loadingLicense, permissions.update]); const pushToServiceButton = useMemo( () => ( @@ -126,7 +126,7 @@ export const usePushToService = ({ isLoading || loadingLicense || errorsMsg.length > 0 || - !permissions.all || + !permissions.push || !isValidConnector || !hasDataToPush } @@ -146,13 +146,13 @@ export const usePushToService = ({ hasDataToPush, isLoading, loadingLicense, - permissions.all, + permissions.push, isValidConnector, ] ); const objToReturn = useMemo(() => { - const hidePushButton = errorsMsg.length > 0 || !hasDataToPush || !permissions.all; + const hidePushButton = errorsMsg.length > 0 || !hasDataToPush || !permissions.push; return { pushButton: hidePushButton ? ( @@ -184,7 +184,7 @@ export const usePushToService = ({ hasLicenseError, onEditClick, pushToServiceButton, - permissions.all, + permissions.push, ]); return objToReturn; diff --git a/x-pack/plugins/cases/public/components/user_actions/index.tsx b/x-pack/plugins/cases/public/components/user_actions/index.tsx index 7224eee213719..4b53499c9e5ec 100644 --- a/x-pack/plugins/cases/public/components/user_actions/index.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/index.tsx @@ -233,7 +233,7 @@ export const UserActions = React.memo( const { permissions } = useCasesContext(); - const bottomActions = permissions.all + const bottomActions = permissions.create ? [ { username: ( diff --git a/x-pack/plugins/cases/public/components/user_actions/property_actions.test.tsx b/x-pack/plugins/cases/public/components/user_actions/property_actions.test.tsx index e9319169b953c..88df48c1fac78 100644 --- a/x-pack/plugins/cases/public/components/user_actions/property_actions.test.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/property_actions.test.tsx @@ -6,11 +6,15 @@ */ import React from 'react'; -import { mount, ReactWrapper } from 'enzyme'; -import { UserActionPropertyActions } from './property_actions'; -import { render } from '@testing-library/react'; +import { UserActionPropertyActions, UserActionPropertyActionsProps } from './property_actions'; +import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { TestProviders } from '../../common/mock'; +import { + noCreateCasesPermissions, + noDeleteCasesPermissions, + noUpdateCasesPermissions, + TestProviders, +} from '../../common/mock'; jest.mock('../../common/lib/kibana'); @@ -28,67 +32,123 @@ const props = { }; describe('UserActionPropertyActions ', () => { - let wrapper: ReactWrapper; - - beforeAll(() => { - wrapper = mount( - <TestProviders> - <UserActionPropertyActions {...props} /> - </TestProviders> - ); - }); - beforeEach(() => { jest.clearAllMocks(); }); it('renders', async () => { - expect( - wrapper.find('[data-test-subj="user-action-title-loading"]').first().exists() - ).toBeFalsy(); + render( + <TestProviders> + <UserActionPropertyActions {...props} /> + </TestProviders> + ); - expect(wrapper.find('[data-test-subj="property-actions"]').first().exists()).toBeTruthy(); + expect(screen.queryByTestId('user-action-title-loading')).not.toBeInTheDocument(); + expect(screen.getByTestId('property-actions')).toBeInTheDocument(); }); it('shows the edit and quote buttons', async () => { - wrapper.find('[data-test-subj="property-actions-ellipses"]').first().simulate('click'); - wrapper.find('[data-test-subj="property-actions-pencil"]').exists(); - wrapper.find('[data-test-subj="property-actions-quote"]').exists(); + const renderResult = render( + <TestProviders> + <UserActionPropertyActions {...props} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + expect(screen.getByTestId('property-actions-pencil')).toBeInTheDocument(); + expect(screen.getByTestId('property-actions-quote')).toBeInTheDocument(); }); it('quote click calls onQuote', async () => { - wrapper.find('[data-test-subj="property-actions-ellipses"]').first().simulate('click'); - wrapper.find('[data-test-subj="property-actions-quote"]').first().simulate('click'); + const renderResult = render( + <TestProviders> + <UserActionPropertyActions {...props} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + userEvent.click(renderResult.getByTestId('property-actions-quote')); + expect(onQuote).toHaveBeenCalledWith(props.id); }); it('pencil click calls onEdit', async () => { - wrapper.find('[data-test-subj="property-actions-ellipses"]').first().simulate('click'); - wrapper.find('[data-test-subj="property-actions-pencil"]').first().simulate('click'); + const renderResult = render( + <TestProviders> + <UserActionPropertyActions {...props} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + userEvent.click(renderResult.getByTestId('property-actions-pencil')); expect(onEdit).toHaveBeenCalledWith(props.id); }); it('shows the spinner when loading', async () => { - wrapper = mount( + render( <TestProviders> <UserActionPropertyActions {...props} isLoading={true} /> </TestProviders> ); - expect( - wrapper.find('[data-test-subj="user-action-title-loading"]').first().exists() - ).toBeTruthy(); - - expect(wrapper.find('[data-test-subj="property-actions"]').first().exists()).toBeFalsy(); + expect(screen.getByTestId('user-action-title-loading')).toBeInTheDocument(); + expect(screen.queryByTestId('property-actions')).not.toBeInTheDocument(); }); - describe('Delete button', () => { - const onDelete = jest.fn(); - const deleteProps = { - ...props, - onDelete, - deleteLabel: 'delete me', - deleteConfirmlabel: 'confirm delete me', - }; + describe('deletion props', () => { + let onDelete: jest.Mock; + let deleteProps: UserActionPropertyActionsProps; + + beforeEach(() => { + jest.clearAllMocks(); + + onDelete = jest.fn(); + deleteProps = { + ...props, + onDelete, + deleteLabel: 'delete me', + deleteConfirmTitle: 'confirm delete me', + }; + }); + + it('does not show the delete icon when the user does not have delete permissions', () => { + const renderResult = render( + <TestProviders permissions={noDeleteCasesPermissions()}> + <UserActionPropertyActions {...deleteProps} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + expect(renderResult.queryByTestId('property-actions-trash')).not.toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-pencil')).toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-quote')).toBeInTheDocument(); + }); + + it('does not show the pencil icon when the user does not have update permissions', () => { + const renderResult = render( + <TestProviders permissions={noUpdateCasesPermissions()}> + <UserActionPropertyActions {...deleteProps} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + expect(renderResult.queryByTestId('property-actions-trash')).toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-pencil')).not.toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-quote')).toBeInTheDocument(); + }); + + it('does not show the quote icon when the user does not have create permissions', () => { + const renderResult = render( + <TestProviders permissions={noCreateCasesPermissions()}> + <UserActionPropertyActions {...deleteProps} /> + </TestProviders> + ); + + userEvent.click(renderResult.getByTestId('property-actions-ellipses')); + expect(renderResult.queryByTestId('property-actions-trash')).toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-pencil')).toBeInTheDocument(); + expect(renderResult.queryByTestId('property-actions-quote')).not.toBeInTheDocument(); + }); + it('shows the delete button', () => { const renderResult = render( <TestProviders> diff --git a/x-pack/plugins/cases/public/components/user_actions/property_actions.tsx b/x-pack/plugins/cases/public/components/user_actions/property_actions.tsx index 502e69a9d1903..13273346241e5 100644 --- a/x-pack/plugins/cases/public/components/user_actions/property_actions.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/property_actions.tsx @@ -13,7 +13,7 @@ import { useLensOpenVisualization } from '../markdown_editor/plugins/lens/use_le import { CANCEL_BUTTON, CONFIRM_BUTTON } from './translations'; import { useCasesContext } from '../cases_context/use_cases_context'; -interface UserActionPropertyActionsProps { +export interface UserActionPropertyActionsProps { id: string; editLabel: string; deleteLabel?: string; @@ -59,47 +59,56 @@ const UserActionPropertyActionsComponent = ({ setShowDeleteConfirm(false); }, []); - const propertyActions = useMemo( - () => - [ - permissions.all - ? [ - { - iconType: 'pencil', - label: editLabel, - onClick: onEditClick, - }, - ...(deleteLabel && onDelete - ? [ - { - iconType: 'trash', - label: deleteLabel, - onClick: onDeleteClick, - }, - ] - : []), - { - iconType: 'quote', - label: quoteLabel, - onClick: onQuoteClick, - }, - ] - : [], - canUseEditor && actionConfig ? [actionConfig] : [], - ].flat(), - [ - permissions.all, - editLabel, - onEditClick, - deleteLabel, - onDelete, - onDeleteClick, - quoteLabel, - onQuoteClick, - canUseEditor, - actionConfig, - ] - ); + const propertyActions = useMemo(() => { + const showEditPencilIcon = permissions.update; + const showTrashIcon = permissions.delete && deleteLabel && onDelete; + const showQuoteIcon = permissions.create; + const showLensEditor = permissions.update && canUseEditor && actionConfig; + + return [ + ...(showEditPencilIcon + ? [ + { + iconType: 'pencil', + label: editLabel, + onClick: onEditClick, + }, + ] + : []), + ...(showTrashIcon + ? [ + { + iconType: 'trash', + label: deleteLabel, + onClick: onDeleteClick, + }, + ] + : []), + ...(showQuoteIcon + ? [ + { + iconType: 'quote', + label: quoteLabel, + onClick: onQuoteClick, + }, + ] + : []), + ...(showLensEditor ? [actionConfig] : []), + ]; + }, [ + permissions.update, + permissions.delete, + permissions.create, + deleteLabel, + onDelete, + canUseEditor, + actionConfig, + editLabel, + onEditClick, + onDeleteClick, + quoteLabel, + onQuoteClick, + ]); if (!propertyActions.length) { return null; diff --git a/x-pack/plugins/cases/public/mocks.ts b/x-pack/plugins/cases/public/mocks.ts index 5d86b31d1e0cd..57eead3b80b10 100644 --- a/x-pack/plugins/cases/public/mocks.ts +++ b/x-pack/plugins/cases/public/mocks.ts @@ -28,6 +28,14 @@ const hooksMock: jest.Mocked<CasesUiStart['hooks']> = { const helpersMock: jest.Mocked<CasesUiStart['helpers']> = { canUseCases: jest.fn(), + getUICapabilities: jest.fn().mockReturnValue({ + all: false, + create: false, + read: false, + update: false, + delete: false, + push: false, + }), getRuleIdFromEvent: jest.fn(), groupAlertsByRule: jest.fn(), }; diff --git a/x-pack/plugins/cases/public/plugin.ts b/x-pack/plugins/cases/public/plugin.ts index 410ce5b31b07f..53b3b57d4e2ef 100644 --- a/x-pack/plugins/cases/public/plugin.ts +++ b/x-pack/plugins/cases/public/plugin.ts @@ -24,6 +24,7 @@ import { getCasesContextLazy } from './client/ui/get_cases_context'; import { getCreateCaseFlyoutLazy } from './client/ui/get_create_case_flyout'; import { getRecentCasesLazy } from './client/ui/get_recent_cases'; import { groupAlertsByRule } from './client/helpers/group_alerts_by_rule'; +import { getUICapabilities } from './client/helpers/capabilities'; import { ExternalReferenceAttachmentTypeRegistry } from './client/attachment_framework/external_reference_registry'; import { PersistableStateAttachmentTypeRegistry } from './client/attachment_framework/persistable_state_registry'; @@ -150,6 +151,7 @@ export class CasesUiPlugin }, helpers: { canUseCases: canUseCases(core.application.capabilities), + getUICapabilities, getRuleIdFromEvent, groupAlertsByRule, }, diff --git a/x-pack/plugins/cases/public/types.ts b/x-pack/plugins/cases/public/types.ts index b417fd0202516..f07dd8cd9fb04 100644 --- a/x-pack/plugins/cases/public/types.ts +++ b/x-pack/plugins/cases/public/types.ts @@ -29,7 +29,7 @@ import type { } from '../common/api'; import type { UseCasesAddToExistingCaseModal } from './components/all_cases/selector_modal/use_cases_add_to_existing_case_modal'; import type { UseCasesAddToNewCaseFlyout } from './components/create/flyout/use_cases_add_to_new_case_flyout'; -import type { CasesOwners } from './client/helpers/can_use_cases'; +import { canUseCases } from './client/helpers/can_use_cases'; import { getRuleIdFromEvent } from './client/helpers/get_rule_id_from_event'; import type { GetCasesContextProps } from './client/ui/get_cases_context'; import type { GetCasesProps } from './client/ui/get_cases'; @@ -38,6 +38,7 @@ import type { GetCreateCaseFlyoutProps } from './client/ui/get_create_case_flyou import type { GetRecentCasesProps } from './client/ui/get_recent_cases'; import type { Cases, CasesStatus, CasesMetrics } from '../common/ui'; import { groupAlertsByRule } from './client/helpers/group_alerts_by_rule'; +import { getUICapabilities } from './client/helpers/capabilities'; import type { AttachmentFramework } from './client/attachment_framework/types'; import { ExternalReferenceAttachmentTypeRegistry } from './client/attachment_framework/external_reference_registry'; import { PersistableStateAttachmentTypeRegistry } from './client/attachment_framework/persistable_state_registry'; @@ -137,7 +138,8 @@ export interface CasesUiStart { * @param owners an array of CaseOwners that should be queried for permission * @returns An object denoting the case permissions of the current user */ - canUseCases: (owners?: CasesOwners[]) => { crud: boolean; read: boolean }; + canUseCases: ReturnType<typeof canUseCases>; + getUICapabilities: typeof getUICapabilities; getRuleIdFromEvent: typeof getRuleIdFromEvent; groupAlertsByRule: typeof groupAlertsByRule; }; diff --git a/x-pack/plugins/cases/public/utils/permissions.ts b/x-pack/plugins/cases/public/utils/permissions.ts new file mode 100644 index 0000000000000..827535d484588 --- /dev/null +++ b/x-pack/plugins/cases/public/utils/permissions.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CasesPermissions } from '../../common'; + +export const isReadOnlyPermissions = (permissions: CasesPermissions) => { + return ( + !permissions.all && + !permissions.create && + !permissions.update && + !permissions.delete && + !permissions.push && + permissions.read + ); +}; diff --git a/x-pack/plugins/cases/server/attachment_framework/external_reference_registry.ts b/x-pack/plugins/cases/server/attachment_framework/external_reference_registry.ts new file mode 100644 index 0000000000000..131f91868e0d9 --- /dev/null +++ b/x-pack/plugins/cases/server/attachment_framework/external_reference_registry.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { AttachmentTypeRegistry } from '../../common/registry'; +import { ExternalReferenceAttachmentType } from './types'; + +export class ExternalReferenceAttachmentTypeRegistry extends AttachmentTypeRegistry<ExternalReferenceAttachmentType> { + constructor() { + super('ExternalReferenceAttachmentTypeRegistry'); + } +} diff --git a/x-pack/plugins/cases/server/attachment_framework/types.ts b/x-pack/plugins/cases/server/attachment_framework/types.ts index eb99133149e48..50d9952a807ad 100644 --- a/x-pack/plugins/cases/server/attachment_framework/types.ts +++ b/x-pack/plugins/cases/server/attachment_framework/types.ts @@ -23,7 +23,14 @@ export interface PersistableStateAttachmentTypeSetup id: string; } +export interface ExternalReferenceAttachmentType { + id: string; +} + export interface AttachmentFramework { + registerExternalReference: ( + externalReferenceAttachmentType: ExternalReferenceAttachmentType + ) => void; registerPersistableState: ( persistableStateAttachmentType: PersistableStateAttachmentTypeSetup ) => void; diff --git a/x-pack/plugins/cases/server/client/attachments/add.ts b/x-pack/plugins/cases/server/client/attachments/add.ts index 2c58845ec6d57..979828c35ecdd 100644 --- a/x-pack/plugins/cases/server/client/attachments/add.ts +++ b/x-pack/plugins/cases/server/client/attachments/add.ts @@ -12,6 +12,10 @@ import { identity } from 'fp-ts/lib/function'; import { SavedObjectsUtils } from '@kbn/core/server'; +import { + isCommentRequestTypeExternalReference, + isCommentRequestTypePersistableState, +} from '../../../common/utils/attachments'; import { CaseResponse, CommentRequest, CommentRequestRt, throwErrors } from '../../../common/api'; import { CaseCommentModel } from '../../common/models'; @@ -50,7 +54,12 @@ export const addComment = async ( fold(throwErrors(Boom.badRequest), identity) ); - const { logger, authorization } = clientArgs; + const { + logger, + authorization, + persistableStateAttachmentTypeRegistry, + externalReferenceAttachmentTypeRegistry, + } = clientArgs; decodeCommentRequest(comment); try { @@ -61,6 +70,24 @@ export const addComment = async ( entities: [{ owner: comment.owner, id: savedObjectID }], }); + if ( + isCommentRequestTypeExternalReference(query) && + !externalReferenceAttachmentTypeRegistry.has(query.externalReferenceAttachmentTypeId) + ) { + throw Boom.badRequest( + `Attachment type ${query.externalReferenceAttachmentTypeId} is not registered.` + ); + } + + if ( + isCommentRequestTypePersistableState(query) && + !persistableStateAttachmentTypeRegistry.has(query.persistableStateAttachmentTypeId) + ) { + throw Boom.badRequest( + `Attachment type ${query.persistableStateAttachmentTypeId} is not registered.` + ); + } + const createdDate = new Date().toISOString(); const model = await CaseCommentModel.create(caseId, clientArgs); diff --git a/x-pack/plugins/cases/server/client/attachments/delete.ts b/x-pack/plugins/cases/server/client/attachments/delete.ts index 68852dd1edea8..f22a7d5ce3c79 100644 --- a/x-pack/plugins/cases/server/client/attachments/delete.ts +++ b/x-pack/plugins/cases/server/client/attachments/delete.ts @@ -79,6 +79,7 @@ export async function deleteAll( attachmentService.delete({ unsecuredSavedObjectsClient, attachmentId: comment.id, + refresh: false, }); // Ensuring we don't too many concurrent deletions running. @@ -149,6 +150,7 @@ export async function deleteComment( await attachmentService.delete({ unsecuredSavedObjectsClient, attachmentId: attachmentID, + refresh: false, }); await userActionService.createUserAction({ diff --git a/x-pack/plugins/cases/server/client/cases/create.ts b/x-pack/plugins/cases/server/client/cases/create.ts index 714c8199d11a5..1997977e98a32 100644 --- a/x-pack/plugins/cases/server/client/cases/create.ts +++ b/x-pack/plugins/cases/server/client/cases/create.ts @@ -79,6 +79,7 @@ export const create = async ( newCase: query, }), id: savedObjectID, + refresh: false, }); await userActionService.createUserAction({ diff --git a/x-pack/plugins/cases/server/client/cases/delete.ts b/x-pack/plugins/cases/server/client/cases/delete.ts index 3e3f70433a624..64fc7ef50078d 100644 --- a/x-pack/plugins/cases/server/client/cases/delete.ts +++ b/x-pack/plugins/cases/server/client/cases/delete.ts @@ -53,6 +53,7 @@ export async function deleteCases(ids: string[], clientArgs: CasesClientArgs): P const deleteCasesMapper = async (id: string) => caseService.deleteCase({ id, + refresh: false, }); // Ensuring we don't too many concurrent deletions running. @@ -81,6 +82,7 @@ export async function deleteCases(ids: string[], clientArgs: CasesClientArgs): P attachmentService.delete({ unsecuredSavedObjectsClient, attachmentId: comment.id, + refresh: false, }) ); diff --git a/x-pack/plugins/cases/server/client/cases/push.ts b/x-pack/plugins/cases/server/client/cases/push.ts index cfdec1da5e775..46e570db2dbe8 100644 --- a/x-pack/plugins/cases/server/client/cases/push.ts +++ b/x-pack/plugins/cases/server/client/cases/push.ts @@ -237,6 +237,7 @@ export const push = async ( updated_by: { username, full_name, email }, }, version: myCase.version, + refresh: false, }), attachmentService.bulkUpdate({ @@ -251,6 +252,7 @@ export const push = async ( }, version: comment.version, })), + refresh: false, }), ]); @@ -262,6 +264,7 @@ export const push = async ( user, caseId, owner: myCase.attributes.owner, + refresh: false, }); if (myCase.attributes.settings.syncAlerts) { diff --git a/x-pack/plugins/cases/server/client/cases/update.ts b/x-pack/plugins/cases/server/client/cases/update.ts index 6569dcd3f52b2..8678846db8bee 100644 --- a/x-pack/plugins/cases/server/client/cases/update.ts +++ b/x-pack/plugins/cases/server/client/cases/update.ts @@ -339,6 +339,7 @@ export const update = async ( version, }; }), + refresh: false, }); // If a status update occurred and the case is synced then we need to update all alerts' status diff --git a/x-pack/plugins/cases/server/client/configure/client.ts b/x-pack/plugins/cases/server/client/configure/client.ts index 9bb6b83316264..735317f312a39 100644 --- a/x-pack/plugins/cases/server/client/configure/client.ts +++ b/x-pack/plugins/cases/server/client/configure/client.ts @@ -289,11 +289,13 @@ async function update( mappings = await casesClientInternal.configuration.updateMappings({ connector, mappingId: resMappings[0].id, + refresh: false, }); } else { mappings = await casesClientInternal.configuration.createMappings({ connector, owner: configuration.attributes.owner, + refresh: false, }); } } @@ -375,7 +377,11 @@ async function create( if (myCaseConfigure.saved_objects.length > 0) { const deleteConfigurationMapper = async (c: SavedObject<CasesConfigureAttributes>) => - caseConfigureService.delete({ unsecuredSavedObjectsClient, configurationId: c.id }); + caseConfigureService.delete({ + unsecuredSavedObjectsClient, + configurationId: c.id, + refresh: false, + }); // Ensuring we don't too many concurrent deletions running. await pMap(myCaseConfigure.saved_objects, deleteConfigurationMapper, { @@ -397,6 +403,7 @@ async function create( mappings = await casesClientInternal.configuration.createMappings({ connector: configuration.connector, owner: configuration.owner, + refresh: false, }); } catch (e) { error = e.isBoom diff --git a/x-pack/plugins/cases/server/client/configure/create_mappings.ts b/x-pack/plugins/cases/server/client/configure/create_mappings.ts index 52f00453ef0ec..6067daaee5526 100644 --- a/x-pack/plugins/cases/server/client/configure/create_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/create_mappings.ts @@ -13,7 +13,7 @@ import { CreateMappingsArgs } from './types'; import { casesConnectors } from '../../connectors'; export const createMappings = async ( - { connector, owner }: CreateMappingsArgs, + { connector, owner, refresh }: CreateMappingsArgs, clientArgs: CasesClientArgs ): Promise<ConnectorMappingsAttributes[]> => { const { unsecuredSavedObjectsClient, connectorMappingsService, logger } = clientArgs; @@ -34,6 +34,7 @@ export const createMappings = async ( id: connector.id, }, ], + refresh, }); return theMapping.attributes.mappings; diff --git a/x-pack/plugins/cases/server/client/configure/types.ts b/x-pack/plugins/cases/server/client/configure/types.ts index c7ac49c9e94aa..d425b7f67d908 100644 --- a/x-pack/plugins/cases/server/client/configure/types.ts +++ b/x-pack/plugins/cases/server/client/configure/types.ts @@ -6,15 +6,16 @@ */ import { CaseConnector } from '../../../common/api'; +import { IndexRefresh } from '../../services/types'; export interface MappingsArgs { connector: CaseConnector; } -export interface CreateMappingsArgs extends MappingsArgs { +export interface CreateMappingsArgs extends MappingsArgs, IndexRefresh { owner: string; } -export interface UpdateMappingsArgs extends MappingsArgs { +export interface UpdateMappingsArgs extends MappingsArgs, IndexRefresh { mappingId: string; } diff --git a/x-pack/plugins/cases/server/client/configure/update_mappings.ts b/x-pack/plugins/cases/server/client/configure/update_mappings.ts index 490ec69cc5a26..4068827d8eb00 100644 --- a/x-pack/plugins/cases/server/client/configure/update_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/update_mappings.ts @@ -13,7 +13,7 @@ import { UpdateMappingsArgs } from './types'; import { casesConnectors } from '../../connectors'; export const updateMappings = async ( - { connector, mappingId }: UpdateMappingsArgs, + { connector, mappingId, refresh }: UpdateMappingsArgs, clientArgs: CasesClientArgs ): Promise<ConnectorMappingsAttributes[]> => { const { unsecuredSavedObjectsClient, connectorMappingsService, logger } = clientArgs; @@ -34,6 +34,7 @@ export const updateMappings = async ( id: connector.id, }, ], + refresh, }); return theMapping.attributes.mappings ?? []; diff --git a/x-pack/plugins/cases/server/client/factory.ts b/x-pack/plugins/cases/server/client/factory.ts index cbf859e1781ec..5b28ca5ffd21a 100644 --- a/x-pack/plugins/cases/server/client/factory.ts +++ b/x-pack/plugins/cases/server/client/factory.ts @@ -30,6 +30,7 @@ import { import { AuthorizationAuditLogger } from '../authorization'; import { CasesClient, createCasesClient } from '.'; import { PersistableStateAttachmentTypeRegistry } from '../attachment_framework/persistable_state_registry'; +import { ExternalReferenceAttachmentTypeRegistry } from '../attachment_framework/external_reference_registry'; interface CasesClientFactoryArgs { securityPluginSetup?: SecurityPluginSetup; @@ -39,6 +40,7 @@ interface CasesClientFactoryArgs { actionsPluginStart: ActionsPluginStart; lensEmbeddableFactory: LensServerPluginSetup['lensEmbeddableFactory']; persistableStateAttachmentTypeRegistry: PersistableStateAttachmentTypeRegistry; + externalReferenceAttachmentTypeRegistry: ExternalReferenceAttachmentTypeRegistry; } /** @@ -130,6 +132,8 @@ export class CasesClientFactory { lensEmbeddableFactory: this.options.lensEmbeddableFactory, authorization: auth, actionsClient: await this.options.actionsPluginStart.getActionsClientWithRequest(request), + persistableStateAttachmentTypeRegistry: this.options.persistableStateAttachmentTypeRegistry, + externalReferenceAttachmentTypeRegistry: this.options.externalReferenceAttachmentTypeRegistry, }); } } diff --git a/x-pack/plugins/cases/server/client/types.ts b/x-pack/plugins/cases/server/client/types.ts index d071e72099bf9..d1cb9e011f85f 100644 --- a/x-pack/plugins/cases/server/client/types.ts +++ b/x-pack/plugins/cases/server/client/types.ts @@ -19,6 +19,8 @@ import { AttachmentService, AlertService, } from '../services'; +import { PersistableStateAttachmentTypeRegistry } from '../attachment_framework/persistable_state_registry'; +import { ExternalReferenceAttachmentTypeRegistry } from '../attachment_framework/external_reference_registry'; /** * Parameters for initializing a cases client @@ -36,4 +38,6 @@ export interface CasesClientArgs { readonly lensEmbeddableFactory: LensServerPluginSetup['lensEmbeddableFactory']; readonly authorization: PublicMethodsOf<Authorization>; readonly actionsClient: PublicMethodsOf<ActionsClient>; + readonly persistableStateAttachmentTypeRegistry: PersistableStateAttachmentTypeRegistry; + readonly externalReferenceAttachmentTypeRegistry: ExternalReferenceAttachmentTypeRegistry; } diff --git a/x-pack/plugins/cases/server/common/models/case_with_comments.ts b/x-pack/plugins/cases/server/common/models/case_with_comments.ts index 2c6c600820429..3574ca707f729 100644 --- a/x-pack/plugins/cases/server/common/models/case_with_comments.ts +++ b/x-pack/plugins/cases/server/common/models/case_with_comments.ts @@ -32,6 +32,7 @@ import { MAX_DOCS_PER_PAGE, } from '../../../common/constants'; import { CasesClientArgs } from '../../client'; +import { RefreshSetting } from '../../services/types'; import { createCaseError } from '../error'; import { countAlertsForID, @@ -88,6 +89,7 @@ export class CaseCommentModel { const { id, version, ...queryRestAttributes } = updateRequest; const options: SavedObjectsUpdateOptions<CommentAttributes> = { version, + refresh: false, }; if (queryRestAttributes.type === CommentType.user && queryRestAttributes?.comment) { @@ -115,7 +117,7 @@ export class CaseCommentModel { }, options, }), - this.updateCaseUserAndDate(updatedAt), + this.updateCaseUserAndDateSkipRefresh(updatedAt), ]); await commentableCase.createUpdateCommentUserAction(comment, updateRequest, owner); @@ -130,7 +132,14 @@ export class CaseCommentModel { } } - private async updateCaseUserAndDate(date: string): Promise<CaseCommentModel> { + private async updateCaseUserAndDateSkipRefresh(date: string) { + return this.updateCaseUserAndDate(date, false); + } + + private async updateCaseUserAndDate( + date: string, + refresh: RefreshSetting + ): Promise<CaseCommentModel> { try { const updatedCase = await this.params.caseService.patchCase({ originalCase: this.caseInfo, @@ -140,6 +149,7 @@ export class CaseCommentModel { updated_by: { ...this.params.user }, }, version: this.caseInfo.version, + refresh, }); return this.newObjectWithInfo({ @@ -209,8 +219,9 @@ export class CaseCommentModel { }), references, id, + refresh: false, }), - this.updateCaseUserAndDate(createdDate), + this.updateCaseUserAndDateSkipRefresh(createdDate), ]); await Promise.all([ @@ -411,8 +422,9 @@ export class CaseCommentModel { id, }; }), + refresh: false, }), - this.updateCaseUserAndDate(new Date().toISOString()), + this.updateCaseUserAndDateSkipRefresh(new Date().toISOString()), ]); const savedObjectsWithoutErrors = newlyCreatedAttachments.saved_objects.filter( diff --git a/x-pack/plugins/cases/server/features.ts b/x-pack/plugins/cases/server/features.ts index dabd3b37e5bb0..f2e7ad3bb74c6 100644 --- a/x-pack/plugins/cases/server/features.ts +++ b/x-pack/plugins/cases/server/features.ts @@ -11,6 +11,7 @@ import { KibanaFeatureConfig } from '@kbn/features-plugin/common'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { APP_ID, FEATURE_ID } from '../common/constants'; +import { createUICapabilities } from '../common'; /** * The order of appearance in the feature privilege page @@ -20,44 +21,81 @@ import { APP_ID, FEATURE_ID } from '../common/constants'; const FEATURE_ORDER = 3100; -export const getCasesKibanaFeature = (): KibanaFeatureConfig => ({ - id: FEATURE_ID, - name: i18n.translate('xpack.cases.features.casesFeatureName', { - defaultMessage: 'Cases', - }), - category: DEFAULT_APP_CATEGORIES.management, - app: [], - order: FEATURE_ORDER, - management: { - insightsAndAlerting: [APP_ID], - }, - cases: [APP_ID], - privileges: { - all: { - cases: { - all: [APP_ID], - }, - management: { - insightsAndAlerting: [APP_ID], - }, - savedObject: { - all: [], - read: [], - }, - ui: ['crud_cases', 'read_cases'], +export const getCasesKibanaFeature = (): KibanaFeatureConfig => { + const capabilities = createUICapabilities(); + + return { + id: FEATURE_ID, + name: i18n.translate('xpack.cases.features.casesFeatureName', { + defaultMessage: 'Cases', + }), + category: DEFAULT_APP_CATEGORIES.management, + app: [], + order: FEATURE_ORDER, + management: { + insightsAndAlerting: [APP_ID], }, - read: { - cases: { - read: [APP_ID], - }, - management: { - insightsAndAlerting: [APP_ID], + cases: [APP_ID], + privileges: { + all: { + cases: { + create: [APP_ID], + read: [APP_ID], + update: [APP_ID], + push: [APP_ID], + }, + management: { + insightsAndAlerting: [APP_ID], + }, + savedObject: { + all: [], + read: [], + }, + ui: capabilities.all, }, - savedObject: { - all: [], - read: [], + read: { + cases: { + read: [APP_ID], + }, + management: { + insightsAndAlerting: [APP_ID], + }, + savedObject: { + all: [], + read: [], + }, + ui: capabilities.read, }, - ui: ['read_cases'], }, - }, -}); + subFeatures: [ + { + name: i18n.translate('xpack.cases.features.deleteSubFeatureName', { + defaultMessage: 'Delete', + }), + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + api: [], + id: 'cases_delete', + name: i18n.translate('xpack.cases.features.deleteSubFeatureDetails', { + defaultMessage: 'Delete cases and comments', + }), + includeIn: 'all', + savedObject: { + all: [], + read: [], + }, + cases: { + delete: [APP_ID], + }, + ui: capabilities.delete, + }, + ], + }, + ], + }, + ], + }; +}; diff --git a/x-pack/plugins/cases/server/plugin.ts b/x-pack/plugins/cases/server/plugin.ts index 89b390c72f338..f01e6c75d10bd 100644 --- a/x-pack/plugins/cases/server/plugin.ts +++ b/x-pack/plugins/cases/server/plugin.ts @@ -50,6 +50,7 @@ import { getExternalRoutes } from './routes/api/get_external_routes'; import { createCasesTelemetry, scheduleCasesTelemetryTask } from './telemetry'; import { getInternalRoutes } from './routes/api/get_internal_routes'; import { PersistableStateAttachmentTypeRegistry } from './attachment_framework/persistable_state_registry'; +import { ExternalReferenceAttachmentTypeRegistry } from './attachment_framework/external_reference_registry'; export interface PluginsSetup { actions: ActionsPluginSetup; @@ -75,12 +76,14 @@ export class CasePlugin { private securityPluginSetup?: SecurityPluginSetup; private lensEmbeddableFactory?: LensServerPluginSetup['lensEmbeddableFactory']; private persistableStateAttachmentTypeRegistry: PersistableStateAttachmentTypeRegistry; + private externalReferenceAttachmentTypeRegistry: ExternalReferenceAttachmentTypeRegistry; constructor(private readonly initializerContext: PluginInitializerContext) { this.kibanaVersion = initializerContext.env.packageInfo.version; this.logger = this.initializerContext.logger.get(); this.clientFactory = new CasesClientFactory(this.logger); this.persistableStateAttachmentTypeRegistry = new PersistableStateAttachmentTypeRegistry(); + this.externalReferenceAttachmentTypeRegistry = new ExternalReferenceAttachmentTypeRegistry(); } public setup(core: CoreSetup, plugins: PluginsSetup): PluginSetupContract { @@ -143,6 +146,9 @@ export class CasePlugin { return { attachmentFramework: { + registerExternalReference: (externalReferenceAttachmentType) => { + this.externalReferenceAttachmentTypeRegistry.register(externalReferenceAttachmentType); + }, registerPersistableState: (persistableStateAttachmentType) => { this.persistableStateAttachmentTypeRegistry.register(persistableStateAttachmentType); }, @@ -172,6 +178,7 @@ export class CasePlugin { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion lensEmbeddableFactory: this.lensEmbeddableFactory!, persistableStateAttachmentTypeRegistry: this.persistableStateAttachmentTypeRegistry, + externalReferenceAttachmentTypeRegistry: this.externalReferenceAttachmentTypeRegistry, }); const client = core.elasticsearch.client; diff --git a/x-pack/plugins/cases/server/services/attachments/index.ts b/x-pack/plugins/cases/server/services/attachments/index.ts index 1975f0c653011..aa055663d6e03 100644 --- a/x-pack/plugins/cases/server/services/attachments/index.ts +++ b/x-pack/plugins/cases/server/services/attachments/index.ts @@ -42,6 +42,7 @@ import { } from '../so_references'; import { SavedObjectFindOptionsKueryNode } from '../../common/types'; import { PersistableStateAttachmentTypeRegistry } from '../../attachment_framework/persistable_state_registry'; +import { IndexRefresh } from '../types'; interface AttachedToCaseArgs extends ClientArgs { caseId: string; @@ -64,13 +65,15 @@ interface GetAttachmentArgs extends ClientArgs { attachmentId: string; } -interface CreateAttachmentArgs extends ClientArgs { +interface DeleteAttachmentArgs extends GetAttachmentArgs, IndexRefresh {} + +interface CreateAttachmentArgs extends ClientArgs, IndexRefresh { attributes: AttachmentAttributes; references: SavedObjectReference[]; id: string; } -interface BulkCreateAttachments extends ClientArgs { +interface BulkCreateAttachments extends ClientArgs, IndexRefresh { attachments: Array<{ attributes: AttachmentAttributes; references: SavedObjectReference[]; @@ -86,7 +89,7 @@ interface UpdateArgs { export type UpdateAttachmentArgs = UpdateArgs & ClientArgs; -interface BulkUpdateAttachmentArgs extends ClientArgs { +interface BulkUpdateAttachmentArgs extends ClientArgs, IndexRefresh { comments: UpdateArgs[]; } @@ -256,10 +259,16 @@ export class AttachmentService { } } - public async delete({ unsecuredSavedObjectsClient, attachmentId }: GetAttachmentArgs) { + public async delete({ + unsecuredSavedObjectsClient, + attachmentId, + refresh, + }: DeleteAttachmentArgs) { try { this.log.debug(`Attempting to DELETE attachment ${attachmentId}`); - return await unsecuredSavedObjectsClient.delete(CASE_COMMENT_SAVED_OBJECT, attachmentId); + return await unsecuredSavedObjectsClient.delete(CASE_COMMENT_SAVED_OBJECT, attachmentId, { + refresh, + }); } catch (error) { this.log.error(`Error on DELETE attachment ${attachmentId}: ${error}`); throw error; @@ -271,6 +280,7 @@ export class AttachmentService { attributes, references, id, + refresh, }: CreateAttachmentArgs): Promise<SavedObject<AttachmentAttributes>> { try { this.log.debug(`Attempting to POST a new comment`); @@ -288,6 +298,7 @@ export class AttachmentService { { references: extractedReferences, id, + refresh, } ); @@ -304,6 +315,7 @@ export class AttachmentService { public async bulkCreate({ unsecuredSavedObjectsClient, attachments, + refresh, }: BulkCreateAttachments): Promise<SavedObjectsBulkResponse<AttachmentAttributes>> { try { this.log.debug(`Attempting to bulk create attachments`); @@ -322,7 +334,8 @@ export class AttachmentService { attributes: extractedAttributes, references: extractedReferences, }; - }) + }), + { refresh } ); return { @@ -390,6 +403,7 @@ export class AttachmentService { public async bulkUpdate({ unsecuredSavedObjectsClient, comments, + refresh, }: BulkUpdateAttachmentArgs): Promise<SavedObjectsBulkUpdateResponse<AttachmentAttributes>> { try { this.log.debug( @@ -422,7 +436,8 @@ export class AttachmentService { */ references: shouldUpdateRefs ? extractedReferences : undefined, }; - }) + }), + { refresh } ); return { diff --git a/x-pack/plugins/cases/server/services/cases/index.test.ts b/x-pack/plugins/cases/server/services/cases/index.test.ts index 69b3773ef0fed..1088187c7b46b 100644 --- a/x-pack/plugins/cases/server/services/cases/index.test.ts +++ b/x-pack/plugins/cases/server/services/cases/index.test.ts @@ -554,6 +554,7 @@ describe('CasesService', () => { "type": "action", }, ], + "refresh": undefined, } `); }); diff --git a/x-pack/plugins/cases/server/services/cases/index.ts b/x-pack/plugins/cases/server/services/cases/index.ts index 6656ff3b14a50..5790f57e37b6b 100644 --- a/x-pack/plugins/cases/server/services/cases/index.ts +++ b/x-pack/plugins/cases/server/services/cases/index.ts @@ -55,6 +55,7 @@ import { ESCaseAttributes } from './types'; import { AttachmentService } from '../attachments'; import { AggregationBuilder, AggregationResponse } from '../../client/metrics/types'; import { createCaseError } from '../../common/error'; +import { IndexRefresh } from '../types'; interface GetCaseIdsByAlertIdArgs { alertId: string; @@ -70,6 +71,8 @@ interface GetCaseArgs { id: string; } +interface DeleteCaseArgs extends GetCaseArgs, IndexRefresh {} + interface GetCasesArgs { caseIds: string[]; } @@ -84,12 +87,12 @@ interface FindCaseCommentsArgs { options?: SavedObjectFindOptionsKueryNode; } -interface PostCaseArgs { +interface PostCaseArgs extends IndexRefresh { attributes: CaseAttributes; id: string; } -interface PatchCase { +interface PatchCase extends IndexRefresh { caseId: string; updatedAttributes: Partial<CaseAttributes & PushedArgs>; originalCase: SavedObject<CaseAttributes>; @@ -97,8 +100,8 @@ interface PatchCase { } type PatchCaseArgs = PatchCase; -interface PatchCasesArgs { - cases: PatchCase[]; +interface PatchCasesArgs extends IndexRefresh { + cases: Array<Omit<PatchCase, 'refresh'>>; } interface GetUserArgs { @@ -297,10 +300,10 @@ export class CasesService { }, new Map<string, number>()); } - public async deleteCase({ id: caseId }: GetCaseArgs) { + public async deleteCase({ id: caseId, refresh }: DeleteCaseArgs) { try { this.log.debug(`Attempting to DELETE case ${caseId}`); - return await this.unsecuredSavedObjectsClient.delete(CASE_SAVED_OBJECT, caseId); + return await this.unsecuredSavedObjectsClient.delete(CASE_SAVED_OBJECT, caseId, { refresh }); } catch (error) { this.log.error(`Error on DELETE case ${caseId}: ${error}`); throw error; @@ -564,14 +567,18 @@ export class CasesService { } } - public async postNewCase({ attributes, id }: PostCaseArgs): Promise<SavedObject<CaseAttributes>> { + public async postNewCase({ + attributes, + id, + refresh, + }: PostCaseArgs): Promise<SavedObject<CaseAttributes>> { try { this.log.debug(`Attempting to POST a new case`); const transformedAttributes = transformAttributesToESModel(attributes); const createdCase = await this.unsecuredSavedObjectsClient.create<ESCaseAttributes>( CASE_SAVED_OBJECT, transformedAttributes.attributes, - { id, references: transformedAttributes.referenceHandler.build() } + { id, references: transformedAttributes.referenceHandler.build(), refresh } ); return transformSavedObjectToExternalModel(createdCase); } catch (error) { @@ -585,6 +592,7 @@ export class CasesService { updatedAttributes, originalCase, version, + refresh, }: PatchCaseArgs): Promise<SavedObjectsUpdateResponse<CaseAttributes>> { try { this.log.debug(`Attempting to UPDATE case ${caseId}`); @@ -597,6 +605,7 @@ export class CasesService { { version, references: transformedAttributes.referenceHandler.build(originalCase.references), + refresh, } ); @@ -609,6 +618,7 @@ export class CasesService { public async patchCases({ cases, + refresh, }: PatchCasesArgs): Promise<SavedObjectsBulkUpdateResponse<CaseAttributes>> { try { this.log.debug(`Attempting to UPDATE case ${cases.map((c) => c.caseId).join(', ')}`); @@ -625,7 +635,8 @@ export class CasesService { }); const updatedCases = await this.unsecuredSavedObjectsClient.bulkUpdate<ESCaseAttributes>( - bulkUpdate + bulkUpdate, + { refresh } ); return transformUpdateResponsesToExternalModels(updatedCases); } catch (error) { diff --git a/x-pack/plugins/cases/server/services/configure/index.test.ts b/x-pack/plugins/cases/server/services/configure/index.test.ts index dbe5a157994da..b967886b13be9 100644 --- a/x-pack/plugins/cases/server/services/configure/index.test.ts +++ b/x-pack/plugins/cases/server/services/configure/index.test.ts @@ -364,6 +364,7 @@ describe('CaseConfigureService', () => { expect(unsecuredSavedObjectsClient.update.mock.calls[0][3]).toMatchInlineSnapshot(` Object { "references": undefined, + "refresh": undefined, } `); }); @@ -469,6 +470,7 @@ describe('CaseConfigureService', () => { "type": "action", }, ], + "refresh": undefined, } `); }); diff --git a/x-pack/plugins/cases/server/services/configure/index.ts b/x-pack/plugins/cases/server/services/configure/index.ts index 2b8bc3c6b7cc8..4cd7f5ad7283f 100644 --- a/x-pack/plugins/cases/server/services/configure/index.ts +++ b/x-pack/plugins/cases/server/services/configure/index.ts @@ -25,6 +25,7 @@ import { } from '../transform'; import { ConnectorReferenceHandler } from '../connector_reference_handler'; import { ESCasesConfigureAttributes } from './types'; +import { IndexRefresh } from '../types'; interface ClientArgs { unsecuredSavedObjectsClient: SavedObjectsClientContract; @@ -33,16 +34,19 @@ interface ClientArgs { interface GetCaseConfigureArgs extends ClientArgs { configurationId: string; } + +interface DeleteCaseConfigureArgs extends GetCaseConfigureArgs, IndexRefresh {} + interface FindCaseConfigureArgs extends ClientArgs { options?: SavedObjectFindOptionsKueryNode; } -interface PostCaseConfigureArgs extends ClientArgs { +interface PostCaseConfigureArgs extends ClientArgs, IndexRefresh { attributes: CasesConfigureAttributes; id: string; } -interface PatchCaseConfigureArgs extends ClientArgs { +interface PatchCaseConfigureArgs extends ClientArgs, IndexRefresh { configurationId: string; updatedAttributes: Partial<CasesConfigureAttributes>; originalConfiguration: SavedObject<CasesConfigureAttributes>; @@ -51,10 +55,18 @@ interface PatchCaseConfigureArgs extends ClientArgs { export class CaseConfigureService { constructor(private readonly log: Logger) {} - public async delete({ unsecuredSavedObjectsClient, configurationId }: GetCaseConfigureArgs) { + public async delete({ + unsecuredSavedObjectsClient, + configurationId, + refresh, + }: DeleteCaseConfigureArgs) { try { this.log.debug(`Attempting to DELETE case configure ${configurationId}`); - return await unsecuredSavedObjectsClient.delete(CASE_CONFIGURE_SAVED_OBJECT, configurationId); + return await unsecuredSavedObjectsClient.delete( + CASE_CONFIGURE_SAVED_OBJECT, + configurationId, + { refresh } + ); } catch (error) { this.log.debug(`Error on DELETE case configure ${configurationId}: ${error}`); throw error; @@ -105,6 +117,7 @@ export class CaseConfigureService { unsecuredSavedObjectsClient, attributes, id, + refresh, }: PostCaseConfigureArgs): Promise<SavedObject<CasesConfigureAttributes>> { try { this.log.debug(`Attempting to POST a new case configuration`); @@ -112,7 +125,7 @@ export class CaseConfigureService { const createdConfig = await unsecuredSavedObjectsClient.create<ESCasesConfigureAttributes>( CASE_CONFIGURE_SAVED_OBJECT, esConfigInfo.attributes, - { id, references: esConfigInfo.referenceHandler.build() } + { id, references: esConfigInfo.referenceHandler.build(), refresh } ); return transformToExternalModel(createdConfig); @@ -127,6 +140,7 @@ export class CaseConfigureService { configurationId, updatedAttributes, originalConfiguration, + refresh, }: PatchCaseConfigureArgs): Promise<SavedObjectsUpdateResponse<CasesConfigurePatch>> { try { this.log.debug(`Attempting to UPDATE case configuration ${configurationId}`); @@ -141,6 +155,7 @@ export class CaseConfigureService { }, { references: esUpdateInfo.referenceHandler.build(originalConfiguration.references), + refresh, } ); diff --git a/x-pack/plugins/cases/server/services/connector_mappings/index.ts b/x-pack/plugins/cases/server/services/connector_mappings/index.ts index 302a546ca69ea..2163775bf50ef 100644 --- a/x-pack/plugins/cases/server/services/connector_mappings/index.ts +++ b/x-pack/plugins/cases/server/services/connector_mappings/index.ts @@ -10,6 +10,7 @@ import { Logger, SavedObjectReference, SavedObjectsClientContract } from '@kbn/c import { CASE_CONNECTOR_MAPPINGS_SAVED_OBJECT } from '../../../common/constants'; import { ConnectorMappings } from '../../../common/api'; import { SavedObjectFindOptionsKueryNode } from '../../common/types'; +import { IndexRefresh } from '../types'; interface ClientArgs { unsecuredSavedObjectsClient: SavedObjectsClientContract; @@ -18,12 +19,12 @@ interface FindConnectorMappingsArgs extends ClientArgs { options?: SavedObjectFindOptionsKueryNode; } -interface PostConnectorMappingsArgs extends ClientArgs { +interface PostConnectorMappingsArgs extends ClientArgs, IndexRefresh { attributes: ConnectorMappings; references: SavedObjectReference[]; } -interface UpdateConnectorMappingsArgs extends ClientArgs { +interface UpdateConnectorMappingsArgs extends ClientArgs, IndexRefresh { mappingId: string; attributes: Partial<ConnectorMappings>; references: SavedObjectReference[]; @@ -49,6 +50,7 @@ export class ConnectorMappingsService { unsecuredSavedObjectsClient, attributes, references, + refresh, }: PostConnectorMappingsArgs) { try { this.log.debug(`Attempting to POST a new connector mappings`); @@ -57,6 +59,7 @@ export class ConnectorMappingsService { attributes, { references, + refresh, } ); } catch (error) { @@ -70,6 +73,7 @@ export class ConnectorMappingsService { mappingId, attributes, references, + refresh, }: UpdateConnectorMappingsArgs) { try { this.log.debug(`Attempting to UPDATE connector mappings ${mappingId}`); @@ -79,6 +83,7 @@ export class ConnectorMappingsService { attributes, { references, + refresh, } ); } catch (error) { diff --git a/x-pack/plugins/aiops/common/types.ts b/x-pack/plugins/cases/server/services/types.ts similarity index 51% rename from x-pack/plugins/aiops/common/types.ts rename to x-pack/plugins/cases/server/services/types.ts index 218988ae2b29c..1df1158583fa4 100644 --- a/x-pack/plugins/aiops/common/types.ts +++ b/x-pack/plugins/cases/server/services/types.ts @@ -5,15 +5,10 @@ * 2.0. */ -export interface FieldValuePair { - fieldName: string; - fieldValue: string; - isFallbackResult?: boolean; -} +import { SavedObjectsCreateOptions } from '@kbn/core/server'; + +export type RefreshSetting = NonNullable<SavedObjectsCreateOptions['refresh']>; -export interface ChangePoint extends FieldValuePair { - doc_count: number; - bg_count: number; - score: number; - pValue: number | null; +export interface IndexRefresh { + refresh?: SavedObjectsCreateOptions['refresh']; } diff --git a/x-pack/plugins/cases/server/services/user_actions/index.test.ts b/x-pack/plugins/cases/server/services/user_actions/index.test.ts index 450b5f423c426..14931763a4cc4 100644 --- a/x-pack/plugins/cases/server/services/user_actions/index.test.ts +++ b/x-pack/plugins/cases/server/services/user_actions/index.test.ts @@ -854,46 +854,49 @@ describe('CaseUserActionService', () => { user: commonArgs.user, }); - expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith([ - { - attributes: { - action: 'delete', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + [ + { + attributes: { + action: 'delete', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'delete_case', + owner: 'securitySolution', + payload: {}, }, - type: 'delete_case', - owner: 'securitySolution', - payload: {}, + references: [ + { id: '1', name: 'associated-cases', type: 'cases' }, + { id: '3', name: 'connectorId', type: 'action' }, + ], + type: 'cases-user-actions', }, - references: [ - { id: '1', name: 'associated-cases', type: 'cases' }, - { id: '3', name: 'connectorId', type: 'action' }, - ], - type: 'cases-user-actions', - }, - { - attributes: { - action: 'delete', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: 'delete', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'delete_case', + owner: 'securitySolution', + payload: {}, }, - type: 'delete_case', - owner: 'securitySolution', - payload: {}, + references: [ + { id: '2', name: 'associated-cases', type: 'cases' }, + { id: '4', name: 'connectorId', type: 'action' }, + ], + type: 'cases-user-actions', }, - references: [ - { id: '2', name: 'associated-cases', type: 'cases' }, - { id: '4', name: 'connectorId', type: 'action' }, - ], - type: 'cases-user-actions', - }, - ]); + ], + { refresh: undefined } + ); }); }); @@ -906,161 +909,164 @@ describe('CaseUserActionService', () => { user: commonArgs.user, }); - expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith([ - { - attributes: { - action: Actions.update, - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + [ + { + attributes: { + action: Actions.update, + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'title', + owner: 'securitySolution', + payload: { title: 'updated title' }, }, - type: 'title', - owner: 'securitySolution', - payload: { title: 'updated title' }, + references: [{ id: '1', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '1', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: Actions.update, - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: Actions.update, + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'status', + owner: 'securitySolution', + payload: { status: 'closed' }, }, - type: 'status', - owner: 'securitySolution', - payload: { status: 'closed' }, + references: [{ id: '1', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '1', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: Actions.update, - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', - }, - type: 'connector', - owner: 'securitySolution', - payload: { - connector: { - fields: { - category: 'Denial of Service', - destIp: true, - malwareHash: true, - malwareUrl: true, - priority: '2', - sourceIp: true, - subcategory: '45', + { + attributes: { + action: Actions.update, + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'connector', + owner: 'securitySolution', + payload: { + connector: { + fields: { + category: 'Denial of Service', + destIp: true, + malwareHash: true, + malwareUrl: true, + priority: '2', + sourceIp: true, + subcategory: '45', + }, + name: 'ServiceNow SN', + type: '.servicenow-sir', }, - name: 'ServiceNow SN', - type: '.servicenow-sir', }, }, + references: [ + { id: '1', name: 'associated-cases', type: 'cases' }, + { id: '456', name: 'connectorId', type: 'action' }, + ], + type: 'cases-user-actions', }, - references: [ - { id: '1', name: 'associated-cases', type: 'cases' }, - { id: '456', name: 'connectorId', type: 'action' }, - ], - type: 'cases-user-actions', - }, - { - attributes: { - action: Actions.update, - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: Actions.update, + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'description', + owner: 'securitySolution', + payload: { description: 'updated desc' }, }, - type: 'description', - owner: 'securitySolution', - payload: { description: 'updated desc' }, + references: [{ id: '2', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '2', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: 'add', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: 'add', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'tags', + owner: 'securitySolution', + payload: { tags: ['one', 'two'] }, }, - type: 'tags', - owner: 'securitySolution', - payload: { tags: ['one', 'two'] }, + references: [{ id: '2', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '2', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: 'delete', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: 'delete', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'tags', + owner: 'securitySolution', + payload: { tags: ['defacement'] }, }, - type: 'tags', - owner: 'securitySolution', - payload: { tags: ['defacement'] }, + references: [{ id: '2', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '2', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: Actions.update, - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', + { + attributes: { + action: Actions.update, + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'settings', + owner: 'securitySolution', + payload: { settings: { syncAlerts: false } }, }, - type: 'settings', - owner: 'securitySolution', - payload: { settings: { syncAlerts: false } }, + references: [{ id: '2', name: 'associated-cases', type: 'cases' }], + type: 'cases-user-actions', }, - references: [{ id: '2', name: 'associated-cases', type: 'cases' }], - type: 'cases-user-actions', - }, - { - attributes: { - action: 'update', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', - }, - owner: 'securitySolution', - payload: { - severity: 'critical', + { + attributes: { + action: 'update', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + owner: 'securitySolution', + payload: { + severity: 'critical', + }, + type: 'severity', }, - type: 'severity', + references: [ + { + id: '2', + name: 'associated-cases', + type: 'cases', + }, + ], + type: 'cases-user-actions', }, - references: [ - { - id: '2', - name: 'associated-cases', - type: 'cases', - }, - ], - type: 'cases-user-actions', - }, - ]); + ], + { refresh: undefined } + ); }); }); @@ -1070,56 +1076,59 @@ describe('CaseUserActionService', () => { ...commonArgs, attachments, }); - expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith([ - { - attributes: { - action: 'delete', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', - }, - type: 'comment', - owner: 'securitySolution', - payload: { - comment: { comment: 'a comment', owner: 'securitySolution', type: 'user' }, + expect(unsecuredSavedObjectsClient.bulkCreate).toHaveBeenCalledWith( + [ + { + attributes: { + action: 'delete', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'comment', + owner: 'securitySolution', + payload: { + comment: { comment: 'a comment', owner: 'securitySolution', type: 'user' }, + }, }, + references: [ + { id: '123', name: 'associated-cases', type: 'cases' }, + { id: '1', name: 'associated-cases-comments', type: 'cases-comments' }, + ], + type: 'cases-user-actions', }, - references: [ - { id: '123', name: 'associated-cases', type: 'cases' }, - { id: '1', name: 'associated-cases-comments', type: 'cases-comments' }, - ], - type: 'cases-user-actions', - }, - { - attributes: { - action: 'delete', - created_at: '2022-01-09T22:00:00.000Z', - created_by: { - email: 'elastic@elastic.co', - full_name: 'Elastic User', - username: 'elastic', - }, - type: 'comment', - owner: 'securitySolution', - payload: { - comment: { - alertId: 'alert-id-1', - index: 'alert-index-1', - owner: 'securitySolution', - rule: { id: 'rule-id-1', name: 'rule-name-1' }, - type: 'alert', + { + attributes: { + action: 'delete', + created_at: '2022-01-09T22:00:00.000Z', + created_by: { + email: 'elastic@elastic.co', + full_name: 'Elastic User', + username: 'elastic', + }, + type: 'comment', + owner: 'securitySolution', + payload: { + comment: { + alertId: 'alert-id-1', + index: 'alert-index-1', + owner: 'securitySolution', + rule: { id: 'rule-id-1', name: 'rule-name-1' }, + type: 'alert', + }, }, }, + references: [ + { id: '123', name: 'associated-cases', type: 'cases' }, + { id: '2', name: 'associated-cases-comments', type: 'cases-comments' }, + ], + type: 'cases-user-actions', }, - references: [ - { id: '123', name: 'associated-cases', type: 'cases' }, - { id: '2', name: 'associated-cases-comments', type: 'cases-comments' }, - ], - type: 'cases-user-actions', - }, - ]); + ], + { refresh: undefined } + ); }); }); diff --git a/x-pack/plugins/cases/server/services/user_actions/index.ts b/x-pack/plugins/cases/server/services/user_actions/index.ts index 3adde90f369d1..f0bdc0f44ddea 100644 --- a/x-pack/plugins/cases/server/services/user_actions/index.ts +++ b/x-pack/plugins/cases/server/services/user_actions/index.ts @@ -58,6 +58,7 @@ import { BuilderFactory } from './builder_factory'; import { defaultSortField, isCommentRequestTypeExternalReferenceSO } from '../../common/utils'; import { PersistableStateAttachmentTypeRegistry } from '../../attachment_framework/persistable_state_registry'; import { injectPersistableReferencesToSO } from '../../attachment_framework/so_references'; +import { IndexRefresh } from '../types'; interface GetCaseUserActionArgs extends ClientArgs { caseId: string; @@ -68,18 +69,18 @@ export interface UserActionItem { references: SavedObjectReference[]; } -interface PostCaseUserActionArgs extends ClientArgs { +interface PostCaseUserActionArgs extends ClientArgs, IndexRefresh { actions: BuilderReturnValue[]; } -interface CreateUserActionES<T> extends ClientArgs { +interface CreateUserActionES<T> extends ClientArgs, IndexRefresh { attributes: T; references: SavedObjectReference[]; } type CommonUserActionArgs = ClientArgs & CommonArguments; -interface BulkCreateCaseDeletionUserAction extends ClientArgs { +interface BulkCreateCaseDeletionUserAction extends ClientArgs, IndexRefresh { cases: Array<{ id: string; owner: string; connectorId: string }>; user: User; } @@ -90,18 +91,19 @@ interface GetUserActionItemByDifference extends CommonUserActionArgs { newValue: unknown; } -interface BulkCreateBulkUpdateCaseUserActions extends ClientArgs { +interface BulkCreateBulkUpdateCaseUserActions extends ClientArgs, IndexRefresh { originalCases: Array<SavedObject<CaseAttributes>>; updatedCases: Array<SavedObjectsUpdateResponse<CaseAttributes>>; user: User; } -interface BulkCreateAttachmentUserAction extends Omit<CommonUserActionArgs, 'owner'> { +interface BulkCreateAttachmentUserAction extends Omit<CommonUserActionArgs, 'owner'>, IndexRefresh { attachments: Array<{ id: string; owner: string; attachment: CommentRequest }>; } type CreateUserActionClient<T extends keyof BuilderParameters> = CreateUserAction<T> & - CommonUserActionArgs; + CommonUserActionArgs & + IndexRefresh; export class CaseUserActionService { private static readonly userActionFieldsAllowed: Set<string> = new Set(Object.keys(ActionTypes)); @@ -184,6 +186,7 @@ export class CaseUserActionService { unsecuredSavedObjectsClient, cases, user, + refresh, }: BulkCreateCaseDeletionUserAction): Promise<void> { this.log.debug(`Attempting to create a create case user action`); const userActionsWithReferences = cases.reduce<BuilderReturnValue[]>((acc, caseInfo) => { @@ -204,7 +207,11 @@ export class CaseUserActionService { return [...acc, deleteCaseUserAction]; }, []); - await this.bulkCreate({ unsecuredSavedObjectsClient, actions: userActionsWithReferences }); + await this.bulkCreate({ + unsecuredSavedObjectsClient, + actions: userActionsWithReferences, + refresh, + }); } public async bulkCreateUpdateCase({ @@ -212,6 +219,7 @@ export class CaseUserActionService { originalCases, updatedCases, user, + refresh, }: BulkCreateBulkUpdateCaseUserActions): Promise<void> { const userActionsWithReferences = updatedCases.reduce<BuilderReturnValue[]>( (acc, updatedCase) => { @@ -250,7 +258,11 @@ export class CaseUserActionService { [] ); - await this.bulkCreate({ unsecuredSavedObjectsClient, actions: userActionsWithReferences }); + await this.bulkCreate({ + unsecuredSavedObjectsClient, + actions: userActionsWithReferences, + refresh, + }); } private async bulkCreateAttachment({ @@ -259,6 +271,7 @@ export class CaseUserActionService { attachments, user, action = Actions.create, + refresh, }: BulkCreateAttachmentUserAction): Promise<void> { this.log.debug(`Attempting to create a bulk create case user action`); const userActionsWithReferences = attachments.reduce<BuilderReturnValue[]>( @@ -282,7 +295,11 @@ export class CaseUserActionService { [] ); - await this.bulkCreate({ unsecuredSavedObjectsClient, actions: userActionsWithReferences }); + await this.bulkCreate({ + unsecuredSavedObjectsClient, + actions: userActionsWithReferences, + refresh, + }); } public async bulkCreateAttachmentDeletion({ @@ -290,6 +307,7 @@ export class CaseUserActionService { caseId, attachments, user, + refresh, }: BulkCreateAttachmentUserAction): Promise<void> { await this.bulkCreateAttachment({ unsecuredSavedObjectsClient, @@ -297,6 +315,7 @@ export class CaseUserActionService { attachments, user, action: Actions.delete, + refresh, }); } @@ -305,6 +324,7 @@ export class CaseUserActionService { caseId, attachments, user, + refresh, }: BulkCreateAttachmentUserAction): Promise<void> { await this.bulkCreateAttachment({ unsecuredSavedObjectsClient, @@ -312,6 +332,7 @@ export class CaseUserActionService { attachments, user, action: Actions.create, + refresh, }); } @@ -325,6 +346,7 @@ export class CaseUserActionService { payload, connectorId, attachmentId, + refresh, }: CreateUserActionClient<T>) { try { this.log.debug(`Attempting to create a user action of type: ${type}`); @@ -342,7 +364,7 @@ export class CaseUserActionService { if (userAction) { const { attributes, references } = userAction; - await this.create({ unsecuredSavedObjectsClient, attributes, references }); + await this.create({ unsecuredSavedObjectsClient, attributes, references, refresh }); } } catch (error) { this.log.error(`Error on creating user action of type: ${type}. Error: ${error}`); @@ -382,12 +404,14 @@ export class CaseUserActionService { unsecuredSavedObjectsClient, attributes, references, + refresh, }: CreateUserActionES<T>): Promise<void> { try { this.log.debug(`Attempting to POST a new case user action`); await unsecuredSavedObjectsClient.create<T>(CASE_USER_ACTION_SAVED_OBJECT, attributes, { references: references ?? [], + refresh, }); } catch (error) { this.log.error(`Error on POST a new case user action: ${error}`); @@ -398,6 +422,7 @@ export class CaseUserActionService { public async bulkCreate({ unsecuredSavedObjectsClient, actions, + refresh, }: PostCaseUserActionArgs): Promise<void> { if (isEmpty(actions)) { return; @@ -407,7 +432,8 @@ export class CaseUserActionService { this.log.debug(`Attempting to POST a new case user action`); await unsecuredSavedObjectsClient.bulkCreate( - actions.map((action) => ({ type: CASE_USER_ACTION_SAVED_OBJECT, ...action })) + actions.map((action) => ({ type: CASE_USER_ACTION_SAVED_OBJECT, ...action })), + { refresh } ); } catch (error) { this.log.error(`Error on POST a new case user action: ${error}`); diff --git a/x-pack/plugins/cloud/server/assets/fullstory_library.js b/x-pack/plugins/cloud/server/assets/fullstory_library.js index 487d6c8e8528c..583e32dc30f30 100644 --- a/x-pack/plugins/cloud/server/assets/fullstory_library.js +++ b/x-pack/plugins/cloud/server/assets/fullstory_library.js @@ -9,5 +9,7 @@ * Portions of this code are licensed under the following license: * For license information please see https://edge.fullstory.com/s/fs.js.LICENSE.txt */ -/* eslint-disable */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/s",n(n.s=4)}([function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]});t.__esModule=!0,t.omit=t.pick=t.assertExhaustive=t.isNonEmpty=void 0,i(t,n(6),"ExtendedObject","Object"),t.isNonEmpty=function(e){return e.length>0},t.assertExhaustive=function(e,t){throw void 0===t&&(t="Reached unexpected case in exhaustive switch"),new Error(t)},t.pick=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={};return t.forEach(function(t){r[t]=e[t]}),r},t.omit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=r({},e);return Object.keys(i).forEach(function(e){var n=e;-1!==t.indexOf(n)&&delete i[n]}),i}},function(e,t){},function(e){e.exports={Any:{iframe:{src:"scrubUrl",srcdoc:"erase"},frame:{src:"scrubUrl",srcdoc:"erase"}},Exclude:{"*":{alt:"erase",checked:"erase",data:"erase",placeholder:"erase",src:"erase",srcset:"erase",href:"erase",title:"erase",value:"erase"}},Mask:{"*":{checked:"erase",data:"erase",alt:"maskText",placeholder:"maskText",title:"maskText",value:"maskText"},option:{label:"maskText"}}}},function(e){e.exports=[{Selector:"object:not([type^=\"image/\"])",Consent:!1,Type:1},{Selector:"embed:not([type^=\"image/\"])",Consent:!1,Type:1},{Selector:"canvas",Consent:!1,Type:1},{Selector:"noscript",Consent:!1,Type:1},{Selector:".fs-hide",Consent:!1,Type:1},{Selector:".fs-exclude",Consent:!1,Type:1},{Selector:".fs-exclude-without-consent",Consent:!0,Type:1},{Selector:".fs-mask",Consent:!1,Type:2},{Selector:".fs-mask-without-consent",Consent:!0,Type:2},{Selector:".fs-unmask",Consent:!1,Type:3},{Selector:".fs-unmask-with-consent",Consent:!0,Type:3},{Selector:".fs-block",Consent:!1,Type:1},{Selector:".fs-record-with-consent",Consent:!0,Type:1}]},function(e,t,n){e.exports=n(7)},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.ExtendedObject=void 0,t.ExtendedObject=Object},function(e,t,n){"use strict";n.r(t);n(5);var r=!1;function i(){return r}function o(e){i()&&window.console&&console.log(e)}n(1);var s=new(function(){function e(e){this.rebuildFromSnapshot(e)}return e.prototype.rebuildFromSnapshot=function(e){var t=this.snapshot;if(this.snapshot=e,!t||t.functions!==e.functions){var n=e.functions;this.jsonParse=n.jsonParse,this.jsonStringify=n.jsonStringify,this.arrayIsArray=n.arrayIsArray,this.objectKeys=n.objectKeys,this.objectValues=n.objectValues||null,this.dateNow=n.dateNow,this.objectHasOwnProp=u(n.objectHasOwnProp),this.dateGetTime=u(n.dateGetTime),this.matchMedia=c(n.matchMedia),this.setWindowTimeout=u(n.setWindowTimeout),this.setWindowInterval=u(n.setWindowInterval),this.clearWindowTimeout=u(n.clearWindowTimeout),this.clearWindowInterval=u(n.clearWindowInterval),this.requestWindowAnimationFrame=c(n.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(n.requestWindowIdleCallback),this.mathAbs=n.mathAbs,this.mathFloor=n.mathFloor,this.mathMax=n.mathMax,this.mathMin=n.mathMin,this.mathPow=n.mathPow,this.mathRandom=n.mathRandom,this.mathRound=n.mathRound}},e}())(a(window));function a(e,t){void 0===t&&(t=0);var n=t,r=function(e){try{return e()}catch(e){return n=2,function(){throw new Error("Invoked failed snapshot")}}},i={jsonParse:r(function(){return e.JSON.parse}),jsonStringify:r(function(){return e.JSON.stringify}),arrayIsArray:r(function(){return e.Array.isArray}),objectKeys:r(function(){return e.Object.keys}),objectValues:r(function(){return e.Object.values}),dateNow:r(function(){return e.Date.now}),objectHasOwnProp:r(function(){return e.Object.prototype.hasOwnProperty}),dateGetTime:r(function(){return e.Date.prototype.getTime}),matchMedia:r(function(){return e.matchMedia}),setWindowTimeout:r(function(){return e.setTimeout}),setWindowInterval:r(function(){return e.setInterval}),clearWindowTimeout:r(function(){return e.clearTimeout}),clearWindowInterval:r(function(){return e.clearInterval}),requestWindowAnimationFrame:r(function(){return e.requestAnimationFrame}),requestWindowIdleCallback:r(function(){return e.requestIdleCallback}),mathAbs:r(function(){return e.Math.abs}),mathFloor:r(function(){return e.Math.floor}),mathMax:r(function(){return e.Math.max}),mathMin:r(function(){return e.Math.min}),mathPow:r(function(){return e.Math.pow}),mathRandom:r(function(){return e.Math.random}),mathRound:r(function(){return e.Math.round})},o={functionToString:r(function(){return e.Function.prototype.toString}),objectToString:r(function(){return e.Object.prototype.toString})};return{status:n,functions:i,helpers:o}}function u(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(t,n)}}function c(e){return e?u(e):null}var h,d="number"==typeof(h=s.dateNow())?{now:function(){return s.dateNow()},timeOrigin:h}:{now:function(){return s.dateGetTime(new Date)},timeOrigin:h=s.dateGetTime(new Date)};var l=function(){var e,t=window.performance;if(t&&t.now){var n=t.now();if("number"==typeof n&&isFinite(n)&&!(n<=0)){var r=t.timeOrigin;if("number"!=typeof r){var i=d.now()-t.now(),o=null===(e=t.timing)||void 0===e?void 0:e.navigationStart;r=o?Math.min(i,o):i}var s=Math.round(r);if("number"==typeof s&&isFinite(s)&&!(s<=0))return{now:function(){return Math.round(s+t.now())},timeOrigin:s}}}}();function p(){return l?l.now():d.now()}var f=["","0","1","-1","true","false","n/a","nan","undefined","null","nil","the_id_that_you_use_in_your_app_for_this_user"],v=["811c9dc5","350ca8af","340ca71c","14cd0a2b","4db211e5","0b069958","3613e041","2f8f13ba","9b61ad43","77074ba4","0da3f8ec","1c750511"],_=function(){return s.mathFloor(p()/1e3)},g=function(){return _()+31536e3};function m(e){if(!e)return null;var t=e.split("/"),n=t[0],r=t[1],i=parseInt(r),s=_(),a=g();if(isNaN(i)&&(i=a),i<=s)return null;i>a&&(i=a);var u=n.split(/[#,]/);if(u.length<3&&(u=n.split("`")).length<3)return null;var c=u[0],h=u[1],d=u[2],l=u[3],p="";void 0!==l&&(p=decodeURIComponent(l),(f.indexOf(p)>=0||v.indexOf(p)>=0)&&(o("Ignoring invalid app key \""+p+"\" from cookie."),p=""));var m=d.split(":");return{expirationAbsTimeSeconds:i,host:c,orgId:h,userId:m[0],sessionId:m[1]||"",appKeyHash:p}}function y(e){for(var t={},n=e.cookie.split(";"),r=0;r<n.length;r++){var i=n[r].replace(/^\s+|\s+$/g,"").split("=");t[i[0]]||(t[i[0]]=i[1])}return t}var w="_fs_loaded",b="_fs_namespace";var S,E="FS";function T(e){if(S)return S;var t=k(e);return t?(S=t,t):(t=e[b])?(S=t,t):S=E}function k(e){return e[w]}function I(e){return e[T(e)]}function C(e){return"localhost"==e||"127.0.0.1"==e}var R,A,x,O,M=/^([^.]+\.)*(fullstory|onfire).[^.]+(\/|$)/;function L(e){return!!e._fs_ext_debug||!!e._fs_debug}function F(e){return e._fs_rec_host||((t=D(e))&&M.test(t)?0===t.lastIndexOf("rs.",0)||0===t.lastIndexOf("rs-2.",0)?t:0==t.lastIndexOf("www.",0)?"rs."+t.slice(4):0==t.lastIndexOf("app.",0)?"rs."+t.slice(4):"rs."+t:t);var t}function P(e){return e._fs_ext_org||e._fs_org}function q(e){return!!e._fs_is_outer_script}function U(e){return e._fs_replay_flags}function N(e){return e._fs_transport}function W(e,t){var n=I(e);if(n){var r=n.q;r||(r=n.q=[]),r.push(t)}}function D(e){return e._fs_ext_host||e._fs_host}function B(e){return e?C(function(e){var t=e,n=t.indexOf(":");return n>=0&&(t=t.slice(0,n)),t}(e))?e:0==e.indexOf("www.")?"app."+e.slice(4):"app."+e:e}function H(e){return e?e+"/s/fs.js":void 0}!function(e){e.MUT_INSERT=2,e.MUT_REMOVE=3,e.MUT_ATTR=4,e.MUT_TEXT=6,e.MOUSEMOVE=8,e.MOUSEMOVE_CURVE=9,e.SCROLL_LAYOUT=10,e.SCROLL_LAYOUT_CURVE=11,e.MOUSEDOWN=12,e.MOUSEUP=13,e.KEYDOWN=14,e.KEYUP=15,e.CLICK=16,e.FOCUS=17,e.VALUECHANGE=18,e.RESIZE_LAYOUT=19,e.DOMLOADED=20,e.LOAD=21,e.PLACEHOLDER_SIZE=22,e.UNLOAD=23,e.BLUR=24,e.SET_FRAME_BASE=25,e.TOUCHSTART=32,e.TOUCHEND=33,e.TOUCHCANCEL=34,e.TOUCHMOVE=35,e.TOUCHMOVE_CURVE=36,e.NAVIGATE=37,e.PLAY=38,e.PAUSE=39,e.RESIZE_VISUAL=40,e.RESIZE_VISUAL_CURVE=41,e.RESIZE_DOCUMENT=42,e.LOG=48,e.ERROR=49,e.DBL_CLICK=50,e.FORM_SUBMIT=51,e.WINDOW_FOCUS=52,e.WINDOW_BLUR=53,e.HEARTBEAT=54,e.WATCHED_ELEM=56,e.PERF_ENTRY=57,e.REC_FEAT_SUPPORTED=58,e.SELECT=59,e.CSSRULE_INSERT=60,e.CSSRULE_DELETE=61,e.FAIL_THROTTLED=62,e.AJAX_REQUEST=63,e.SCROLL_VISUAL_OFFSET=64,e.SCROLL_VISUAL_OFFSET_CURVE=65,e.MEDIA_QUERY_CHANGE=66,e.RESOURCE_TIMING_BUFFER_FULL=67,e.MUT_SHADOW=68,e.DISABLE_STYLESHEET=69,e.FULLSCREEN=70,e.FULLSCREEN_ERROR=71,e.ADOPTED_STYLESHEETS=72,e.CUSTOM_ELEMENT_DEFINED=73,e.MODAL_OPEN=74,e.MODAL_CLOSE=75,e.SLOW_INTERACTION=76,e.LONG_FRAME=77,e.TIMING=78,e.STORAGE_WRITE_FAILURE=79,e.KEEP_ELEMENT=2e3,e.KEEP_URL=2001,e.KEEP_BOUNCE=2002,e.SYS_SETVAR=8193,e.SYS_RESOURCEHASH=8195,e.SYS_SETCONSENT=8196,e.SYS_CUSTOM=8197,e.SYS_REPORTCONSENT=8198}(R||(R={})),function(e){e.Unknown=0,e.Serialization=1}(A||(A={})),function(e){e.Unknown=0,e.DomSnapshot=1,e.NodeEncoding=2,e.LzEncoding=3}(x||(x={})),function(e){e.Internal=0,e.Public=1}(O||(O={}));var j,K,V,z,Y,G,Q,X,J,$,Z,ee,te,ne=["print","alert","confirm"];function re(e){switch(e){case R.MOUSEDOWN:case R.MOUSEMOVE:case R.MOUSEMOVE_CURVE:case R.MOUSEUP:case R.KEYDOWN:case R.KEYUP:case R.TOUCHSTART:case R.TOUCHEND:case R.TOUCHMOVE:case R.TOUCHMOVE_CURVE:case R.TOUCHCANCEL:case R.CLICK:case R.SCROLL_LAYOUT:case R.SCROLL_LAYOUT_CURVE:case R.SCROLL_VISUAL_OFFSET:case R.SCROLL_VISUAL_OFFSET_CURVE:case R.NAVIGATE:return!0;}return!1}!function(e){e.GrantConsent=!0,e.RevokeConsent=!1}(j||(j={})),function(e){e.Page=0,e.Document=1}(K||(K={})),function(e){e.Unknown=0,e.Api=1,e.FsShutdownFrame=2,e.Hibernation=3,e.Reidentify=4,e.SettingsBlocked=5,e.Size=6,e.Unload=7}(V||(V={})),function(e){e.Timing=0,e.Navigation=1,e.Resource=2,e.Paint=3,e.Mark=4,e.Measure=5,e.Memory=6}(z||(z={})),function(e){e.Performance=0,e.PerformanceEntries=1,e.PerformanceMemory=2,e.Console=3,e.Ajax=4,e.PerformanceObserver=5,e.AjaxFetch=6}(Y||(Y={})),function(e){e.Node=1,e.Sheet=2}(G||(G={})),function(e){e.StyleSheetHooks=0,e.SetPropertyHooks=1}(Q||(Q={})),function(e){e.User="user",e.Account="acct",e.Event="evt"}(X||(X={})),function(e){e.Elide=0,e.Record=1,e.Whitelist=2}(J||(J={})),function(e){e.ReasonNoSuchOrg=1,e.ReasonOrgDisabled=2,e.ReasonOrgOverQuota=3,e.ReasonBlockedDomain=4,e.ReasonBlockedIp=5,e.ReasonBlockedUserAgent=6,e.ReasonBlockedGeo=7,e.ReasonBlockedTrafficRamping=8,e.ReasonInvalidURL=9,e.ReasonUserOptOut=10,e.ReasonInvalidRecScript=11,e.ReasonDeletingUser=12,e.ReasonNativeHookFailure=13}($||($={})),function(e){e.Unset=0,e.Exclude=1,e.Mask=2,e.Unmask=3,e.Watch=4,e.Keep=5}(Z||(Z={})),function(e){e.Unset=0,e.Click=1}(ee||(ee={})),function(e){e.MaxLogsPerPage=1024,e.MutationProcessingInterval=250,e.CurveSamplingInterval=142,e.DefaultBundleUploadInterval=5e3,e.HeartbeatInitial=4e3,e.HeartbeatMax=256200,e.PageInactivityTimeout=18e5,e.BackoffMax=3e5,e.ScrollSampleInterval=e.MutationProcessingInterval/5,e.InactivityThreshold=4e3,e.MaxPayloadLength=16384}(te||(te={}));function ie(e,t){return function(){try{return e.apply(this,arguments)}catch(e){try{t&&t(e)}catch(e){}}}}var oe=function(){},se=navigator.userAgent,ae=se.indexOf("MSIE ")>-1||se.indexOf("Trident/")>-1,ue=(ae&&se.indexOf("Trident/5"),ae&&se.indexOf("Trident/6"),ae&&se.indexOf("rv:11")>-1),ce=se.indexOf("Edge/")>-1;se.indexOf("CriOS");var he=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function de(){var e=window.navigator.userAgent.match(/Version\/(\d+)/);return e?parseInt(e[1]):-1}function le(e){if(!he)return!1;var t=de();return t>=0&&t===e}function pe(e){if(!he)return!1;var t=de();return t>=0&&t<e}le(9),le(10),pe(8),pe(10),pe(12);function fe(e,t){for(var n=0===t.indexOf("on")?function(e){return"on"+e+t.slice(2)}:function(e){return""+e+t.charAt(0).toUpperCase()+t.slice(1)},r=0,i=[function(){return t},function(){return n("webkit")},function(){return n("moz")},function(){return n("ms")}];r<i.length;r++){var o=(0,i[r])();if(o in e)return o}return t}function ve(e){return"function"==typeof e}var _e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},ge=0,me=function(e,t){Ce[ge]=e,Ce[ge+1]=t,2===(ge+=2)&&be()};var ye=window.MutationObserver||window.WebKitMutationObserver,we="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof self&&void 0!==self.importScripts&&"undefined"!=typeof MessageChannel;var be,Se,Ee,Te,ke,Ie,Ce=new Array(1e3);function Re(){for(var e=0;e<ge;e+=2){(0,Ce[e])(Ce[e+1]),Ce[e]=void 0,Ce[e+1]=void 0}ge=0}function Ae(e,t){var n=arguments,r=this,i=new this.constructor(Me);void 0===i[Oe]&&Qe(i);var o,s=r._state;return s?(o=n[s-1],me(function(){return Ye(s,i,o,r._result)})):je(r,i,e,t),i}function xe(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(Me);return We(t,e),t}ye?(Te=0,ke=new ye(Re),Ie=document.createTextNode(""),ke.observe(Ie,{characterData:!0}),be=function(){var e=Te=++Te%2;Ie.data=e+""}):we?((Ee=new MessageChannel).port1.onmessage=Re,be=function(){return Ee.port2.postMessage(0)}):(Se=setTimeout,be=function(){return Se(Re,1)});var Oe=Math.random().toString(36).substring(16);function Me(){}var Le=void 0,Fe=1,Pe=2,qe=new Ve;function Ue(e){try{return e.then}catch(e){return qe.error=e,qe}}function Ne(e,t,n){t.constructor===e.constructor&&n===Ae&&t.constructor.resolve===xe?function(e,t){t._state===Fe?Be(e,t._result):t._state===Pe?He(e,t._result):je(t,void 0,function(t){return We(e,t)},function(t){return He(e,t)})}(e,t):n===qe?(He(e,qe.error),qe.error=null):void 0===n?Be(e,t):ve(n)?function(e,t,n){me(function(e){var r=!1,i=function(e,t,n,r,i){try{e.call(t,n,r)}catch(e){return e}}(n,t,function(n){r||(r=!0,t!==n?We(e,n):Be(e,n))},function(t){r||(r=!0,He(e,t))},e._label);!r&&i&&(r=!0,He(e,i))},e)}(e,t,n):Be(e,t)}function We(e,t){var n;e===t?He(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?Ne(e,t,Ue(t)):Be(e,t)}function De(e){e._onerror&&e._onerror(e._result),Ke(e)}function Be(e,t){e._state===Le&&(e._result=t,e._state=Fe,0!==e._subscribers.length&&me(Ke,e))}function He(e,t){e._state===Le&&(e._state=Pe,e._result=t,me(De,e))}function je(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+Fe]=n,i[o+Pe]=r,0===o&&e._state&&me(Ke,e)}function Ke(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?Ye(n,r,i,o):i(o);e._subscribers.length=0}}function Ve(){this.error=null}var ze=new Ve;function Ye(e,t,n,r){var i,o,s,a,u=ve(n);if(u){if((i=function(e,t){try{return e(t)}catch(e){return ze.error=e,ze}}(n,r))===ze?(a=!0,o=i.error,i.error=null):s=!0,t===i)return void He(t,new TypeError("A promises callback cannot return that same promise."))}else i=r,s=!0;t._state!==Le||(u&&s?We(t,i):a?He(t,o):e===Fe?Be(t,i):e===Pe&&He(t,i))}var Ge=0;function Qe(e){e[Oe]=Ge++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Xe(e,t){this._instanceConstructor=e,this.promise=new e(Me),this.promise[Oe]||Qe(this.promise),_e(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?Be(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&Be(this.promise,this._result))):He(this.promise,new Error("Array Methods must be provided an Array"))}Xe.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===Le&&n<e;n++)this._eachEntry(t[n],n)},Xe.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===xe){var i=Ue(e);if(i===Ae&&e._state!==Le)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===Je){var o=new n(Me);Ne(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},Xe.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===Le&&(this._remaining--,e===Pe?He(r,n):this._result[t]=n),0===this._remaining&&Be(r,this._result)},Xe.prototype._willSettleAt=function(e,t){var n=this;je(e,void 0,function(e){return n._settledAt(Fe,t,e)},function(e){return n._settledAt(Pe,t,e)})};var Je=function(e){this[Oe]=Ge++,this._result=this._state=void 0,this._subscribers=[],Me!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof Je?function(e,t){try{t(function(t){We(e,t)},function(t){He(e,t)})}catch(t){He(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())};Je.all=function(e){return new Xe(this,e).promise},Je.race=function(e){var t=this;return _e(e)?new t(function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},Je.resolve=xe,Je.reject=function(e){var t=new this(Me);return He(t,e),t},Je._setAsap=function(e){me=e},Je._asap=me,Je.prototype={constructor:Je,then:Ae,"catch":function(e){return this.then(null,e)}};var $e,Ze,et="function"==typeof window.Promise?window.Promise:Je,tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function nt(e){return s.arrayIsArray(e)}var rt,it,ot,st,at,ut;function ct(e,t){return 0==e.lastIndexOf(t,0)}function ht(e,t){for(var n in e)s.objectHasOwnProp(e,n)&&t(e[n],n,e)}function dt(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return e[t]}function lt(e,t){var n=0;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&++n>t)return!1;return n==t}function pt(e,t){var n=0;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&++n>t)return!0;return!1}Ze="function"==typeof s.objectKeys?function(e){return s.objectKeys(e)}:function(e){var t=[];for(var n in e)s.objectHasOwnProp(e,n)&&t.push(n);return t},st=(ot=function(e){return e.matches||e.msMatchesSelector||e.webkitMatchesSelector})(window.Element.prototype),!(at=window.document?window.document.documentElement:void 0)||st&&at instanceof window.Element||(st=ot(at)),it=($e=[st,function(e,t){return st.call(e,t)}])[0],rt=$e[1];var ft;ut=ae?function(e){var t=e.nextSibling;return t&&e.parentNode&&t===e.parentNode.firstChild?null:t}:function(e){return e.nextSibling};var vt;ft=ae?function(e,t){if(e){var n=e.parentNode?e.parentNode.firstChild:null;do{t(e),e=e.nextSibling}while(e&&e!=n)}}:function(e,t){for(;e;e=e.nextSibling)t(e)};vt=ae?function(e){var t=e.previousSibling;return t&&e.parentNode&&t===e.parentNode.lastChild?null:t}:function(e){return e.previousSibling};function _t(e,t){if(!e)return oe;var n=function(e){try{var t=window;return t.Zone&&t.Zone.root&&"function"==typeof t.Zone.root.wrap?t.Zone.root.wrap(e):e}catch(t){return e}}(e);return t&&(n=n.bind(t)),ie(n,function(e){o("Unexpected error: "+e)})}function gt(e){var t,n=Array.prototype.toJSON,r=String.prototype.toJSON;n&&(Array.prototype.toJSON=void 0),r&&(String.prototype.toJSON=void 0);try{t=s.jsonStringify(e)}catch(e){t=mt(e)}finally{n&&(Array.prototype.toJSON=n),r&&(String.prototype.toJSON=r)}return t}function mt(e){var t="Internal error: unable to determine what JSON error was";try{t=(t=""+e).replace(/[^a-zA-Z0-9\.\:\!\, ]/g,"_")}catch(e){}return"\""+t+"\""}function yt(e){var t=e.doctype;if(!t)return"";var n="<!DOCTYPE ";return n+=t.name,t.publicId&&(n+=" PUBLIC \""+t.publicId+"\""),t.systemId&&(n+=" \""+t.systemId+"\""),n+">"}function wt(e){return s.jsonParse(e)}function bt(e){var t=0,n=0;return null==e.screen?[t,n]:(t=parseInt(String(e.screen.width)),n=parseInt(String(e.screen.height)),[t=isNaN(t)?0:t,n=isNaN(n)?0:n])}var St=function(){function e(e,t){this.target=e,this.propertyName=t,this._before=oe,this._afterSync=oe,this._afterAsync=oe,this.on=!1}return e.prototype.before=function(e){return this._before=_t(e),this},e.prototype.afterSync=function(e){return this._afterSync=_t(e),this},e.prototype.afterAsync=function(e){return this._afterAsync=_t(function(t){s.setWindowTimeout(window,ie(function(){e(t)}),0)}),this},e.prototype.disable=function(){if(this.on=!1,this.shim){var e=this.shim,t=e.override,n=e["native"];this.target[this.propertyName]===t&&(this.target[this.propertyName]=n,this.shim=void 0)}},e.prototype.enable=function(){if(this.on=!0,this.shim)return!0;this.shim=this.makeShim();try{this.target[this.propertyName]=this.shim.override}catch(e){return!1}return!0},e.prototype.makeShim=function(){var e=this,t=this.target[this.propertyName];return{"native":t,override:function(){var n={that:this,args:arguments,result:null};e.on&&e._before(n);var r=t.apply(this,arguments);return e.on&&(n.result=r,e._afterSync(n),e._afterAsync(n)),r}}},e}(),Et={};function Tt(e,t){if(!e||"function"!=typeof e[t])return null;var n;Et[t]=Et[t]||[];for(var r=0;r<Et[t].length;r++)Et[t][r].obj==e&&(n=Et[t][r].hook);return n||(n=new St(e,t),Et[t].push({obj:e,hook:n})),n.enable()?n:null}function kt(e,t,n){if(!e)return function(){};var r=Object.getOwnPropertyDescriptor(e.prototype,t);if(!r||!r.set)return function(){};var i=r.set,o=_t(n),s=!0;function a(e){i.call(this,e),s&&o(this,e)}return Object.defineProperty(e.prototype,t,tt(tt({},r),{set:a})),function(){s=!1;var n=Object.getOwnPropertyDescriptor(e.prototype,t);n&&a===n.set&&Object.defineProperty(e.prototype,t,tt(tt({},n),{set:i}))}}var It=10,Ct="[anonymous]",Rt=/function\s*([\w\-$]+)?\s*\(/i;function At(e){return e.stack||e.backtrace||e.stacktrace}function xt(){var e,t;try{throw new Error("")}catch(n){e="<generated>\n",t=At(n)}if(!t){e="<generated-ie>\n";var n=[];try{for(var r=arguments.callee.caller.caller;r&&n.length<It;){var i=Rt.test(r.toString())&&RegExp.$1||Ct;n.push(i),r=r.caller}}catch(e){o(e)}t=n.join("\n")}return e+t}function Ot(){try{return window.self!==window.top}catch(e){return!0}}var Mt=function(){function e(){}return e.wrap=function(t,n){return void 0===n&&(n="error"),ie(t,function(t){return e.sendToBugsnag(t,n)})},e.errorLimit=15,e.sendToBugsnag=function(t,n,r){if(!(e.errorLimit<=0)){e.errorLimit--,"string"==typeof t&&(t=new Error(t));var i=y(document).fs_uid,o=i?m(i):void 0;o&&o.orgId!=P(window)&&(o=void 0);var s=new Date(1591209308e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:Ot(),CompiledTimestamp:1591209308,CompiledTime:s,orgId:P(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:t.message,name:"Recording Error",releaseStage:"production "+s,severity:n,language:navigator.language||navigator.userLanguage||"en-GB",stacktrace:At(t)||xt()};if(r)for(var u in r){var c=typeof r[u];a["aux_"+u]="string"===c||"number"===c?r[u]:gt(r[u])}var h=[];for(var u in a)h.push(encodeURIComponent(u)+"="+encodeURIComponent(a[u]));new Image().src="https://"+F(window)+"/rec/except?"+h.join("&")}},e}(),Lt={};function Ft(e,t,n){if(void 0===n&&(n=1),e)return!0;if(Lt[t]=Lt[t]||0,Lt[t]++,Lt[t]>n)return!1;var r=new Error("Assertion failed: "+t);return Mt.sendToBugsnag(r,"error"),e}function Pt(e,t,n,r){void 0!==n&&("function"==typeof e.addEventListener?e.addEventListener(t,n,r):"function"==typeof e.addListener?e.addListener(n):o("Target of "+t+" doesn't seem to support listeners"))}function qt(e,t,n,r){void 0!==n&&("function"==typeof e.removeEventListener?e.removeEventListener(t,n,r):"function"==typeof e.removeListener?e.removeListener(n):o("Target of "+t+" doesn't seem to support listeners"))}var Ut=function(){function e(){var e=this;this._listeners=[],this._children=[],this._yesCapture=!0,this._noCapture=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e._yesCapture={capture:!0,passive:!0},e._noCapture={capture:!1,passive:!0}}});window.addEventListener("test",oe,t)}catch(e){}}return e.prototype.add=function(e,t,n,r,i){return void 0===i&&(i=!1),this.addCustom(e,t,n,r,i)},e.prototype.addCustom=function(e,t,n,r,i){void 0===i&&(i=!1);var o={target:e,type:t,fn:Mt.wrap(function(e){(i||!1!==e.isTrusted||"message"==t||e._fs_trust_event)&&r(e)}),options:n?this._yesCapture:this._noCapture,index:this._listeners.length};return this._listeners.push(o),Pt(e,t,o.fn,o.options),o},e.prototype.remove=function(e){e.target&&(qt(e.target,e.type,e.fn,e.options),e.target=null,e.fn=void 0)},e.prototype.clear=function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e].target&&this.remove(this._listeners[e]);this._listeners=[]},e.prototype.createChild=function(){var t=new e;return this._children.push(t),t},e.prototype.refresh=function(){for(var e=0,t=this._listeners;e<t.length;e++){var n=t[e];n.target&&(qt(n.target,n.type,n.fn,n.options),Pt(n.target,n.type,n.fn,n.options))}for(var r=0,i=this._children;r<i.length;r++){i[r].refresh()}},e}();function Nt(e,t){return t&&e.pageLeft==t.pageLeft&&e.pageTop==t.pageTop}function Wt(e,t){return t&&e.width==t.width&&e.height==t.height}function Dt(e){return{pageLeft:e.pageLeft,pageTop:e.pageTop,width:e.width,height:e.height}}var Bt=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),Ht=".*?"+/(?:[^\\](?:\\\\)*)/.source;new RegExp(Bt.map(function(e){var t=e[0],n=e[1];return"("+t+")("+Ht+")("+n+")"}).join("|"),"g");var jt=/url\(["']?(.+?)["']?\)/g,Kt=/^\s*\/\//;function Vt(e){return e&&e.body&&e.documentElement?"BackCompat"==e.compatMode?[e.body.clientWidth,e.body.clientHeight]:[e.documentElement.clientWidth,e.documentElement.clientHeight]:[0,0]}var zt=function(){function e(e,t){var n,r;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var i=e.document;if(i&&i.documentElement&&i.body){if("visualViewport"in e){var o=i.documentElement.getBoundingClientRect();this.hasKnownPosition=!0,this.pageLeft=0==o.left?0:-o.left,this.pageTop=0==o.top?0:-o.top}if(n=Vt(i),this.clientWidth=n[0],this.clientHeight=n[1],void 0!==t&&this.clientWidth==t.clientWidth&&this.clientHeight==t.clientHeight&&t.width>0&&t.height>0)return this.width=t.width,void(this.height=t.height);r=this.computeLayoutViewportSizeFromMediaQueries(e),this.width=r[0],this.height=r[1]}}return e.prototype.computeLayoutViewportSizeFromMediaQueries=function(e){var t=this.findMediaValue(e,"width",this.clientWidth,this.clientWidth+128);void 0===t&&(t=this.tryToGet(e,"innerWidth")),void 0===t&&(t=this.clientWidth);var n=this.findMediaValue(e,"height",this.clientHeight,this.clientHeight+128);return void 0===n&&(n=this.tryToGet(e,"innerHeight")),void 0===n&&(n=this.clientHeight),[t,n]},e.prototype.findMediaValue=function(e,t,n,r){if(s.matchMedia){var i=s.matchMedia(e,"(min-"+t+": "+n+"px)");if(null!=i){if(i.matches&&s.matchMedia(e,"(max-"+t+": "+n+"px)").matches)return n;for(;n<=r;){var o=s.mathFloor((n+r)/2);if(s.matchMedia(e,"(min-"+t+": "+o+"px)").matches){if(s.matchMedia(e,"(max-"+t+": "+o+"px)").matches)return o;n=o+1}else r=o-1}}}},e.prototype.tryToGet=function(e,t){try{return e[t]}catch(e){return}},e}();function Yt(e,t){return new zt(e,t)}var Gt=function(e,t){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var n=e.document;if(n.body){var r="BackCompat"==n.compatMode;"pageXOffset"in e?(this.pageLeft=e.pageXOffset,this.pageTop=e.pageYOffset):n.scrollingElement?(this.pageLeft=n.scrollingElement.scrollLeft,this.pageTop=n.scrollingElement.scrollTop):r?(this.pageLeft=n.body.scrollLeft,this.pageTop=n.body.scrollTop):n.documentElement&&(n.documentElement.scrollLeft>0||n.documentElement.scrollTop>0)?(this.pageLeft=n.documentElement.scrollLeft,this.pageTop=n.documentElement.scrollTop):(this.pageLeft=n.body.scrollLeft||0,this.pageTop=n.body.scrollTop||0),this.offsetLeft=this.pageLeft-t.pageLeft,this.offsetTop=this.pageTop-t.pageTop;try{var i=e.innerWidth,o=e.innerHeight}catch(e){return}if(0!=i&&0!=o){this.scale=t.width/i,this.scale<1&&(this.scale=1);var s=t.width-t.clientWidth,a=t.height-t.clientHeight;this.width=i-s/this.scale,this.height=o-a/this.scale}}};var Qt,Xt=(Qt=function(e,t){return(Qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Qt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Jt=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},$t=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Zt=function(){function e(){var t=this;this._wrappedTick=Mt.wrap(function(){t.unregister(),t._tick()}),this._due=0,this._id=e.nextId++}return e._rearm=function(){e.checkedAlready=!1,e.lastCheck=0},e.checkForBrokenSchedulers=function(){return Jt(this,void 0,et,function(){var t,n;return $t(this,function(r){switch(r.label){case 0:return!s.requestWindowAnimationFrame||e.checkedAlready?[2,void 0]:(t=p())-e.lastCheck<100?[2,void 0]:(e.lastCheck=t,e.checkedAlready=!0,[4,new et(function(e){return s.requestWindowAnimationFrame(window,e)})]);case 1:return r.sent(),n=[],ht(e.registry,function(e){var r=e.maybeForceTick(t);r&&n.push(r)}),[2,et.all(n).then(function(){s.requestWindowAnimationFrame(window,Mt.wrap(function(){e.checkedAlready=!1}))})];}})})},e.stopAll=function(){ht(this.registry,function(e){return e.stop()})},e.prototype.setTick=function(e){this._tick=e},e.prototype.stop=function(){this.cancel(),delete e.registry[this._id]},e.prototype.register=function(t){this._due=p()+100+1.5*t,e.registry[this._id]=this},e.prototype.unregister=function(){delete e.registry[this._id]},e.prototype.maybeForceTick=function(e){if(e>this._due)return et.resolve().then(this._wrappedTick)["catch"](function(){})},e.registry={},e.nextId=0,e.checkedAlready=!1,e.lastCheck=0,e}(),en=function(e){function t(t){var n=e.call(this)||this;return n._interval=t,n._handle=-1,n}return Xt(t,e),t.prototype.start=function(e){var t=this;-1==this._handle&&(this.setTick(function(){e(),t.register(t._interval)}),this._handle=s.setWindowInterval(window,this._wrappedTick,this._interval),this.register(this._interval))},t.prototype.cancel=function(){-1!=this._handle&&(s.clearWindowInterval(window,this._handle),this._handle=-1,this.setTick(function(){}))},t}(Zt),tn=function(e){function t(t,n,r){void 0===n&&(n=0);for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.call(this)||this;return s.delay=n,s.timer=-1,s.setTick(function(){t.apply(void 0===r?window:r,i),s.stop()}),s}return Xt(t,e),t.prototype.start=function(e){return void 0===e&&(e=this.delay),this.delay=e,s.clearWindowTimeout(window,this.timer),this.timer=s.setWindowTimeout(window,this._wrappedTick,this.delay),this.register(e),this},t.prototype.cancel=function(){-1!=this.timer&&(s.clearWindowTimeout(window,this.timer),this.timer=-1)},t}(Zt);!function(){function e(e){this.deadlineTime=e,this.didTimeout=this.deadlineTime<=p()}e.prototype.timeRemaining=function(){return this.deadlineTime-p()}}();var nn=function(){function e(e,t,n){this.limit=e,this.breaker=n,this.remaining=0,this.ticker=new en(t),this.open()}return e.prototype.guard=function(e){var t=this;return function(){return 0==t.remaining?(t.breaker(),void t.remaining--):t.remaining<0?void 0:(t.remaining--,e.apply(this,arguments))}},e.prototype.close=function(){return this.ticker.stop(),this},e.prototype.open=function(){var e=this;return this.remaining=this.limit,this.ticker.start(function(){e.remaining=e.limit}),this},e}(),rn=function(){function e(){this._reported=0,this._skew=0,this._startTime=l?l.timeOrigin:d.timeOrigin}return e.prototype.wallTime=function(){return p()},e.prototype.now=function(){var e=this.wallTime()-this._startTime;return e<0&&this._reportTimeSkew("timekeeper now() is negative"),e},e.prototype.startTime=function(){return this._startTime},e.prototype.setStartTime=function(e){var t=this.wallTime();this._startTime=e,e>t&&(this._skew=e-t,this._reportTimeSkew("timekeeper set with future ts"))},e.prototype._reportTimeSkew=function(e){this._reported++<=2&&Mt.sendToBugsnag(e,"error",{skew:this._skew,startTime:this._startTime,wallTime:this.wallTime()})},e}();function on(e){var t=e;return t.tagName?"object"==typeof t.tagName?"form":t.tagName.toLowerCase():null}var sn,an,un=n(3),cn=n(0),hn=Object.defineProperty,dn=p()%1e9,ln=window.WeakMap||((sn=function(){this.name="__st"+(1e9*s.mathRandom()>>>0)+dn++ +"__"}).prototype={set:function(e,t){var n=e[this.name];n&&n[0]===e?n[1]=t:hn(e,this.name,{value:[e,t],writable:!0})},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0}},sn),pn=1,fn=4,vn=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};function _n(e){if(null==e)return 0;switch(e){case an.Exclude:return 5;case an.Mask:return 4;case an.Unmask:return 3;case an.Watch:return 2;case an.Keep:return 1;default:return Object(cn.assertExhaustive)(e,"Undefined watch kind: "+e);}}!function(e){e[e.Exclude=1]="Exclude",e[e.Mask=2]="Mask",e[e.Unmask=3]="Unmask",e[e.Watch=4]="Watch",e[e.Keep=5]="Keep"}(an||(an={}));var gn={1:"exclude",2:"mask",3:"unmask",4:"watch",5:"keep"},mn=[an.Exclude,an.Mask,an.Unmask,an.Watch,an.Keep],yn=function(){function e(e){void 0===e&&(e="matches"),this._watchStrategy=e,this._hasWatched=!1,this._rules=Sn(),this._consentRules=Sn()}return e.prototype.initialize=function(e){var t=e.blocks,n=e.keeps,r=e.watches,i=e.flags;this._watchStrategy=i.watchStrategy;var o=vn(un);if(i.whitelist&&o.push({Type:Z.Mask,Consent:j.RevokeConsent,Selector:"body"}),t)for(var s=0,a=t;s<a.length;s++){var u=a[s];o.push(u)}if(r)for(var c=0,h=r;c<h.length;c++){var d=h[c];o.push({Type:Z.Watch,Consent:j.RevokeConsent,Selector:d.Selector})}this._batchElementBlocks(o),n&&this._batchElementKeeps(n)},e.prototype.isWatched=function(e){var t=[an.Exclude,an.Mask,an.Unmask,an.Watch,an.Keep];return this._firstMatch(t,e)},e.prototype.matchesAnyKeepRule=function(e){var t=[an.Keep];return null!==this._firstMatch(t,e)},e.prototype.matchesAnyConsentRule=function(e){var t=[an.Exclude,an.Mask,an.Unmask,an.Keep];return null!==this._firstConsentMatch(t,e)},e.prototype._firstMatch=function(e,t){this._hasWatched=!0;for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0,s=this._rules[i];o<s.length;o++){var a=s[o];if(rt(t,a))return i}return this._consent?null:this._firstConsentMatch(e,t)},e.prototype._firstConsentMatch=function(e,t){for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0,s=this._consentRules[i];o<s.length;o++){var a=s[o];if(rt(t,a))return i}return null},e.prototype._batchElementBlocks=function(e){var t=this,n=Sn(),r=Sn();e.map(wn).filter(function(e){return bn(e.selector)}).forEach(function(e){e.consent?r[e.kind].push(e):n[e.kind].push(e)});for(var i=document.documentElement||document.createElement("div"),o=function(e,n){try{var r=e.map(function(e){return e.selector}).join(", ");rt(i,r),n.push(r)}catch(n){Mt.sendToBugsnag("Browser rejected optimistic merge rule","warning"),t._fallback(e)}},s=0,a=mn;s<a.length;s++){var u=a[s];n[u].length>0&&o(n[u],this._rules[u]),r[u].length>0&&o(r[u],this._consentRules[u])}},e.prototype._fallback=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t],i=r.kind,o=r.consent,s=r.selector;this.addRule(i,o,s)}},e.prototype.addElementBlock=function(e){var t=wn(e),n=t.kind,r=t.consent,i=t.selector;return this.addRule(n,r,i)},e.prototype._batchElementKeeps=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addElementKeep(r)}},e.prototype.addElementKeep=function(e){var t=an.Keep;switch(e.Type){case ee.Click:break;default:return!1;}return this.addRule(t,e.Consent,e.Selector)},e.prototype.addRule=function(e,t,n){if(this.tryToAddRule(e,t,n))return!0;switch(e){case an.Watch:case an.Unmask:case an.Keep:break;case an.Mask:case an.Exclude:default:this._rules[e]=["*"];}return!1},e.prototype.tryToAddRule=function(e,t,n){try{return!bn(n)||this.mergeRule(e,t,n)}catch(e){return Mt.sendToBugsnag("Error adding block rule","error",{selector:n,error:e.toString()}),!1}},e.prototype.getConsent=function(){return this._consent},e.prototype.initializeConsent=function(e){void 0===this._consent&&this.setConsent(e)},e.prototype.setConsent=function(e){this._consent!==e&&(this._consent=e,this._hasWatched&&this.onConsentChange&&this.onConsentChange())},e.prototype.mergeRule=function(e,t,n){var r=t?this._consentRules:this._rules,i=document.documentElement||document.createElement("div"),o=function(){try{return rt(i,n),!0}catch(t){return Mt.sendToBugsnag("Browser rejected rule","warning",{kind:gn[e],selector:n,error:t.toString()}),!1}};switch(e){case an.Exclude:case an.Mask:case an.Unmask:case an.Watch:case an.Keep:break;default:e=an.Exclude;}if(0==r[e].length)return!!o()&&(r[e].push(n),!0);var s=r[e].length-1,a=r[e][s].concat(", ",n);try{rt(i,a)}catch(t){return!!o()&&(r[e].push(n),Mt.sendToBugsnag("Browser rejected merged rule","warning",{kind:gn[e],selector:n,error:t.toString()}),!0)}return r[e][s]=a,!0},e.prototype.allConsentSensitiveElements=function(e){for(var t=[],n=0,r=[an.Exclude,an.Mask,an.Unmask,an.Keep];n<r.length;n++)for(var i=r[n],o=0,s=this._consentRules[i];o<s.length;o++)for(var a=s[o],u=e.querySelectorAll(a),c=0;c<u.length;c++)t.push(u[c]);return t},e.prototype.allWatchedElements=function(e){var t=this;if("matches"===this._watchStrategy)return null;this._hasWatched=!0;for(var n=new ln,r=function(e,r,i){var o=n.get(e)||{kind:null,matchesAnyKeepRule:!1,matchesAnyConsentRule:i};(!i||i&&!t._consent)&&(null==o.kind&&(o.kind=r),r===an.Keep&&(o.matchesAnyKeepRule=!0)),i&&(o.matchesAnyConsentRule=!0),n.set(e,o)},i=0,o=[[this._rules,!1],[this._consentRules,!0]];i<o.length;i++)for(var s=o[i],a=s[0],u=s[1],c=0,h=mn;c<h.length;c++)for(var d=h[c],l=0,p=a[d];l<p.length;l++){var f=p[l];En(e)&&rt(e,f)&&r(e,d,u);for(var v=e.querySelectorAll(f),_=0;_<v.length;_++)r(v[_],d,u)}return n},e.prototype.getWatchStrategy=function(){return this._watchStrategy},e}();function wn(e){var t=an.Exclude;switch(e.Type){case Z.Unset:case Z.Exclude:t=an.Exclude;break;case Z.Mask:t=an.Mask;break;case Z.Unmask:t=an.Unmask;break;case Z.Watch:t=an.Watch;break;case Z.Keep:t=an.Keep;}return{kind:t,consent:e.Consent,selector:e.Selector}}function bn(e){return!e.match(Kt)&&""!=e.trim()}function Sn(){for(var e=Object.create?Object.create(null):{},t=0,n=mn;t<n.length;t++){e[n[t]]=[]}return e}function En(e){return e.nodeType===pn}var Tn={},kn=1;function In(e){var t=xn(e);return!!t&&void 0!==t.watchKind}function Cn(e){var t=xn(e);return!!t&&t.watchKind==an.Exclude}function Rn(e){var t=xn(e);return!!t&&!!t.mask}function An(e){var t=xn(e);return t?t.watchKind:void 0}function xn(e){return e?Tn[e._fs]:null}function On(e){return Tn[e]}function Mn(e){try{return e&&e._fs||0}catch(e){return 0}}function Ln(e){return Cn(e)?0:Mn(e)}function Fn(e,t){e.parent&&(t.unobserveSubtree(e.node),e.parent.child==e&&(e.parent.child=e.next),e.parent.lastChild==e&&(e.parent.lastChild=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent=e.prev=e.next=null,delete Tn[e.id],e.node._fs==e.id&&(e.node._fs=0),e.id=0,e.child&&Pn(e.child))}function Pn(e){for(var t=[e];t.length>0&&t.length<1e4;){var n=t.pop();delete Tn[n.id],n.node._fs==n.id&&(n.node._fs=0),n.id=0,n.next&&t.push(n.next),n.child&&t.push(n.child)}Ft(t.length<1e4,"clearIds is fast")}var qn,Un=function(){function e(e,t){this._onchange=e,this._checkElem=t,this._fallback=!1,this._elems={},this.values={},this.radios={},qn=this}return e.prototype.hookEvents=function(){(function(){var e=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(!e||!e.set)return!1;Nn||(kt(HTMLInputElement,"value",jn),kt(HTMLInputElement,"checked",jn),kt(HTMLSelectElement,"value",jn),kt(HTMLTextAreaElement,"value",jn),kt(HTMLSelectElement,"selectedIndex",jn),kt(HTMLOptionElement,"selected",jn),Nn=!0);return!0})()||(this._fallback=!0)},e.prototype.addInput=function(e){var t=Mn(e);if(this._elems[t]=e,Vn(e)){var n=Hn(e);e.checked&&(this.radios[n]=t)}else this.values[t]=Kn(e);(function(e){switch(e.type){case"checkbox":case"radio":return e.checked!=e.hasAttribute("checked");default:return(e.value||"")!=function(e){if("select"!=on(e))return e.getAttribute("value")||"";var t=e,n=t.querySelector("option[selected]")||t.querySelector("option");if(!n)return"";return n.value||""}(e);}})(e)&&this._onchange(e)},e.prototype.diffValue=function(e,t){var n=Mn(e);if(Vn(e)){var r=Hn(e);return this.radios[r]==n!=("true"==t)}return this.values[n]!=t},e.prototype.onChange=function(e,t){void 0===t&&(t=Kn(e));var n=Mn(e);if((e=this._elems[n])&&this.diffValue(e,t))if(this._onchange(e),Vn(e)){var r=Hn(e);"false"==t&&this.radios[r]==n?delete this.radios[r]:this.radios[r]=n}else this.values[n]=t},e.prototype.tick=function(){for(var e in this._elems){var t=this._elems[e];if(this._checkElem(t)){if(this._fallback){var n=Kn(t);if(t&&this.diffValue(t,n))if(this._onchange(t),Vn(t)){var r=Hn(t);this.radios[r]=+e}else this.values[e]=n}}else delete this._elems[e],delete this.values[e],Vn(t)&&delete this.radios[Hn(t)]}},e.prototype.shutdown=function(){qn=null},e.prototype._usingFallback=function(){return this._fallback},e.prototype._trackingElem=function(e){return!!this._elems[e]},e}(),Nn=!1;var Wn,Dn={};function Bn(){try{if(qn)for(var e in Dn){var t=Dn[e],n=t[0],r=t[1];qn.onChange(n,r)}}finally{Wn=null,Dn={}}}function Hn(e){if(!e)return"";for(var t=e;t&&"form"!=on(t);)t=t.parentElement;return(t&&"form"==on(t)?Mn(t):0)+":"+e.name}function jn(e,t){var n=function e(t,n){if(void 0===n&&(n=2),n<=0)return t;var r=on(t);return"option"!=r&&"optgroup"!=r||!t.parentElement?t:e(t.parentElement,n-1)}(e),r=Mn(n);r&&qn&&qn.diffValue(n,""+t)&&(Dn[r]=[n,""+t],Wn||(Wn=new tn(Bn)).start())}function Kn(e){switch(e.type){case"checkbox":case"radio":return""+e.checked;default:var t=e.value;return t||(t=""),""+t;}}function Vn(e){return e&&"radio"==e.type}var zn={};var Yn="__default";function Gn(e){void 0===e&&(e=Yn);var t=zn[e];return t||(t=function(){var e=document.implementation.createHTMLDocument("");return e.head||e.documentElement.appendChild(e.createElement("head")),e.body||e.documentElement.appendChild(e.createElement("body")),e}(),e!==Yn&&(t.open(),t.write(e),t.close()),zn[e]=t),t}var Qn=new(function(){function e(){var e=Gn(),t=e.getElementById("urlresolver-base");t||((t=e.createElement("base")).id="urlresolver-base",e.head.appendChild(t));var n=e.getElementById("urlresolver-parser");n||((n=e.createElement("a")).id="urlresolver-parser",e.head.appendChild(n)),this.base=t,this.parser=n}return e.prototype.parseUrl=function(e,t){if("undefined"!=typeof URL)try{e||(e=document.baseURI);var n=e?new URL(t,e):new URL(t);if(n.href)return n}catch(e){}return this.parseUrlUsingBaseAndAnchor(e,t)},e.prototype.parseUrlUsingBaseAndAnchor=function(e,t){this.base.setAttribute("href",e),this.parser.setAttribute("href",t);var n=document.createElement("a");return n.href=this.parser.href,n},e.prototype.resolveUrl=function(e,t){return this.parseUrl(e,t).href},e.prototype.resolveToDocument=function(e,t){var n=Jn(e);return null==n?t:this.resolveUrl(n,t)},e}());function Xn(e,t){return Qn.parseUrl(e,t)}function Jn(e){var t=e.document,n=e.location.href;if("string"==typeof t.baseURI)n=t.baseURI;else{var r=t.getElementsByTagName("base")[0];r&&r.href&&(n=r.href)}return"about:blank"==n&&e.parent!=e?Jn(e.parent):n}var $n=new RegExp("[^\\s]"),Zn=new RegExp("[\\s]*$");String.prototype;function er(e){var t=$n.exec(e);if(!t)return e;for(var n=t.index,r=(t=Zn.exec(e))?e.length-t.index:0,i="\uFFFF",o=e.slice(n,e.length-r).split(/\r\n?|\n/g),s=0;s<o.length;s++)i+=""+o[s].length,s!=o.length-1&&(i+=":");return(n||r)&&(i+=" "+n+" "+r),i}var tr=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","referrerPolicy","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].reduce(function(e,t){return e[t]=t,e[t.toUpperCase()]=t,e},{}),nr=n(2),rr="(redacted)",ir=16e6;function or(e,t){var n=e.textContent;if(!n)return"";if(!t&&!(t=xn(e)))return"";var r=n.length;return r>ir?(Mt.sendToBugsnag("Ignoring huge text node","warning",{length:r}),""):e.parentNode&&"style"==on(e.parentNode)?n:t.mask?er(n):n}function sr(e){return tr[e]||e.toLowerCase()}function ar(e,t,n,r){var i,o=on(t);if(null===o)return null;var s=function(e){var t,r,s;i=null!==(r=null===(t=nr[e][o])||void 0===t?void 0:t[n])&&void 0!==r?r:null===(s=nr[e]["*"])||void 0===s?void 0:s[n]};if(s("Any"),void 0===i){var a=xn(t);if(!a)return null;a.watchKind==an.Exclude?s("Exclude"):a.mask&&s("Mask")}if(void 0===i)return r;switch(i){case"erase":return null;case"scrubUrl":return ur(r,e,{source:"dom",type:o});case"maskText":return er(r);default:return Object(cn.assertExhaustive)(i);}}function ur(e,t,n){switch(n.source){case"dom":switch(r=n.type){case"frame":case"iframe":return hr(e,t);default:return cr(e,t);}case"event":switch(r=n.type){case R.AJAX_REQUEST:case R.NAVIGATE:return cr(e,t);case R.SET_FRAME_BASE:return hr(e,t);default:return Object(cn.assertExhaustive)(r);}case"log":return hr(e,t);case"page":var r;switch(r=n.type){case"base":return hr(e,t);case"referrer":case"url":return cr(e,t);default:return Object(cn.assertExhaustive)(r);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return hr(e,t);default:return cr(e,t);}default:return Object(cn.assertExhaustive)(n);}}function cr(e,t){return lr(e,t,function(e){if(!(e in pr)){var t=["password","token","^jwt$"];switch("4K3FQ"!==e&&"NQ829"!==e&&"KCF98"!==e&&t.push("^code$"),e){case"2FVM4":t.push("^e$","^eref$","^fn$");break;case"35500":t.push("share_token","password-reset-key");break;case"1HWDJ":t.push("email_id","invite","join");break;case"J82WF":t=[".*"];break;case"8MM83":t=["^creditCard"];break;case"PAN8Z":t.push("code","hash","ol","aeh");break;case"BKP05":t.push("api_key","session_id","encryption_key");break;case"QKM7G":t.push("postcode","encryptedQuoteId","registrationId","productNumber","customerName","agentId","qqQuoteId");break;case"FP60X":t.push("phrase");break;case"GDWG7":t=["^(?!productType|utmSource).*$"];break;case"RV68C":t.push("drivingLicense");break;case"S3VEC":t.push("data");break;case"Q8RZE":t.push("myLowesCardNumber");}pr[e]=new RegExp(t.join("|"),"i")}return pr[e]}(t))}function hr(e,t){return lr(e,t,fr)}function dr(e,t,n,r){var i=new RegExp("(\\/"+t+"\\/).*$","i");n==r&&e.pathname.indexOf(t)>=0&&(e.pathname=e.pathname.replace(i,"$1"+rr))}function lr(e,t,n){var r=Xn("",e);return r.hash&&r.hash.indexOf("access_token")>=0&&(r.hash="#"+rr),dr(r,"visitor",t,"QS8RG"),dr(r,"account",t,"QS8RG"),dr(r,"parentAccount",t,"QS8RG"),dr(r,"reset_password",t,"AGQFM"),dr(r,"reset-password",t,"95NJ7"),dr(r,"dl",t,"RV68C"),dr(r,"retailer",t,"FP60X"),dr(r,"ocadotech",t,"FP60X"),dr(r,"serviceAccounts",t,"FP60X"),dr(r,"signup",t,"7R98D"),r.search&&r.search.length>0&&(r.search=function(e,t){return e.split("?").map(function(e){return function(e,t){return e.replace("?","").split("&").map(function(e){return e.split("=")}).map(function(e){var n=e[0],r=e[1],i=e.slice(2);return t.test(n)&&void 0!==r?[n,rr].concat(i):[n,r].concat(i)}).map(function(e){var t=e[0],n=e[1],r=e.slice(2);return void 0===n?t:[t,n].concat(r).join("=")}).join("&")}(e,t)}).join("?")}(r.search,n)),r.href.substring(0,2048)}var pr={};var fr=new RegExp(".*","i");var vr=/([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)/gi,_r=/(?:(http)|(ftp)|(file))[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+#]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/gi;function gr(e){return"function"==typeof(t=e.constructor)&&Function.prototype.toString.call(t).indexOf("[native code]")>-1;var t}var mr=function(){function e(e,t,n){this._watcher=e,this._resizer=t,this._orgId=n,Tn={},kn=1}return e.prototype.tokenizeNode=function(e,t,n,r,i,o,s){var a=this,u=xn(t),c=xn(n),h=[];return function(e){var t=kn;try{return e(),!0}catch(e){return kn=t,!1}}(function(){a.tokeNode(e,u,c,r,h,i,o,s)})||(h=[]),h},e.prototype.tokeNode=function(e,t,n,r,i,o,s,a){for(var u=[{parentMirror:t,nextMirror:n,node:r}],c=function(){var t=u.pop();if(!t)return"continue";if("string"==typeof t)return i.push(t),"continue";var n=t.parentMirror,r=t.nextMirror,c=t.node,d=h._encodeTagAndAttributes(e,n,r,c,i,o,s);if(null==d||d.watchKind===an.Exclude)return"continue";var l=c.nodeType===pn?c.shadowRoot:null;return(l||c.firstChild)&&a(d)?(u.push("]"),function(e,t){if(!e)return;var n=[];ft(e,function(e){return n.push(e)});for(;n.length>0;){var r=n.pop();r&&t(r)}}(c.firstChild,function(e){u.push({parentMirror:d,nextMirror:null,node:e})}),l&&u.push({parentMirror:d,nextMirror:null,node:l}),void u.push("[")):"continue"},h=this;u.length;)c()},e.prototype._encodeTagAndAttributes=function(e,t,n,r,i,o,s){if("script"==on(r)||8==r.nodeType)return null;var a,u,c,h,d=function(e){return e.constructor===window.ShadowRoot}(r),l=function(e){var t={id:kn++,node:e};return Tn[t.id]=t,e._fs=t.id,t}(r);if((d||(null==t?void 0:t.isInShadowDOM))&&(l.isInShadowDOM=!0),t&&(d?t.shadow=l:(a=t,u=l,c=n,h=this._resizer,Fn(u,h),u.parent=a,u.next=c,c&&(u.prev=c.prev,c.prev=u),null==u.next?(u.prev=a.lastChild,a.lastChild=u):u.next.prev=u,null==u.prev?a.child=u:u.prev.next=u)),10==r.nodeType){var p=r;return i.push("<!DOCTYPE",":name",p.name,":publicId",p.publicId||"",":systemId",p.systemId||""),l}try{switch(r.nodeType){default:i.push("<"+r.nodeName),yr(r,o);break;case 11:case 9:var f;f=d?gr(r)?"#shadow":"#polyfillshadow":r.nodeName,i.push("<"+f),yr(r,o);break;case 3:void 0===l.mask&&(l.mask=!l.parent||l.parent.mask),l.mask&&this._resizer.observe(r.parentElement),yr(r,o),i.push("<"+r.nodeName,or(r,l));break;case pn:var v=r,_=v.nodeName;"http://www.w3.org/2000/svg"==v.namespaceURI&&(_="svg:"+_),i.push("<"+_);var g=this.getWatchState(v,!!l.isInShadowDOM,e),m=g.watchKind,y=g.matchesAnyKeepRule,w=g.matchesAnyConsentRule;if(l.matchesAnyKeepRule=y,l.matchesAnyConsentRule=w,null!=m)switch(l.watchKind=m,m){case an.Watch:this._resizer.observe(v);break;case an.Exclude:this._resizer.observe(v),i.push(":_fs_excluded","true");break;case an.Unmask:l.mask=!1;break;case an.Mask:l.mask=!0;}m!==an.Unmask&&m!==an.Mask&&l.parent&&(l.mask=l.parent.mask),l.mask&&i.push(":_fs_masked","true"),l.watchKind!=an.Exclude&&yr(r,o),function(e,t,n){if(ce&&"output"===on(t))return;var r=t;if(void 0!==r.hasAttributes&&!r.hasAttributes()||void 0===r.hasAttributes&&r.attributes&&r.attributes.length<=0)return;var i=function(r,i){null!==i&&(r=sr(r),null!==(i=ar(e,t,r,i))&&n(r,i))};if(void 0!==r.getAttributeNames)for(var o=0,s=r.getAttributeNames();o<s.length;o++){var a=s[o];i(a,r.getAttribute(a))}else for(var u=0;u<r.attributes.length;u++){var c=r.attributes[u];null!=c&&i(c.name,c.value)}}(this._orgId,v,function(e,t){i.push(":"+e),i.push(t);try{s(v,e,t)}catch(e){Mt.sendToBugsnag(e,"error")}});}}catch(e){Mt.sendToBugsnag(e,"error")}return l},e.prototype.getWatchState=function(e,t,n){var r=t||null==n?"matches":this._watcher.getWatchStrategy();switch(r){case"matches":return{watchKind:this._watcher.isWatched(e),matchesAnyKeepRule:this._watcher.matchesAnyKeepRule(e),matchesAnyConsentRule:this._watcher.matchesAnyConsentRule(e)};case"qsa":var i=n.get(e);return i?{watchKind:i.kind,matchesAnyKeepRule:i.matchesAnyKeepRule,matchesAnyConsentRule:i.matchesAnyConsentRule}:{watchKind:null,matchesAnyKeepRule:!1,matchesAnyConsentRule:!1};case"verify":var o=n.get(e),s={watchKind:this._watcher.isWatched(e),matchesAnyKeepRule:this._watcher.matchesAnyKeepRule(e),matchesAnyConsentRule:this._watcher.matchesAnyConsentRule(e)};return null!==s.watchKind&&void 0===o?Mt.sendToBugsnag("Watch strategy qsa digest doesn't contain el","error",{matchesDigest:s,qsaDigest:o}):null!==s.watchKind&&void 0!==o?s.watchKind===o.kind&&s.matchesAnyConsentRule===o.matchesAnyConsentRule&&s.matchesAnyKeepRule===o.matchesAnyKeepRule||Mt.sendToBugsnag("Watch strategy qsa digest inconsistency","error",{matchesDigest:s,qsaDigest:o}):null===s.watchKind&&void 0!==o&&null!==o.kind&&Mt.sendToBugsnag("Watch strategy qsa digest flagged an element matches didn't","error",{matchesDigest:s,qsaDigest:o}),s;default:return Object(cn.assertExhaustive)(r);}},e}();function yr(e,t){try{t(e)}catch(e){Mt.sendToBugsnag(e,"error")}}var wr=function(){function e(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return e.prototype.encode=function(t){if(0==t.length)return[];var n,r,i=t[0],o=Object.prototype.hasOwnProperty.call(this.dict.map,i)?this.dict.map[i]:null,s=[],a=1;function u(){o?a>1?s.push([o.idx,a]):s.push(o.idx):s.push(i)}for(n=1;n<t.length;n++)if(r=t[n],o&&Object.prototype.hasOwnProperty.call(o.map,r))a++,i=r,o=o.map[r];else{u();var c=this.startIdx+n-a;null==o&&this.nodeCount<e.MAX_NODES&&(o={idx:c,map:{}},this.dict.map[i]=o,this.nodeCount++),o&&this.nodeCount<e.MAX_NODES&&(o.map[r]={idx:c,map:{}},this.nodeCount++),a=1,i=r,o=Object.prototype.hasOwnProperty.call(this.dict.map,r)?this.dict.map[r]:null}return u(),this.startIdx+=t.length,s},e.MAX_NODES=1e4,e}(),br=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sr=function(){return(Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Er=function(){function e(e){this._ctx=e,this._recordedDims={},this._observedDims={}}return e.create=function(e){return Tr.isSupported(e.window)?new Tr(e):new kr(e)},e.prototype.collect=function(e){var t=[];for(var n in this._observedDims)this.addPlaceholderResize(e,t,Number(n));return this._observedDims={},t},e.prototype.addEntry=function(e){try{var t=Mn(e);if(!t)return;if(e.nodeType!=pn)return;var n=e;if(this._observedDims[t]=n.getBoundingClientRect(),!this._recordedDims[t]){var r=this.flushSizeEvent(t);if(!r)return;this._ctx.queue().enqueue(r)}}catch(e){}},e.prototype.addPlaceholderResize=function(e,t,n){var r=this.flushSizeEvent(n);r&&t.push(Sr(Sr({},r),{When:e}))},e.prototype.flushSizeEvent=function(e){var t=this._observedDims[e];if(!t)return null;var n=On(e);if(!n)return null;var r=n.watchKind,i=t.width,o=t.height,s=this._recordedDims[e];if(s&&s.w==i&&s.h==o)return null;if(this._recordedDims[e]={w:i,h:o},r==an.Watch){var a=0!=i&&0!=o;if((!!s&&0!=s.w&&0!=s.h)!=a)return{Kind:R.WATCHED_ELEM,Args:[e,a]}}return{Kind:R.PLACEHOLDER_SIZE,Args:[e,i,o]}},e}(),Tr=function(e){function t(t){var n=e.call(this,t)||this;return n._inlineGroups=new ln,n._observedInlines=new ln,n._obs=new t.window.ResizeObserver(function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t].target;n.addEntry(i)}}),n._inlineGroupObs=new t.window.ResizeObserver(function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t].target;n._addEntriesForInlineGroup(i)}}),n}return br(t,e),t.isSupported=function(e){return"ResizeObserver"in e},t.prototype.observe=function(e){var t=this;if(e&&e.nodeType==pn){var n=e;this._obs.unobserve(n),this._obs.observe(n),this._ctx.measurer.requestMeasureTask(function(){t._addToInlineGroupIfNeeded(n)})}},t.prototype.unobserveSubtree=function(e){},t.prototype.nodeChanged=function(e){var t=this,n=this._observedInlines.get(e);"number"==typeof n&&Mn(e)===n&&this._ctx.measurer.requestMeasureTask(function(){t.addEntry(e)})},t.prototype._addEntriesForInlineGroup=function(e){var t=this._inlineGroups.get(e);if(t)for(var n in t){var r=On(t[n]);r?this.addEntry(r.node):delete t[n]}},t.prototype._addToInlineGroupIfNeeded=function(e){var t=this,n=Mn(e);if(n){var r=this._nearestNonInlineElementAncestorOf(e);if(r&&r!==e){this._observedInlines.set(e,n),this.addEntry(e);var i=this._inlineGroups.get(r);i||(i=Object.create(null),this._inlineGroups.set(r,i)),i[n]=n,s.setWindowTimeout(this._ctx.window,ie(function(){t._inlineGroupObs.observe(r)}),0)}}},t.prototype._nearestNonInlineElementAncestorOf=function(e){for(var t=0,n=e;;){if(t++>1e3)return null;if(!n||n.nodeType!=pn)return null;var r=n;if(getComputedStyle(r).display.indexOf("inline")<0)return r;n=n.parentNode}},t}(Er),kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return br(t,e),t.prototype.observe=function(e){var t=this;if(e&&e.nodeType==pn){var n=e;this.growWatchedIndex(xn(e)),this._ctx.measurer.requestMeasureTask(function(){t.addEntry(n)})}},t.prototype.unobserveSubtree=function(e){var t=xn(e);t&&this.clearWatchedIndex(t)},t.prototype.nodeChanged=function(e){var t=this,n=this.relatedWatched(e);this._ctx.measurer.requestMeasureTask(function(){for(var e=0,r=n;e<r.length;e++){var i=r[e];t.addEntry(i)}})},t.prototype.watchedChildren=function(e){return e.watchedChildren},t.prototype.growWatchedIndex=function(e){if(e&&In(e.node))for(var t=e,n=e.parent;n;n=n.parent){if(this.watchedChildren(n)||(n.watchedChildren={}),this.watchedChildren(t))for(var r in this.watchedChildren(t))delete this.watchedChildren(n)[r];if(this.watchedChildren(n)[t.id]=t,lt(this.watchedChildren(n),2))t=n;else if(pt(this.watchedChildren(n),2))break}},t.prototype.relatedWatched=function(e){var t=[],n=xn(e);if(n)for(var r=[n],i=0;r.length&&++i<1e3;){var o=r.pop();In(o.node)&&t.push(o.node),this.watchedChildren(o)&&ht(this.watchedChildren(o),function(e){r.push(e)})}else{for(var s=e;s&&!Mn(s);)s=s.parentNode;s&&In(s)&&t.push(s)}return t},t.prototype.clearWatchedIndex=function(e){if(pt(this.watchedChildren(e),0)||In(e.node))for(var t=this.watchedChildren(e)&&pt(this.watchedChildren(e),1)||In(e.node)?e.id:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return t}(this.watchedChildren(e)),n=t?e.parent:null;n&&this.watchedChildren(n)&&this.watchedChildren(n)[t];){if(delete this.watchedChildren(n)[t],lt(this.watchedChildren(n),1)){var r=n.id,i=dt(this.watchedChildren(n));for(n=n.parent;n&&this.watchedChildren(n)&&this.watchedChildren(n)[r];)delete this.watchedChildren(n)[r],this.watchedChildren(n)[i.id]=i,n=n.parent;break}n=n.parent}},t}(Er),Ir=function(){return(Ir=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Cr={attributeName:null,attributeNamespace:null,addedNodes:[],removedNodes:[],nextSibling:null,previousSibling:null,oldValue:null};function Rr(e){return Ir(Ir(Ir({},Cr),e),{type:"childList"})}function Ar(e,t){return 0===t.length?Rr({target:e}):Rr({addedNodes:t,nextSibling:ut(t[t.length-1]),previousSibling:vt(t[0]),target:e})}var xr=ae&&!ue?Dr:window.MutationObserver||window.WebKitMutationObserver||Dr,Or=new ln,Mr=window.setImmediate||window.msSetImmediate;if(!Mr){var Lr=[],Fr=String(s.mathRandom());window.addEventListener("message",function(e){if(e.data===Fr){var t=Lr;Lr=[],t.forEach(function(e){e()})}}),Mr=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Lr.push(e),window.postMessage(Fr,"*"),0}}var Pr=!1,qr=[];function Ur(){Pr=!1;var e=qr;qr=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();!function(e){e.nodes_.forEach(function(t){var n=Or.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}(e),n.length&&(e.callback_(n,e),t=!0)}),t&&Ur()}function Nr(e,t){for(var n=e;n;n=n.parentNode){var r=Or.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],s=o.options;if(n===e||s.subtree){var a=t(s);a&&o.enqueue(a)}}}}var Wr=0;function Dr(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++Wr}Dr.prototype={observe:function(e,t){if(e=function(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n,r=Or.get(e);r||Or.set(e,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=t;break}n||(n=new Yr(this,e,t),r.push(n),this.nodes_.push(e)),n.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=Or.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var Br,Hr,jr=function(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null};function Kr(e,t){return Br=new jr(e,t)}function Vr(e){return Hr||((n=new jr((t=Br).type,t.target)).addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,(Hr=n).oldValue=e,Hr);var t,n}function zr(e,t){return e===t?e:Hr&&((n=e)===Hr||n===Br)?Hr:null;var n}function Yr(e,t,n){var r=this;this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[],this.handleEventBound=function(e){return r.handleEvent_(e)}}Yr.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(t.length>0){var r=zr(t[n-1],e);if(r)return void(t[n-1]=r)}else!function(e){qr.push(e),Pr||(Pr=!0,Mr(Ur))}(this.observer);t[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this.handleEventBound,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this.handleEventBound,!0),t.childList&&e.addEventListener("DOMNodeInserted",this.handleEventBound,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this.handleEventBound,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this.handleEventBound,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this.handleEventBound,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this.handleEventBound,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this.handleEventBound,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=Or.get(e);t||Or.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=Or.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent_:function(e){switch(e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=Kr("attributes",a=e.target);r.attributeName=t,r.attributeNamespace=n;var i=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;Nr(a,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||-1!==e.attributeFilter.indexOf(t)||-1!==e.attributeFilter.indexOf(n)))return e.attributeOldValue?Vr(i):r});break;case"DOMCharacterDataModified":var o=Kr("characterData",a=e.target),s=e.prevValue;Nr(a,function(e){if(e.characterData)return e.characterDataOldValue?Vr(s):o});break;case"DOMNodeRemoved":case"DOMNodeInserted":"DOMNodeRemoved"==e.type&&this.addTransientObserver(e.target);var a=e.relatedNode,u=e.target,c=void 0,h=void 0;"DOMNodeInserted"===e.type?(c=[u],h=[]):(c=[],h=[u]);var d=vt(u),l=ut(u),p=Kr("childList",a);p.addedNodes=c,p.removedNodes=h,p.previousSibling=d,p.nextSibling=l,Nr(a,function(e){if(e.childList)return p});}Br=Hr=void 0}};var Gr=function(){return(Gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Qr=function(){function e(e,t,n,r,i,o,s){var a=this;void 0===n&&(n=!0),void 0===r&&(r=function(){}),void 0===i&&(i=function(){}),void 0===o&&(o=function(){}),void 0===s&&(s=function(){return!0}),this._ctx=e,this._watcher=t,this._compress=n,this._nodeVisitor=r,this._beforeRemove=i,this._attrVisitor=o,this._visitChildren=s,this._sentDomSnapshot=!1,this._newShadowContainers=[],this._toRefresh=[],this._records=[],this._setPropertyWasThrottled=!1,this._wnd=e.window,this._resizer=Er.create(e),this._encoder=new mr(t,this._resizer,e.options.orgId),Ft(!this._watcher.onConsentChange,"This is the only consent change listener."),this._watcher.onConsentChange=function(){return a.updateConsent()}}return e.prototype.hookMutations=function(e){void 0===e&&(e=this._wnd.document),this._root=e,this._sentDomSnapshot=!1,this._compress&&(this._lz=new wr);var t=!0;if(ae)try{this.setUpIEWorkarounds()}catch(e){o("Error setting up IE workarounds for mutation watcher: "+e),t=!1}t&&(this._observer=new xr(this._addMutations.bind(this)))},e.prototype._observerOff=function(){this._observer&&this._observer.disconnect()},e.prototype._addMutations=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this._records.push(r)}},e.prototype.resizer=function(){return this._resizer},e.prototype.shutdown=function(){this._observer&&this._observer.disconnect();var e=xn(this._root);e&&Pn(e),this._records=[],ae&&this.tearDownIEWorkarounds(),this._watcher.onConsentChange=null,this._attachShadowHook&&(this._attachShadowHook.disable(),this._attachShadowHook=null)},e.prototype.processMutations=function(e){if(!this._root)return[];var t=[];if(this.maybeGetInitialSnapshot(e,t),this._setPropertyWasThrottled&&(t.push({Kind:R.FAIL_THROTTLED,When:e,Args:[Q.SetPropertyHooks]}),this._setPropertyWasThrottled=!1),this._records.length>0||this._toRefresh.length>0){var n={},r={};for(var i in this.processRecords(e,t,r,n),r){var o=i.split("\t");t.push({Kind:R.MUT_ATTR,When:e,Args:[parseInt(o[0]),o[1],r[i]]})}for(var i in n)t.push({Kind:R.MUT_TEXT,When:e,Args:[parseInt(i),n[i]]})}var s=this._newShadowContainers;this._newShadowContainers=[];for(var a=0;a<s.length;a++){var u=s[a].shadowRoot;u&&0!=Mn(s[a])&&0==Mn(u)&&(this.observe(u),this.genShadow(null,e,t,s[a],u))}return t.push.apply(t,this._resizer.collect(e)),this._records=[],t},e.prototype.recordingIsDetached=function(){return this._root&&this._root!=this._wnd.document},e.prototype.maybeGetInitialSnapshot=function(e,t){if(!this._sentDomSnapshot){var n=this._watcher.allWatchedElements(this._root);this.genInsert(n,e,t,null,this._root,null),this._resizer.nodeChanged(this._root),this._observer&&this.observe(this._root),this._sentDomSnapshot=!0,this.hookAttachShadow()}},e.prototype.hookAttachShadow=function(){var e=this;this._attachShadowHook=Tt(Element.prototype,"attachShadow"),this._attachShadowHook&&this._attachShadowHook.before(function(t){t.that.shadowRoot||e._newShadowContainers.push(t.that)})},e.prototype.observe=function(e){try{this._observer.observe(e,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(e){}},e.prototype.processRecords=function(e,t,n,r){for(var i=this,o={},s={},a=function(n){if(xn(n)){i.genRemove(e,t,xn(n));var r=xn(n.parentNode);r&&(s[r.id]=r.node)}},u=0;u<this._records.length;++u)try{var c=this._records[u],h=Mn(c.target);if(!h)continue;switch(o[h]=c.target,c.type){case"childList":if(c.removedNodes.length>0)for(var d=0;d<c.removedNodes.length;++d){var l=xn(c.removedNodes[d]);l&&l.id&&this.genRemove(e,t,l)}if(c.addedNodes.length>0){s[h]=c.target;var p=Jr(c.target);p&&(s[p.id]=p.node)}break;case"characterData":Cn(c.target)||c.oldValue!=c.target.textContent&&(r[h]=or(c.target));break;case"attributes":var f=An(w=c.target);if(_n(this._watcher.isWatched(w))>_n(f)){a(w);break}var v=Xr(c.attributeNamespace)+(c.attributeName||""),_=sr(v);if(w.hasAttribute(v)){var g=c.target.getAttribute(v);c.oldValue!=g&&(g=ar(this._ctx.options.orgId,c.target,_,g||""),this._attrVisitor(c.target,_,g||""),null!==g&&(n[h+"\t"+_]=g))}else n[h+"\t"+_]=null;}}catch(e){}for(var m=0,y=this._toRefresh;m<y.length;m++){var w=y[m];try{a(w)}catch(e){Mt.sendToBugsnag(e,"error")}}for(var b in this._toRefresh=[],s){var S=xn(E=s[b]);S&&S.id&&this.diff(e,t,E,S.child,E.firstChild)}for(var b in o){var E=o[b];this._resizer.nodeChanged(E)}},e.prototype._checkForMissingInsertions=function(e){if(!this._sentDomSnapshot||!e)return[];return this.walkAddRecords(this._root),[]},e.prototype.walkAddRecords=function(e){var t=this;Mn(e)||null===e.parentNode?ft(e.firstChild,function(e){t.walkAddRecords(e)}):this._records.push(Ar(e.parentNode,[e]))},e.prototype.diff=function(e,t,n,r,i){for(var o=[],s=r,a=i;s&&a;){var u=xn(a);Mn(a)?u&&s.id==u.id?(s=s.next,a=ut(a)):(o.push({remove:s}),s=s.next):(o.push({insert:[n,a,s.node]}),a=ut(a))}for(;s;s=s.next)o.push({remove:s});ft(a,function(e){o.push({insert:[n,e,null]})});for(var c=!1,h=0;h<o.length;h++){var d=o[h];d.insert?this.genInsert(null,e,t,d.insert[0],d.insert[1],d.insert[2]):d.remove&&(c=!0,this.genRemove(e,t,d.remove))}Ft(!c,"All remove events should have been generated earlier, in MutationWatcher.processMutations")},e.prototype.genShadow=function(e,t,n,r,i){var o=Mn(r),s=this.genDocStream(e,r,i,null);s.length>0&&n.push({When:t,Kind:R.MUT_SHADOW,Args:[o,this._compress?this._lz.encode(s):s]})},e.prototype.genInsert=function(e,t,n,r,i,o){var s=Mn(r)||-1,a=Mn(o)||-1,u=-1===s&&-1===a,c=p(),h=this.genDocStream(e,r,i,o),d=p()-c;if(h.length>0){var l=p(),f=this._compress?this._lz.encode(h):h,v=p()-l;n.push({When:t,Kind:R.MUT_INSERT,Args:[s,a,f]},{When:t,Kind:R.TIMING,Args:[[O.Internal,A.Serialization,u?x.DomSnapshot:x.NodeEncoding,t,d,[x.LzEncoding,v]]]})}},e.prototype.genDocStream=function(e,t,n,r){var i=this;if(t&&Cn(t))return[];for(var o=[],s=this._encoder.tokenizeNode(e,t,r,n,function(e){if(e.nodeType==pn){var t=e;t.shadowRoot&&i.observe(t.shadowRoot)}i._nodeVisitor(e,o)},this._attrVisitor,this._visitChildren),a=0,u=o;a<u.length;a++){(0,u[a])()}return s},e.prototype.genRemove=function(e,t,n){var r=n.id;if(this._beforeRemove(n),Fn(n,this._resizer),t.length>0){var i=t[t.length-1];if(i.Kind==R.MUT_REMOVE)return void i.Args.push(r)}t.push({When:e,Kind:R.MUT_REMOVE,Args:[r]})},e.prototype.setUpIEWorkarounds=function(){var t=this;if(ue){var n=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=n&&n.set;if(!n||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",Gr(Gr({},n),{set:function(e){try{for(var t=void 0;t=this.firstChild;)this.removeChild(t);if(null===e||""==e)return;var n=(this.ownerDocument||document).createTextNode(e);this.appendChild(n)}catch(t){r&&r.call(this,e)}}}))}this._setPropertyThrottle=new nn(e.ThrottleMax,e.ThrottleInterval,function(){return new tn(function(){t._setPropertyWasThrottled=!0,t.tearDownIEWorkarounds()}).start()});var i=this._setPropertyThrottle.guard(function(e){e.cssText=e.cssText});this._setPropertyThrottle.open(),this._setPropertyHook=Tt(CSSStyleDeclaration.prototype,"setProperty"),this._setPropertyHook&&this._setPropertyHook.afterSync(function(e){i(e.that)}),this._removePropertyHook=Tt(CSSStyleDeclaration.prototype,"removeProperty"),this._removePropertyHook&&this._removePropertyHook.afterSync(function(e){i(e.that)})},e.prototype.tearDownIEWorkarounds=function(){this._setPropertyThrottle&&this._setPropertyThrottle.close(),this._setPropertyHook&&this._setPropertyHook.disable(),this._removePropertyHook&&this._removePropertyHook.disable()},e.prototype.updateConsent=function(){var e=this,t=xn(this._root);t&&function(e,t){for(var n=[e];n.length;){var r=n.pop();if(r){t(r);for(var i=r.child,o=r.shadow;i;)n.push(i),i=i.next;o&&n.push(o)}}}(t,function(t){var n=t.node;t.matchesAnyConsentRule&&e.refreshElement(n)})},e.prototype.refreshElement=function(e){Mn(e)&&this._toRefresh.push(e)},e.ThrottleMax=1024,e.ThrottleInterval=1e4,e}();function Xr(e){return void 0===e&&(e=""),null===e?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[e]||""}function Jr(e){return!(null==e?void 0:e.shadowRoot)||gr(e.shadowRoot)?null:xn(e.shadowRoot)}var $r=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],Zr=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],ei=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],ti=["name","startTime","duration"],ni=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],ri=function(){function e(e,t,n){this._ctx=e,this._queue=t,this._perfSupported=!1,this._timingSupported=!1,this._getEntriesSupported=!1,this._memorySupported=!1,this._lastUsedJSHeapSize=0,this._gotLoad=!1,this._observer=null,this._observedBatches=[];var r=window.performance;r&&(this._perfSupported=!0,r.timing&&(this._timingSupported=!0),r.memory&&(this._memorySupported=!0),"function"==typeof r.getEntries&&(this._getEntriesSupported=!0),this._listeners=n.createChild())}return e.prototype.start=function(e){var t=this;this._resourceUploader=e;var n=window.performance;n&&(this._ctx.recording.inFrame||this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Performance,this._timingSupported,Y.PerformanceEntries,this._getEntriesSupported,Y.PerformanceMemory,this._memorySupported,Y.PerformanceObserver,!!window.PerformanceObserver]}),this.observe(),!this._observer&&n.addEventListener&&n.removeEventListener&&this._listeners.add(n,"resourcetimingbufferfull",!0,function(){t._queue.enqueue({Kind:R.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.checkMemory())},e.prototype.onLoad=function(){this._gotLoad||(this._gotLoad=!0,this._timingSupported&&(this.recordTiming(performance.timing),this.checkForNewEntries()))},e.prototype.tick=function(e){this.checkMemory(),e&&this.checkForNewEntries()},e.prototype.shutdown=function(){this._listeners&&this._listeners.clear(),this._resourceUploader=void 0;var e=[];this._observer?(this._observer.takeRecords&&(e=this._observer.takeRecords()),this._observer.disconnect()):window.performance&&window.performance.getEntries&&(e=window.performance.getEntries()),e.length>300&&(e=e.slice(0,300),this._queue.enqueue({Kind:R.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this._observedBatches.push(e),this.tick(!0)},e.prototype.observe=function(){var e=this;if(!this._observer&&this._getEntriesSupported&&window.PerformanceObserver){this._observedBatches.push(performance.getEntries()),this._observer=new window.PerformanceObserver(function(t){var n=t.getEntries();e._observedBatches.push(n)});var t=["navigation","resource","measure","mark"];window.PerformancePaintTiming&&t.push("paint"),this._observer.observe({entryTypes:t})}},e.prototype.checkMemory=function(){if(this._memorySupported&&!this._ctx.recording.inFrame){var e=performance.memory;if(e){var t=e.usedJSHeapSize-this._lastUsedJSHeapSize;(0==this._lastUsedJSHeapSize||s.mathAbs(t/this._lastUsedJSHeapSize)>.2)&&(this.addPerfEvent(z.Memory,e,ni),this._lastUsedJSHeapSize=e.usedJSHeapSize)}}},e.prototype.recordEntry=function(e){switch(e.entryType){case"navigation":this.recordNavigation(e);break;case"resource":this.recordResource(e);break;case"paint":this.recordPaint(e);break;case"measure":this.recordMeasure(e);break;case"mark":this.recordMark(e);}},e.prototype.checkForNewEntries=function(){if(this._perfSupported&&this._getEntriesSupported){var e=this._observedBatches;this._observedBatches=[];for(var t=0,n=e;t<n.length;t++)for(var r=0,i=n[t];r<i.length;r++){var o=i[r];this.recordEntry(o)}}},e.prototype.recordTiming=function(e){this.addPerfEvent(z.Timing,e,$r)},e.prototype.recordNavigation=function(e){this.addPerfEvent(z.Navigation,e,Zr,{name:"navigation"})},e.prototype.recordResource=function(e){var t=this._ctx.options.orgId;"3E938"!=t&&"GDWG7"!=t&&this.addPerfEvent(z.Resource,e,ei,{name:e.initiatorType})},e.prototype.recordPaint=function(e){this.addPerfEvent(z.Paint,e,ti)},e.prototype.recordMark=function(e){this.addPerfEvent(z.Mark,e,ti)},e.prototype.recordMeasure=function(e){this.addPerfEvent(z.Measure,e,ti)},e.prototype.addPerfEvent=function(e,t,n,r){void 0===r&&(r={});for(var i=[e],o=0,s=n;o<s.length;o++){var a=s[o],u=t[a];if(void 0===u&&(u=-1),a in r){var c=ur(u,this._ctx.options.orgId,{source:"perfEntry",type:r[a]});u===c&&this.maybeUploadResource(e,t,c),u=c}i.push(u)}this._queue.enqueue({Kind:R.PERF_ENTRY,Args:i})},e.prototype.maybeUploadResource=function(e,t,n){this._resourceUploader&&e===z.Resource&&"css"===t.initiatorType&&this._resourceUploader.uploadIfNeeded(this._ctx.window,n)},e}();function ii(e){var t=0,n={id:t++,edges:{}};return e.split("\n").forEach(function(e){if(""!=(e=e.trim())){if(0==e.indexOf("/")||e.lastIndexOf("/")==e.length-1)throw new Error("Leading and trailing slashes are not supported");var r=n,i=e.split("/");i.forEach(function(e,n){if(""===(e=e.trim()))throw new Error("Empty elements are not allowed");if("**"!=e&&"*"!=e&&-1!=e.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;"**"==e?(r.loop=!0,o=r):e in r.edges&&(o=r.edges[e]),o||(o={id:t++,edges:{}},r.edges[e]=o),n==i.length-1&&(o.term=!0),r=o})}}),n}var oi=ii("**"),si="__fs__redacted";function ai(e,t,n){var r;if(n){r=1==n?oi:n;try{var i=0,o=[1],a=[],u={};return u[r.id]=r,a.push(u),s.jsonStringify(e,function(e,n){var r=n&&"object"==typeof n;if(""==e&&1==o.length)return o[0]--,r&&o.push(s.objectKeys(n).length),n;var u={},c=a[a.length-1],h=!0,d=!1,l=function(e){u[e.id]=e,h=!1,e.term&&(d=!0)};for(var p in c){var f=c[p];e in f.edges&&l(f.edges[e]),"*"in f.edges&&l(f.edges["*"]),f.loop&&l(f)}for((h||!r&&!d)&&(n=si),i+=e.length+2,(i+=r?2:null===n?4:n.toString().length)>=t&&(n=void 0),o[o.length-1]--,n&&n!==si&&r&&(o.push(s.objectKeys(n).length),a.push(u));o[o.length-1]<=0;)o.pop(),a.pop();return n})}catch(e){}return"[error serializing "+e.constructor.name+"]"}}var ui=function(){function e(e){this._requestTracker=e}return e.prototype.disable=function(){this._hook&&(this._hook.disable(),this._hook=null)},e.prototype.enable=function(e){var t,n=this,r=I(e),i=null===(t=null==r?void 0:r._w)||void 0===t?void 0:t.fetch;(i||e.fetch)&&(this._hook=Tt(i?r._w:e,"fetch"),this._hook&&this._hook.afterSync(function(e){return n.recordFetch(e.that,e.result,e.args[0],e.args[1])}))},e.prototype.recordFetch=function(e,t,n,r){var i,o="GET",s="",a={};if("string"==typeof n?s=n:"url"in n?(s=n.url,o=n.method,i=n.body,n.headers&&n.headers.forEach(function(e,t){a[e]=t})):s=""+n,r){o=r.method||o;var u=r.headers;if(u)if(nt(u))for(var c=0,h=u;c<h.length;c++){var d=h[c],l=d[0],p=d[1];a[l]=p}else if("function"==typeof u.forEach)u.forEach(function(e,t,n){a[t]=e});else for(var l in u)a[l]=u[l];i=r.body||i}if(s){for(var l in s=this._requestTracker.addPendingReq(t,o,s),a)this._requestTracker.addHeader(t,l,a[l]);i&&this._requestTracker.addRequestBody(t,i)}this.instrumentResponse(t,s,!!this._requestTracker.getRspWhitelist(s))},e.prototype.instrumentResponse=function(e,t,n){var r=this;e.then(Mt.wrap(function(t){var i=(t.headers.get("content-type")||"default").split(";")[0],o=["default","text/plain","text/json","application/json"].indexOf(i)>-1;n&&o?t.clone().text().then(Mt.wrap(function(i){var o=mi(i,n),s=o[0],a=o[1];r.onComplete(e,t,s,a)}))["catch"](Mt.wrap(function(n){r.onComplete(e,t,-1,void 0)})):r.onComplete(e,t,-1,void 0)}))["catch"](Mt.wrap(function(t){r.onComplete(e,t,-1,void 0)}))},e.prototype.onComplete=function(e,t,n,r){var i=this,o=-1,s="";if("headers"in t){o=t.status;s=this.serializeFetchHeaders(t.headers,function(e){return i._requestTracker.isHeaderInResponseHeaderWhitelist(e[0])})}return this._requestTracker.onComplete(e,s,o,n,r)},e.prototype.serializeFetchHeaders=function(e,t){var n="";return e.forEach(function(e,r){r=r.toLowerCase();var i=t([r,e]);n+=r+(i?": "+e:"")+di}),n},e}(),ci=function(){function e(e){this._requestTracker=e}return e.prototype.disable=function(){this._xhrOpenHook&&(this._xhrOpenHook.disable(),this._xhrOpenHook=null),this._xhrSetHeaderHook&&(this._xhrSetHeaderHook.disable(),this._xhrSetHeaderHook=null)},e.prototype.enable=function(e){var t,n=this,r=I(e),i=(null===(t=null==r?void 0:r._w)||void 0===t?void 0:t.XMLHttpRequest)||e.XMLHttpRequest;if(i){var o=i.prototype;this._xhrOpenHook=Tt(o,"open"),this._xhrOpenHook&&this._xhrOpenHook.before(function(e){var t=e.args[0],r=e.args[1];n._requestTracker.addPendingReq(e.that,t,r),e.that.addEventListener("load",Mt.wrap(function(t){n.onComplete(e.that)})),e.that.addEventListener("error",Mt.wrap(function(t){n.onComplete(e.that)}))}),this._xhrSendHook=Tt(o,"send"),this._xhrSendHook&&this._xhrSendHook.before(function(e){var t=e.args[0];n._requestTracker.addRequestBody(e.that,t)}),this._xhrSetHeaderHook=Tt(o,"setRequestHeader"),this._xhrSetHeaderHook&&this._xhrSetHeaderHook.before(function(e){var t=e.args[0],r=e.args[1];n._requestTracker.addHeader(e.that,t,r)})}},e.prototype.onComplete=function(e){var t=this,n=this.responseBody(e),r=n[0],i=n[1],o=Ei(function(e){var t=[];return e.split(di).forEach(function(e){var n=e.indexOf(":");-1!=n?t.push([e.slice(0,n).trim(),e.slice(n+1,e.length).trim()]):t.push([e.trim(),null])}),t}(e.getAllResponseHeaders()),function(e){return t._requestTracker.isHeaderInResponseHeaderWhitelist(e[0])});return this._requestTracker.onComplete(e,o,e.status,r,i)},e.prototype.responseBody=function(e){var t=this._requestTracker.pendingReq(e);if(!t)return[-1,void 0];var n=this._requestTracker.getRspWhitelist(t.url);if(e.responseType){var r=e.response;switch(r||o("Maybe response type was different that expected."),e.responseType){case"text":return mi(e.responseText,n);case"json":return function(e,t){if(!e)return[-1,void 0];return[yi(e),ai(e,te.MaxPayloadLength,t)]}(r,n);case"arraybuffer":return function(e,t){return[e?e.byteLength:-1,t?"[ArrayBuffer]":void 0]}(r,n);case"blob":return function(e,t){return[e?e.size:-1,t?"[Blob]":void 0]}(r,n);case"document":return function(e,t){return[-1,t?"[Document]":void 0]}(0,n);}}return mi(e.responseText,n)},e}();var hi,di="\r\n",li=["a-im","accept","accept-charset","accept-encoding","accept-language","accept-datetime","access-control-request-method,","access-control-request-headers","cache-control","connection","content-length","content-md5","content-type","date","expect","forwarded","from","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","max-forwards","origin","pragma","range","referer","te","user-agent","upgrade","via","warning"],pi=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","permanent","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-frame-options"],fi={BM7A6:["x-b3-traceid"],KD87S:["transactionid"],NHYJM:["x-att-conversationid"],GBNRN:["x-trace-id"],R16RC:["x-request-id"],DE9CX:["x-client","x-client-id","ot-baggage-original-client","x-req-id","x-datadog-trace-id","x-datadog-parent-id","x-datadog-sampling-priority"]},vi={"thefullstory.com":["x-cloud-trace-context"],TN1:["x-cloud-trace-context"],KD87S:["transactionid"],PPE96:["x-b3-traceid"],HWT6H:["x-b3-traceid"],PPEY7:["x-b3-traceid"],PPK3W:["x-b3-traceid"],NHYJM:["x-att-conversationid"],GBNRN:["x-trace-id"],NK5T9:["traceid","requestid"]},_i=function(){function e(e,t){this._ctx=e,this._queue=t,this._enabled=!1,this._tracker=new gi(e,t),this._xhr=new ci(this._tracker),this._fetch=new ui(this._tracker)}return e.prototype.isEnabled=function(){return this._enabled},e.prototype.enable=function(e){this._enabled||(this._enabled=!0,this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Ajax,!0,Y.AjaxFetch,!!e]}),this._xhr.enable(this._ctx.window),e&&this._fetch.enable(this._ctx.window))},e.prototype.disable=function(){this._enabled&&(this._enabled=!1,this._xhr.disable(),this._fetch.disable())},e.prototype.tick=function(e){this._tracker.tick(e)},e.prototype.setWatches=function(e){this._tracker.setWatches(e)},e}(),gi=function(){function e(e,t){this._ctx=e,this._queue=t,this._reqHeaderWhitelist={},this._rspHeaderWhitelist={},this._pendingReqs={},this._events=[],this._curId=1,this.addHeaderWhitelist(li,pi),this.addHeaderWhitelist(fi[e.options.orgId],vi[e.options.orgId])}return e.prototype.getReqWhitelist=function(e){var t=this.findWhitelistIndexFor(e);return t>=0&&this._reqWhitelist[t]},e.prototype.getRspWhitelist=function(e){var t=this.findWhitelistIndexFor(e);return t>=0&&this._rspWhitelist[t]},e.prototype.isHeaderInRequestHeaderWhitelist=function(e){return e in this._reqHeaderWhitelist},e.prototype.isHeaderInResponseHeaderWhitelist=function(e){return e in this._rspHeaderWhitelist},e.prototype.pushEvent=function(e){this._events.push(e)},e.prototype.setWatches=function(e){var t=this,n=[];this._reqWhitelist=[],this._rspWhitelist=[],e.forEach(function(e){n.push(e.URLRegex),t._reqWhitelist.push(Si(e.RecordReq,e.ReqWhitelist)),t._rspWhitelist.push(Si(e.RecordRsp,e.RspWhitelist))}),this._reqBodyRegex=new RegExp("("+n.join(")|(")+")")},e.prototype.addHeaderWhitelist=function(e,t){var n=this;e&&e.forEach(function(e){return n._reqHeaderWhitelist[e]=!0}),t&&t.forEach(function(e){return n._rspHeaderWhitelist[e]=!0})},e.prototype.tick=function(e){if(e){for(var t=0;t<this._events.length;t++)this._queue.enqueue({Kind:R.AJAX_REQUEST,Args:this._events[t]});this._events=[]}},e.prototype.pendingReq=function(e){var t=wi(e);return t?this._pendingReqs[t]:(o("missing xhr req id"),null)},e.prototype.deletePending=function(e){var t=wi(e);t&&delete this._pendingReqs[t]},e.prototype.addPendingReq=function(e,t,n){this.deletePending(e);var r=this._curId++;return n=function(e,t){return Qn.resolveToDocument(e,t)}(this._ctx.window,n),this._pendingReqs[r]={id:r,xhr:e,method:t,url:n,startTime:p(),headers:[],reqSize:0,reqBody:void 0},function(e,t){e._fs=t}(e,r),n},e.prototype.addHeader=function(e,t,n){var r=this.pendingReq(e);r&&r.headers.push([t,n])},e.prototype.addRequestBody=function(e,t){var n,r=this.pendingReq(e);r&&(n=this.requestBody(r.url,t),r.reqSize=n[0],r.reqBody=n[1])},e.prototype.onComplete=function(e,t,n,r,i){var o=this,s=this.pendingReq(e);if(s){this.deletePending(e);var a=p()-s.startTime,u=Ei(s.headers,function(e){return o.isHeaderInRequestHeaderWhitelist(e[0])}),c=s.reqBody||null,h=[s.method,ur(s.url,this._ctx.options.orgId,{source:"event",type:R.AJAX_REQUEST}),a,n,u,t,s.startTime,s.reqSize,r,c,i||null];this.pushEvent(h)}},e.prototype.findWhitelistIndexFor=function(e){if(this._reqBodyRegex){var t=this._reqBodyRegex.exec(e);if(t)for(var n=1;n<t.length;n++)if(void 0!==t[n])return n-1}return-1},e.prototype.requestBody=function(e,t){if(null==t)return[0,void 0];var n=this.getReqWhitelist(e),r=typeof t;if("string"==r)return function(e,t){return[e.length,bi(e,t)]}(t,n);if("object"==r){var i=r.constructor;switch(i){case String:case Object:default:return function(e,t){var n=void 0;!1!==t&&(n=ai(e,te.MaxPayloadLength,t));return[yi(e),n]}(t,n);case Blob:return function(e,t){var n=e.size,r=void 0;t&&(r="[Blob]");return[n,r]}(t,n);case ArrayBuffer:return function(e,t){var n=e.byteLength,r=void 0;t&&(r="[ArrayBuffer]");return[n,r]}(t,n);case Document:case FormData:case URLSearchParams:case ReadableStream:return[-1,n?""+i.name:void 0];}}return[-1,n?"[unknown]":void 0]},e}();function mi(e,t){return e?[e.length,bi(e,t)]:[-1,void 0]}function yi(e){try{return s.jsonStringify(e).length}catch(e){}return 0}function wi(e){return e._fs}function bi(e,t){if(0!=t)try{return ai(s.jsonParse(e),te.MaxPayloadLength,t)}catch(n){return 1==t?e.slice(0,te.MaxPayloadLength):void 0}}function Si(e,t){switch(e){default:case J.Elide:return!1;case J.Record:return!0;case J.Whitelist:try{return ii(t)}catch(e){return o("error parsing field whitelist ("+t+": "+e),!1}}}function Ei(e,t){var n="";return e.forEach(function(e){e[0]=e[0].toLowerCase();var r=t(e);n+=e[0]+(r?": "+e[1]:"")+di}),n}function Ti(e){return e?e.sheet:void 0}function ki(e){try{return e?e.cssRules||e.rules:void 0}catch(e){return}}function Ii(e,t){var n=function(e,t){var n=e;if("function"==typeof n.getPropertyCSSValue){var r=n.getPropertyCSSValue(t);if(null!=r){var i;switch(r.cssValueType){case 1:i=r;break;case 2:if(1!==r.length)return;var o=r.item(0);if(null==o)return;if(1!==o.cssValueType)return;i=o;break;default:return;}if(19===i.primitiveType){var s=Gn();hi||(hi=s.createElement("div"));var a=i.cssText;try{hi.style.cssText=t+": \""+a+"\";";var u=hi.style.getPropertyCSSValue(t);if(null==u)return;if(a!==u.cssText)return}catch(e){return}finally{hi.style.cssText=""}return"\""+a+"\""}}}}(e,t);return void 0!==n?n:e.getPropertyValue(t)}var Ci,Ri="EventQueue not defined for 'withEventQueueFor', likely caused by holding ref to callback",Ai=function(e){var t=e.ownerDocument;return t&&t.defaultView},xi=function(){function e(t,n){var r=this;this.ctx=t,this.queue=n,this.hooks=[],this.removeShims=[],this.nextSheetId=1;var i=e;this.throttle=new nn(i.ThrottleMax,i.ThrottleInterval,function(){return setTimeout(function(){r.queue.enqueue({Kind:R.FAIL_THROTTLED,Args:[Q.StyleSheetHooks]}),r.stop()})}),this.addInsert=this.throttle.guard(this.addInsert),this.addDelete=this.throttle.guard(this.addDelete)}return e.prototype.start=function(){var e=this;this.throttle.open();var t=this.ctx.window;if(t.CSSStyleSheet&&t.StyleSheet){var n,r=t.CSSStyleSheet.prototype;(n=Tt(r,"insertRule"))&&(n.afterSync(function(t){e.addInsert(t.that,t.args[0],t.args[1])}),this.hooks.push(n)),(n=Tt(r,"deleteRule"))&&(n.afterSync(function(t){e.addDelete(t.that,t.args[0])}),this.hooks.push(n)),this.removeShims.push(kt(t.StyleSheet,"disabled",function(t,n){return e.onDisableSheet(t,n)}),kt(t.Document,"adoptedStyleSheets",function(t,n){return e.onSetAdoptedStyleSheets(t)}),kt(t.ShadowRoot,"adoptedStyleSheets",function(t,n){return e.onSetAdoptedStyleSheets(t)}))}},e.prototype.onSetAdoptedStyleSheets=function(e){if(Mn(e)){var t=e.adoptedStyleSheets;if(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=this.snapshotConstructedStylesheet(o);n.push(s),!0===o.disabled&&this.onDisableSheet(o,!0)}this.queue.enqueue({Kind:R.ADOPTED_STYLESHEETS,Args:[Mn(e),n]})}}},e.prototype.snapshotEl=function(e,t){void 0===t&&(t=0);var n=Mn(e);if(n){var r=Ti(e);r&&this.snapshot([G.Node,n],r,t)}},e.prototype.snapshotConstructedStylesheet=function(e){var t=Pi(e);if(void 0!==t)return t;var n=this.nextSheetId++;return function(e,t){e._fs=t}(e,n),this.snapshot([G.Sheet,n],e),n},e.prototype.snapshot=function(e,t,n){void 0===n&&(n=0);var r=ki(t);if(r){for(var i=[],o=n;o<r.length;o++)try{i.push(Ci(r[o]))}catch(e){i.push("html {}")}this.queue.enqueue({Kind:R.CSSRULE_INSERT,Args:[e,i,n]})}},e.prototype.addInsert=function(t,n,r){var i=Fi(t,G.Node);i&&"string"==typeof n&&(n.length>e.MaxRuleBytes&&(o("CSSRule too large, inserting dummy instead: "+n.length),n="dummy {}"),this.withEventQueueForSheet(t,function(e){return e.enqueue({Kind:R.CSSRULE_INSERT,Args:"number"==typeof r?[i,[n],r]:[i,[n]]})}))},e.prototype.addDelete=function(e,t){var n=Fi(e,G.Node);n&&this.withEventQueueForSheet(e,function(e){return e.enqueue({Kind:R.CSSRULE_DELETE,Args:[n,t]})})},e.prototype.onDisableSheet=function(e,t){var n=Fi(e,G.Node);n&&this.withEventQueueForSheet(e,function(e){return e.enqueue({Kind:R.DISABLE_STYLESHEET,Args:[n,!!t]})})},e.prototype.withEventQueueForSheet=function(e,t){if(e.ownerNode)return n=this.ctx,r=e.ownerNode,i=t,void((o=I(Ai(r)||n.window))&&"function"==typeof o._withEventQueue&&o._withEventQueue(n.recording.pageSignature(),function(e){i({enqueue:function(t){Ft(null!=e,Ri)&&e.enqueue(t)},enqueueFirst:function(t){Ft(null!=e,Ri)&&e.enqueueFirst(t)}}),e=null}));var n,r,i,o;t(this.queue)},e.prototype.stop=function(){this.throttle.close();for(var e=0,t=this.hooks;e<t.length;e++){t[e].disable()}this.hooks=[];for(var n=0,r=this.removeShims;n<r.length;n++){(0,r[n])()}this.removeShims=[]},e.ThrottleMax=1e4,e.ThrottleInterval=1e4,e.MaxRuleBytes=16384,e}(),Oi=document.createElement("div");function Mi(e,t){if(void 0===t&&(t=0),!Ft(t<=20,"No deep recursion for CSS rules"))return"html { /* Depth limit exceeded! */ }";var n=function(e){switch(e.type){case CSSRule.PAGE_RULE:var t=e.selectorText||"";return t&&ct(t,"@page")?t:"@page "+t;case CSSRule.KEYFRAME_RULE:return e.keyText;case CSSRule.STYLE_RULE:return e.selectorText;case CSSRule.MEDIA_RULE:return"@media "+e.media.mediaText;case CSSRule.KEYFRAMES_RULE:return"@keyframes "+e.name;case CSSRule.SUPPORTS_RULE:return"@supports "+e.conditionText;default:return null;}}(e);if(null==n)return e.cssText;var r=function(e,t){var n=e,r=n.style;if(r){for(var i="",o=0;o<r.length;o++){var s=r[o],a=Ii(r,s);"initial"!==a&&("\""!==(u=a)[0]&&"'"!==u[0]||u[u.length-1]!==u[0])||(i+=s+": "+a,"important"===r.getPropertyPriority(s)&&(i+=" !important"),i+="; ")}return[r.cssText,i].filter(Boolean).join("\n")}var u;var c=n.cssRules;if(!c)return null;var h="";for(o=0;o<c.length;o++)h+=Mi(c[o],t+1);return h}(e,t);return null==r?e.cssText:n+" { "+r+"} "}Oi.style.width="initial",Ci=""!=Oi.style.cssText?function(e){return e.cssText}:Mi;var Li=/^\s*$/;function Fi(e,t){var n=function(e){var t=Pi(e);if(t)return[G.Sheet,t];var n=Mn(e.ownerNode);if(n)return[G.Node,n];return}(e);if(n){var r=n[0],i=n[1];return r===t?i:n}}function Pi(e){return e._fs}var qi=function(){function e(e,t,n){this._ctx=e,this._q=t,this._listeners=n.createChild()}return e.prototype.start=function(){var e=this,t=this._ctx.window.document;this._listeners.addCustom(t,this.getFullscreenChangeEvent(),!0,function(t){e.onFullscreenChange(t)}),this._listeners.addCustom(t,this.getFullscreenErrorEvent(),!0,function(t){e.onFullscreenError(t)})},e.prototype.stop=function(){this._listeners&&this._listeners.clear()},e.prototype.onFullscreenChange=function(e){var t=this.getFullscreenElement();if(t){var n=Mn(t);Ft(null==this._previousFullscreenFSID,"Error: Received fullscreen signal but we think we are already in fullscreen?"),this._q.enqueue({Kind:R.FULLSCREEN,Args:[n,!0]}),this._previousFullscreenFSID=n}else Ft(null!=this._previousFullscreenFSID,"Error: Received fullscreen exit signal but have no previous fullscreen event?"),this._q.enqueue({Kind:R.FULLSCREEN,Args:[this._previousFullscreenFSID,!1]}),this._previousFullscreenFSID=void 0},e.prototype.onFullscreenError=function(e){this._q.enqueue({Kind:R.FULLSCREEN_ERROR,Args:[]})},e.prototype.getFullscreenElement=function(){var e=this._ctx.window.document;return e[fe(e,"fullscreenElement")]},e.prototype.getFullscreenChangeEvent=function(){return fe(this._ctx.window.document,"onfullscreenchange").slice(2)},e.prototype.getFullscreenErrorEvent=function(){return fe(this._ctx.window.document,"onfullscreenerror").slice(2)},e}(),Ui=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Ni=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Wi=function(){function e(e,t){this._queue=t,this._registry=null,this._checkedNodeTags={};var n=e.window;this._registry=n.customElements&&n.customElements.get&&n.customElements.whenDefined&&n.customElements}return e.prototype.onCustomNodeVisited=function(e){return Ui(this,void 0,et,function(){var t,n;return Ni(this,function(r){switch(r.label){case 0:if(!this._registry)return[2];if(t=e.nodeName.toLowerCase(),this._checkedNodeTags.hasOwnProperty(t))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),n=!!this._registry.get(t),this._checkedNodeTags[t]=n,[4,this._registry.whenDefined(t)];case 2:return r.sent(),this._enqueue(t),[3,4];case 3:return r.sent(),[3,4];case 4:return[2];}})})},e.prototype._enqueue=function(e){this._queue.enqueue({Kind:R.CUSTOM_ELEMENT_DEFINED,Args:[e]})},e}(),Di=function(){function e(e,t,n,r,i,o,s,a){var u=this;this._ctx=e,this._queue=t,this._keep=n,this._onFrameCreated=o,this._beforeFrameRemoved=s,this._resourceUploader=a,this._curSelection=[],this._scrollTimeouts={},this._uploadResources=!1,this._modalHooks=[],this._initialized=!1,this._wnd=e.window,this._doc=this._wnd.document,this._loc=this._wnd.location,this._hst=this._wnd.history,this._listeners=i.createChild(),this._currentUrl=this._loc.href,this._inputWatcher=new Un(function(e){u.addChangeElem(e)},function(e){return!!Mn(e)}),this._ajaxWatcher=new _i(e,t),this._perfWatcher=new ri(e,t,this._listeners),this._styleSheetWatcher=new xi(e,t),this._fullscreenWatcher=new qi(e,t,this._listeners),this._customElementWatcher=new Wi(e,t),this._mutWatcher=new Qr(e,r,!0,function(e,t){return u.visitNode(e,t)},function(e){var t=e.node;if("iframe"==on(e.node))u._beforeFrameRemoved(e.node);else if("function"==typeof t.getElementsByTagName)for(var n=t.getElementsByTagName("iframe"),r=0;r<n.length;r++){var i=n[r];u._beforeFrameRemoved(i)}},function(e,t,n){if(!function(e){return Cn(e)||Rn(e)}(e)&&u._uploadResources)for(var r=0,i=function(e,t,n){var r,i=on(e);if(Hi[t]&&Hi[t][i])return[n];if("link"==i&&"href"==t&&(r=e.getAttribute("rel"))&&r.indexOf("stylesheet")>-1)return[n];if("srcset"==t&&("img"==i||"source"==i)){return null!=n.match(/^\s*$/)?[]:n.split(",").map(function(e){return e.trim().split(/\s+/)[0]})}var o=e;if("style"==t&&o.style){var s=o.style.backgroundImage;if(!s)return[];if(s.length>300)return[];var a=[],u=void 0;for(jt.lastIndex=0;u=jt.exec(s);){var c=u[1];c&&a.push(c.trim())}return a}return[]}(e,t,n);r<i.length;r++){var o=i[r];u._resourceUploader.uploadIfNeeded(u._wnd,o)}})}return e.prototype.watchEvents=function(){var e=this;this._mutWatcher.hookMutations(),this._inputWatcher.hookEvents(),this._styleSheetWatcher.start(),this._perfWatcher.start(this._resourceUploader),this._fullscreenWatcher.start(),this._listeners.add(this._wnd,"mousemove",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseMove(t)}),this._listeners.add(this._wnd,"mousedown",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseDown(t)}),this._listeners.add(this._wnd,"mouseup",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseUp(t)}),this._listeners.add(this._wnd,"keydown",!0,function(){e.addKeyDown()}),this._listeners.add(this._wnd,"keyup",!0,function(){e.addKeyUp()}),this._listeners.add(this._wnd,"click",!0,function(t){e.isSafePointerEvent(t)&&e.addClick(t)}),this._listeners.add(this._wnd,"dblclick",!0,function(t){e.addDblClick(t)}),this._listeners.add(this._wnd,"focus",!0,function(t){e.addFocus(t)}),this._listeners.add(this._wnd,"blur",!0,function(t){e.addBlur(t)}),this._listeners.add(this._wnd,"change",!0,function(t){e.addChange(t)},!0),this._listeners.add(this._wnd,"touchstart",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHSTART),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchend",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHEND),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchmove",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHMOVE),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchcancel",!0,function(t){e.isSafePointerEvent(t)&&e.addTouchEvent(t,R.TOUCHCANCEL)}),this._listeners.add(this._wnd,"play",!0,function(t){e.addPlayEvent(t)}),this._listeners.add(this._wnd,"pause",!0,function(t){e.addPauseEvent(t)}),this._listeners.add(this._wnd,"scroll",!1,function(){e.addWindowScrollOrResize()}),this._listeners.add(this._wnd,"resize",!1,function(){e.addWindowScrollOrResize()}),this._listeners.add(this._wnd,"submit",!1,function(t){e.addFormSubmit(t)}),this._listeners.add(this._wnd,"focus",!1,function(){e.addWindowFocus()}),this._listeners.add(this._wnd,"blur",!1,function(){e.addWindowBlur()}),this._listeners.add(this._wnd,"popstate",!1,function(){e.addNavigate()}),this._listeners.add(this._wnd,"selectstart",!0,function(){e.addSelection()}),this._listeners.add(this._doc,"selectionchange",!0,function(){e.addSelection()});var t=this._wnd.visualViewport;t?(this._listeners.add(t,"scroll",!0,function(){return e.addWindowScrollOrResize()}),this._listeners.add(t,"resize",!0,function(){return e.addWindowScrollOrResize()})):this._listeners.add(this._wnd,"mousewheel",!0,function(){e.addWindowScrollOrResize()}),this._pushHook=Tt(this._hst,"pushState"),this._pushHook&&this._pushHook.afterSync(function(){return e.addNavigate()}),this._replaceHook=Tt(this._hst,"replaceState"),this._replaceHook&&this._replaceHook.afterSync(function(){return e.addNavigate()});for(var n=function(t){var n=Tt(r._wnd,t);if(!n)return"continue";r._modalHooks.push(n),n.before(function(){e._queue.enqueue({Kind:R.MODAL_OPEN,Args:[t]})}).afterSync(function(){e._queue.enqueue({Kind:R.MODAL_CLOSE,Args:[t]})})},r=this,i=0,o=ne;i<o.length;i++){n(o[i])}if("function"==typeof this._wnd.document.hasFocus&&this._queue.enqueue({Kind:this._wnd.document.hasFocus()?R.WINDOW_FOCUS:R.WINDOW_BLUR,Args:[]}),s.matchMedia)for(var a=function(t,n,r){var i=s.matchMedia(u._wnd,r);if(!i)return"continue";var o=function(){i.matches&&e._queue.enqueue({Kind:R.MEDIA_QUERY_CHANGE,Args:[t,n]})};u._listeners.add(i,"change",!0,o),o()},u=this,c=0,h=[["any-pointer","coarse","not screen and (any-pointer: fine)"],["any-pointer","fine","only screen and (any-pointer: fine)"],["any-hover","none","not screen and (any-hover: hover)"],["any-hover","hover","only screen and (any-hover: hover)"],["pointer","none","(pointer: none)"],["pointer","coarse","(pointer: coarse)"],["pointer","fine","(pointer: fine)"]];c<h.length;c++){var d=h[c];a(d[0],d[1],d[2])}this._initialized=!0},e.prototype.initResourceUploading=function(){this._resourceUploader.init(),this._uploadResources=!0},e.prototype.onDomLoad=function(){this.addDomLoaded(),this.addViewportChange(),this._mutWatcher._checkForMissingInsertions(ae)},e.prototype.onLoad=function(){var e=this,t=!1,n=Mt.wrap(function(){t||(t=!0,e._perfWatcher.onLoad(),e.addLoad(),e.addViewportChange())},"error");new tn(n,0).start(),s.requestWindowAnimationFrame&&s.requestWindowAnimationFrame(this._wnd,n)},e.prototype.ajaxWatcher=function(){return this._ajaxWatcher},e.prototype.bundleEvents=function(e){var t=this;return this._queue.enqueueSimultaneousEventsIn(function(n){return t._inputWatcher.tick(),t._perfWatcher.tick(e),t._ajaxWatcher.tick(e),t.addViewportChange(),t._mutWatcher.processMutations(n)})},e.prototype.shutdown=function(e){if(this._initialized){this._initialized=!1,this._listeners&&this._listeners.clear(),this._pushHook&&this._pushHook.disable(),this._replaceHook&&this._replaceHook.disable();for(var t=0,n=this._modalHooks;t<n.length;t++){n[t].disable()}this._modalHooks=[],this._perfWatcher.onLoad(),this._ctx.measurer.performMeasurementsNow(),this._queue.processEvents(),this._inputWatcher.shutdown(),this._mutWatcher.shutdown(),this._ajaxWatcher.disable(),this._perfWatcher.shutdown(),this._styleSheetWatcher.stop(),this._fullscreenWatcher.stop(),this._queue.shutdown(e)}},e.prototype.recordingIsDetached=function(){return this._mutWatcher.recordingIsDetached()},e.prototype.visitNode=function(e,t){var n=this;switch(e.nodeName){case"#document":case"#document-fragment":"#document-fragment"===e.nodeName&&this._listeners.add(e,"scroll",!0,function(e){return n.addScroll(Ki(e))});var r=e;try{if(!r.adoptedStyleSheets||0===r.adoptedStyleSheets.length)break}catch(e){break}t.push(function(){n._styleSheetWatcher.onSetAdoptedStyleSheets(e)});break;case"HTML":this._docElScrollListener&&this._listeners.remove(this._docElScrollListener),this._docElScrollListener=this._listeners.add(e,"scroll",!0,function(e){n.addScroll(Ki(e))});break;case"BODY":this.addViewportChange(),this.addSelection();break;case"INPUT":case"TEXTAREA":case"SELECT":this._inputWatcher.addInput(e);break;case"FRAME":case"IFRAME":this._onFrameCreated(e);break;case"VIDEO":case"AUDIO":e.paused||this._queue.enqueue({Kind:R.PLAY,Args:[Mn(e)]});break;case"LINK":if(!(i=e.sheet))break;!0===i.disabled&&this._styleSheetWatcher.onDisableSheet(i,!0);break;case"STYLE":var i,o=e;if(!(i=o.sheet))break;!0===i.disabled&&this._styleSheetWatcher.onDisableSheet(i,!0);var s=function(e){var t=e.textContent||"";if(!(t.length>5e5)){var n=ki(Ti(e));if(n){if(n.length>0&&Li.test(t))return 0;var r,i=Gn();ae?(r=i.createElement("style")).textContent=e.textContent:r=i.importNode(e,!0),i.head.appendChild(r);var o=ki(Ti(r));if(i.head.removeChild(r),o)return n.length>o.length?o.length:void 0}}}(o);void 0!==s&&t.push(function(){n._styleSheetWatcher.snapshotEl(o,s)});break;default:"#"!==e.nodeName[0]&&e.nodeName.indexOf("-")>-1&&this._customElementWatcher.onCustomNodeVisited(e);}if("scrollLeft"in e&&"scrollTop"in e){var a=e;this._ctx.measurer.requestMeasureTask(function(){0==a.scrollLeft&&0==a.scrollTop||n.addScroll(a)})}},e.prototype.isSafePointerEvent=function(e){var t=Ki(e);return!!Mn(t)&&!Cn(t)},e.prototype.addMouseMove=function(e){var t=Mn(Ki(e));this._queue.enqueue({Kind:R.MOUSEMOVE,Args:t?[e.clientX,e.clientY,t]:[e.clientX,e.clientY]})},e.prototype.addMouseDown=function(e){this._queue.enqueue({Kind:R.MOUSEDOWN,Args:[e.clientX,e.clientY]})},e.prototype.addMouseUp=function(e){this._queue.enqueue({Kind:R.MOUSEUP,Args:[e.clientX,e.clientY]})},e.prototype.addTouchEvent=function(e,t){if(void 0!==e.changedTouches)for(var n=0;n<e.changedTouches.length;++n){var r=e.changedTouches[n];isNaN(parseInt(r.identifier))&&(r.identifier=0);var i=[r.identifier,r.clientX,r.clientY];this._queue.enqueue({Kind:t,Args:i})}},e.prototype.addPlayEvent=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.PLAY,Args:[t]})},e.prototype.addPauseEvent=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.PAUSE,Args:[t]})},e.prototype.addWindowFocus=function(){this._queue.enqueue({Kind:R.WINDOW_FOCUS,Args:[]})},e.prototype.addWindowBlur=function(){this._queue.enqueue({Kind:R.WINDOW_BLUR,Args:[]})},e.prototype.maybeAddValueChange=function(){var e=ji(this._doc);e&&this._inputWatcher.onChange(e)},e.prototype.addKeyDown=function(){var e=ji(this._doc);e&&!Ln(e)||(this.maybeAddValueChange(),this._queue.enqueue({Kind:R.KEYDOWN,Args:[]}))},e.prototype.addKeyUp=function(){var e=ji(this._doc);e&&!Ln(e)||(this.maybeAddValueChange(),this._queue.enqueue({Kind:R.KEYUP,Args:[]}))},e.prototype.addViewportChange=function(){var e=this;this._ctx.measurer.requestMeasureTask(function(){return e._addViewportChangeImpl()})},e.prototype._addViewportChangeImpl=function(){var e=this.getWindowScrollingElement(),t=Mn(e);if(t){var n=function(e,t){var n=e.documentElement.getBoundingClientRect(),r=t.scrollWidth,i=t.scrollHeight;return{width:s.mathMax(n.width,r),height:s.mathMax(n.height,i)}}(this._wnd.document,e);Wt(n,this._curDocSize)||(this._curDocSize=n,this._queue.enqueue({Kind:R.RESIZE_DOCUMENT,Args:[n.width,n.height]}));var r,i,o,a,u=Yt(this._wnd,this._curLayoutViewport),c=function(e,t){return"visualViewport"in e?e.visualViewport:(void 0===t&&(t=Yt(e)),new Gt(e,t))}(this._wnd,u);u.hasKnownPosition?(Nt(u,this._curLayoutViewport)||this._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[t,u.pageLeft,u.pageTop]}),r=c,(i=this._curVisualViewport)&&r.offsetLeft==i.offsetLeft&&r.offsetTop==i.offsetTop||this._queue.enqueue({Kind:R.SCROLL_VISUAL_OFFSET,Args:[t,c.offsetLeft,c.offsetTop]})):Nt(c,this._curVisualViewport)||this._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[t,c.pageLeft,c.pageTop]}),function(e,t){return t&&e.width==t.width&&e.height==t.height&&e.clientWidth==t.clientWidth&&e.clientHeight==t.clientHeight}(u,this._curLayoutViewport)||(u.width==u.clientWidth&&u.height==u.clientHeight?this._queue.enqueue({Kind:R.RESIZE_LAYOUT,Args:[u.clientWidth,u.clientHeight]}):this._queue.enqueue({Kind:R.RESIZE_LAYOUT,Args:[u.clientWidth,u.clientHeight,u.width,u.height]})),Wt(c,this._curVisualViewport)||this._queue.enqueue({Kind:R.RESIZE_VISUAL,Args:[c.width,c.height]}),this._curLayoutViewport=((a=Dt(o=u)).clientWidth=o.clientWidth,a.clientHeight=o.clientHeight,a),this._curVisualViewport=function(e){var t=Dt(e);return t.offsetLeft=e.offsetLeft,t.offsetTop=e.offsetTop,t}(c)}},e.prototype.doWorkInScrollTimeout=function(e,t){var n=this;e in this._scrollTimeouts||(this._scrollTimeouts[e]=t,new tn(function(){n._ctx.measurer.requestMeasureTask(function(){if(e in n._scrollTimeouts){var t=n._scrollTimeouts[e];delete n._scrollTimeouts[e],t()}})},te.ScrollSampleInterval).start())},e.prototype._fireScrollTimeouts=function(){for(var e in this._scrollTimeouts)this._scrollTimeouts[e](),delete this._scrollTimeouts[e];this._scrollTimeouts=[]},e.prototype.getWindowScrollingElement=function(){return this._doc.scrollingElement||this._doc.body||this._doc.documentElement},e.prototype.addWindowScrollOrResize=function(){var e=this;this.doWorkInScrollTimeout(1,function(){return e.addViewportChange()})},e.prototype.addScroll=function(e){var t=this,n=Mn(e);n&&this.doWorkInScrollTimeout(n,function(){if(Mn(e)===n){var r=e;n&&"number"==typeof r.scrollLeft&&t._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[n,r.scrollLeft,r.scrollTop]})}})},e.prototype.addDomLoaded=function(){this._queue.enqueue({Kind:R.DOMLOADED,Args:[]})},e.prototype.addLoad=function(){this._queue.enqueue({Kind:R.LOAD,Args:[]})},e.prototype.addNavigate=function(){var e=this._loc.href;this._currentUrl!=e&&(this._currentUrl=e,this._keep.onNavigate(e),this._queue.enqueue({Kind:R.NAVIGATE,Args:[ur(this._loc.href,this._ctx.options.orgId,{source:"event",type:R.NAVIGATE}),this._doc.title]}))},e.prototype.addClick=function(e){var t=Ki(e),n=Mn(t);if(n){var r=0,i=0,o=0,s=0;if(t&&t.getBoundingClientRect){var a=t.getBoundingClientRect();r=a.left,i=a.top,o=a.width,s=a.height}var u=xn(t);this._keep.onClick(u),this._queue.enqueue({Kind:R.CLICK,Args:[n,e.clientX,e.clientY,r,i,o,s]})}},e.prototype.addDblClick=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.DBL_CLICK,Args:[t]})},e.prototype.addFormSubmit=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.FORM_SUBMIT,Args:[t]})},e.prototype.addFocus=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.FOCUS,Args:[t]})},e.prototype.addBlur=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.BLUR,Args:[t]})},e.prototype.addChange=function(e){this._inputWatcher.onChange(Ki(e))},e.prototype.addChangeElem=function(e){var t=Ln(e);if(t){var n=Kn(e);Rn(e)&&(n=er(n)),this._queue.enqueue({Kind:R.VALUECHANGE,Args:[t,n]})}},e.prototype.addSelection=function(){var e=this;this._ctx.measurer.requestMeasureTask(function(){var t;try{t=e.selectionArgs()}catch(e){return}for(var n=!1,r=0;r<4;r++)if(e._curSelection[r]!==t[r]){n=!0;break}n&&(e._curSelection=t,e._queue.enqueue({Kind:R.SELECT,Args:t}))})},e.prototype.selectionArgs=function(){if(!this._wnd.getSelection)return[];var e=this._wnd.getSelection();if(!e)return[];if("None"==e.type)return[];if("Caret"==e.type){var t=Mn(e.anchorNode);return t?[t,e.anchorOffset]:[]}if(!e.anchorNode||!e.focusNode)return[];var n=Bi(e.anchorNode,e.anchorOffset),r=n[0],i=n[1],o=Bi(e.focusNode,e.focusOffset),s=o[0],a=o[1],u=Boolean(r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING),c=u?[r,s]:[s,r],h=c[0],d=c[1],l=u?[i,a]:[a,i],p=l[0],f=l[1];for(Mn(h)||(p=0);h&&!Mn(h)&&h!=d;)h=ut(h)||h.parentNode;for(Mn(d)||(f=0);d&&!Mn(d)&&d!=h;)d=vt(d)||d.parentNode;if(h==d&&p==f)return[];var v=Mn(h),_=Mn(d);return h&&d&&v&&_?[v,p,_,f,u]:[]},e}();function Bi(e,t){if(!e.firstChild)return[e,t];e=e.firstChild;for(var n=0;n<t-1;n++){var r=ut(e);if(!r)return[e,0];e=r}return[e,0]}var Hi={src:{img:!0,embed:!0},href:{use:!0,image:!0},data:{object:!0}};function ji(e){for(var t=e.activeElement;t&&t.shadowRoot;){var n=t.shadowRoot.activeElement;if(!n)return t;t=n}return t}function Ki(e){if(e.composed&&e.target){var t=e.target;if(t.nodeType==pn&&t.shadowRoot){var n=e.composedPath();if(n.length>0)return n[0]}}return e.target}var Vi=/^\s*at .*(\S+\:\d+|native|(<anonymous>))/m,zi=/^(eval@)?(\[native code\])?$/;function Yi(e){if(!e||"string"!=typeof e.stack)return[];var t=e;return t.stack.match(Vi)?t.stack.split("\n").filter(function(e){return!!e.match(Vi)}).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),n=Qi(t.pop());return Gi(t.join(" "),["eval","<anonymous>"].indexOf(n[0])>-1?"":n[0],n[1],n[2])}):function(e){return e.split("\n").filter(function(e){return!e.match(zi)}).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return[e,"",-1,-1];var t=e.split("@"),n=Qi(t.pop());return Gi(t.join("@"),n[0],n[1],n[2])})}(t.stack)}function Gi(e,t,n,r){return[e||"",t||"",parseInt(n||"-1"),parseInt(r||"-1")]}function Qi(e){if(!e||-1===e.indexOf(":"))return["","",""];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return t?[t[1]||"",t[2]||"",t[3]||""]:["","",""]}var Xi=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Ji=function(){function e(e,t,n){this._queue=t,this._enabled=!1,this._overflow=!1,this._total=0,this._hooks=[],this._wnd=e.window,this._listeners=n.createChild();var r=e.options.orgId;this.orgId=r,this.maxLogsPerPage="P2C"==r||"ESHFX"==r||"6HFXR"==r||"A0W9W"==r||"5V0ND"==r?3e3:"GF6RM"==r?1600:te.MaxLogsPerPage}return e.prototype._overflowMsg=function(){return"\"[received more than "+this.maxLogsPerPage+" messages]\""},e.prototype.enable=function(){var e=this;if(this._listeners.add(this._wnd,"error",!0,function(t){return e.addError(t)}),this._listeners.add(this._wnd,"unhandledrejection",!0,function(t){e.addLog("error",["Uncaught (in promise)",t.reason])},!0),!this._enabled)if(this._enabled=!0,this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Console,!0]}),this._wnd.console)for(var t=function(t){var r=Tt(n._wnd.console,t);if(!r)return"continue";r.before(function(n){var r=n.args;return e.addLog(t,r)}),n._hooks.push(r)},n=this,r=0,i=["log","info","warn","error"];r<i.length;r++){t(i[r])}else this.addLog("log",["NOTE: Log messages cannot be captured on IE9"])},e.prototype.isEnabled=function(){return this._enabled},e.prototype.disable=function(){var e;if(this._listeners&&this._listeners.clear(),this._enabled)for(this._enabled=!1;e=this._hooks.pop();)e.disable()},e.prototype.logEvent=function(e,t){if(!this.checkOverflow())return null;var n;n=-1==["log","info","warn","error","debug","_fs_debug"].indexOf(e)?["log",$i(e,1e3,this.orgId)]:[e];for(var r=0;r<t.length;++r)n.push($i(t[r],1e3,this.orgId));return{Kind:R.LOG,Args:n}},e.prototype.addLog=function(e,t){var n=this.logEvent(e,t);n&&this._queue.enqueue(n)},e.prototype.addError=function(e){var t=e.message,n=e.filename,r=e.lineno;(t||n||r)&&this.checkOverflow()&&("object"==typeof t&&(t=$i(t,1e3,this.orgId)),"object"==typeof n&&(n=$i(n,100,this.orgId,!1)),"object"==typeof r&&(r=-1),this._queue.enqueue({Kind:R.ERROR,Args:Xi([t,n,r],Yi(e.error))}))},e.prototype.checkOverflow=function(){return!this._overflow&&(this._total==this.maxLogsPerPage?(this._queue.enqueue({Kind:R.LOG,Args:["warn",this._overflowMsg()]}),this._overflow=!0,!1):(this._total++,!0))},e}();function $i(e,t,n,r){void 0===r&&(r=!0);try{var i={tokens:[],opath:[],cyclic:Zi(e,t/4)};!function e(t,n,r,i){if(n<1)return 0;var o=t&&t.constructor==Date?eo(t):function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&e.nodeType>0&&"string"==typeof e.nodeName}(t)?function(e){return e.toString()}(t):void 0===t?"undefined":"object"!=typeof t||null==t?t:t instanceof Error?t.stack||t.name+": "+t.message:void 0;if(void 0!==o)return void 0===(o=s.jsonStringify(o))?0:("\""==o[0]&&(o=to(o,n,"...\"")),o.length<=n?(i.tokens.push(o),o.length):0);if(i.cyclic){i.opath.splice(r);var a=i.opath.lastIndexOf(t);if(a>-1){var u="<Cycle to ancestor #"+(r-a-1)+">";return u="\""+to(u,n-2)+"\"",i.tokens.push(u),u.length}i.opath.push(t)}var c=n,h=function(e){return c>=e.length&&(c-=e.length,i.tokens.push(e),!0)},d=function(e){","==i.tokens[i.tokens.length-1]?i.tokens[i.tokens.length-1]=e:h(e)};if(c<2)return 0;if(nt(t)){h("[");for(var l=0;l<t.length&&c>0;l++){var p=e(t[l],c-1,r+1,i);if(c-=p,0==p&&!h("null"))break;h(",")}d("]")}else{h("{");var f=Ze(t);for(l=0;l<f.length&&c>0;l++){var v=f[l],_=t[v];if(!h("\""+v+"\":"))break;if(0==(p=e(_,c-1,r+1,i))){i.tokens.pop();break}c-=p,h(",")}d("}")}return n==1/0?1:n-c}(e,t,0,i);var o=i.tokens.join("");return r?function(e,t){var n=t.replace(vr,"<email>");return n=n.replace(_r,function(t){return ur(t,e,{source:"log",type:"debug"})})}(n,o):o}catch(e){return mt(e)}}function Zi(e,t){var n=0;try{s.jsonStringify(e,function(e,r){if(n++>t)throw"break";if("object"==typeof r)return r})}catch(e){return"break"!=e}return!1}var eo=function(e){return isNaN(e)?"Invalid Date":e.toUTCString()},to=function(e,t,n){return void 0===n&&(n="..."),e.length<=t?e:e.length<=n.length||t<=n.length?e.substring(0,t):e.substring(0,t-n.length)+n};var no=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},ro=function(){function e(e,t){this._q=e,this._valueIndices=t,this._evts=[],this._curveEndMs=0}return e.prototype.add=function(e){0==this._evts.length?(this._q.push(e),this._curveEndMs=e.When):e.When>this._curveEndMs&&(this._curveEndMs=e.When),this._evts.push(e)},e.prototype.finish=function(e,t){void 0===t&&(t=[]);var n=this._evts.length;if(n<=1)return!1;for(var r=no([this._curveEndMs],t),i=this._evts[0].When,o=this._evts[n-1].When,s=0;s<this._valueIndices.length;++s){var a=this._valueIndices[s],u=this._evts[0].Args[a],c=(this._evts[1].When-i)/(o-i),h=(this._evts[1].Args[a]-u)/c,d=this._evts[n-2].Args[a],l=(o-this._evts[n-2].When)/(o-i),p=this._evts[n-1].Args[a],f=(p-d)/l;r.push(u,p,h,f)}return this._evts[0].Kind=e,this._evts[0].Args=r,!0},e.prototype.evts=function(){return this._evts},e}();var io=function(){function e(e,t,n,r){void 0===n&&(n=function(){return[]}),void 0===r&&(r=en),this._ctx=e,this._transport=t,this._gatherExternalEvents=n,this._tickerFactory=r,this._recordingDisabled=!1,this._activeSimultaneousEventsTransactions=0,this._lastWhen=-1,this._gotUnload=!1,this._eventQueue=[],this._sampleCurvesTicker=new this._tickerFactory(te.CurveSamplingInterval),this._processMutationsTicker=new this._tickerFactory(te.MutationProcessingInterval)}return e.prototype.startPipeline=function(e){var t,n,r=this;this._recordingDisabled||this._pipelineStarted||(this._pipelineStarted=!0,this._frameId=null!==(t=e.frameId)&&void 0!==t?t:0,this._parentIds=null!==(n=e.parentIds)&&void 0!==n?n:[],this.processEvents(),this._processMutationsTicker.start(function(){r.processEvents()}),this._sampleCurvesTicker.start(function(){r.processEvents(!0)}),this._transport.startPipeline(e))},e.prototype.enqueueSimultaneousEventsIn=function(e){0===this._activeSimultaneousEventsTransactions&&(this._lastWhen=this._ctx.time.now());try{return this._activeSimultaneousEventsTransactions++,e(this._lastWhen)}finally{this._activeSimultaneousEventsTransactions--,this._activeSimultaneousEventsTransactions<0&&(this._activeSimultaneousEventsTransactions=0)}},e.prototype.enqueue=function(e){var t=this._activeSimultaneousEventsTransactions>0?this._lastWhen:this._ctx.time.now();this.enqueueAt(t,e),Zt.checkForBrokenSchedulers()},e.prototype.enqueueAt=function(e,t){if(!this._recordingDisabled){e<this._lastWhen&&(e=this._lastWhen),this._lastWhen=e;var n=t;n.When=e,this._eventQueue.push(n)}},e.prototype.enqueueFirst=function(e){if(this._eventQueue.length>0){var t=e;t.When=this._eventQueue[0].When,this._eventQueue.unshift(t)}else this.enqueue(e)},e.prototype.addUnload=function(e){this._gotUnload||(this._gotUnload=!0,this.enqueue({Kind:R.UNLOAD,Args:[e]}),this.singSwanSong())},e.prototype.shutdown=function(e){this._flush(),this.addUnload(e),this._flush(),this._recordingDisabled=!0,this.stopPipeline()},e.prototype._flush=function(){this.processEvents(),this._transport.flush()},e.prototype.singSwanSong=function(){this._recordingDisabled||(this.processEvents(),this._transport.singSwanSong())},e.prototype.rebaseIframe=function(e){for(var t=0,n=this._eventQueue.length;t<n;t++){var r=this._eventQueue[t],i=r.When+this._ctx.time.startTime()-e;i<0&&(i=0),r.When=i}},e.prototype.processEvents=function(e){if(this._pipelineStarted){var t=this._eventQueue;this._eventQueue=[];var n=function(e){if(0==e.length)return e;for(var t,n=[],r=new ro(n,[0,1]),i={},o={},s={},a=0,u=e;a<u.length;a++){var c=u[a];switch(c.Kind){case R.MOUSEMOVE:r.add(c);break;case R.TOUCHMOVE:(l=c.Args[0])in i||(i[l]=new ro(n,[1,2])),i[l].add(c);break;case R.SCROLL_LAYOUT:(l=c.Args[0])in o||(o[l]=new ro(n,[1,2])),o[l].add(c);break;case R.SCROLL_VISUAL_OFFSET:(l=c.Args[0])in s||(s[l]=new ro(n,[1,2])),s[l].add(c);break;case R.RESIZE_VISUAL:t||(t=new ro(n,[0,1])),t.add(c);break;default:n.push(c);}}if(r.finish(R.MOUSEMOVE_CURVE)){var h=r.evts();if(h.length>0){var d=h[h.length-1].Args[2];if(d)h[0].Args[9]=d}}for(var l in o){o[p=parseInt(l)].finish(R.SCROLL_LAYOUT_CURVE,[p])}for(var l in s){s[p=parseInt(l)].finish(R.SCROLL_VISUAL_OFFSET_CURVE,[p])}for(var l in i){var p;i[p=parseInt(l)].finish(R.TOUCHMOVE_CURVE,[p])}return t&&t.finish(R.RESIZE_VISUAL_CURVE),n}(t);e||(n=n.concat(this._gatherExternalEvents(0!=n.length))),this.ensureFrameIds(n),0!=n.length&&this._transport.enqueueEvents(this._ctx.recording.pageSignature(),n)}},e.prototype.ensureFrameIds=function(e){if(this._frameId)for(var t=this._parentIds,n=t&&t.length>0,r=0;r<e.length;++r){var i=e[r];i.FId||(i.FId=this._frameId),n&&!i.PIds&&(i.PIds=t)}},e.prototype.stopPipeline=function(){this._pipelineStarted&&(this._sampleCurvesTicker.stop(),this._processMutationsTicker.stop(),this._eventQueue=[],this._transport.stopPipeline())},e}();function oo(){var e,t;return{promise:new et(function(n,r){e=n,t=r}),resolve:e,reject:t}}function so(e){return new et(function(t){s.setWindowTimeout(window,ie(t),e)})}var ao=function(){function e(e){void 0===e&&(e=4),this.hashCount=e,this.idx=0,this.hashMask=e-1,this.reset()}return e.prototype.reset=function(){this.idx=0,this.hash=[];for(var e=0;e<this.hashCount;++e)this.hash.push(2166136261)},e.prototype.write=function(e){for(var t=this.hashMask,n=this.idx,r=0;r<e.length;r++)this.hash[n]=this.hash[n]^e[r],this.hash[n]+=(this.hash[n]<<1)+(this.hash[n]<<4)+(this.hash[n]<<7)+(this.hash[n]<<8)+(this.hash[n]<<24),n=n+1&t;this.idx=n},e.prototype.writeAscii=function(e){for(var t=this.hashMask,n=this.idx,r=0;r<e.length;r++)this.hash[n]=this.hash[n]^e.charCodeAt(r),this.hash[n]+=(this.hash[n]<<1)+(this.hash[n]<<4)+(this.hash[n]<<7)+(this.hash[n]<<8)+(this.hash[n]<<24),n=n+1&t;this.idx=n},e.prototype.sum=function(){var e,t=this.sumAsHex();return e=t.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").map(Number),lo(String.fromCharCode.apply(window,e))},e.prototype.sumAsHex=function(){for(var e="",t=0;t<this.hashCount;++t)e+=("00000000"+(this.hash[t]>>>0).toString(16)).slice(-8);return e},e}();function uo(e){var t=new ao(1);return t.writeAscii(e),t.sumAsHex()}function co(e){var t=new Uint8Array(e);return lo(String.fromCharCode.apply(null,t))}var ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function lo(e){var t;return(null!==(t=window.btoa)&&void 0!==t?t:po)(e).replace(/\+/g,"-").replace(/\//g,"_")}function po(e){for(var t=String(e),n=[],r=0,i=0,o=0,s=ho;t.charAt(0|o)||(s="=",o%1);n.push(s.charAt(63&r>>8-o%1*8))){if((i=t.charCodeAt(o+=.75))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return n.join("")}var fo=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},vo=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},_o=1e4,go=25,mo=100;function yo(e,t,n,r){return void 0===r&&(r=new ao),fo(this,void 0,et,function(){var i,o,s,a;return vo(this,function(u){switch(u.label){case 0:i=e.now(),o=n.byteLength,s=0,u.label=1;case 1:return s<o?e.now()-i>go?[4,t(mo)]:[3,3]:[3,5];case 2:u.sent(),i=e.now(),u.label=3;case 3:a=new Uint8Array(n,s,Math.min(o-s,_o)),r.write(a),u.label=4;case 4:return s+=_o,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var wo=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},bo=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},So=6e6,Eo=function(){function e(e,t,n,r,i){void 0===r&&(r=window.FormData),void 0===i&&(i=tn),this.ctx=e,this.queue=t,this.protocol=n,this.FormDataCtr=r,this.Timeout=i,this.started={},this.byUrl={},this.batchReady=!1,this.existsBatch=[],this._sentToBugsnag=!1}return e.prototype.init=function(){this.FormDataCtr&&this.main()["catch"](function(e){Mt.sendToBugsnag(e,"error")})},e.prototype.main=function(){return wo(this,void 0,et,function(){var e,t,n,r,i,s,a,u,c,h,d,l,p,f,v,_,g,m,y,w,b,S,E,T,k,I;return bo(this,function(C){switch(C.label){case 0:e=this.ctx.options.orgId,C.label=1;case 1:return[4,this.getBatch()];case 2:for(t=C.sent(),n={fsnv:[],sha1:[]},r=0,i=t;r<i.length;r++)s=i[r],a=s.hash,v=s.hashAlgorithm,n[v].push(a);for(u={},c=0,h=t;c<h.length;c++)d=h[c],u[d.hash]=d;l=void 0,C.label=3;case 3:return C.trys.push([3,5,,6]),[4,this.protocol.queryResources({OrgId:e,HashesByAlgorithm:n})];case 4:return l=C.sent(),[3,6];case 5:return o("/rec/queryResources failed with status "+C.sent()),[3,1];case 6:for(p=0,f=l;p<f.length;p++)if((m=f[p]).Found&&m.CanonicalHash){if(!(y=u[m.QueryHash])){this.sendOnceToBugsnag("No resource found for hash");continue}if(y.blob=y.stringData=null,"fsnv"!==(v=m.CanonicalHash.Algorithm)){this.sendOnceToBugsnag("Unrecognized canonical hash type",{hashAlgorithm:v});continue}this.queue.enqueue({Kind:R.SYS_RESOURCEHASH,Args:["url",y.url,m.CanonicalHash.Hash]})}else;_=0,g=l,C.label=7;case 7:if(!(_<g.length))return[3,12];if((m=g[_]).Found&&m.CanonicalHash)return[3,11];if(null==(y=u[m.QueryHash]))return this.sendOnceToBugsnag("Server told us to upload a hash we don't have"),[3,11];if(w=y.url,b=y.contentType,!(S=y.blob||y.stringData))return this.sendOnceToBugsnag("Missing resource contents"),[3,11];if(E=y.blob||new Blob([S],{type:b}),null==S)return this.sendOnceToBugsnag("Tried to re-upload a resource"),[3,11];if((T=new this.FormDataCtr).append("orgId",e),T.append("baseUrl",w),"fsnv"===m.QueryAlgorithm)T.append("fsnvHash",m.QueryHash);else{if("sha1"!==m.QueryAlgorithm)return this.sendOnceToBugsnag("Unrecognized hash type from resource query",{hashAlgorithm:m.QueryAlgorithm}),[3,11];T.append("sha1Hash",m.QueryHash)}T.append("contents",E,"blob"),y.blob=y.stringData=null,C.label=8;case 8:return C.trys.push([8,10,,11]),[4,this.protocol.uploadResource(T)];case 9:return k=C.sent(),"fsnv"!=(I=JSON.parse(k)).Algorithm&&this.sendOnceToBugsnag("Unexpected hash type from resource upload",{hashAlgorithm:I.Algorithm}),this.queue.enqueue({Kind:R.SYS_RESOURCEHASH,Args:["url",w,I.Hash]}),[3,11];case 10:return C.sent(),o("Server error uploading resource"),[3,11];case 11:return _++,[3,7];case 12:return[3,1];case 13:return[2];}})})},e.prototype.getBatch=function(){var e=this,t=oo(),n=t.resolve,r=t.promise,i=function(){e.popBatch=null,e.batchReady=!1;var t=e.existsBatch;e.existsBatch=[],n(t)};return this.batchReady?i():this.popBatch=i,r},e.prototype.uploadIfNeeded=function(e,t){return wo(this,void 0,et,function(){var n,r,i=this;return bo(this,function(o){switch(o.label){case 0:return this.FormDataCtr?this.started[t]?[2]:function(e,t){var n=Xn(Jn(e),t);switch(n.protocol){case"blob:":return!0;case"http:":case"https:":switch(n.hostname){case"localhost":case"127.0.0.1":case"[::1]":return e.location.protocol===n.protocol&&e.location.host===n.host;case"::1":var r=n.port?"[::1]:"+n.port:"[::1]";return e.location.protocol===n.protocol&&e.location.host===r;default:return!1;}default:return!1;}}(e,t)?(this.started[t]=!0,[4,this.processResource(t)]):[2]:[2];case 1:return(n=o.sent())?(r=0==this.existsBatch.length,this.existsBatch.push(n),r&&new this.Timeout(function(){i.batchReady=!0,i.popBatch&&i.popBatch()},50).start(),[2]):[2];}})})},e.prototype.processResource=function(e){return wo(this,void 0,et,function(){var t,n,r,i,o;return bo(this,function(s){switch(s.label){case 0:return this.byUrl[e]?[2,this.byUrl[e]]:[4,To(e,this.ctx.options.orgId)];case 1:return(t=s.sent())?[4,ko(this.ctx,t.buffer)]:[2,null];case 2:return n=s.sent(),r=n.hash,i=n.algorithm,o={hash:r,hashAlgorithm:i,url:e,blob:t.blob,contentType:t.contentType},this.byUrl[o.url]=o,[2,o];}})})},e.prototype.sendOnceToBugsnag=function(e,t){this._sentToBugsnag||(this._sentToBugsnag=!0,o(e),Mt.sendToBugsnag(e,"error",t))},e}();function To(e,t){var n=oo(),r=n.resolve,i=n.promise,s=new XMLHttpRequest;return"string"!=typeof s.responseType?(r(null),i):(s.open("GET",e),s.responseType="blob",s.onerror=function(){r(null)},s.onload=function(){if(200!=s.status)return o("Error loading blob resource "+ur(e,t,{source:"log",type:"debug"})),void r(null);var n=s.response;if((n.size||n.length)>So){var i=ur(e,t,{source:"log",type:"bugsnag"});return Mt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:i,MaxResourceSizeBytes:So}),void r(null)}(function(e){var t=oo(),n=t.resolve,r=t.promise,i=new FileReader;return i.readAsArrayBuffer(e),i.onload=function(){n(i.result)},i.onerror=function(e){Mt.sendToBugsnag(e,"error"),n(null)},r})(n).then(function(e){r(e?{buffer:e,blob:n,contentType:n.type}:null)})},s.send(),i)}function ko(e,t){var n,r;return wo(this,void 0,et,function(){var i;return bo(this,function(o){switch(o.label){case 0:return i=e.window,(null===(r=null===(n=i.crypto)||void 0===n?void 0:n.subtle)||void 0===r?void 0:r.digest)?[4,i.crypto.subtle.digest({name:"sha-1"},t)]:[3,2];case 1:return[2,{hash:co(o.sent()),algorithm:"sha1"}];case 2:return[4,yo(e.time,so,t)];case 3:return[2,{hash:o.sent().hash,algorithm:"fsnv"}];}})})}var Io=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Co=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ro=function(){function e(e){this._byteCount=0,this._scheme=e.options.scheme,this._recHost=e.options.recHost}return e.prototype.page=function(e,t,n){this.post("/rec/page",gt(e),function(e){try{t(wt(e))}catch(e){n(0)}},function(e,t){if(t)try{return n(0,wt(t))}catch(e){}n(0)})},e.prototype.bundle=function(e){var t=gt(e.bundle);this._byteCount+=t.length,o("total bytes written: "+this._byteCount);var n=xo(e.bundle.Seq,e);return this.post(n,t,function(t){try{e.win(wt(t))}catch(n){Mt.sendToBugsnag("Failed to JSON parse /rec/bundle response","error",{rsp:t,error:n.toString()}),e.lose(0)}},e.lose),this._byteCount},e.prototype.bundleBeacon=function(e){return Mo(this._scheme,this._recHost,e)},e.prototype.exponentialBackoffMs=function(e,t){var n=s.mathMin(te.BackoffMax,5e3*s.mathPow(2,e));return t?n+.25*s.mathRandom()*n:n},e.prototype.post=function(e,t,n,r){Oo(this._scheme,this._recHost,e,t,n,r)},e}(),Ao=function(){function e(e){this._scheme=e.options.scheme,this._recHost=e.options.recHost}return e.prototype.uploadResource=function(e){var t=this;return new et(function(n,r){Oo(t._scheme,t._recHost,"/rec/uploadResource",e,n,r)})},e.prototype.queryResources=function(e){return Io(this,void 0,et,function(){var t,n,r=this;return Co(this,function(i){switch(i.label){case 0:return t=JSON.stringify(e),[4,new et(function(e,n){Oo(r._scheme,r._recHost,"/rec/queryResources",t,e,n)})];case 1:return n=i.sent(),[2,JSON.parse(n)];}})})},e}();function xo(e,t){var n="/rec/bundle?OrgId="+t.orgId+"&UserId="+t.userId+"&SessionId="+t.sessionId+"&PageId="+t.pageId+"&Seq="+e;return null!=t.serverPageStart&&(n+="&PageStart="+t.serverPageStart),null!=t.serverBundleTime&&(n+="&PrevBundleTime="+t.serverBundleTime),null!=t.lastUserActivity&&(n+="&LastActivity="+t.lastUserActivity),t.isNewSession&&(n+="&IsNewSession=true"),null!=t.deltaT&&(n+="&DeltaT="+t.deltaT),n}function Oo(e,t,n,r,i,o){var s="//"+t+n,a=!1,u=new XMLHttpRequest;if("withCredentials"in u)u.onreadystatechange=function(){if(u.readyState==fn){if(a)return;a=!0;try{200==u.status?i(u.responseText):o&&o(u.status,u.responseText)}catch(e){Mt.sendToBugsnag(e,"error")}}},u.open("POST",e+s,!0),u.withCredentials=!0,"function"!=typeof r.append&&u.setRequestHeader("Content-Type","text/plain"),u.send(r);else{var c=new XDomainRequest;c.onload=function(){i(c.responseText)},c.onerror=function(){o&&o("Not Found"==c.responseText?404:500,c.responseText)},c.onprogress=function(){},c.open("POST",s),c.send(r)}}function Mo(e,t,n){if("function"==typeof navigator.sendBeacon){var r=e+"//"+t+xo(n.bundle.Seq,n)+"&SkipResponseBody=true",i=gt(n.bundle);try{return navigator.sendBeacon(r,i)}catch(e){Mt.sendToBugsnag(e,"error",{url:r,data:i})}}return!1}var Lo=function(){function e(e,t,n){void 0===n&&(n=new Fo),this._ctx=e,this._q=t,this._matcher=n}return e.prototype.initialize=function(e){var t;if(e){this._setUrlKeeps(e);var n=null===(t=this._ctx.window.location)||void 0===t?void 0:t.href;this.onNavigate(n)}},e.prototype.onNavigate=function(e){return!!this._matcher.matches(e)&&(this._q.enqueue({Kind:R.KEEP_URL,Args:[this._scrubUrl(e)]}),!0)},e.prototype.onClick=function(e){return!(!e||!function(e){var t=xn(e);return!!t&&!0===t.matchesAnyKeepRule}(e.node))&&(this._q.enqueue({Kind:R.KEEP_ELEMENT,Args:[e.id]}),!0)},e.prototype.urlMatches=function(e){return this._matcher.matches(e)},e.prototype._setUrlKeeps=function(e){this._matcher.setRules(e)},e.prototype._scrubUrl=function(e){return ur(e,this._ctx.options.orgId,{source:"page",type:"base"})},e}(),Fo=function(){function e(){this._regexes=null}return e.prototype.setRules=function(e){var t=e.map(function(e){return e.Regex}).filter(this._isValidRegex);t.length>0&&(this._regexes=this._joinRegexes(t))},e.prototype.matches=function(e){return!!this._regexes&&this._regexes.test(e)},e.prototype._isValidRegex=function(e){try{return new RegExp(e),!0}catch(t){return Mt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:e,error:t.toString()}),!1}},e.prototype._joinRegexes=function(e){try{return new RegExp("("+e.join(")|(")+")","i")}catch(t){return Mt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:e,error:t.toString()}),null}},e}();function Po(e,t){var n=Mn(e)+" ";return e.id&&(n+="#"+e.id),n+="[src="+ur(e.src,t,{source:"log",type:"debug"})+"]"}var qo,Uo=function(e){var t=e.transport,n=e.frame,r=e.orgId,s=e.scheme,a=e.script,u=e.recHost,c=e.appHost,h=Po(n,r);o("Injecting into Frame "+h);try{if(function(e){return e.id==e.name&&No.test(e.id)}(n))return void o("Blacklisted iframe: "+h);if(function(e){if(!e.contentDocument||!e.contentWindow||!e.contentWindow.location)return!0;return function(e){return!!e.src&&"about:blank"!=e.src&&e.src.indexOf("javascript:")<0}(e)&&e.src!=e.contentWindow.location.href&&"loading"==e.contentDocument.readyState}(n))return void o("Frame not yet loaded: "+h);var d=n.contentWindow,l=n.contentDocument;if(!d||!l)return void o("Missing contentWindow or contentDocument: "+h);if(!l.head)return void o("Missing contentDocument.head: "+h);if(I(d))return void o("FS already defined in Frame contentWindow: "+h+". Ignoring.");d._fs_org=r,d._fs_script=a,d._fs_rec_host=u,d._fs_app_host=c,d._fs_debug=i(),d._fs_run_in_iframe=!0,t&&(d._fs_transport=t);var p=l.createElement("script");p.async=!0,p.crossOrigin="anonymous",p.src=s+"//"+a,"testdrive"==r&&(p.src+="?allowMoo=true"),l.head.appendChild(p)}catch(e){o("iFrame no injecty. Probably not same origin.")}},No=/^fb\d{18}$/;!function(e){e[e.NoInfoYet=1]="NoInfoYet",e[e.Enabled=2]="Enabled",e[e.Disabled=3]="Disabled"}(qo||(qo={}));var Wo=function(){function e(e,t,n,r){var i=this;this._ctx=e,this._transport=n,this._injector=r,this._bundleUploadInterval=te.DefaultBundleUploadInterval,this._iFrames=[],this._pendingChildFrameIdInits=[],this._listeners=new Ut,this._getCurrentSessionEnabled=qo.NoInfoYet,this._resourceUploadingEnabled=!1,this._tickerTasks=[],this._pendingIframes={},this._watcher=new yn,this._queue=new io(e,this._transport,function(e){for(var t=i._eventWatcher.bundleEvents(e),n=void 0;n=i._tickerTasks.pop();)n();return t},t),this._keep=new Lo(e,this._queue),this._eventWatcher=new Di(e,this._queue,this._keep,this._watcher,this._listeners,function(e){i.onFrameCreated(e)},function(e){i.beforeFrameRemoved(e)},new Eo(e,this._queue,new Ao(e))),this._consoleWatcher=new Ji(e,this._queue,this._listeners),this._scheme=e.options.scheme,this._script=e.options.script,this._recHost=e.options.recHost,this._appHost=e.options.appHost,this._orgId=e.options.orgId,this._wnd=e.window}return e.prototype.bundleUploadInterval=function(){return this._bundleUploadInterval},e.prototype.start=function(e,t){var n=this;this._onFullyStarted=t,"onpagehide"in this._wnd?this._listeners.add(this._wnd,"pagehide",!1,function(e){n.onUnload()}):this._listeners.add(this._wnd,"unload",!1,function(e){n.onUnload()}),this._listeners.add(this._wnd,"message",!1,function(e){if("string"==typeof e.data){var t=e.source;n.postMessageReceived(t,Bo(e.data))}});var r=this._wnd.Document?this._wnd.Document.prototype:this._wnd.document;this._docCloseHook=Tt(r,"close"),this._docCloseHook&&this._docCloseHook.afterAsync(function(){n._listeners.refresh()})},e.prototype.queue=function(){return this._queue},e.prototype.eventWatcher=function(){return this._eventWatcher},e.prototype.console=function(){return this._consoleWatcher},e.prototype.onDomLoad=function(){this._eventWatcher.onDomLoad()},e.prototype.onLoad=function(){this._eventWatcher.onLoad()},e.prototype.shutdown=function(e){this._eventWatcher.shutdown(e),this._consoleWatcher.disable(),this._listeners&&this._listeners.clear(),this._docCloseHook&&this._docCloseHook.disable(),this.tellAllFramesTo(["ShutdownFrame"])},e.prototype.tellAllFramesTo=function(e){for(var t=0;t<this._iFrames.length;t++){var n=this._iFrames[t];n.contentWindow&&Do(n.contentWindow,e)}},e.prototype.getCurrentSessionURL=function(e){var t=this._getCurrentSessionEnabled;if(t==qo.NoInfoYet)return null;if(t==qo.Disabled)return this._scheme+"//"+this._appHost+"/opt/upgrade";var n=this.getCurrentSession();return n?(e&&(n+=":"+this._ctx.time.wallTime()),this._scheme+"//"+this._appHost+"/ui/"+this._ctx.options.orgId+"/session/"+encodeURIComponent(n)):null},e.prototype.getCurrentSession=function(){var e=this._getCurrentSessionEnabled;return e==qo.NoInfoYet||e==qo.Disabled?null:this._userId?this._userId+":"+this._sessionId:null},e.prototype.setConsent=function(e){var t=this,n=function(){t._watcher.setConsent(e),t._queue.processEvents()},r=function(){t._queue.enqueue({Kind:R.SYS_SETCONSENT,Args:[e,K.Document]})};switch(e){case j.GrantConsent:r(),n();break;case j.RevokeConsent:n(),r();}this.tellAllFramesTo(["SetConsent",e])},e.prototype.pageSignature=function(){return this._userId+":"+this._sessionId+":"+this._pageId},e.prototype.fireFsReady=function(e){void 0===e&&(e=!1);var t=this._wnd._fs_ready;if(t)try{e?t(!0):t()}catch(e){o("exception in _fs_ready(): "+e)}},e.prototype.onUnload=function(){this._queue.addUnload(V.Unload),Zt.stopAll()},e.prototype.handleResponse=function(e){var t=e.Flags,n=t.AjaxFetch,r=t.AjaxWatcher,i=t.ConsoleWatcher,o=t.GetCurrentSession,s=t.WatchStrategy,a=t.ResourceUploading,u=t.WhitelistElements;this._pageRsp=e,this._userId=e.UserIntId,this._sessionId=e.SessionIntId,this._pageId=e.PageIntId,this._serverPageStart=e.PageStart,this._getCurrentSessionEnabled=o?qo.Enabled:qo.Disabled,"number"==typeof e.BundleUploadInterval&&(this._bundleUploadInterval=e.BundleUploadInterval),a&&this.enableResourceUploading(),r&&this.enableAjaxWatcher(!!n),i&&this.enableConsoleWatcher(),r&&e.AjaxWatches&&this._eventWatcher.ajaxWatcher().setWatches(e.AjaxWatches),this._watcher.initialize({blocks:e.ElementBlocks,keeps:e.ElementKeeps,watches:e.ElementWatches,flags:{whitelist:!!u,watchStrategy:null!=s?s:"matches"}}),this._keep.initialize(e.UrlKeeps),this._watcher.initializeConsent(!!e.Consented)},e.prototype.fullyStarted=function(){this._onFullyStarted()},e.prototype.enableResourceUploading=function(){this._resourceUploadingEnabled=!0,this._eventWatcher.initResourceUploading()},e.prototype.enableAjaxWatcher=function(e){this.eventWatcher().ajaxWatcher().enable(e)},e.prototype.enableConsoleWatcher=function(){this.console().enable()},e.prototype.flushPendingChildFrameInits=function(){if(this._pendingChildFrameIdInits.length>0){for(var e=0;e<this._pendingChildFrameIdInits.length;e++)this._pendingChildFrameIdInits[e]();this._pendingChildFrameIdInits=[]}},e.prototype.inject=function(e){var t=this;this._ctx.measurer.requestMeasureTask(function(){i()&&o("Injecting into a "+("none"!==getComputedStyle(e,null).display?"hidden":"visible")+" iframe: "+Po(e,t._orgId));var n={send:function(n,r,i){et.resolve().then(Mt.wrap(function(){t.postMessageReceived(e.contentWindow,[n,s.jsonParse(r),i])}))}};t._injector({frame:e,transport:n,orgId:t._orgId,scheme:t._scheme,script:t._script,recHost:t._recHost,appHost:t._appHost})})},e.prototype.onFrameCreated=function(e){var t=Mn(e);if(t){this._iFrames.push(e);var n=!1;if(e.contentWindow)try{n=!!I(e.contentWindow)}catch(e){n=!0}var r=function(e){var t=e.src,n=location.protocol+"//"+location.host;return!t||"about:blank"==t||ct(t,"javascript:")||ct(t,n)}(e),i=e.contentWindow&&e.contentWindow.postMessage;r&&!n||!i?r?this.initSameOriginIframe(e):o("Frame Doesn't need injecting. Probably cross domain "+Po(e,this._orgId)):this.initCrossOriginIframe(e,t)}else o("fsid missing or invalid for iFrame "+Po(e,this._orgId))},e.prototype.initCrossOriginIframe=function(e,t){var n=this;e.contentWindow&&e.contentWindow.postMessage?(o("Cross-origin iframe "+Po(e,this._orgId)),Do(e.contentWindow,["GreetFrame"]),i()&&(this._pendingIframes[t]=!0,setTimeout(function(){n._pendingIframes[t]&&o("iframe "+e.src+" is unresponsive")},5e3))):o("No content window on init of cross-origin iframe "+Po(e,this._orgId))},e.prototype.initSameOriginIframe=function(e){var t=this;o("Attempting to setup Frame "+Po(e,this._orgId)),this.inject(e),e.addEventListener("load",Mt.wrap(function(n){o("onload for frame "+Po(e,t._orgId)),t.inject(e)}))},e.prototype.beforeFrameRemoved=function(e){for(var t=0;t<this._iFrames.length;t++){if(e==this._iFrames[t])return void this._iFrames.splice(t,1)}},e.prototype.postMessageReceived=function(e,t){if(!e||e.parent==this._wnd)switch(t[0]){case"EvtBundle":var n=t[1],r=this.pageSignature(),i=t[2];if(r!=i)return Mt.sendToBugsnag("Page signature mismatch","warning",{pageSignature:r,messageSignature:i}),void(e&&Do(e,["ShutdownFrame"]));n.length>0&&this._transport.enqueueEvents(r,n);break;case"RequestFrameId":if(!e)return void o("No MessageEvent.source, iframe may have unloaded.");var s=this.iFrameWndToFsId(e);s?(o("Responding to FID request for frame "+s),this._pendingIframes[s]=!1,this.sendFrameIdToInnerFrame(e,s)):o("No FrameId found. Hoping to send one later.");}},e.prototype.sendFrameIdToInnerFrame=function(e,t){var n=this,r=function(){var r=[];0!=n._frameId&&(r=n._parentIds?n._parentIds.concat(n._frameId):[n._frameId]);var i=n._ctx.time.startTime();Do(e,["SetFrameId",t,r,i,n._scheme,n._script,n._appHost,n._orgId,n._pageRsp])};null==this._frameId?this._pendingChildFrameIdInits.push(r):r()},e.prototype.iFrameWndToFsId=function(e){for(var t=0;t<this._iFrames.length;t++)if(this._iFrames[t].contentWindow==e)return Mn(this._iFrames[t]);return o("Unable to locate frame for window"),NaN},e}();function Do(e,t){e&&e.postMessage&&e.postMessage(gt({__fs:t}),"*")}function Bo(e){try{var t=wt(e);if("__fs"in t)return t.__fs}catch(e){}return[]}function Ho(e){return e>=400&&502!==e||202==e||206==e}var jo=function(){return(jo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ko=function(){function e(e,t,n,r){void 0===r&&(r=tn),this._ctx=e,this._protocol=t,this._identity=n,this._timeoutFactory=r,this._recover()}return e.prototype.sing=function(e){o("Saving "+e.bundles.length+" bundles in swan-song.");var t=gt({OrgId:this._identity.orgId(),UserId:this._identity.userId(),SessionId:this._identity.sessionId(),PageId:e.pageId,Bundles:e.bundles,PageStartTime:this._ctx.time.startTime(),LastBundleTime:e.lastBundleTime,ServerPageStart:e.serverPageStart,ServerBundleTime:e.serverBundleTime,IsNewSession:e.isNewSession});if(!(t.length>2e6))try{localStorage._fs_swan_song=t}catch(e){}},e.prototype._recover=function(){try{if("_fs_swan_song"in localStorage){var e=localStorage._fs_swan_song||localStorage.singSwanSong;delete localStorage._fs_swan_song,delete localStorage.singSwanSong;var t=wt(e);if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return void o("Malformed swan song found. Ignoring it.");t.OrgId||(t.OrgId=this._identity.orgId()),t.Bundles.length>0&&(o("Sending "+t.Bundles.length+" bundles as prior page swan song"),this.sendSwanSongBundles(t))}}catch(e){o("Error recovering swan-song: "+e)}},e.prototype.sendSwanSongBundles=function(e,t){var n=this;void 0===t&&(t=0);var r=null;if(nt(e.Bundles)&&0!==e.Bundles.length&&void 0!==e.Bundles[0]){1==e.Bundles.length&&(r=this._ctx.time.wallTime()-(e.LastBundleTime||0));this._protocol.bundle({bundle:e.Bundles[0],deltaT:r,orgId:e.OrgId,pageId:e.PageId,serverBundleTime:e.ServerBundleTime,serverPageStart:e.ServerPageStart,sessionId:e.SessionId,userId:e.UserId,isNewSession:e.IsNewSession,win:function(t){o("Sent "+e.Bundles[0].Evts.length+" trailing events from last session as Seq "+e.Bundles[0].Seq),e.Bundles.shift(),e.Bundles.length>0?n.sendSwanSongBundles(jo(jo({},e),{ServerBundleTime:t.BundleTime})):o("Done with prior page swan song")},lose:function(r){Ho(r)?o("Fatal error while sending events, giving up"):(o("Failed to send events from last session, will retry while on this page"),n._lastSwanSongRetryTimeout=new n._timeoutFactory(n.sendSwanSongBundles,n._protocol.exponentialBackoffMs(t,!0),n,e,t+1).start())}})}},e}(),Vo=function(){function e(e,t,n,r){var i=this;void 0===t&&(t=new Ro(e)),void 0===n&&(n=en),void 0===r&&(r=tn),this._ctx=e,this._protocol=t,this._tickerFactory=n,this._backoffRetries=0,this._backoffTime=0,this._bundleSeq=1,this._lastPostTime=0,this._serverBundleTime=0,this._isNewSession=!1,this._largePageSize=16e6,this._outgoingEventQueue=[],this._bundleQueue=[],this._hibernating=!1,this._heartbeatInterval=0,this._lastUserActivity=this._ctx.time.wallTime(),this._finished=!1,this._scheme=e.options.scheme,this._identity=e.recording.identity,this._lastBundleTime=e.time.wallTime(),this._swanSong=new Ko(e,this._protocol,this._identity,r),this._heartbeatTimeout=new r(function(){i.onHeartbeat()}),this._hibernationTimeout=new r(function(){i.onHibernate()},te.PageInactivityTimeout)}return e.prototype.onShutdown=function(e){this._onShutdown=e},e.prototype.scheme=function(){return this._scheme},e.prototype.enqueueEvents=function(e,t){if(this.maybeHibernate(),this._hibernating){if(this._finished)return;for(var n=0,r=t;n<r.length;n++){if(re((u=r[n]).Kind)){this._ctx.recording.splitPage(V.Hibernation),this._finished=!0;break}}}else{for(var i=0,o=t;i<o.length;i++){if(re((u=o[i]).Kind)){this._hibernationTimeout.start(),this._heartbeatInterval=te.HeartbeatInitial,this._heartbeatTimeout.start(this._heartbeatInterval),this._lastUserActivity=this._ctx.time.wallTime();break}}for(var s=0,a=t;s<a.length;s++){var u=a[s];this._outgoingEventQueue.push(u)}}},e.prototype.initUploadTicker=function(){this._uploadTicker=new this._tickerFactory(this._ctx.recording.bundleUploadInterval())},e.prototype.startPipeline=function(e){var t=this;this._pageId=e.pageId,this._serverPageStart=e.serverPageStart,this._isNewSession=e.isNewSession,this.enqueueAndSendBundle(),this._uploadTicker||this.initUploadTicker(),this._uploadTicker.start(function(){t.enqueueAndSendBundle()}),this._heartbeatInterval=te.HeartbeatInitial,this._heartbeatTimeout.start(this._heartbeatInterval),this._hibernationTimeout.start()},e.prototype.stopPipeline=function(){this._uploadTicker&&this._uploadTicker.stop(),this._outgoingEventQueue=[],this._bundleQueue=[],this._hibernationTimeout.stop(),this._heartbeatTimeout.stop()},e.prototype.flush=function(){this.maybeSendNextBundle()},e.prototype.singSwanSong=function(){if(!this._hibernating&&(this._outgoingEventQueue.length>0&&this.enqueueNextBundle(!0),this._bundleQueue.length>0||this._pendingBundle)){var e=this._bundleQueue.concat();this._pendingBundle&&e.unshift(this._pendingBundle),this._swanSong.sing({pageId:this._pageId,bundles:e,lastBundleTime:this._lastBundleTime,serverPageStart:this._serverPageStart,serverBundleTime:this._serverBundleTime,isNewSession:this._isNewSession})}},e.prototype.maybeHibernate=function(){this._hibernating||this.calcLastUserActivityDuration()>=te.PageInactivityTimeout+5e3&&this.onHibernate()},e.prototype.calcLastUserActivityDuration=function(){return s.mathFloor(this._ctx.time.wallTime()-this._lastUserActivity)},e.prototype.onHeartbeat=function(){var e=this.calcLastUserActivityDuration();this._outgoingEventQueue.push({When:this._ctx.time.now(),Kind:R.HEARTBEAT,Args:[e]}),this._heartbeatInterval*=2,this._heartbeatInterval>te.HeartbeatMax&&(this._heartbeatInterval=te.HeartbeatMax),this._heartbeatTimeout.start(this._heartbeatInterval)},e.prototype.onHibernate=function(){this._hibernating||(this.calcLastUserActivityDuration()<=2*te.PageInactivityTimeout&&(this._outgoingEventQueue.push({When:this._ctx.time.now(),Kind:R.UNLOAD,Args:[V.Hibernation]}),this.singSwanSong()),this.stopPipeline(),this._hibernating=!0)},e.prototype.enqueueAndSendBundle=function(){this._pendingBundle?this._pendingBundleFailed&&this._sendPendingBundle():0!=this._outgoingEventQueue.length?this.enqueueNextBundle():this.maybeSendNextBundle()},e.prototype.enqueueNextBundle=function(e){void 0===e&&(e=!1);var t={When:this._outgoingEventQueue[0].When,Seq:this._bundleSeq++,Evts:this._outgoingEventQueue};this._outgoingEventQueue=[],this._bundleQueue.push(t),e?this._protocol.bundleBeacon({bundle:t,deltaT:null,orgId:this._identity.orgId(),pageId:this._pageId,serverBundleTime:this._serverBundleTime,serverPageStart:this._serverPageStart,isNewSession:this._isNewSession,sessionId:this._identity.sessionId(),userId:this._identity.userId(),win:function(){},lose:function(){}}):this.maybeSendNextBundle()},e.prototype.maybeSendNextBundle=function(){this._pageId&&this._serverPageStart&&!this._pendingBundle&&0!=this._bundleQueue.length&&(this._pendingBundle=this._bundleQueue.shift(),this._sendPendingBundle())},e.prototype._sendPendingBundle=function(){var e=this,t=this._ctx.time.wallTime();if(!(t<this._backoffTime)){var n=this._pendingBundle;n&&(this._pendingBundleFailed=!1,this._lastPostTime=this._lastBundleTime=t,this.sendBundle(n,function(t){o("Sent bundle "+n.Seq+" with "+n.Evts.length+" events"),e._serverBundleTime=t.BundleTime,e._pendingBundle=null,e._backoffTime=0,e._backoffRetries=0,e._ctx.time.wallTime()-e._lastPostTime>e._ctx.recording.bundleUploadInterval()&&e.maybeSendNextBundle()},function(t){if(o("Failed to send events."),Ho(t))return 206==t?Mt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):t>=500&&Mt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),void(e._onShutdown&&e._onShutdown());e._pendingBundleFailed=!0,e._backoffTime=e._lastPostTime+e._protocol.exponentialBackoffMs(e._backoffRetries++,!1)}))}},e.prototype.sendBundle=function(e,t,n){var r=s.mathFloor(this._ctx.time.wallTime()-this._lastUserActivity),i=this._protocol.bundle({bundle:e,deltaT:null,lastUserActivity:r,orgId:this._identity.orgId(),pageId:this._pageId,serverBundleTime:this._serverBundleTime,serverPageStart:this._serverPageStart,isNewSession:this._isNewSession,sessionId:this._identity.sessionId(),userId:this._identity.userId(),win:t,lose:n});i>this._largePageSize&&this._bundleSeq>16&&(o("splitting large page: "+i),this._ctx.recording.splitPage(V.Size))},e}(),zo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yo=function(e){function t(t,n,r,i,o){void 0===r&&(r=new Vo(t,n)),void 0===i&&(i=en),void 0===o&&(o=Uo);var s,a,u=e.call(this,t,i,r,o)||this;return u._protocol=n,u._domLoaded=!1,u._recordingDisabled=!1,u._integrationScriptFetched=!1,r.onShutdown(function(){return u.shutdown(V.SettingsBlocked)}),u._doc=u._wnd.document,u._frameId=0,u._identity=t.recording.identity,u._getCurrentSessionEnabled=qo.NoInfoYet,s=u._wnd,a=function(e){if(u._eventWatcher.shutdown(V.Api),e){var t=u._doc.getElementById(e);t&&t.setAttribute("_fs_embed_token",u._embedToken)}},s._fs_shutdown=a,u}return zo(t,e),t.prototype.onDomLoad=function(){var t=this;e.prototype.onDomLoad.call(this),this._domLoaded=!0,this.injectIntegrationScript(function(){t.fireFsReady(t._recordingDisabled)})},t.prototype.getReplayFlags=function(){var e=U(this._wnd);if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(e+=",forceSession",this._wnd.history)){var t=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(e,t,n){return n?t:""});this._wnd.history.replaceState({},"",this._wnd.location.href.replace(location.search,t))}return e},t.prototype.start=function(t,n){var r,i,o,s=this;e.prototype.start.call(this,t,n);var a=this.getReplayFlags(),u=Vt(this._doc),c=u[0],h=u[1],d=bt(this._wnd),l=d[0],p=d[1],f="";t||(f=this._identity.userId());var v=null!==(o=null===(i=null===(r=this._ctx)||void 0===r?void 0:r.recording)||void 0===i?void 0:i.preroll)&&void 0!==o?o:-1,_=ur(Jn(this._wnd),this._orgId,{source:"page",type:"base"}),g=ur(this._doc.referrer,this._orgId,{source:"page",type:"referrer"}),m=ur(this._wnd.location.href,this._orgId,{source:"page",type:"url"}),y={OrgId:this._orgId,UserId:f,Url:m,Base:_,Width:c,Height:h,ScreenWidth:l,ScreenHeight:p,Referrer:g,Preroll:v,Doctype:yt(this._doc),CompiledTimestamp:1591209308,AppId:this._identity.appId()};a&&(y.ReplayFlags=a),this._protocol.page(y,function(e){s.handleResponse(e),s.handleIdentity(e.CookieDomain,e.UserIntId,e.SessionIntId,e.PageIntId,e.EmbedToken),s.handleIntegrationScript(e.IntegrationScript),e.PreviewMode&&s.maybeInjectPreviewScript();var t=s._wnd._fs_pagestart;t&&t();var n=!!e.Consented;s._queue.enqueueFirst({Kind:R.SYS_REPORTCONSENT,Args:[n,K.Document]}),s._queue.enqueueFirst({Kind:R.SET_FRAME_BASE,Args:[ur(Jn(s._wnd),s._orgId,{source:"event",type:R.SET_FRAME_BASE}),yt(s._doc)]}),s._queue.startPipeline({pageId:e.PageIntId,serverPageStart:e.PageStart,isNewSession:!!e.IsNewSession}),s.fullyStarted()},function(e,t){t&&t.user_id&&t.cookie_domain&&t.reason_code==$.ReasonBlockedTrafficRamping&&f!=t.user_id&&s.handleIdentity(t.cookie_domain,t.user_id,"","",""),s.disableBecauseRecPageSaidSo()})},t.prototype.handleIntegrationScript=function(e){var t=this;this._integrationScriptFetched=!0,this._integrationScript=e,this.injectIntegrationScript(function(){t.fireFsReady(t._recordingDisabled)})},t.prototype.handleIdentity=function(e,t,n,r,i){var s=this._identity;s.setIds(this._wnd,e,t,n),this._embedToken=i,o("/User,"+s.userId()+"/Session,"+s.sessionId()+"/Page,"+r)},t.prototype.injectIntegrationScript=function(e){if(this._domLoaded&&this._integrationScriptFetched)if(this._integrationScript){var t=this._doc.createElement("script");this._wnd._fs_csp?(t.addEventListener("load",e),t.addEventListener("error",e),t.async=!0,t.src=this._scheme+"//"+this._recHost+"/rec/integrations?OrgId="+this._orgId,this._doc.head.appendChild(t)):(t.text=this._integrationScript,this._doc.head.appendChild(t),e())}else e()},t.prototype.maybeInjectPreviewScript=function(){if(!this._doc.getElementById("FullStory-preview-script")){var e=this._doc.createElement("script");e.id="FullStory-preview-script",e.async=!0,e.src=this._scheme+"//"+this._appHost+"/s/fspreview.js",this._doc.head.appendChild(e)}},t.prototype.disableBecauseRecPageSaidSo=function(){this.shutdown(V.SettingsBlocked),o("Disabling FS."),this._recordingDisabled=!0,this.fireFsReady(this._recordingDisabled)},t}(Wo),Go=function(){function e(e,t){void 0===t&&(t=new Qo(e)),this._wnd=e,this._messagePoster=t}return e.prototype.enqueueEvents=function(e,t){this._messagePoster.postMessage(this._wnd.parent,"EvtBundle",t,e)},e.prototype.startPipeline=function(){},e.prototype.stopPipeline=function(){},e.prototype.flush=function(){},e.prototype.singSwanSong=function(){},e.prototype.onShutdown=function(e){},e}(),Qo=function(){function e(e){this.wnd=e}return e.prototype.postMessage=function(e,t,n,r){var i=N(this.wnd);if(i)try{i.send(t,gt(n),r)}catch(e){i.send(t,gt(n))}else e.postMessage(function(e,t,n){var r=[e,t];n&&r.push(n);return gt({__fs:r})}(t,n,r),"*")},e}();var Xo,Jo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$o=function(e){function t(t,n,r,i,o){void 0===n&&(n=new Qo(t.window)),void 0===r&&(r=new Go(t.window)),void 0===i&&(i=en),void 0===o&&(o=Uo);var s=e.call(this,t,i,r,o)||this;return s._messagePoster=n,s}return Jo(t,e),t.prototype.start=function(t,n){var r=this;e.prototype.start.call(this,t,n),this.sendRequestForFrameId(),this._listeners.add(this._wnd,"load",!1,function(){r._eventWatcher.recordingIsDetached()&&(o("Recording wrong document. Restarting recording in iframe."),r._ctx.recording.splitPage(V.FsShutdownFrame))})},t.prototype.postMessageReceived=function(t,n){if(e.prototype.postMessageReceived.call(this,t,n),t==this._wnd.parent||t==this._wnd)switch(n[0]){case"GreetFrame":this.sendRequestForFrameId();break;case"SetFrameId":try{var r=n[1],i=n[2],s=n[3],a=n[4],u=n[5],c=n[6],h=n[7],d=n[8];if(!r)return void o("Outer page gave us a bogus frame Id! Iframe: "+ur(location.href,h,{source:"log",type:"debug"}));this.setFrameIdFromOutside(r,i,s,a,u,c,h,d)}catch(e){o("Failed to parse frameId from message: "+gt(n))}break;case"SetConsent":var l=n[1];this.setConsent(l);break;case"InitFrameMobile":try{var p=JSON.parse(n[1]),f=p.StartTime;if(n.length>2){var v=n[2];if(v.hasOwnProperty("ProtocolVersion"))v.ProtocolVersion>=20180723&&v.hasOwnProperty("OuterStartTime")&&(f=v.OuterStartTime)}var _=p.Host;this.setFrameIdFromOutside(0,[],f,"https:",H(_),B(_),p.OrgId,p.PageResponse)}catch(e){o("Failed to initialize mobile web recording from message: "+gt(n))}}},t.prototype.sendRequestForFrameId=function(){this._frameId||(0!=this._frameId?this._wnd.parent?(o("Asking for a frame ID."),this._messagePoster.postMessage(this._wnd.parent,"RequestFrameId",[])):o("Orphaned window."):o("For some reason the outer window attempted to request a frameId"))},t.prototype.setFrameIdFromOutside=function(e,t,n,r,i,s,a,u){if(this._frameId)this._frameId!=e?(o("Updating frame id from "+this._frameId+" to "+e),this._ctx.recording.splitPage(V.FsShutdownFrame)):o("frame Id is already set to "+this._frameId);else{o("FrameId received within frame "+ur(location.href,a,{source:"log",type:"debug"})+": "+e),this._scheme=r,this._script=i,this._appHost=s,this._orgId=a,this._frameId=e,this._parentIds=t,this.handleResponse(u),this.fireFsReady();var c=!!u.Consented;this._queue.enqueueFirst({Kind:R.SYS_REPORTCONSENT,Args:[c,K.Document]}),this._queue.enqueueFirst({Kind:R.SET_FRAME_BASE,Args:[ur(Jn(this._wnd),a,{source:"event",type:R.SET_FRAME_BASE}),yt(this._wnd.document)]}),this._queue.rebaseIframe(n),this._ctx.time.setStartTime(n),this._queue.startPipeline({pageId:this._pageId,serverPageStart:u.PageStart,isNewSession:!!u.IsNewSession,frameId:e,parentIds:t}),this.flushPendingChildFrameInits(),this.fullyStarted()}},t}(Wo),Zo="fsidentity",es="newuid",ts=function(){function e(e,t){void 0===e&&(e=document),void 0===t&&(t=function(){}),this._doc=e,this._onWriteFailure=t,this._cookies={},this._appId=void 0}return e.prototype.initFromCookies=function(e,t){this._cookies=y(this._doc);var n=this._cookies.fs_uid;if(!n)try{n=localStorage._fs_uid}catch(e){}var r=m(n);r&&r.host.replace(/^www\./,"")==e.replace(/^www\./,"")&&r.orgId==t?this._cookie=r:this._cookie={expirationAbsTimeSeconds:g(),host:e,orgId:t,userId:"",sessionId:"",appKeyHash:""}},e.prototype.initFromParsedCookie=function(e){this._cookie=e},e.prototype.clear=function(){this._cookie.userId=this._cookie.sessionId=this._cookie.appKeyHash=this._appId="",this._cookie.expirationAbsTimeSeconds=g(),this._write()},e.prototype.host=function(){return this._cookie.host},e.prototype.orgId=function(){return this._cookie.orgId},e.prototype.userId=function(){return this._cookie.userId},e.prototype.sessionId=function(){return this._cookie.sessionId},e.prototype.appKeyHash=function(){return this._cookie.appKeyHash},e.prototype.cookieData=function(){return this._cookie},e.prototype.cookies=function(){return this._cookies},e.prototype.setCookie=function(e,t,n){void 0===n&&(n=new Date(p()+6048e5).toUTCString());var r=e+"="+t;this._domain?r+="; domain=."+encodeURIComponent(this._domain):r+="; domain=",r+="; Expires="+n+"; path=/; SameSite=Strict","https:"===location.protocol&&(r+="; Secure"),this._doc.cookie=r},e.prototype.setIds=function(e,t,n,r){(C(t)||t.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(t="");var i=function(e){return e._fs_cookie_domain}(e);"string"==typeof i&&(t=i),this._domain=t,this._cookie.userId=n,this._cookie.sessionId=r,this._write()},e.prototype.clearAppId=function(){return!!this._cookie.appKeyHash&&(this._appId="",this._cookie.appKeyHash="",this._write(),!0)},e.prototype.setAppId=function(e){this._appId=e,this._cookie.appKeyHash=uo(e),this._write()},e.prototype.appId=function(){return this._appId},e.prototype.encode=function(){var e=this._cookie.host+"#"+this._cookie.orgId+"#"+this._cookie.userId+":"+this._cookie.sessionId;return this._cookie.appKeyHash&&(e+="#"+encodeURIComponent(this._cookie.appKeyHash)+"#"),e+="/"+this._cookie.expirationAbsTimeSeconds},e.prototype._write=function(){if(null!=this._domain){var e=this.encode(),t=new Date(1e3*this._cookie.expirationAbsTimeSeconds).toUTCString();this.setCookie("fs_uid",e,t);var n=[];-1===this._doc.cookie.indexOf(e)&&n.push(["fs_uid","cookie"]);try{localStorage._fs_uid=e,localStorage._fs_uid!==e&&n.push(["fs_uid","localStorage"])}catch(e){n.push(["fs_uid","localStorage",String(e)])}n.length>0&&this._onWriteFailure(n)}},e}();!function(e){e.rec="rec",e.user="user",e.account="account",e.consent="consent",e.customEvent="event",e.log="log"}(Xo||(Xo={}));var ns={acctId:"str",displayName:"str",website:"str"},rs={uid:"str",displayName:"str",email:"str"},is={str:os,bool:ss,real:as,"int":us,date:cs,strs:hs(os),bools:hs(ss),reals:hs(as),ints:hs(us),dates:hs(cs),objs:hs(ds),obj:ds};function os(e){return"string"==typeof e}function ss(e){return"boolean"==typeof e}function as(e){return"number"==typeof e}function us(e){return"number"==typeof e&&e-s.mathFloor(e)==0}function cs(e){return!!e&&(e.constructor===Date?!isNaN(e):("number"==typeof e||"string"==typeof e)&&!isNaN(new Date(e)))}function hs(e){return function(t){if(!(t instanceof Array))return!1;for(var n=0;n<t.length;n++)if(!e(t[n]))return!1;return!0}}function ds(e){return!!e&&"object"==typeof e}var ls=/^[a-zA-Z][a-zA-Z0-9_]*$/,ps=function(){function e(e){this._identity=e}return e.prototype.identity=function(){return this._identity},e.prototype.api=function(e,t,n){var r=!1,i=[];try{switch(e){case Xo.account:i.push.apply(i,this.rawEventsFromApi(X.Account,ns,t,n));break;case Xo.user:if("object"!=typeof t)o("Expected argument of type 'object' instead got type: '"+typeof t+"', value: "+gt(t));else if("uid"in t){var a=t.uid;if(!1===a)this._identity.clearAppId()&&(r=!0),delete t.uid;else{var u=function(e,t){"number"==typeof e&&s.mathFloor(e)==e&&(o("Expected appId of type 'string' instead got value: "+e+" of type: "+typeof e),e=""+e);if("string"!=typeof e)return o("blocking FS.identify API call; uid value ("+e+") must be a string"),[void 0,Zo];var n=e.trim();if(f.indexOf(n.toLowerCase())>=0)return o("blocking FS.identify API call; uid value ("+n+") is illegal"),[void 0,Zo];var r=uo(n),i=void 0;t&&t._cookie.appKeyHash&&t._cookie.appKeyHash!==r&&t._cookie.appKeyHash!==n&&(o("user re-identified; existing uid hash ("+t._cookie.appKeyHash+") does not match provided uid ("+n+")"),i=es);return[n,i]}(a,this._identity),c=u[0],h=u[1];if(!c){switch(h){case Zo:case void 0:break;default:o("unexpected failReason returned from setAppId: "+h);}return{events:i}}t.uid=c,this._identity.setAppId(t.uid),h==es&&(r=!0)}}i.push.apply(i,this.rawEventsFromApi(X.User,rs,t,n));break;case Xo.customEvent:var d=t.n,l=t.p;i.push.apply(i,this.rawEventsFromApi(X.Event,{},l,n,d));break;default:o("invalid operation \""+e+"\"; only \"rec\", \"account\", and \"user\" are supported at present");}}catch(t){o("unexpected exception handling "+e+" API call: "+t.message)}return{events:i,reidentify:r}},e.prototype.rawEventsFromApi=function(e,t,n,r,i){var a=function e(t,n,r){var i={PayloadToSend:{},ValidationErrors:[]},a=function(r){var o=e(t,n,r);return i.ValidationErrors=i.ValidationErrors.concat(o.ValidationErrors),o.PayloadToSend};return ht(r,function(e,r){var u=function(e,t,n,r){var i=t,a=typeof n;if("undefined"===a)return o("Cannot infer type of "+a+" "+n),r.push({Type:"vartype",FieldName:t,ValueType:a+" (unsupported)"}),null;if(s.objectHasOwnProp(e,t))return{name:t,type:e[t]};var u=t.lastIndexOf("_");if(-1==u||!vs(t.substring(u+1))){var c=function(e){for(var t in is)if(is[t](e))return t;return null}(n);if(null==c)return o("Cannot infer type of "+a+" "+n),n?r.push({Type:"vartype",FieldName:t}):r.push({Type:"vartype",FieldName:t,ValueType:"null (unsupported)"}),null;u=t.length,o("Warning: Inferring user variable \""+t+"\" to be of type \""+c+"\""),t=t+"_"+c}var h=[t.substring(0,u),t.substring(u+1)],d=h[0],l=h[1];if("object"===a&&!n)return o("null is not a valid object type"),r.push({Type:"vartype",FieldName:i,ValueType:"null (unsupported)"}),null;if(!ls.test(d)){d=d.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(d[0])&&(d=d.substring(1)),r.push({Type:"varname",FieldName:i});var p=d+"_"+l;if(o("Warning: variable \""+i+"\" has invalid characters. It should match /"+ls.source+"/. Converted name to \""+p+"\"."),""==d)return null;t=p}if(!vs(l))return o("Variable \""+i+"\" has invalid type \""+l+"\""),r.push({Type:"varname",FieldName:i}),null;if(!function(e,t){return is[e](t)}(l,n))return o("illegal value "+gt(n)+" for type "+l),"number"===a?a=n%1==0?"integer":"real":"object"==a&&null!=n&&n.constructor==Date&&(a=isNaN(n)?"invalid date":"date"),r.push({Type:"vartype",FieldName:i,ValueType:a}),null;return{name:t,type:l}}(n,r,e,i.ValidationErrors);if(u){var c=u.name,h=u.type;if("obj"!=h){if("objs"!=h){var d,l;i.PayloadToSend[c]=fs(h,e)}else{t!=X.Event&&i.ValidationErrors.push({Type:"vartype",FieldName:c,ValueType:"Array<Object> (unsupported)"});for(var p=e,f=[],v=0;v<p.length;v++){(_=a(p[v]))&&f.push(_)}f.length>0&&(i.PayloadToSend[c]=f)}}else{var _=a(e),g=(l="_obj").length>(d=r).length||d.substring(d.length-l.length)!=l?c.substring(0,c.length-"_obj".length):c;i.PayloadToSend[g]=_}}else i.PayloadToSend[r]=fs("",e)}),i}(e,t,n),u=[],c=e==X.Event,h=gt(a.PayloadToSend),d=!!r&&"fs"!==r;return c?u.push({When:0,Kind:R.SYS_CUSTOM,Args:d?[i,h,r]:[i,h]}):u.push({When:0,Kind:R.SYS_SETVAR,Args:d?[e,h,r]:[e,h]}),u},e}();function fs(e,t){return"str"==e&&null!=t&&(t=t.trim()),null==t||"date"!=e&&t.constructor!=Date||(t=function(e){var t,n=e.constructor===Date?e:new Date(e);try{t=n.toISOString()}catch(e){t=null}return t}(t)),t}function vs(e){return!!is[e]}var _s=function(){return(_s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},gs=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},ms=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function ys(e,t){return gs(this,void 0,et,function(){var n,r,i,s,u;return ms(this,function(c){switch(c.label){case 0:if(c.trys.push([0,2,,3]),ae||ce)return[2,_s(_s({},t),{status:1})];if(!e.document||0!==t.status)return[2,t];if(1===(n=function(e,t){var n=t.functions,r={},i=_s({},t.helpers);if(i.functionToString=function(e,t){var n,r,i=null===(n=e["__core-js_shared__"])||void 0===n?void 0:n.inspectSource;if(bs(i,1))return function(){return i(this)};var o=null===(r=e["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(bs(o))return o;var s=t.__zone_symbol__OriginalDelegate;if(bs(s))return s;if(bs(t))return t;return}(e,i.functionToString),!i.functionToString)return t;var o=!1;for(var s in n)if(n[s]){if(r[s]=Ts(i.functionToString,n[s]),r[s]||(r[s]=ks(i.functionToString,i,s)),!r[s])return t;r[s]!==n[s]&&(o=!0)}else r[s]=void 0;return{status:1,functions:o?r:n,helpers:i}}(e,t)).status)return[2,n];o("The window is dirty; rebuilding Windex from a fresh global."),(r=e.document.createElement("iframe")).id="FullStory-iframe",r.className="fs-hide",r.style.display="none",i=e.document.body||e.document.head||e.document.documentElement||e.document;try{i.appendChild(r)}catch(e){return[2,_s(_s({},t),{status:1})]}return r.contentWindow?(s=a(r.contentWindow,1),r.parentNode&&r.parentNode.removeChild(r),2===s.status?[2,_s(_s({},t),{status:1})]:[4,ws(s,t)]):[2,_s(_s({},t),{status:1})];case 1:return[2,c.sent()];case 2:return u=c.sent(),Mt.sendToBugsnag(u,"error"),[2,_s(_s({},t),{status:1})];case 3:return[2];}})})}function ws(e,t){var n,r=new et(function(e){return n=e});return setTimeout(function(){try{e.functions.jsonParse("[]").push(0)}catch(e){n(_s(_s({},t),{status:1}))}n(e)}),r}function bs(e,t){var n;if(void 0===t&&(t=0),!e)return!1;var r=function(e){try{return void e.call(null)}catch(e){return(e.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"")}},i=void 0;0!==t&&"number"==typeof Error.stackTraceLimit&&(i=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var o=[function(){throw new Error("")},e],s=function __fs_nomangle_check_stack(){return o.map(r)}(),a=s[0],u=s[1];if(void 0!==i&&(Error.stackTraceLimit=i),!a||!u)return!1;for(var c="\n".charCodeAt(0),h=a.length>u.length?u.length:a.length,d=1,l=d;l<h;l++){var p=a.charCodeAt(a.length-l),f=u.charCodeAt(u.length-l);if(p!=f)break;f!=c&&l!=h-1||(d=l)}return(null!==(n=u.slice(0,u.length-d+1).match(/\.js:\d+([:)]|$)/gm))&&void 0!==n?n:[]).length<=t}function Ss(e,t){return e.call(t).indexOf("[native code]")>=0}var Es=["__zone_symbol__OriginalDelegate","nr@original"];function Ts(e,t){if(t){for(var n=0,r=Es;n<r.length;n++){var i=t[r[n]];if("function"==typeof i&&Ss(e,i))return i}return Ss(e,t)?t:void 0}}function ks(e,t,n){switch(n){case"arrayIsArray":var r=Ts(e,t.objectToString);if(!r)return;return t.objectToString=r,function(e){return"[object Array]"==r.call(e)};default:return;}}var Is=function(){function e(e,t){void 0===t&&(t=function(e){return new WebSocket(e)}),this._newSock=t,this._connecting=!1,this._connected=!1,this._queue={},this._seq=1,this._scheme=e.options.scheme,this._host=e.options.recHost}return e.isSupported=function(){return"WebSocket"in window},e.prototype.page=function(e,t,n){this.request({Cmd:1,Page:e},function(e){return t(e.Page)},n)},e.prototype.bundle=function(e){var t=e.deltaT,n=e.serverPageStart,r=e.serverBundleTime;return this.request({Cmd:2,Bundle:{OrgId:e.orgId,UserId:e.userId,SessionId:e.sessionId,PageId:e.pageId,Seq:e.bundle.Seq,DeltaT:null===t?void 0:t,PageStart:null==n?void 0:n,PrevBundleTime:null==r?void 0:r,Bundle:e.bundle}},function(t){return e.win(t.Bundle)},e.lose)},e.prototype.bundleBeacon=function(e){return Mo(this._scheme,this._host,e)},e.prototype.exponentialBackoffMs=function(e,t){var n=s.mathMin(te.BackoffMax,5e3*s.mathPow(2,e));return t?n+.25*s.mathRandom()*n:n},e.prototype.request=function(e,t,n){e.Seq=this._seq++;var r=gt(e);return this._queue[e.Seq]={payload:r,win:t,lose:n},this.maybeConnect(),r.length},e.prototype.handleMessage=function(e){var t;try{t=wt(e)}catch(e){return void o("socket: error parsing frame: "+e.toString())}var n=this._queue[t.Seq];delete this._queue[t.Seq],n?3==t.Cmd?(o(t.Fail.Error),n.lose(t.Fail.Status)):n.win(t):o("socket: mismatched request seq "+t.Seq+"; ignoring")},e.prototype.drainQueue=function(){if(this._connected)for(var e in this._queue){var t=this._queue[e];t.sent||(this._sock.send(t.payload),t.sent=!0)}else o("socket: attempt to drain queue when disconnected.")},e.prototype.failPending=function(){for(var e in this._queue){var t=this._queue[e];t.sent&&(delete this._queue[e],t.lose(0))}},e.prototype.maybeConnect=function(){var e=this;if(this._connected)this.drainQueue();else if(!this._connecting){this._connecting=!0;var t=("https:"==this._scheme?"wss:":"ws:")+"//"+this._host+"/rec/sock";this._sock=this._newSock(t),this._sock.onopen=function(t){e._connecting=!1,e._connected=!0,e.drainQueue()},this._sock.onmessage=function(t){e.handleMessage(t.data),e.drainQueue()},this._sock.onclose=function(t){o("socket: closed; reconnecting"),e._connecting=e._connected=!1,e.failPending()},this._sock.onerror=function(t){o("socket: error; reconnecting"),e._connecting=e._connected=!1,e.failPending()}}},e}(),Cs=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rs=function(){function e(){var e=this;this.measurementTasks=null,this.performingMeasurements=!1,this.recursionDepth=0,this.performMeasurements=Mt.wrap(function(){if(e.performingMeasurements)Mt.sendToBugsnag("performMeasurements() already in progress","error");else{e.performingMeasurements=!0;try{if(!e.measurementTasks)return;for(var t=0;t<e.measurementTasks.length;t++)e.measurementTasks[t]();e.measurementTasks=null}finally{e.performingMeasurements=!1}}})}return e.create=function(e){return e.ResizeObserver?new As(e,e.ResizeObserver):s.requestWindowAnimationFrame&&e.MessageChannel?new xs(e,s.requestWindowAnimationFrame,e.MessageChannel):new Os(e)},e.prototype.requestMeasureTask=function(e){var t=this;if(this.recursionDepth>16)Mt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var n=this.performingMeasurements?this.recursionDepth:0,r=Mt.wrap(function(){var r=t.recursionDepth;t.recursionDepth=n+1;try{e()}finally{t.recursionDepth=r}});this.measurementTasks?this.measurementTasks.push(r):(this.measurementTasks=[r],this.schedule())}},e.prototype.performMeasurementsNow=function(){this.performMeasurements()},e}(),As=function(e){function t(t,n){var r=e.call(this)||this;return r.wnd=t,r.ResizeObserver=n,r}return Cs(t,e),t.prototype.schedule=function(){var e=this,t=this.ResizeObserver,n=this.wnd.document,r=n.body||n.documentElement||n.head,i=new t(function(){i.unobserve(r),e.performMeasurements()});i.observe(r)},t}(Rs),xs=function(e){function t(t,n,r){var i=e.call(this)||this;return i.wnd=t,i.requestWindowAnimationFrame=n,i.onRAF=Mt.wrap(function(){i.ch.port2.postMessage(void 0)}),i.ch=new r,i}return Cs(t,e),t.prototype.schedule=function(){this.ch.port1.onmessage=this.performMeasurements,this.requestWindowAnimationFrame(this.wnd,this.onRAF)},t}(Rs),Os=function(e){function t(t){var n=e.call(this)||this;return n.wnd=t,n}return Cs(t,e),t.prototype.schedule=function(){s.setWindowTimeout(this.wnd,this.performMeasurements,0)},t}(Rs),Ms=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Ls=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Fs=function(){function e(){}return e.prototype.createTopRecorder=function(e){var t=e.window._fs_use_socket&&Is.isSupported()?new Is(e):new Ro(e);return new Yo(e,t)},e.prototype.createInnerRecorder=function(e){return new $o(e)},e}(),Ps=function(){function e(e,t){void 0===e&&(e=window),void 0===t&&(t=new Fs),this.wnd=e,this.recMaker=t,this.scheme="https:",this.domDoneLoaded=!1,this.waitingOnStart=!1,this.reidentifyCount=0}return e.prototype.init=function(){var e,t;k(this.wnd)||(e=this.wnd,t=T(this.wnd),e[w]=t,t in e||(e[t]={}),function(e){gs(this,void 0,et,function(){var t;return ms(this,function(n){switch(n.label){case 0:return[4,ys(e,s.snapshot)];case 1:return t=n.sent(),s.rebuildFromSnapshot(t),[2];}})})}(this.wnd),this.initApi(),this.start())},e.prototype.getCurrentSessionURL=function(e){return this.recorder?this.recorder.getCurrentSessionURL(e):null},e.prototype.getCurrentSession=function(){return this.recorder?this.recorder.getCurrentSession():null},e.prototype.enableConsole=function(){this.recorder&&this.recorder.console().enable()},e.prototype.disableConsole=function(){this.recorder&&this.recorder.console().disable()},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._api(Xo.log,e)},e.prototype.shutdownApi=function(){this.shutdown(V.Api)},e.prototype.shutdown=function(e){this.recorder&&!this.deferredStart?(this.recorder.shutdown(e),this.recorder=null):o("Recording already shut down.")},e.prototype.restart=function(){if(this.deferredStart)return this.deferredStart(),void(this.deferredStart=null);this.recorder?o("Recording already started."):this.recorder=this.createRecorder(!0)},e.prototype.splitPage=function(e,t){return Ms(this,void 0,et,function(){return Ls(this,function(n){switch(n.label){case 0:return t&&null==this.identity?(o("Can't re-identify from an iframe"),[2]):this.waitingOnStart?(this.splitPending=[e,t],[2]):(this.shutdown(e),[4,so(0)]);case 1:return n.sent(),[4,so(0)];case 2:return n.sent(),t&&this.identity&&this.identity.clear(),this.restart(),[2];}})})},e.prototype.executeApiSequence=function(e,t,n){if(this.inFrame())return o("API calls may only be made from the top-most frame"),null;for(var r,i,s=[],a=!1,u=0;u<t.length;u++)try{var c=t[u],h=c[0],d=c[1];switch(h){case Xo.rec:r=!!d;break;case Xo.log:var l=d,p=l[0],f=l.slice(1),v=e.console().logEvent(p,f);v&&s.push(v);break;case Xo.consent:i=!!d;break;case Xo.account:case Xo.user:case Xo.customEvent:var _=this.vars.api(h,d,n),g=_.events;_.reidentify&&(s=[],i=void 0,a=!0),s.push.apply(s,g);break;default:o("Unrecognized api: "+h);}}catch(e){Mt.sendToBugsnag(e,"error")}return{reidentified:a,recordingShouldBeEnabled:r,applyApi:function(){void 0!==i&&e.setConsent(i);for(var t=e.queue(),n=0,r=s;n<r.length;n++){var o=r[n];t.enqueue(o)}}}},e.prototype._api=function(e,t,n){var r;if(this.recorder){var i=null!==(r=this.executeApiSequence(this.recorder,[[e,t]],n))&&void 0!==r?r:{reidentified:!1,applyApi:function(){}},s=i.reidentified,a=i.recordingShouldBeEnabled,u=i.applyApi;if(s){if(this.reidentifyCount>=8)return void o("reidentified too many times; giving up");this.reidentifyCount++,W(this.wnd,[e,t]),this.splitPage(V.Reidentify,!0)}else u();void 0!==a&&(a?this.restart():this.shutdown(V.Api))}else W(this.wnd,[e,t])},e.prototype._cookies=function(){return this.identity?this.identity.cookies():(o("Error in FS integration: Can't get cookies from inside an iframe"),null)},e.prototype._setCookie=function(e,t){this.identity?this.identity.setCookie(e,t):o("Error in FS integration: Can't set cookies from inside an iframe")},e.prototype._withEventQueue=function(e,t){if(this.recorder){var n=this.recorder.queue(),r=this.recorder.pageSignature();null!=n&&null!=r?e===r?t(n):Mt.sendToBugsnag("Error in _withEventQueue: Page Signature mismatch","error",{pageSignature:r,callerSignature:e}):o("Error getting event queue or page signature: Recorder not initialized")}else o("Error in FS integration: Recorder not initialized")},e.prototype.initApi=function(){var e=I(this.wnd);e?(e.getCurrentSessionURL=_t(this.getCurrentSessionURL,this),e.getCurrentSession=_t(this.getCurrentSession,this),e.enableConsole=_t(this.enableConsole,this),e.disableConsole=_t(this.disableConsole,this),e.log=_t(this.log,this),e.shutdown=_t(this.shutdownApi,this),e.restart=_t(this.restart,this),e._api=_t(this._api,this),e._cookies=_t(this._cookies,this),e._setCookie=_t(this._setCookie,this),e._withEventQueue=_t(this._withEventQueue,this)):o("Missing browser API namespace; couldn't initialize API.")},e.prototype.start=function(){var e,t=this;e=L(this.wnd),r=e,o("script version UNSET (compiled at 1591209308)");var n=P(this.wnd);if(n){this.orgId=n;var i,s=(i=this.wnd)._fs_script||H(D(i));if(s){this.script=s;var a=F(this.wnd);if(a){this.recHost=a;var u=function(e){return e._fs_app_host||B(D(e))}(this.wnd);u?(this.appHost=u,o("script: "+this.script),o("recording host: "+this.recHost),o("orgid: "+this.orgId),"localhost:8080"==this.recHost&&(this.scheme="http:"),this.inFrame()||(this.identity=new ts(this.wnd.document,function(e){for(var n,r=0,i=e;r<i.length;r++){var o=i[r];null===(n=t.recorder)||void 0===n||n.queue().enqueue({Kind:R.STORAGE_WRITE_FAILURE,Args:o})}}),this.vars=new ps(this.identity),this.identity.initFromCookies(this.recHost,this.orgId)),this.canRecord(this.orgId)?(this.recorder=this.createRecorder(),this.recorder.eventWatcher().watchEvents(),this.hookLoadEvents(),this.wnd.addEventListener("message",Mt.wrap(function(e){if("string"==typeof e.data&&(e.source==t.wnd.parent||e.source==t.wnd))switch(Bo(e.data)[0]){case"ShutdownFrame":t.shutdown(V.FsShutdownFrame);break;case"RestartFrame":t.restart();}}))):this.hailMary()):o("Missing global _fs_host or _fs_app_host. Recording disabled.")}else o("Missing global _fs_host or _fs_rec_host. Recording disabled.")}else o("Missing global _fs_host or _fs_rec_host. Recording disabled.")}else o("Missing global _fs_org. Recording disabled.")},e.prototype._context=function(e){var t,n=this,r=s.mathRound(null!==(t=ie(function(){var e;return null===(e=window.performance)||void 0===e?void 0:e.now()})())&&void 0!==t?t:-1);return{window:this.wnd,time:new rn,measurer:Rs.create(this.wnd),options:{orgId:this.orgId,scheme:this.scheme,script:this.script,recHost:this.recHost,appHost:this.appHost},recording:{bundleUploadInterval:function(){return e().bundleUploadInterval()},preroll:r,inFrame:this.inFrame(),vars:this.vars,identity:this.identity,splitPage:function(e,t){return n.splitPage(e,t)},pageSignature:function(){return e().pageSignature()}},queue:function(){return e().queue()}}},e.prototype.createRecorder=function(e){var t,n,r=this,i=this._context(function(){return n}),o=!1,s=!1;if(this.inFrame())n=this.recMaker.createInnerRecorder(i);else{n=this.recMaker.createTopRecorder(i);var a=null!==(t=this.executeApiSequence(n,function(e){var t=I(e);if(!t)return[];var n=t.q;return n?(delete t.q,n):[]}(this.wnd)))&&void 0!==t?t:{applyApi:function(){}},u=a.reidentified,c=a.recordingShouldBeEnabled,h=a.applyApi;void 0!==c&&(s=!c),o=!!u,h()}this.waitingOnStart=!0;var d=function(){n.start(o,function(){r.waitingOnStart=!1,e&&n.tellAllFramesTo(["RestartFrame"]),r.splitPending&&(r.splitPage(r.splitPending[0],r.splitPending[1]),r.splitPending=null)}),e&&n.eventWatcher().watchEvents()};return s?this.deferredStart=d:d(),n},e.prototype.inFrame=function(){if("boolean"==typeof this._inFrame)return this._inFrame;var e=N(this.wnd);return q(this.wnd)?this._inFrame=!1:this.wnd!=top?this._inFrame=!0:e?e.init&&e.init(this.orgId)&&(this._inFrame=!0):this._inFrame=!1,this._inFrame},e.prototype.canRecord=function(e){return(this.wnd.MutationObserver||this.wnd.MutationEvent)&&this.wnd.postMessage&&it&&2!==s.snapshot.status?!!function e(t){if(t==top||q(t)||function(e){return!!e._fs_run_in_iframe}(t)||N(t))return!0;try{return t.parent.document,e(t.parent)}catch(e){return!1}}(this.wnd)||(o("FullStory recording for this page is NOT allowed within an iFrame."),!1):(o("missing required browser features"),!1)},e.prototype.hailMary=function(){var e,t=this;if(this.identity){var n=U(this.wnd);o("Unable to record playback stream.");var r=document.createElement("script");this.wnd.__fs_startResponse=function(e){e&&t.identity.setIds(t.wnd,e.CookieDomain,e.UserIntId,e.SessionIntId),document.head&&document.head.removeChild(r)};var i=Vt(this.wnd.document),a=i[0],u=i[1],c=bt(this.wnd),h=c[0],d=c[1],l=ur(Jn(this.wnd),this.orgId,{source:"page",type:"base"}),p=ur(document.referrer,this.orgId,{source:"page",type:"referrer"}),f=ur(this.wnd.location.href,this.orgId,{source:"page",type:"url"}),v=s.mathRound(null!==(e=ie(function(){var e;return null===(e=window.performance)||void 0===e?void 0:e.now()})())&&void 0!==e?e:-1);r.src="//"+this.recHost+"/rec/page?OrgId="+this.orgId+"&UserId="+this.identity.userId()+"&Url="+encodeURIComponent(f)+"&Base="+encodeURIComponent(l)+"&Width="+a+"&Height="+u+"&ScreenWidth="+h+"&ScreenHeight="+d+"&Referrer="+encodeURIComponent(p)+"&Doctype="+encodeURIComponent(yt(document))+"&Preroll="+v+"&CompiledTimestamp=1591209308&Fallback=true"+(n?"&ReplayFlags="+n:""),document.head&&document.head.appendChild(r)}},e.prototype.hookLoadEvents=function(){var e=this,t=function(){e.domDoneLoaded||(e.domDoneLoaded=!0,e.recorder&&e.recorder.onDomLoad())},n=!1,r=function(){n||(n=!0,e.recorder&&e.recorder.onLoad())};switch(document.readyState){case"interactive":document.attachEvent||t();break;case"complete":t(),r();}this.domDoneLoaded||document.addEventListener("DOMContentLoaded",Mt.wrap(t)),n||this.wnd.addEventListener("load",Mt.wrap(function(e){t(),r()}))},e}();!function(){try{new Ps().init()}catch(e){Mt.sendToBugsnag(e,"error"),L(window)&&window.console&&console.log&&console.log("Failed to initialize FullStory.")}}()}]); \ No newline at end of file +/* eslint-disable prettier/prettier,no-var,eqeqeq,new-cap,no-nested-ternary,no-use-before-define,no-sequences,block-scoped-var,one-var, + dot-notation,no-script-url,no-restricted-globals,no-unused-vars,guard-for-in,no-proto,camelcase,no-empty,no-redeclare,no-caller, + strict,no-extend-native,no-undef,no-loop-func */ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/s",n(n.s=4)}([function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]});t.__esModule=!0,t.omit=t.pick=t.assertExhaustive=t.isNonEmpty=void 0,i(t,n(6),"ExtendedObject","Object"),t.isNonEmpty=function(e){return e.length>0},t.assertExhaustive=function(e,t){throw void 0===t&&(t="Reached unexpected case in exhaustive switch"),new Error(t)},t.pick=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={};return t.forEach(function(t){r[t]=e[t]}),r},t.omit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=r({},e);return Object.keys(i).forEach(function(e){var n=e;-1!==t.indexOf(n)&&delete i[n]}),i}},function(e,t){},function(e){e.exports={Any:{iframe:{src:"scrubUrl",srcdoc:"erase"},frame:{src:"scrubUrl",srcdoc:"erase"}},Exclude:{"*":{alt:"erase",checked:"erase",data:"erase",placeholder:"erase",src:"erase",srcset:"erase",href:"erase",title:"erase",value:"erase"}},Mask:{"*":{checked:"erase",data:"erase",alt:"maskText",placeholder:"maskText",title:"maskText",value:"maskText"},option:{label:"maskText"}}}},function(e){e.exports=[{Selector:"object:not([type^=\"image/\"])",Consent:!1,Type:1},{Selector:"embed:not([type^=\"image/\"])",Consent:!1,Type:1},{Selector:"canvas",Consent:!1,Type:1},{Selector:"noscript",Consent:!1,Type:1},{Selector:".fs-hide",Consent:!1,Type:1},{Selector:".fs-exclude",Consent:!1,Type:1},{Selector:".fs-exclude-without-consent",Consent:!0,Type:1},{Selector:".fs-mask",Consent:!1,Type:2},{Selector:".fs-mask-without-consent",Consent:!0,Type:2},{Selector:".fs-unmask",Consent:!1,Type:3},{Selector:".fs-unmask-with-consent",Consent:!0,Type:3},{Selector:".fs-block",Consent:!1,Type:1},{Selector:".fs-record-with-consent",Consent:!0,Type:1}]},function(e,t,n){e.exports=n(7)},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0,t.ExtendedObject=void 0,t.ExtendedObject=Object},function(e,t,n){"use strict";n.r(t);n(5);var r=!1;function i(){return r}function o(e){i()&&window.console&&console.log(e)}n(1);var s=new(function(){function e(e){this.rebuildFromSnapshot(e)}return e.prototype.rebuildFromSnapshot=function(e){var t=this.snapshot;if(this.snapshot=e,!t||t.functions!==e.functions){var n=e.functions;this.jsonParse=n.jsonParse,this.jsonStringify=n.jsonStringify,this.arrayIsArray=n.arrayIsArray,this.objectKeys=n.objectKeys,this.objectValues=n.objectValues||null,this.dateNow=n.dateNow,this.objectHasOwnProp=u(n.objectHasOwnProp),this.dateGetTime=u(n.dateGetTime),this.matchMedia=c(n.matchMedia),this.setWindowTimeout=u(n.setWindowTimeout),this.setWindowInterval=u(n.setWindowInterval),this.clearWindowTimeout=u(n.clearWindowTimeout),this.clearWindowInterval=u(n.clearWindowInterval),this.requestWindowAnimationFrame=c(n.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(n.requestWindowIdleCallback),this.mathAbs=n.mathAbs,this.mathFloor=n.mathFloor,this.mathMax=n.mathMax,this.mathMin=n.mathMin,this.mathPow=n.mathPow,this.mathRandom=n.mathRandom,this.mathRound=n.mathRound}},e}())(a(window));function a(e,t){void 0===t&&(t=0);var n=t,r=function(e){try{return e()}catch(e){return n=2,function(){throw new Error("Invoked failed snapshot")}}},i={jsonParse:r(function(){return e.JSON.parse}),jsonStringify:r(function(){return e.JSON.stringify}),arrayIsArray:r(function(){return e.Array.isArray}),objectKeys:r(function(){return e.Object.keys}),objectValues:r(function(){return e.Object.values}),dateNow:r(function(){return e.Date.now}),objectHasOwnProp:r(function(){return e.Object.prototype.hasOwnProperty}),dateGetTime:r(function(){return e.Date.prototype.getTime}),matchMedia:r(function(){return e.matchMedia}),setWindowTimeout:r(function(){return e.setTimeout}),setWindowInterval:r(function(){return e.setInterval}),clearWindowTimeout:r(function(){return e.clearTimeout}),clearWindowInterval:r(function(){return e.clearInterval}),requestWindowAnimationFrame:r(function(){return e.requestAnimationFrame}),requestWindowIdleCallback:r(function(){return e.requestIdleCallback}),mathAbs:r(function(){return e.Math.abs}),mathFloor:r(function(){return e.Math.floor}),mathMax:r(function(){return e.Math.max}),mathMin:r(function(){return e.Math.min}),mathPow:r(function(){return e.Math.pow}),mathRandom:r(function(){return e.Math.random}),mathRound:r(function(){return e.Math.round})},o={functionToString:r(function(){return e.Function.prototype.toString}),objectToString:r(function(){return e.Object.prototype.toString})};return{status:n,functions:i,helpers:o}}function u(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(t,n)}}function c(e){return e?u(e):null}var h,d="number"==typeof(h=s.dateNow())?{now:function(){return s.dateNow()},timeOrigin:h}:{now:function(){return s.dateGetTime(new Date)},timeOrigin:h=s.dateGetTime(new Date)};var l=function(){var e,t=window.performance;if(t&&t.now){var n=t.now();if("number"==typeof n&&isFinite(n)&&!(n<=0)){var r=t.timeOrigin;if("number"!=typeof r){var i=d.now()-t.now(),o=null===(e=t.timing)||void 0===e?void 0:e.navigationStart;r=o?Math.min(i,o):i}var s=Math.round(r);if("number"==typeof s&&isFinite(s)&&!(s<=0))return{now:function(){return Math.round(s+t.now())},timeOrigin:s}}}}();function p(){return l?l.now():d.now()}var f=["","0","1","-1","true","false","n/a","nan","undefined","null","nil","the_id_that_you_use_in_your_app_for_this_user"],v=["811c9dc5","350ca8af","340ca71c","14cd0a2b","4db211e5","0b069958","3613e041","2f8f13ba","9b61ad43","77074ba4","0da3f8ec","1c750511"],_=function(){return s.mathFloor(p()/1e3)},g=function(){return _()+31536e3};function m(e){if(!e)return null;var t=e.split("/"),n=t[0],r=t[1],i=parseInt(r),s=_(),a=g();if(isNaN(i)&&(i=a),i<=s)return null;i>a&&(i=a);var u=n.split(/[#,]/);if(u.length<3&&(u=n.split("`")).length<3)return null;var c=u[0],h=u[1],d=u[2],l=u[3],p="";void 0!==l&&(p=decodeURIComponent(l),(f.indexOf(p)>=0||v.indexOf(p)>=0)&&(o("Ignoring invalid app key \""+p+"\" from cookie."),p=""));var m=d.split(":");return{expirationAbsTimeSeconds:i,host:c,orgId:h,userId:m[0],sessionId:m[1]||"",appKeyHash:p}}function y(e){for(var t={},n=e.cookie.split(";"),r=0;r<n.length;r++){var i=n[r].replace(/^\s+|\s+$/g,"").split("=");t[i[0]]||(t[i[0]]=i[1])}return t}var w="_fs_loaded",b="_fs_namespace";var S,E="FS";function T(e){if(S)return S;var t=k(e);return t?(S=t,t):(t=e[b])?(S=t,t):S=E}function k(e){return e[w]}function I(e){return e[T(e)]}function C(e){return"localhost"==e||"127.0.0.1"==e}var R,A,x,O,M=/^([^.]+\.)*(fullstory|onfire).[^.]+(\/|$)/;function L(e){return!!e._fs_ext_debug||!!e._fs_debug}function F(e){return e._fs_rec_host||((t=D(e))&&M.test(t)?0===t.lastIndexOf("rs.",0)||0===t.lastIndexOf("rs-2.",0)?t:0==t.lastIndexOf("www.",0)?"rs."+t.slice(4):0==t.lastIndexOf("app.",0)?"rs."+t.slice(4):"rs."+t:t);var t}function P(e){return e._fs_ext_org||e._fs_org}function q(e){return!!e._fs_is_outer_script}function U(e){return e._fs_replay_flags}function N(e){return e._fs_transport}function W(e,t){var n=I(e);if(n){var r=n.q;r||(r=n.q=[]),r.push(t)}}function D(e){return e._fs_ext_host||e._fs_host}function B(e){return e?C(function(e){var t=e,n=t.indexOf(":");return n>=0&&(t=t.slice(0,n)),t}(e))?e:0==e.indexOf("www.")?"app."+e.slice(4):"app."+e:e}function H(e){return e?e+"/s/fs.js":void 0}!function(e){e.MUT_INSERT=2,e.MUT_REMOVE=3,e.MUT_ATTR=4,e.MUT_TEXT=6,e.MOUSEMOVE=8,e.MOUSEMOVE_CURVE=9,e.SCROLL_LAYOUT=10,e.SCROLL_LAYOUT_CURVE=11,e.MOUSEDOWN=12,e.MOUSEUP=13,e.KEYDOWN=14,e.KEYUP=15,e.CLICK=16,e.FOCUS=17,e.VALUECHANGE=18,e.RESIZE_LAYOUT=19,e.DOMLOADED=20,e.LOAD=21,e.PLACEHOLDER_SIZE=22,e.UNLOAD=23,e.BLUR=24,e.SET_FRAME_BASE=25,e.TOUCHSTART=32,e.TOUCHEND=33,e.TOUCHCANCEL=34,e.TOUCHMOVE=35,e.TOUCHMOVE_CURVE=36,e.NAVIGATE=37,e.PLAY=38,e.PAUSE=39,e.RESIZE_VISUAL=40,e.RESIZE_VISUAL_CURVE=41,e.RESIZE_DOCUMENT=42,e.LOG=48,e.ERROR=49,e.DBL_CLICK=50,e.FORM_SUBMIT=51,e.WINDOW_FOCUS=52,e.WINDOW_BLUR=53,e.HEARTBEAT=54,e.WATCHED_ELEM=56,e.PERF_ENTRY=57,e.REC_FEAT_SUPPORTED=58,e.SELECT=59,e.CSSRULE_INSERT=60,e.CSSRULE_DELETE=61,e.FAIL_THROTTLED=62,e.AJAX_REQUEST=63,e.SCROLL_VISUAL_OFFSET=64,e.SCROLL_VISUAL_OFFSET_CURVE=65,e.MEDIA_QUERY_CHANGE=66,e.RESOURCE_TIMING_BUFFER_FULL=67,e.MUT_SHADOW=68,e.DISABLE_STYLESHEET=69,e.FULLSCREEN=70,e.FULLSCREEN_ERROR=71,e.ADOPTED_STYLESHEETS=72,e.CUSTOM_ELEMENT_DEFINED=73,e.MODAL_OPEN=74,e.MODAL_CLOSE=75,e.SLOW_INTERACTION=76,e.LONG_FRAME=77,e.TIMING=78,e.STORAGE_WRITE_FAILURE=79,e.KEEP_ELEMENT=2e3,e.KEEP_URL=2001,e.KEEP_BOUNCE=2002,e.SYS_SETVAR=8193,e.SYS_RESOURCEHASH=8195,e.SYS_SETCONSENT=8196,e.SYS_CUSTOM=8197,e.SYS_REPORTCONSENT=8198}(R||(R={})),function(e){e.Unknown=0,e.Serialization=1}(A||(A={})),function(e){e.Unknown=0,e.DomSnapshot=1,e.NodeEncoding=2,e.LzEncoding=3}(x||(x={})),function(e){e.Internal=0,e.Public=1}(O||(O={}));var j,K,V,z,Y,G,Q,X,J,$,Z,ee,te,ne=["print","alert","confirm"];function re(e){switch(e){case R.MOUSEDOWN:case R.MOUSEMOVE:case R.MOUSEMOVE_CURVE:case R.MOUSEUP:case R.KEYDOWN:case R.KEYUP:case R.TOUCHSTART:case R.TOUCHEND:case R.TOUCHMOVE:case R.TOUCHMOVE_CURVE:case R.TOUCHCANCEL:case R.CLICK:case R.SCROLL_LAYOUT:case R.SCROLL_LAYOUT_CURVE:case R.SCROLL_VISUAL_OFFSET:case R.SCROLL_VISUAL_OFFSET_CURVE:case R.NAVIGATE:return!0;}return!1}!function(e){e.GrantConsent=!0,e.RevokeConsent=!1}(j||(j={})),function(e){e.Page=0,e.Document=1}(K||(K={})),function(e){e.Unknown=0,e.Api=1,e.FsShutdownFrame=2,e.Hibernation=3,e.Reidentify=4,e.SettingsBlocked=5,e.Size=6,e.Unload=7}(V||(V={})),function(e){e.Timing=0,e.Navigation=1,e.Resource=2,e.Paint=3,e.Mark=4,e.Measure=5,e.Memory=6}(z||(z={})),function(e){e.Performance=0,e.PerformanceEntries=1,e.PerformanceMemory=2,e.Console=3,e.Ajax=4,e.PerformanceObserver=5,e.AjaxFetch=6}(Y||(Y={})),function(e){e.Node=1,e.Sheet=2}(G||(G={})),function(e){e.StyleSheetHooks=0,e.SetPropertyHooks=1}(Q||(Q={})),function(e){e.User="user",e.Account="acct",e.Event="evt"}(X||(X={})),function(e){e.Elide=0,e.Record=1,e.Whitelist=2}(J||(J={})),function(e){e.ReasonNoSuchOrg=1,e.ReasonOrgDisabled=2,e.ReasonOrgOverQuota=3,e.ReasonBlockedDomain=4,e.ReasonBlockedIp=5,e.ReasonBlockedUserAgent=6,e.ReasonBlockedGeo=7,e.ReasonBlockedTrafficRamping=8,e.ReasonInvalidURL=9,e.ReasonUserOptOut=10,e.ReasonInvalidRecScript=11,e.ReasonDeletingUser=12,e.ReasonNativeHookFailure=13}($||($={})),function(e){e.Unset=0,e.Exclude=1,e.Mask=2,e.Unmask=3,e.Watch=4,e.Keep=5}(Z||(Z={})),function(e){e.Unset=0,e.Click=1}(ee||(ee={})),function(e){e.MaxLogsPerPage=1024,e.MutationProcessingInterval=250,e.CurveSamplingInterval=142,e.DefaultBundleUploadInterval=5e3,e.HeartbeatInitial=4e3,e.HeartbeatMax=256200,e.PageInactivityTimeout=18e5,e.BackoffMax=3e5,e.ScrollSampleInterval=e.MutationProcessingInterval/5,e.InactivityThreshold=4e3,e.MaxPayloadLength=16384}(te||(te={}));function ie(e,t){return function(){try{return e.apply(this,arguments)}catch(e){try{t&&t(e)}catch(e){}}}}var oe=function(){},se=navigator.userAgent,ae=se.indexOf("MSIE ")>-1||se.indexOf("Trident/")>-1,ue=(ae&&se.indexOf("Trident/5"),ae&&se.indexOf("Trident/6"),ae&&se.indexOf("rv:11")>-1),ce=se.indexOf("Edge/")>-1;se.indexOf("CriOS");var he=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function de(){var e=window.navigator.userAgent.match(/Version\/(\d+)/);return e?parseInt(e[1]):-1}function le(e){if(!he)return!1;var t=de();return t>=0&&t===e}function pe(e){if(!he)return!1;var t=de();return t>=0&&t<e}le(9),le(10),pe(8),pe(10),pe(12);function fe(e,t){for(var n=0===t.indexOf("on")?function(e){return"on"+e+t.slice(2)}:function(e){return""+e+t.charAt(0).toUpperCase()+t.slice(1)},r=0,i=[function(){return t},function(){return n("webkit")},function(){return n("moz")},function(){return n("ms")}];r<i.length;r++){var o=(0,i[r])();if(o in e)return o}return t}function ve(e){return"function"==typeof e}var _e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},ge=0,me=function(e,t){Ce[ge]=e,Ce[ge+1]=t,2===(ge+=2)&&be()};var ye=window.MutationObserver||window.WebKitMutationObserver,we="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof self&&void 0!==self.importScripts&&"undefined"!=typeof MessageChannel;var be,Se,Ee,Te,ke,Ie,Ce=new Array(1e3);function Re(){for(var e=0;e<ge;e+=2){(0,Ce[e])(Ce[e+1]),Ce[e]=void 0,Ce[e+1]=void 0}ge=0}function Ae(e,t){var n=arguments,r=this,i=new this.constructor(Me);void 0===i[Oe]&&Qe(i);var o,s=r._state;return s?(o=n[s-1],me(function(){return Ye(s,i,o,r._result)})):je(r,i,e,t),i}function xe(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(Me);return We(t,e),t}ye?(Te=0,ke=new ye(Re),Ie=document.createTextNode(""),ke.observe(Ie,{characterData:!0}),be=function(){var e=Te=++Te%2;Ie.data=e+""}):we?((Ee=new MessageChannel).port1.onmessage=Re,be=function(){return Ee.port2.postMessage(0)}):(Se=setTimeout,be=function(){return Se(Re,1)});var Oe=Math.random().toString(36).substring(16);function Me(){}var Le=void 0,Fe=1,Pe=2,qe=new Ve;function Ue(e){try{return e.then}catch(e){return qe.error=e,qe}}function Ne(e,t,n){t.constructor===e.constructor&&n===Ae&&t.constructor.resolve===xe?function(e,t){t._state===Fe?Be(e,t._result):t._state===Pe?He(e,t._result):je(t,void 0,function(t){return We(e,t)},function(t){return He(e,t)})}(e,t):n===qe?(He(e,qe.error),qe.error=null):void 0===n?Be(e,t):ve(n)?function(e,t,n){me(function(e){var r=!1,i=function(e,t,n,r,i){try{e.call(t,n,r)}catch(e){return e}}(n,t,function(n){r||(r=!0,t!==n?We(e,n):Be(e,n))},function(t){r||(r=!0,He(e,t))},e._label);!r&&i&&(r=!0,He(e,i))},e)}(e,t,n):Be(e,t)}function We(e,t){var n;e===t?He(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?Ne(e,t,Ue(t)):Be(e,t)}function De(e){e._onerror&&e._onerror(e._result),Ke(e)}function Be(e,t){e._state===Le&&(e._result=t,e._state=Fe,0!==e._subscribers.length&&me(Ke,e))}function He(e,t){e._state===Le&&(e._state=Pe,e._result=t,me(De,e))}function je(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+Fe]=n,i[o+Pe]=r,0===o&&e._state&&me(Ke,e)}function Ke(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?Ye(n,r,i,o):i(o);e._subscribers.length=0}}function Ve(){this.error=null}var ze=new Ve;function Ye(e,t,n,r){var i,o,s,a,u=ve(n);if(u){if((i=function(e,t){try{return e(t)}catch(e){return ze.error=e,ze}}(n,r))===ze?(a=!0,o=i.error,i.error=null):s=!0,t===i)return void He(t,new TypeError("A promises callback cannot return that same promise."))}else i=r,s=!0;t._state!==Le||(u&&s?We(t,i):a?He(t,o):e===Fe?Be(t,i):e===Pe&&He(t,i))}var Ge=0;function Qe(e){e[Oe]=Ge++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Xe(e,t){this._instanceConstructor=e,this.promise=new e(Me),this.promise[Oe]||Qe(this.promise),_e(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?Be(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&Be(this.promise,this._result))):He(this.promise,new Error("Array Methods must be provided an Array"))}Xe.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===Le&&n<e;n++)this._eachEntry(t[n],n)},Xe.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===xe){var i=Ue(e);if(i===Ae&&e._state!==Le)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===Je){var o=new n(Me);Ne(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},Xe.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===Le&&(this._remaining--,e===Pe?He(r,n):this._result[t]=n),0===this._remaining&&Be(r,this._result)},Xe.prototype._willSettleAt=function(e,t){var n=this;je(e,void 0,function(e){return n._settledAt(Fe,t,e)},function(e){return n._settledAt(Pe,t,e)})};var Je=function(e){this[Oe]=Ge++,this._result=this._state=void 0,this._subscribers=[],Me!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof Je?function(e,t){try{t(function(t){We(e,t)},function(t){He(e,t)})}catch(t){He(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())};Je.all=function(e){return new Xe(this,e).promise},Je.race=function(e){var t=this;return _e(e)?new t(function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},Je.resolve=xe,Je.reject=function(e){var t=new this(Me);return He(t,e),t},Je._setAsap=function(e){me=e},Je._asap=me,Je.prototype={constructor:Je,then:Ae,"catch":function(e){return this.then(null,e)}};var $e,Ze,et="function"==typeof window.Promise?window.Promise:Je,tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function nt(e){return s.arrayIsArray(e)}var rt,it,ot,st,at,ut;function ct(e,t){return 0==e.lastIndexOf(t,0)}function ht(e,t){for(var n in e)s.objectHasOwnProp(e,n)&&t(e[n],n,e)}function dt(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return e[t]}function lt(e,t){var n=0;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&++n>t)return!1;return n==t}function pt(e,t){var n=0;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&++n>t)return!0;return!1}Ze="function"==typeof s.objectKeys?function(e){return s.objectKeys(e)}:function(e){var t=[];for(var n in e)s.objectHasOwnProp(e,n)&&t.push(n);return t},st=(ot=function(e){return e.matches||e.msMatchesSelector||e.webkitMatchesSelector})(window.Element.prototype),!(at=window.document?window.document.documentElement:void 0)||st&&at instanceof window.Element||(st=ot(at)),it=($e=[st,function(e,t){return st.call(e,t)}])[0],rt=$e[1];var ft;ut=ae?function(e){var t=e.nextSibling;return t&&e.parentNode&&t===e.parentNode.firstChild?null:t}:function(e){return e.nextSibling};var vt;ft=ae?function(e,t){if(e){var n=e.parentNode?e.parentNode.firstChild:null;do{t(e),e=e.nextSibling}while(e&&e!=n)}}:function(e,t){for(;e;e=e.nextSibling)t(e)};vt=ae?function(e){var t=e.previousSibling;return t&&e.parentNode&&t===e.parentNode.lastChild?null:t}:function(e){return e.previousSibling};function _t(e,t){if(!e)return oe;var n=function(e){try{var t=window;return t.Zone&&t.Zone.root&&"function"==typeof t.Zone.root.wrap?t.Zone.root.wrap(e):e}catch(t){return e}}(e);return t&&(n=n.bind(t)),ie(n,function(e){o("Unexpected error: "+e)})}function gt(e){var t,n=Array.prototype.toJSON,r=String.prototype.toJSON;n&&(Array.prototype.toJSON=void 0),r&&(String.prototype.toJSON=void 0);try{t=s.jsonStringify(e)}catch(e){t=mt(e)}finally{n&&(Array.prototype.toJSON=n),r&&(String.prototype.toJSON=r)}return t}function mt(e){var t="Internal error: unable to determine what JSON error was";try{t=(t=""+e).replace(/[^a-zA-Z0-9\.\:\!\, ]/g,"_")}catch(e){}return"\""+t+"\""}function yt(e){var t=e.doctype;if(!t)return"";var n="<!DOCTYPE ";return n+=t.name,t.publicId&&(n+=" PUBLIC \""+t.publicId+"\""),t.systemId&&(n+=" \""+t.systemId+"\""),n+">"}function wt(e){return s.jsonParse(e)}function bt(e){var t=0,n=0;return null==e.screen?[t,n]:(t=parseInt(String(e.screen.width)),n=parseInt(String(e.screen.height)),[t=isNaN(t)?0:t,n=isNaN(n)?0:n])}var St=function(){function e(e,t){this.target=e,this.propertyName=t,this._before=oe,this._afterSync=oe,this._afterAsync=oe,this.on=!1}return e.prototype.before=function(e){return this._before=_t(e),this},e.prototype.afterSync=function(e){return this._afterSync=_t(e),this},e.prototype.afterAsync=function(e){return this._afterAsync=_t(function(t){s.setWindowTimeout(window,ie(function(){e(t)}),0)}),this},e.prototype.disable=function(){if(this.on=!1,this.shim){var e=this.shim,t=e.override,n=e["native"];this.target[this.propertyName]===t&&(this.target[this.propertyName]=n,this.shim=void 0)}},e.prototype.enable=function(){if(this.on=!0,this.shim)return!0;this.shim=this.makeShim();try{this.target[this.propertyName]=this.shim.override}catch(e){return!1}return!0},e.prototype.makeShim=function(){var e=this,t=this.target[this.propertyName];return{"native":t,override:function(){var n={that:this,args:arguments,result:null};e.on&&e._before(n);var r=t.apply(this,arguments);return e.on&&(n.result=r,e._afterSync(n),e._afterAsync(n)),r}}},e}(),Et={};function Tt(e,t){if(!e||"function"!=typeof e[t])return null;var n;Et[t]=Et[t]||[];for(var r=0;r<Et[t].length;r++)Et[t][r].obj==e&&(n=Et[t][r].hook);return n||(n=new St(e,t),Et[t].push({obj:e,hook:n})),n.enable()?n:null}function kt(e,t,n){if(!e)return function(){};var r=Object.getOwnPropertyDescriptor(e.prototype,t);if(!r||!r.set)return function(){};var i=r.set,o=_t(n),s=!0;function a(e){i.call(this,e),s&&o(this,e)}return Object.defineProperty(e.prototype,t,tt(tt({},r),{set:a})),function(){s=!1;var n=Object.getOwnPropertyDescriptor(e.prototype,t);n&&a===n.set&&Object.defineProperty(e.prototype,t,tt(tt({},n),{set:i}))}}var It=10,Ct="[anonymous]",Rt=/function\s*([\w\-$]+)?\s*\(/i;function At(e){return e.stack||e.backtrace||e.stacktrace}function xt(){var e,t;try{throw new Error("")}catch(n){e="<generated>\n",t=At(n)}if(!t){e="<generated-ie>\n";var n=[];try{for(var r=arguments.callee.caller.caller;r&&n.length<It;){var i=Rt.test(r.toString())&&RegExp.$1||Ct;n.push(i),r=r.caller}}catch(e){o(e)}t=n.join("\n")}return e+t}function Ot(){try{return window.self!==window.top}catch(e){return!0}}var Mt=function(){function e(){}return e.wrap=function(t,n){return void 0===n&&(n="error"),ie(t,function(t){return e.sendToBugsnag(t,n)})},e.errorLimit=15,e.sendToBugsnag=function(t,n,r){if(!(e.errorLimit<=0)){e.errorLimit--,"string"==typeof t&&(t=new Error(t));var i=y(document).fs_uid,o=i?m(i):void 0;o&&o.orgId!=P(window)&&(o=void 0);var s=new Date(1591209308e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:Ot(),CompiledTimestamp:1591209308,CompiledTime:s,orgId:P(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:t.message,name:"Recording Error",releaseStage:"production "+s,severity:n,language:navigator.language||navigator.userLanguage||"en-GB",stacktrace:At(t)||xt()};if(r)for(var u in r){var c=typeof r[u];a["aux_"+u]="string"===c||"number"===c?r[u]:gt(r[u])}var h=[];for(var u in a)h.push(encodeURIComponent(u)+"="+encodeURIComponent(a[u]));new Image().src="https://"+F(window)+"/rec/except?"+h.join("&")}},e}(),Lt={};function Ft(e,t,n){if(void 0===n&&(n=1),e)return!0;if(Lt[t]=Lt[t]||0,Lt[t]++,Lt[t]>n)return!1;var r=new Error("Assertion failed: "+t);return Mt.sendToBugsnag(r,"error"),e}function Pt(e,t,n,r){void 0!==n&&("function"==typeof e.addEventListener?e.addEventListener(t,n,r):"function"==typeof e.addListener?e.addListener(n):o("Target of "+t+" doesn't seem to support listeners"))}function qt(e,t,n,r){void 0!==n&&("function"==typeof e.removeEventListener?e.removeEventListener(t,n,r):"function"==typeof e.removeListener?e.removeListener(n):o("Target of "+t+" doesn't seem to support listeners"))}var Ut=function(){function e(){var e=this;this._listeners=[],this._children=[],this._yesCapture=!0,this._noCapture=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e._yesCapture={capture:!0,passive:!0},e._noCapture={capture:!1,passive:!0}}});window.addEventListener("test",oe,t)}catch(e){}}return e.prototype.add=function(e,t,n,r,i){return void 0===i&&(i=!1),this.addCustom(e,t,n,r,i)},e.prototype.addCustom=function(e,t,n,r,i){void 0===i&&(i=!1);var o={target:e,type:t,fn:Mt.wrap(function(e){(i||!1!==e.isTrusted||"message"==t||e._fs_trust_event)&&r(e)}),options:n?this._yesCapture:this._noCapture,index:this._listeners.length};return this._listeners.push(o),Pt(e,t,o.fn,o.options),o},e.prototype.remove=function(e){e.target&&(qt(e.target,e.type,e.fn,e.options),e.target=null,e.fn=void 0)},e.prototype.clear=function(){for(var e=0;e<this._listeners.length;e++)this._listeners[e].target&&this.remove(this._listeners[e]);this._listeners=[]},e.prototype.createChild=function(){var t=new e;return this._children.push(t),t},e.prototype.refresh=function(){for(var e=0,t=this._listeners;e<t.length;e++){var n=t[e];n.target&&(qt(n.target,n.type,n.fn,n.options),Pt(n.target,n.type,n.fn,n.options))}for(var r=0,i=this._children;r<i.length;r++){i[r].refresh()}},e}();function Nt(e,t){return t&&e.pageLeft==t.pageLeft&&e.pageTop==t.pageTop}function Wt(e,t){return t&&e.width==t.width&&e.height==t.height}function Dt(e){return{pageLeft:e.pageLeft,pageTop:e.pageTop,width:e.width,height:e.height}}var Bt=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),Ht=".*?"+/(?:[^\\](?:\\\\)*)/.source;new RegExp(Bt.map(function(e){var t=e[0],n=e[1];return"("+t+")("+Ht+")("+n+")"}).join("|"),"g");var jt=/url\(["']?(.+?)["']?\)/g,Kt=/^\s*\/\//;function Vt(e){return e&&e.body&&e.documentElement?"BackCompat"==e.compatMode?[e.body.clientWidth,e.body.clientHeight]:[e.documentElement.clientWidth,e.documentElement.clientHeight]:[0,0]}var zt=function(){function e(e,t){var n,r;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var i=e.document;if(i&&i.documentElement&&i.body){if("visualViewport"in e){var o=i.documentElement.getBoundingClientRect();this.hasKnownPosition=!0,this.pageLeft=0==o.left?0:-o.left,this.pageTop=0==o.top?0:-o.top}if(n=Vt(i),this.clientWidth=n[0],this.clientHeight=n[1],void 0!==t&&this.clientWidth==t.clientWidth&&this.clientHeight==t.clientHeight&&t.width>0&&t.height>0)return this.width=t.width,void(this.height=t.height);r=this.computeLayoutViewportSizeFromMediaQueries(e),this.width=r[0],this.height=r[1]}}return e.prototype.computeLayoutViewportSizeFromMediaQueries=function(e){var t=this.findMediaValue(e,"width",this.clientWidth,this.clientWidth+128);void 0===t&&(t=this.tryToGet(e,"innerWidth")),void 0===t&&(t=this.clientWidth);var n=this.findMediaValue(e,"height",this.clientHeight,this.clientHeight+128);return void 0===n&&(n=this.tryToGet(e,"innerHeight")),void 0===n&&(n=this.clientHeight),[t,n]},e.prototype.findMediaValue=function(e,t,n,r){if(s.matchMedia){var i=s.matchMedia(e,"(min-"+t+": "+n+"px)");if(null!=i){if(i.matches&&s.matchMedia(e,"(max-"+t+": "+n+"px)").matches)return n;for(;n<=r;){var o=s.mathFloor((n+r)/2);if(s.matchMedia(e,"(min-"+t+": "+o+"px)").matches){if(s.matchMedia(e,"(max-"+t+": "+o+"px)").matches)return o;n=o+1}else r=o-1}}}},e.prototype.tryToGet=function(e,t){try{return e[t]}catch(e){return}},e}();function Yt(e,t){return new zt(e,t)}var Gt=function(e,t){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var n=e.document;if(n.body){var r="BackCompat"==n.compatMode;"pageXOffset"in e?(this.pageLeft=e.pageXOffset,this.pageTop=e.pageYOffset):n.scrollingElement?(this.pageLeft=n.scrollingElement.scrollLeft,this.pageTop=n.scrollingElement.scrollTop):r?(this.pageLeft=n.body.scrollLeft,this.pageTop=n.body.scrollTop):n.documentElement&&(n.documentElement.scrollLeft>0||n.documentElement.scrollTop>0)?(this.pageLeft=n.documentElement.scrollLeft,this.pageTop=n.documentElement.scrollTop):(this.pageLeft=n.body.scrollLeft||0,this.pageTop=n.body.scrollTop||0),this.offsetLeft=this.pageLeft-t.pageLeft,this.offsetTop=this.pageTop-t.pageTop;try{var i=e.innerWidth,o=e.innerHeight}catch(e){return}if(0!=i&&0!=o){this.scale=t.width/i,this.scale<1&&(this.scale=1);var s=t.width-t.clientWidth,a=t.height-t.clientHeight;this.width=i-s/this.scale,this.height=o-a/this.scale}}};var Qt,Xt=(Qt=function(e,t){return(Qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Qt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Jt=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},$t=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Zt=function(){function e(){var t=this;this._wrappedTick=Mt.wrap(function(){t.unregister(),t._tick()}),this._due=0,this._id=e.nextId++}return e._rearm=function(){e.checkedAlready=!1,e.lastCheck=0},e.checkForBrokenSchedulers=function(){return Jt(this,void 0,et,function(){var t,n;return $t(this,function(r){switch(r.label){case 0:return!s.requestWindowAnimationFrame||e.checkedAlready?[2,void 0]:(t=p())-e.lastCheck<100?[2,void 0]:(e.lastCheck=t,e.checkedAlready=!0,[4,new et(function(e){return s.requestWindowAnimationFrame(window,e)})]);case 1:return r.sent(),n=[],ht(e.registry,function(e){var r=e.maybeForceTick(t);r&&n.push(r)}),[2,et.all(n).then(function(){s.requestWindowAnimationFrame(window,Mt.wrap(function(){e.checkedAlready=!1}))})];}})})},e.stopAll=function(){ht(this.registry,function(e){return e.stop()})},e.prototype.setTick=function(e){this._tick=e},e.prototype.stop=function(){this.cancel(),delete e.registry[this._id]},e.prototype.register=function(t){this._due=p()+100+1.5*t,e.registry[this._id]=this},e.prototype.unregister=function(){delete e.registry[this._id]},e.prototype.maybeForceTick=function(e){if(e>this._due)return et.resolve().then(this._wrappedTick)["catch"](function(){})},e.registry={},e.nextId=0,e.checkedAlready=!1,e.lastCheck=0,e}(),en=function(e){function t(t){var n=e.call(this)||this;return n._interval=t,n._handle=-1,n}return Xt(t,e),t.prototype.start=function(e){var t=this;-1==this._handle&&(this.setTick(function(){e(),t.register(t._interval)}),this._handle=s.setWindowInterval(window,this._wrappedTick,this._interval),this.register(this._interval))},t.prototype.cancel=function(){-1!=this._handle&&(s.clearWindowInterval(window,this._handle),this._handle=-1,this.setTick(function(){}))},t}(Zt),tn=function(e){function t(t,n,r){void 0===n&&(n=0);for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.call(this)||this;return s.delay=n,s.timer=-1,s.setTick(function(){t.apply(void 0===r?window:r,i),s.stop()}),s}return Xt(t,e),t.prototype.start=function(e){return void 0===e&&(e=this.delay),this.delay=e,s.clearWindowTimeout(window,this.timer),this.timer=s.setWindowTimeout(window,this._wrappedTick,this.delay),this.register(e),this},t.prototype.cancel=function(){-1!=this.timer&&(s.clearWindowTimeout(window,this.timer),this.timer=-1)},t}(Zt);!function(){function e(e){this.deadlineTime=e,this.didTimeout=this.deadlineTime<=p()}e.prototype.timeRemaining=function(){return this.deadlineTime-p()}}();var nn=function(){function e(e,t,n){this.limit=e,this.breaker=n,this.remaining=0,this.ticker=new en(t),this.open()}return e.prototype.guard=function(e){var t=this;return function(){return 0==t.remaining?(t.breaker(),void t.remaining--):t.remaining<0?void 0:(t.remaining--,e.apply(this,arguments))}},e.prototype.close=function(){return this.ticker.stop(),this},e.prototype.open=function(){var e=this;return this.remaining=this.limit,this.ticker.start(function(){e.remaining=e.limit}),this},e}(),rn=function(){function e(){this._reported=0,this._skew=0,this._startTime=l?l.timeOrigin:d.timeOrigin}return e.prototype.wallTime=function(){return p()},e.prototype.now=function(){var e=this.wallTime()-this._startTime;return e<0&&this._reportTimeSkew("timekeeper now() is negative"),e},e.prototype.startTime=function(){return this._startTime},e.prototype.setStartTime=function(e){var t=this.wallTime();this._startTime=e,e>t&&(this._skew=e-t,this._reportTimeSkew("timekeeper set with future ts"))},e.prototype._reportTimeSkew=function(e){this._reported++<=2&&Mt.sendToBugsnag(e,"error",{skew:this._skew,startTime:this._startTime,wallTime:this.wallTime()})},e}();function on(e){var t=e;return t.tagName?"object"==typeof t.tagName?"form":t.tagName.toLowerCase():null}var sn,an,un=n(3),cn=n(0),hn=Object.defineProperty,dn=p()%1e9,ln=window.WeakMap||((sn=function(){this.name="__st"+(1e9*s.mathRandom()>>>0)+dn++ +"__"}).prototype={set:function(e,t){var n=e[this.name];n&&n[0]===e?n[1]=t:hn(e,this.name,{value:[e,t],writable:!0})},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0}},sn),pn=1,fn=4,vn=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};function _n(e){if(null==e)return 0;switch(e){case an.Exclude:return 5;case an.Mask:return 4;case an.Unmask:return 3;case an.Watch:return 2;case an.Keep:return 1;default:return Object(cn.assertExhaustive)(e,"Undefined watch kind: "+e);}}!function(e){e[e.Exclude=1]="Exclude",e[e.Mask=2]="Mask",e[e.Unmask=3]="Unmask",e[e.Watch=4]="Watch",e[e.Keep=5]="Keep"}(an||(an={}));var gn={1:"exclude",2:"mask",3:"unmask",4:"watch",5:"keep"},mn=[an.Exclude,an.Mask,an.Unmask,an.Watch,an.Keep],yn=function(){function e(e){void 0===e&&(e="matches"),this._watchStrategy=e,this._hasWatched=!1,this._rules=Sn(),this._consentRules=Sn()}return e.prototype.initialize=function(e){var t=e.blocks,n=e.keeps,r=e.watches,i=e.flags;this._watchStrategy=i.watchStrategy;var o=vn(un);if(i.whitelist&&o.push({Type:Z.Mask,Consent:j.RevokeConsent,Selector:"body"}),t)for(var s=0,a=t;s<a.length;s++){var u=a[s];o.push(u)}if(r)for(var c=0,h=r;c<h.length;c++){var d=h[c];o.push({Type:Z.Watch,Consent:j.RevokeConsent,Selector:d.Selector})}this._batchElementBlocks(o),n&&this._batchElementKeeps(n)},e.prototype.isWatched=function(e){var t=[an.Exclude,an.Mask,an.Unmask,an.Watch,an.Keep];return this._firstMatch(t,e)},e.prototype.matchesAnyKeepRule=function(e){var t=[an.Keep];return null!==this._firstMatch(t,e)},e.prototype.matchesAnyConsentRule=function(e){var t=[an.Exclude,an.Mask,an.Unmask,an.Keep];return null!==this._firstConsentMatch(t,e)},e.prototype._firstMatch=function(e,t){this._hasWatched=!0;for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0,s=this._rules[i];o<s.length;o++){var a=s[o];if(rt(t,a))return i}return this._consent?null:this._firstConsentMatch(e,t)},e.prototype._firstConsentMatch=function(e,t){for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0,s=this._consentRules[i];o<s.length;o++){var a=s[o];if(rt(t,a))return i}return null},e.prototype._batchElementBlocks=function(e){var t=this,n=Sn(),r=Sn();e.map(wn).filter(function(e){return bn(e.selector)}).forEach(function(e){e.consent?r[e.kind].push(e):n[e.kind].push(e)});for(var i=document.documentElement||document.createElement("div"),o=function(e,n){try{var r=e.map(function(e){return e.selector}).join(", ");rt(i,r),n.push(r)}catch(n){Mt.sendToBugsnag("Browser rejected optimistic merge rule","warning"),t._fallback(e)}},s=0,a=mn;s<a.length;s++){var u=a[s];n[u].length>0&&o(n[u],this._rules[u]),r[u].length>0&&o(r[u],this._consentRules[u])}},e.prototype._fallback=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t],i=r.kind,o=r.consent,s=r.selector;this.addRule(i,o,s)}},e.prototype.addElementBlock=function(e){var t=wn(e),n=t.kind,r=t.consent,i=t.selector;return this.addRule(n,r,i)},e.prototype._batchElementKeeps=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addElementKeep(r)}},e.prototype.addElementKeep=function(e){var t=an.Keep;switch(e.Type){case ee.Click:break;default:return!1;}return this.addRule(t,e.Consent,e.Selector)},e.prototype.addRule=function(e,t,n){if(this.tryToAddRule(e,t,n))return!0;switch(e){case an.Watch:case an.Unmask:case an.Keep:break;case an.Mask:case an.Exclude:default:this._rules[e]=["*"];}return!1},e.prototype.tryToAddRule=function(e,t,n){try{return!bn(n)||this.mergeRule(e,t,n)}catch(e){return Mt.sendToBugsnag("Error adding block rule","error",{selector:n,error:e.toString()}),!1}},e.prototype.getConsent=function(){return this._consent},e.prototype.initializeConsent=function(e){void 0===this._consent&&this.setConsent(e)},e.prototype.setConsent=function(e){this._consent!==e&&(this._consent=e,this._hasWatched&&this.onConsentChange&&this.onConsentChange())},e.prototype.mergeRule=function(e,t,n){var r=t?this._consentRules:this._rules,i=document.documentElement||document.createElement("div"),o=function(){try{return rt(i,n),!0}catch(t){return Mt.sendToBugsnag("Browser rejected rule","warning",{kind:gn[e],selector:n,error:t.toString()}),!1}};switch(e){case an.Exclude:case an.Mask:case an.Unmask:case an.Watch:case an.Keep:break;default:e=an.Exclude;}if(0==r[e].length)return!!o()&&(r[e].push(n),!0);var s=r[e].length-1,a=r[e][s].concat(", ",n);try{rt(i,a)}catch(t){return!!o()&&(r[e].push(n),Mt.sendToBugsnag("Browser rejected merged rule","warning",{kind:gn[e],selector:n,error:t.toString()}),!0)}return r[e][s]=a,!0},e.prototype.allConsentSensitiveElements=function(e){for(var t=[],n=0,r=[an.Exclude,an.Mask,an.Unmask,an.Keep];n<r.length;n++)for(var i=r[n],o=0,s=this._consentRules[i];o<s.length;o++)for(var a=s[o],u=e.querySelectorAll(a),c=0;c<u.length;c++)t.push(u[c]);return t},e.prototype.allWatchedElements=function(e){var t=this;if("matches"===this._watchStrategy)return null;this._hasWatched=!0;for(var n=new ln,r=function(e,r,i){var o=n.get(e)||{kind:null,matchesAnyKeepRule:!1,matchesAnyConsentRule:i};(!i||i&&!t._consent)&&(null==o.kind&&(o.kind=r),r===an.Keep&&(o.matchesAnyKeepRule=!0)),i&&(o.matchesAnyConsentRule=!0),n.set(e,o)},i=0,o=[[this._rules,!1],[this._consentRules,!0]];i<o.length;i++)for(var s=o[i],a=s[0],u=s[1],c=0,h=mn;c<h.length;c++)for(var d=h[c],l=0,p=a[d];l<p.length;l++){var f=p[l];En(e)&&rt(e,f)&&r(e,d,u);for(var v=e.querySelectorAll(f),_=0;_<v.length;_++)r(v[_],d,u)}return n},e.prototype.getWatchStrategy=function(){return this._watchStrategy},e}();function wn(e){var t=an.Exclude;switch(e.Type){case Z.Unset:case Z.Exclude:t=an.Exclude;break;case Z.Mask:t=an.Mask;break;case Z.Unmask:t=an.Unmask;break;case Z.Watch:t=an.Watch;break;case Z.Keep:t=an.Keep;}return{kind:t,consent:e.Consent,selector:e.Selector}}function bn(e){return!e.match(Kt)&&""!=e.trim()}function Sn(){for(var e=Object.create?Object.create(null):{},t=0,n=mn;t<n.length;t++){e[n[t]]=[]}return e}function En(e){return e.nodeType===pn}var Tn={},kn=1;function In(e){var t=xn(e);return!!t&&void 0!==t.watchKind}function Cn(e){var t=xn(e);return!!t&&t.watchKind==an.Exclude}function Rn(e){var t=xn(e);return!!t&&!!t.mask}function An(e){var t=xn(e);return t?t.watchKind:void 0}function xn(e){return e?Tn[e._fs]:null}function On(e){return Tn[e]}function Mn(e){try{return e&&e._fs||0}catch(e){return 0}}function Ln(e){return Cn(e)?0:Mn(e)}function Fn(e,t){e.parent&&(t.unobserveSubtree(e.node),e.parent.child==e&&(e.parent.child=e.next),e.parent.lastChild==e&&(e.parent.lastChild=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent=e.prev=e.next=null,delete Tn[e.id],e.node._fs==e.id&&(e.node._fs=0),e.id=0,e.child&&Pn(e.child))}function Pn(e){for(var t=[e];t.length>0&&t.length<1e4;){var n=t.pop();delete Tn[n.id],n.node._fs==n.id&&(n.node._fs=0),n.id=0,n.next&&t.push(n.next),n.child&&t.push(n.child)}Ft(t.length<1e4,"clearIds is fast")}var qn,Un=function(){function e(e,t){this._onchange=e,this._checkElem=t,this._fallback=!1,this._elems={},this.values={},this.radios={},qn=this}return e.prototype.hookEvents=function(){(function(){var e=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(!e||!e.set)return!1;Nn||(kt(HTMLInputElement,"value",jn),kt(HTMLInputElement,"checked",jn),kt(HTMLSelectElement,"value",jn),kt(HTMLTextAreaElement,"value",jn),kt(HTMLSelectElement,"selectedIndex",jn),kt(HTMLOptionElement,"selected",jn),Nn=!0);return!0})()||(this._fallback=!0)},e.prototype.addInput=function(e){var t=Mn(e);if(this._elems[t]=e,Vn(e)){var n=Hn(e);e.checked&&(this.radios[n]=t)}else this.values[t]=Kn(e);(function(e){switch(e.type){case"checkbox":case"radio":return e.checked!=e.hasAttribute("checked");default:return(e.value||"")!=function(e){if("select"!=on(e))return e.getAttribute("value")||"";var t=e,n=t.querySelector("option[selected]")||t.querySelector("option");if(!n)return"";return n.value||""}(e);}})(e)&&this._onchange(e)},e.prototype.diffValue=function(e,t){var n=Mn(e);if(Vn(e)){var r=Hn(e);return this.radios[r]==n!=("true"==t)}return this.values[n]!=t},e.prototype.onChange=function(e,t){void 0===t&&(t=Kn(e));var n=Mn(e);if((e=this._elems[n])&&this.diffValue(e,t))if(this._onchange(e),Vn(e)){var r=Hn(e);"false"==t&&this.radios[r]==n?delete this.radios[r]:this.radios[r]=n}else this.values[n]=t},e.prototype.tick=function(){for(var e in this._elems){var t=this._elems[e];if(this._checkElem(t)){if(this._fallback){var n=Kn(t);if(t&&this.diffValue(t,n))if(this._onchange(t),Vn(t)){var r=Hn(t);this.radios[r]=+e}else this.values[e]=n}}else delete this._elems[e],delete this.values[e],Vn(t)&&delete this.radios[Hn(t)]}},e.prototype.shutdown=function(){qn=null},e.prototype._usingFallback=function(){return this._fallback},e.prototype._trackingElem=function(e){return!!this._elems[e]},e}(),Nn=!1;var Wn,Dn={};function Bn(){try{if(qn)for(var e in Dn){var t=Dn[e],n=t[0],r=t[1];qn.onChange(n,r)}}finally{Wn=null,Dn={}}}function Hn(e){if(!e)return"";for(var t=e;t&&"form"!=on(t);)t=t.parentElement;return(t&&"form"==on(t)?Mn(t):0)+":"+e.name}function jn(e,t){var n=function e(t,n){if(void 0===n&&(n=2),n<=0)return t;var r=on(t);return"option"!=r&&"optgroup"!=r||!t.parentElement?t:e(t.parentElement,n-1)}(e),r=Mn(n);r&&qn&&qn.diffValue(n,""+t)&&(Dn[r]=[n,""+t],Wn||(Wn=new tn(Bn)).start())}function Kn(e){switch(e.type){case"checkbox":case"radio":return""+e.checked;default:var t=e.value;return t||(t=""),""+t;}}function Vn(e){return e&&"radio"==e.type}var zn={};var Yn="__default";function Gn(e){void 0===e&&(e=Yn);var t=zn[e];return t||(t=function(){var e=document.implementation.createHTMLDocument("");return e.head||e.documentElement.appendChild(e.createElement("head")),e.body||e.documentElement.appendChild(e.createElement("body")),e}(),e!==Yn&&(t.open(),t.write(e),t.close()),zn[e]=t),t}var Qn=new(function(){function e(){var e=Gn(),t=e.getElementById("urlresolver-base");t||((t=e.createElement("base")).id="urlresolver-base",e.head.appendChild(t));var n=e.getElementById("urlresolver-parser");n||((n=e.createElement("a")).id="urlresolver-parser",e.head.appendChild(n)),this.base=t,this.parser=n}return e.prototype.parseUrl=function(e,t){if("undefined"!=typeof URL)try{e||(e=document.baseURI);var n=e?new URL(t,e):new URL(t);if(n.href)return n}catch(e){}return this.parseUrlUsingBaseAndAnchor(e,t)},e.prototype.parseUrlUsingBaseAndAnchor=function(e,t){this.base.setAttribute("href",e),this.parser.setAttribute("href",t);var n=document.createElement("a");return n.href=this.parser.href,n},e.prototype.resolveUrl=function(e,t){return this.parseUrl(e,t).href},e.prototype.resolveToDocument=function(e,t){var n=Jn(e);return null==n?t:this.resolveUrl(n,t)},e}());function Xn(e,t){return Qn.parseUrl(e,t)}function Jn(e){var t=e.document,n=e.location.href;if("string"==typeof t.baseURI)n=t.baseURI;else{var r=t.getElementsByTagName("base")[0];r&&r.href&&(n=r.href)}return"about:blank"==n&&e.parent!=e?Jn(e.parent):n}var $n=new RegExp("[^\\s]"),Zn=new RegExp("[\\s]*$");String.prototype;function er(e){var t=$n.exec(e);if(!t)return e;for(var n=t.index,r=(t=Zn.exec(e))?e.length-t.index:0,i="\uFFFF",o=e.slice(n,e.length-r).split(/\r\n?|\n/g),s=0;s<o.length;s++)i+=""+o[s].length,s!=o.length-1&&(i+=":");return(n||r)&&(i+=" "+n+" "+r),i}var tr=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","referrerPolicy","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].reduce(function(e,t){return e[t]=t,e[t.toUpperCase()]=t,e},{}),nr=n(2),rr="(redacted)",ir=16e6;function or(e,t){var n=e.textContent;if(!n)return"";if(!t&&!(t=xn(e)))return"";var r=n.length;return r>ir?(Mt.sendToBugsnag("Ignoring huge text node","warning",{length:r}),""):e.parentNode&&"style"==on(e.parentNode)?n:t.mask?er(n):n}function sr(e){return tr[e]||e.toLowerCase()}function ar(e,t,n,r){var i,o=on(t);if(null===o)return null;var s=function(e){var t,r,s;i=null!==(r=null===(t=nr[e][o])||void 0===t?void 0:t[n])&&void 0!==r?r:null===(s=nr[e]["*"])||void 0===s?void 0:s[n]};if(s("Any"),void 0===i){var a=xn(t);if(!a)return null;a.watchKind==an.Exclude?s("Exclude"):a.mask&&s("Mask")}if(void 0===i)return r;switch(i){case"erase":return null;case"scrubUrl":return ur(r,e,{source:"dom",type:o});case"maskText":return er(r);default:return Object(cn.assertExhaustive)(i);}}function ur(e,t,n){switch(n.source){case"dom":switch(r=n.type){case"frame":case"iframe":return hr(e,t);default:return cr(e,t);}case"event":switch(r=n.type){case R.AJAX_REQUEST:case R.NAVIGATE:return cr(e,t);case R.SET_FRAME_BASE:return hr(e,t);default:return Object(cn.assertExhaustive)(r);}case"log":return hr(e,t);case"page":var r;switch(r=n.type){case"base":return hr(e,t);case"referrer":case"url":return cr(e,t);default:return Object(cn.assertExhaustive)(r);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return hr(e,t);default:return cr(e,t);}default:return Object(cn.assertExhaustive)(n);}}function cr(e,t){return lr(e,t,function(e){if(!(e in pr)){var t=["password","token","^jwt$"];switch("4K3FQ"!==e&&"NQ829"!==e&&"KCF98"!==e&&t.push("^code$"),e){case"2FVM4":t.push("^e$","^eref$","^fn$");break;case"35500":t.push("share_token","password-reset-key");break;case"1HWDJ":t.push("email_id","invite","join");break;case"J82WF":t=[".*"];break;case"8MM83":t=["^creditCard"];break;case"PAN8Z":t.push("code","hash","ol","aeh");break;case"BKP05":t.push("api_key","session_id","encryption_key");break;case"QKM7G":t.push("postcode","encryptedQuoteId","registrationId","productNumber","customerName","agentId","qqQuoteId");break;case"FP60X":t.push("phrase");break;case"GDWG7":t=["^(?!productType|utmSource).*$"];break;case"RV68C":t.push("drivingLicense");break;case"S3VEC":t.push("data");break;case"Q8RZE":t.push("myLowesCardNumber");}pr[e]=new RegExp(t.join("|"),"i")}return pr[e]}(t))}function hr(e,t){return lr(e,t,fr)}function dr(e,t,n,r){var i=new RegExp("(\\/"+t+"\\/).*$","i");n==r&&e.pathname.indexOf(t)>=0&&(e.pathname=e.pathname.replace(i,"$1"+rr))}function lr(e,t,n){var r=Xn("",e);return r.hash&&r.hash.indexOf("access_token")>=0&&(r.hash="#"+rr),dr(r,"visitor",t,"QS8RG"),dr(r,"account",t,"QS8RG"),dr(r,"parentAccount",t,"QS8RG"),dr(r,"reset_password",t,"AGQFM"),dr(r,"reset-password",t,"95NJ7"),dr(r,"dl",t,"RV68C"),dr(r,"retailer",t,"FP60X"),dr(r,"ocadotech",t,"FP60X"),dr(r,"serviceAccounts",t,"FP60X"),dr(r,"signup",t,"7R98D"),r.search&&r.search.length>0&&(r.search=function(e,t){return e.split("?").map(function(e){return function(e,t){return e.replace("?","").split("&").map(function(e){return e.split("=")}).map(function(e){var n=e[0],r=e[1],i=e.slice(2);return t.test(n)&&void 0!==r?[n,rr].concat(i):[n,r].concat(i)}).map(function(e){var t=e[0],n=e[1],r=e.slice(2);return void 0===n?t:[t,n].concat(r).join("=")}).join("&")}(e,t)}).join("?")}(r.search,n)),r.href.substring(0,2048)}var pr={};var fr=new RegExp(".*","i");var vr=/([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)/gi,_r=/(?:(http)|(ftp)|(file))[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+#]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/gi;function gr(e){return"function"==typeof(t=e.constructor)&&Function.prototype.toString.call(t).indexOf("[native code]")>-1;var t}var mr=function(){function e(e,t,n){this._watcher=e,this._resizer=t,this._orgId=n,Tn={},kn=1}return e.prototype.tokenizeNode=function(e,t,n,r,i,o,s){var a=this,u=xn(t),c=xn(n),h=[];return function(e){var t=kn;try{return e(),!0}catch(e){return kn=t,!1}}(function(){a.tokeNode(e,u,c,r,h,i,o,s)})||(h=[]),h},e.prototype.tokeNode=function(e,t,n,r,i,o,s,a){for(var u=[{parentMirror:t,nextMirror:n,node:r}],c=function(){var t=u.pop();if(!t)return"continue";if("string"==typeof t)return i.push(t),"continue";var n=t.parentMirror,r=t.nextMirror,c=t.node,d=h._encodeTagAndAttributes(e,n,r,c,i,o,s);if(null==d||d.watchKind===an.Exclude)return"continue";var l=c.nodeType===pn?c.shadowRoot:null;return(l||c.firstChild)&&a(d)?(u.push("]"),function(e,t){if(!e)return;var n=[];ft(e,function(e){return n.push(e)});for(;n.length>0;){var r=n.pop();r&&t(r)}}(c.firstChild,function(e){u.push({parentMirror:d,nextMirror:null,node:e})}),l&&u.push({parentMirror:d,nextMirror:null,node:l}),void u.push("[")):"continue"},h=this;u.length;)c()},e.prototype._encodeTagAndAttributes=function(e,t,n,r,i,o,s){if("script"==on(r)||8==r.nodeType)return null;var a,u,c,h,d=function(e){return e.constructor===window.ShadowRoot}(r),l=function(e){var t={id:kn++,node:e};return Tn[t.id]=t,e._fs=t.id,t}(r);if((d||(null==t?void 0:t.isInShadowDOM))&&(l.isInShadowDOM=!0),t&&(d?t.shadow=l:(a=t,u=l,c=n,h=this._resizer,Fn(u,h),u.parent=a,u.next=c,c&&(u.prev=c.prev,c.prev=u),null==u.next?(u.prev=a.lastChild,a.lastChild=u):u.next.prev=u,null==u.prev?a.child=u:u.prev.next=u)),10==r.nodeType){var p=r;return i.push("<!DOCTYPE",":name",p.name,":publicId",p.publicId||"",":systemId",p.systemId||""),l}try{switch(r.nodeType){default:i.push("<"+r.nodeName),yr(r,o);break;case 11:case 9:var f;f=d?gr(r)?"#shadow":"#polyfillshadow":r.nodeName,i.push("<"+f),yr(r,o);break;case 3:void 0===l.mask&&(l.mask=!l.parent||l.parent.mask),l.mask&&this._resizer.observe(r.parentElement),yr(r,o),i.push("<"+r.nodeName,or(r,l));break;case pn:var v=r,_=v.nodeName;"http://www.w3.org/2000/svg"==v.namespaceURI&&(_="svg:"+_),i.push("<"+_);var g=this.getWatchState(v,!!l.isInShadowDOM,e),m=g.watchKind,y=g.matchesAnyKeepRule,w=g.matchesAnyConsentRule;if(l.matchesAnyKeepRule=y,l.matchesAnyConsentRule=w,null!=m)switch(l.watchKind=m,m){case an.Watch:this._resizer.observe(v);break;case an.Exclude:this._resizer.observe(v),i.push(":_fs_excluded","true");break;case an.Unmask:l.mask=!1;break;case an.Mask:l.mask=!0;}m!==an.Unmask&&m!==an.Mask&&l.parent&&(l.mask=l.parent.mask),l.mask&&i.push(":_fs_masked","true"),l.watchKind!=an.Exclude&&yr(r,o),function(e,t,n){if(ce&&"output"===on(t))return;var r=t;if(void 0!==r.hasAttributes&&!r.hasAttributes()||void 0===r.hasAttributes&&r.attributes&&r.attributes.length<=0)return;var i=function(r,i){null!==i&&(r=sr(r),null!==(i=ar(e,t,r,i))&&n(r,i))};if(void 0!==r.getAttributeNames)for(var o=0,s=r.getAttributeNames();o<s.length;o++){var a=s[o];i(a,r.getAttribute(a))}else for(var u=0;u<r.attributes.length;u++){var c=r.attributes[u];null!=c&&i(c.name,c.value)}}(this._orgId,v,function(e,t){i.push(":"+e),i.push(t);try{s(v,e,t)}catch(e){Mt.sendToBugsnag(e,"error")}});}}catch(e){Mt.sendToBugsnag(e,"error")}return l},e.prototype.getWatchState=function(e,t,n){var r=t||null==n?"matches":this._watcher.getWatchStrategy();switch(r){case"matches":return{watchKind:this._watcher.isWatched(e),matchesAnyKeepRule:this._watcher.matchesAnyKeepRule(e),matchesAnyConsentRule:this._watcher.matchesAnyConsentRule(e)};case"qsa":var i=n.get(e);return i?{watchKind:i.kind,matchesAnyKeepRule:i.matchesAnyKeepRule,matchesAnyConsentRule:i.matchesAnyConsentRule}:{watchKind:null,matchesAnyKeepRule:!1,matchesAnyConsentRule:!1};case"verify":var o=n.get(e),s={watchKind:this._watcher.isWatched(e),matchesAnyKeepRule:this._watcher.matchesAnyKeepRule(e),matchesAnyConsentRule:this._watcher.matchesAnyConsentRule(e)};return null!==s.watchKind&&void 0===o?Mt.sendToBugsnag("Watch strategy qsa digest doesn't contain el","error",{matchesDigest:s,qsaDigest:o}):null!==s.watchKind&&void 0!==o?s.watchKind===o.kind&&s.matchesAnyConsentRule===o.matchesAnyConsentRule&&s.matchesAnyKeepRule===o.matchesAnyKeepRule||Mt.sendToBugsnag("Watch strategy qsa digest inconsistency","error",{matchesDigest:s,qsaDigest:o}):null===s.watchKind&&void 0!==o&&null!==o.kind&&Mt.sendToBugsnag("Watch strategy qsa digest flagged an element matches didn't","error",{matchesDigest:s,qsaDigest:o}),s;default:return Object(cn.assertExhaustive)(r);}},e}();function yr(e,t){try{t(e)}catch(e){Mt.sendToBugsnag(e,"error")}}var wr=function(){function e(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return e.prototype.encode=function(t){if(0==t.length)return[];var n,r,i=t[0],o=Object.prototype.hasOwnProperty.call(this.dict.map,i)?this.dict.map[i]:null,s=[],a=1;function u(){o?a>1?s.push([o.idx,a]):s.push(o.idx):s.push(i)}for(n=1;n<t.length;n++)if(r=t[n],o&&Object.prototype.hasOwnProperty.call(o.map,r))a++,i=r,o=o.map[r];else{u();var c=this.startIdx+n-a;null==o&&this.nodeCount<e.MAX_NODES&&(o={idx:c,map:{}},this.dict.map[i]=o,this.nodeCount++),o&&this.nodeCount<e.MAX_NODES&&(o.map[r]={idx:c,map:{}},this.nodeCount++),a=1,i=r,o=Object.prototype.hasOwnProperty.call(this.dict.map,r)?this.dict.map[r]:null}return u(),this.startIdx+=t.length,s},e.MAX_NODES=1e4,e}(),br=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sr=function(){return(Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Er=function(){function e(e){this._ctx=e,this._recordedDims={},this._observedDims={}}return e.create=function(e){return Tr.isSupported(e.window)?new Tr(e):new kr(e)},e.prototype.collect=function(e){var t=[];for(var n in this._observedDims)this.addPlaceholderResize(e,t,Number(n));return this._observedDims={},t},e.prototype.addEntry=function(e){try{var t=Mn(e);if(!t)return;if(e.nodeType!=pn)return;var n=e;if(this._observedDims[t]=n.getBoundingClientRect(),!this._recordedDims[t]){var r=this.flushSizeEvent(t);if(!r)return;this._ctx.queue().enqueue(r)}}catch(e){}},e.prototype.addPlaceholderResize=function(e,t,n){var r=this.flushSizeEvent(n);r&&t.push(Sr(Sr({},r),{When:e}))},e.prototype.flushSizeEvent=function(e){var t=this._observedDims[e];if(!t)return null;var n=On(e);if(!n)return null;var r=n.watchKind,i=t.width,o=t.height,s=this._recordedDims[e];if(s&&s.w==i&&s.h==o)return null;if(this._recordedDims[e]={w:i,h:o},r==an.Watch){var a=0!=i&&0!=o;if((!!s&&0!=s.w&&0!=s.h)!=a)return{Kind:R.WATCHED_ELEM,Args:[e,a]}}return{Kind:R.PLACEHOLDER_SIZE,Args:[e,i,o]}},e}(),Tr=function(e){function t(t){var n=e.call(this,t)||this;return n._inlineGroups=new ln,n._observedInlines=new ln,n._obs=new t.window.ResizeObserver(function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t].target;n.addEntry(i)}}),n._inlineGroupObs=new t.window.ResizeObserver(function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t].target;n._addEntriesForInlineGroup(i)}}),n}return br(t,e),t.isSupported=function(e){return"ResizeObserver"in e},t.prototype.observe=function(e){var t=this;if(e&&e.nodeType==pn){var n=e;this._obs.unobserve(n),this._obs.observe(n),this._ctx.measurer.requestMeasureTask(function(){t._addToInlineGroupIfNeeded(n)})}},t.prototype.unobserveSubtree=function(e){},t.prototype.nodeChanged=function(e){var t=this,n=this._observedInlines.get(e);"number"==typeof n&&Mn(e)===n&&this._ctx.measurer.requestMeasureTask(function(){t.addEntry(e)})},t.prototype._addEntriesForInlineGroup=function(e){var t=this._inlineGroups.get(e);if(t)for(var n in t){var r=On(t[n]);r?this.addEntry(r.node):delete t[n]}},t.prototype._addToInlineGroupIfNeeded=function(e){var t=this,n=Mn(e);if(n){var r=this._nearestNonInlineElementAncestorOf(e);if(r&&r!==e){this._observedInlines.set(e,n),this.addEntry(e);var i=this._inlineGroups.get(r);i||(i=Object.create(null),this._inlineGroups.set(r,i)),i[n]=n,s.setWindowTimeout(this._ctx.window,ie(function(){t._inlineGroupObs.observe(r)}),0)}}},t.prototype._nearestNonInlineElementAncestorOf=function(e){for(var t=0,n=e;;){if(t++>1e3)return null;if(!n||n.nodeType!=pn)return null;var r=n;if(getComputedStyle(r).display.indexOf("inline")<0)return r;n=n.parentNode}},t}(Er),kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return br(t,e),t.prototype.observe=function(e){var t=this;if(e&&e.nodeType==pn){var n=e;this.growWatchedIndex(xn(e)),this._ctx.measurer.requestMeasureTask(function(){t.addEntry(n)})}},t.prototype.unobserveSubtree=function(e){var t=xn(e);t&&this.clearWatchedIndex(t)},t.prototype.nodeChanged=function(e){var t=this,n=this.relatedWatched(e);this._ctx.measurer.requestMeasureTask(function(){for(var e=0,r=n;e<r.length;e++){var i=r[e];t.addEntry(i)}})},t.prototype.watchedChildren=function(e){return e.watchedChildren},t.prototype.growWatchedIndex=function(e){if(e&&In(e.node))for(var t=e,n=e.parent;n;n=n.parent){if(this.watchedChildren(n)||(n.watchedChildren={}),this.watchedChildren(t))for(var r in this.watchedChildren(t))delete this.watchedChildren(n)[r];if(this.watchedChildren(n)[t.id]=t,lt(this.watchedChildren(n),2))t=n;else if(pt(this.watchedChildren(n),2))break}},t.prototype.relatedWatched=function(e){var t=[],n=xn(e);if(n)for(var r=[n],i=0;r.length&&++i<1e3;){var o=r.pop();In(o.node)&&t.push(o.node),this.watchedChildren(o)&&ht(this.watchedChildren(o),function(e){r.push(e)})}else{for(var s=e;s&&!Mn(s);)s=s.parentNode;s&&In(s)&&t.push(s)}return t},t.prototype.clearWatchedIndex=function(e){if(pt(this.watchedChildren(e),0)||In(e.node))for(var t=this.watchedChildren(e)&&pt(this.watchedChildren(e),1)||In(e.node)?e.id:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return t}(this.watchedChildren(e)),n=t?e.parent:null;n&&this.watchedChildren(n)&&this.watchedChildren(n)[t];){if(delete this.watchedChildren(n)[t],lt(this.watchedChildren(n),1)){var r=n.id,i=dt(this.watchedChildren(n));for(n=n.parent;n&&this.watchedChildren(n)&&this.watchedChildren(n)[r];)delete this.watchedChildren(n)[r],this.watchedChildren(n)[i.id]=i,n=n.parent;break}n=n.parent}},t}(Er),Ir=function(){return(Ir=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Cr={attributeName:null,attributeNamespace:null,addedNodes:[],removedNodes:[],nextSibling:null,previousSibling:null,oldValue:null};function Rr(e){return Ir(Ir(Ir({},Cr),e),{type:"childList"})}function Ar(e,t){return 0===t.length?Rr({target:e}):Rr({addedNodes:t,nextSibling:ut(t[t.length-1]),previousSibling:vt(t[0]),target:e})}var xr=ae&&!ue?Dr:window.MutationObserver||window.WebKitMutationObserver||Dr,Or=new ln,Mr=window.setImmediate||window.msSetImmediate;if(!Mr){var Lr=[],Fr=String(s.mathRandom());window.addEventListener("message",function(e){if(e.data===Fr){var t=Lr;Lr=[],t.forEach(function(e){e()})}}),Mr=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Lr.push(e),window.postMessage(Fr,"*"),0}}var Pr=!1,qr=[];function Ur(){Pr=!1;var e=qr;qr=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();!function(e){e.nodes_.forEach(function(t){var n=Or.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}(e),n.length&&(e.callback_(n,e),t=!0)}),t&&Ur()}function Nr(e,t){for(var n=e;n;n=n.parentNode){var r=Or.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],s=o.options;if(n===e||s.subtree){var a=t(s);a&&o.enqueue(a)}}}}var Wr=0;function Dr(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++Wr}Dr.prototype={observe:function(e,t){if(e=function(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n,r=Or.get(e);r||Or.set(e,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=t;break}n||(n=new Yr(this,e,t),r.push(n),this.nodes_.push(e)),n.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=Or.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var Br,Hr,jr=function(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null};function Kr(e,t){return Br=new jr(e,t)}function Vr(e){return Hr||((n=new jr((t=Br).type,t.target)).addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,(Hr=n).oldValue=e,Hr);var t,n}function zr(e,t){return e===t?e:Hr&&((n=e)===Hr||n===Br)?Hr:null;var n}function Yr(e,t,n){var r=this;this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[],this.handleEventBound=function(e){return r.handleEvent_(e)}}Yr.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(t.length>0){var r=zr(t[n-1],e);if(r)return void(t[n-1]=r)}else!function(e){qr.push(e),Pr||(Pr=!0,Mr(Ur))}(this.observer);t[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this.handleEventBound,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this.handleEventBound,!0),t.childList&&e.addEventListener("DOMNodeInserted",this.handleEventBound,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this.handleEventBound,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this.handleEventBound,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this.handleEventBound,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this.handleEventBound,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this.handleEventBound,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=Or.get(e);t||Or.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=Or.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent_:function(e){switch(e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=Kr("attributes",a=e.target);r.attributeName=t,r.attributeNamespace=n;var i=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;Nr(a,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||-1!==e.attributeFilter.indexOf(t)||-1!==e.attributeFilter.indexOf(n)))return e.attributeOldValue?Vr(i):r});break;case"DOMCharacterDataModified":var o=Kr("characterData",a=e.target),s=e.prevValue;Nr(a,function(e){if(e.characterData)return e.characterDataOldValue?Vr(s):o});break;case"DOMNodeRemoved":case"DOMNodeInserted":"DOMNodeRemoved"==e.type&&this.addTransientObserver(e.target);var a=e.relatedNode,u=e.target,c=void 0,h=void 0;"DOMNodeInserted"===e.type?(c=[u],h=[]):(c=[],h=[u]);var d=vt(u),l=ut(u),p=Kr("childList",a);p.addedNodes=c,p.removedNodes=h,p.previousSibling=d,p.nextSibling=l,Nr(a,function(e){if(e.childList)return p});}Br=Hr=void 0}};var Gr=function(){return(Gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Qr=function(){function e(e,t,n,r,i,o,s){var a=this;void 0===n&&(n=!0),void 0===r&&(r=function(){}),void 0===i&&(i=function(){}),void 0===o&&(o=function(){}),void 0===s&&(s=function(){return!0}),this._ctx=e,this._watcher=t,this._compress=n,this._nodeVisitor=r,this._beforeRemove=i,this._attrVisitor=o,this._visitChildren=s,this._sentDomSnapshot=!1,this._newShadowContainers=[],this._toRefresh=[],this._records=[],this._setPropertyWasThrottled=!1,this._wnd=e.window,this._resizer=Er.create(e),this._encoder=new mr(t,this._resizer,e.options.orgId),Ft(!this._watcher.onConsentChange,"This is the only consent change listener."),this._watcher.onConsentChange=function(){return a.updateConsent()}}return e.prototype.hookMutations=function(e){void 0===e&&(e=this._wnd.document),this._root=e,this._sentDomSnapshot=!1,this._compress&&(this._lz=new wr);var t=!0;if(ae)try{this.setUpIEWorkarounds()}catch(e){o("Error setting up IE workarounds for mutation watcher: "+e),t=!1}t&&(this._observer=new xr(this._addMutations.bind(this)))},e.prototype._observerOff=function(){this._observer&&this._observer.disconnect()},e.prototype._addMutations=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this._records.push(r)}},e.prototype.resizer=function(){return this._resizer},e.prototype.shutdown=function(){this._observer&&this._observer.disconnect();var e=xn(this._root);e&&Pn(e),this._records=[],ae&&this.tearDownIEWorkarounds(),this._watcher.onConsentChange=null,this._attachShadowHook&&(this._attachShadowHook.disable(),this._attachShadowHook=null)},e.prototype.processMutations=function(e){if(!this._root)return[];var t=[];if(this.maybeGetInitialSnapshot(e,t),this._setPropertyWasThrottled&&(t.push({Kind:R.FAIL_THROTTLED,When:e,Args:[Q.SetPropertyHooks]}),this._setPropertyWasThrottled=!1),this._records.length>0||this._toRefresh.length>0){var n={},r={};for(var i in this.processRecords(e,t,r,n),r){var o=i.split("\t");t.push({Kind:R.MUT_ATTR,When:e,Args:[parseInt(o[0]),o[1],r[i]]})}for(var i in n)t.push({Kind:R.MUT_TEXT,When:e,Args:[parseInt(i),n[i]]})}var s=this._newShadowContainers;this._newShadowContainers=[];for(var a=0;a<s.length;a++){var u=s[a].shadowRoot;u&&0!=Mn(s[a])&&0==Mn(u)&&(this.observe(u),this.genShadow(null,e,t,s[a],u))}return t.push.apply(t,this._resizer.collect(e)),this._records=[],t},e.prototype.recordingIsDetached=function(){return this._root&&this._root!=this._wnd.document},e.prototype.maybeGetInitialSnapshot=function(e,t){if(!this._sentDomSnapshot){var n=this._watcher.allWatchedElements(this._root);this.genInsert(n,e,t,null,this._root,null),this._resizer.nodeChanged(this._root),this._observer&&this.observe(this._root),this._sentDomSnapshot=!0,this.hookAttachShadow()}},e.prototype.hookAttachShadow=function(){var e=this;this._attachShadowHook=Tt(Element.prototype,"attachShadow"),this._attachShadowHook&&this._attachShadowHook.before(function(t){t.that.shadowRoot||e._newShadowContainers.push(t.that)})},e.prototype.observe=function(e){try{this._observer.observe(e,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(e){}},e.prototype.processRecords=function(e,t,n,r){for(var i=this,o={},s={},a=function(n){if(xn(n)){i.genRemove(e,t,xn(n));var r=xn(n.parentNode);r&&(s[r.id]=r.node)}},u=0;u<this._records.length;++u)try{var c=this._records[u],h=Mn(c.target);if(!h)continue;switch(o[h]=c.target,c.type){case"childList":if(c.removedNodes.length>0)for(var d=0;d<c.removedNodes.length;++d){var l=xn(c.removedNodes[d]);l&&l.id&&this.genRemove(e,t,l)}if(c.addedNodes.length>0){s[h]=c.target;var p=Jr(c.target);p&&(s[p.id]=p.node)}break;case"characterData":Cn(c.target)||c.oldValue!=c.target.textContent&&(r[h]=or(c.target));break;case"attributes":var f=An(w=c.target);if(_n(this._watcher.isWatched(w))>_n(f)){a(w);break}var v=Xr(c.attributeNamespace)+(c.attributeName||""),_=sr(v);if(w.hasAttribute(v)){var g=c.target.getAttribute(v);c.oldValue!=g&&(g=ar(this._ctx.options.orgId,c.target,_,g||""),this._attrVisitor(c.target,_,g||""),null!==g&&(n[h+"\t"+_]=g))}else n[h+"\t"+_]=null;}}catch(e){}for(var m=0,y=this._toRefresh;m<y.length;m++){var w=y[m];try{a(w)}catch(e){Mt.sendToBugsnag(e,"error")}}for(var b in this._toRefresh=[],s){var S=xn(E=s[b]);S&&S.id&&this.diff(e,t,E,S.child,E.firstChild)}for(var b in o){var E=o[b];this._resizer.nodeChanged(E)}},e.prototype._checkForMissingInsertions=function(e){if(!this._sentDomSnapshot||!e)return[];return this.walkAddRecords(this._root),[]},e.prototype.walkAddRecords=function(e){var t=this;Mn(e)||null===e.parentNode?ft(e.firstChild,function(e){t.walkAddRecords(e)}):this._records.push(Ar(e.parentNode,[e]))},e.prototype.diff=function(e,t,n,r,i){for(var o=[],s=r,a=i;s&&a;){var u=xn(a);Mn(a)?u&&s.id==u.id?(s=s.next,a=ut(a)):(o.push({remove:s}),s=s.next):(o.push({insert:[n,a,s.node]}),a=ut(a))}for(;s;s=s.next)o.push({remove:s});ft(a,function(e){o.push({insert:[n,e,null]})});for(var c=!1,h=0;h<o.length;h++){var d=o[h];d.insert?this.genInsert(null,e,t,d.insert[0],d.insert[1],d.insert[2]):d.remove&&(c=!0,this.genRemove(e,t,d.remove))}Ft(!c,"All remove events should have been generated earlier, in MutationWatcher.processMutations")},e.prototype.genShadow=function(e,t,n,r,i){var o=Mn(r),s=this.genDocStream(e,r,i,null);s.length>0&&n.push({When:t,Kind:R.MUT_SHADOW,Args:[o,this._compress?this._lz.encode(s):s]})},e.prototype.genInsert=function(e,t,n,r,i,o){var s=Mn(r)||-1,a=Mn(o)||-1,u=-1===s&&-1===a,c=p(),h=this.genDocStream(e,r,i,o),d=p()-c;if(h.length>0){var l=p(),f=this._compress?this._lz.encode(h):h,v=p()-l;n.push({When:t,Kind:R.MUT_INSERT,Args:[s,a,f]},{When:t,Kind:R.TIMING,Args:[[O.Internal,A.Serialization,u?x.DomSnapshot:x.NodeEncoding,t,d,[x.LzEncoding,v]]]})}},e.prototype.genDocStream=function(e,t,n,r){var i=this;if(t&&Cn(t))return[];for(var o=[],s=this._encoder.tokenizeNode(e,t,r,n,function(e){if(e.nodeType==pn){var t=e;t.shadowRoot&&i.observe(t.shadowRoot)}i._nodeVisitor(e,o)},this._attrVisitor,this._visitChildren),a=0,u=o;a<u.length;a++){(0,u[a])()}return s},e.prototype.genRemove=function(e,t,n){var r=n.id;if(this._beforeRemove(n),Fn(n,this._resizer),t.length>0){var i=t[t.length-1];if(i.Kind==R.MUT_REMOVE)return void i.Args.push(r)}t.push({When:e,Kind:R.MUT_REMOVE,Args:[r]})},e.prototype.setUpIEWorkarounds=function(){var t=this;if(ue){var n=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=n&&n.set;if(!n||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",Gr(Gr({},n),{set:function(e){try{for(var t=void 0;t=this.firstChild;)this.removeChild(t);if(null===e||""==e)return;var n=(this.ownerDocument||document).createTextNode(e);this.appendChild(n)}catch(t){r&&r.call(this,e)}}}))}this._setPropertyThrottle=new nn(e.ThrottleMax,e.ThrottleInterval,function(){return new tn(function(){t._setPropertyWasThrottled=!0,t.tearDownIEWorkarounds()}).start()});var i=this._setPropertyThrottle.guard(function(e){e.cssText=e.cssText});this._setPropertyThrottle.open(),this._setPropertyHook=Tt(CSSStyleDeclaration.prototype,"setProperty"),this._setPropertyHook&&this._setPropertyHook.afterSync(function(e){i(e.that)}),this._removePropertyHook=Tt(CSSStyleDeclaration.prototype,"removeProperty"),this._removePropertyHook&&this._removePropertyHook.afterSync(function(e){i(e.that)})},e.prototype.tearDownIEWorkarounds=function(){this._setPropertyThrottle&&this._setPropertyThrottle.close(),this._setPropertyHook&&this._setPropertyHook.disable(),this._removePropertyHook&&this._removePropertyHook.disable()},e.prototype.updateConsent=function(){var e=this,t=xn(this._root);t&&function(e,t){for(var n=[e];n.length;){var r=n.pop();if(r){t(r);for(var i=r.child,o=r.shadow;i;)n.push(i),i=i.next;o&&n.push(o)}}}(t,function(t){var n=t.node;t.matchesAnyConsentRule&&e.refreshElement(n)})},e.prototype.refreshElement=function(e){Mn(e)&&this._toRefresh.push(e)},e.ThrottleMax=1024,e.ThrottleInterval=1e4,e}();function Xr(e){return void 0===e&&(e=""),null===e?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[e]||""}function Jr(e){return!(null==e?void 0:e.shadowRoot)||gr(e.shadowRoot)?null:xn(e.shadowRoot)}var $r=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],Zr=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],ei=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],ti=["name","startTime","duration"],ni=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],ri=function(){function e(e,t,n){this._ctx=e,this._queue=t,this._perfSupported=!1,this._timingSupported=!1,this._getEntriesSupported=!1,this._memorySupported=!1,this._lastUsedJSHeapSize=0,this._gotLoad=!1,this._observer=null,this._observedBatches=[];var r=window.performance;r&&(this._perfSupported=!0,r.timing&&(this._timingSupported=!0),r.memory&&(this._memorySupported=!0),"function"==typeof r.getEntries&&(this._getEntriesSupported=!0),this._listeners=n.createChild())}return e.prototype.start=function(e){var t=this;this._resourceUploader=e;var n=window.performance;n&&(this._ctx.recording.inFrame||this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Performance,this._timingSupported,Y.PerformanceEntries,this._getEntriesSupported,Y.PerformanceMemory,this._memorySupported,Y.PerformanceObserver,!!window.PerformanceObserver]}),this.observe(),!this._observer&&n.addEventListener&&n.removeEventListener&&this._listeners.add(n,"resourcetimingbufferfull",!0,function(){t._queue.enqueue({Kind:R.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.checkMemory())},e.prototype.onLoad=function(){this._gotLoad||(this._gotLoad=!0,this._timingSupported&&(this.recordTiming(performance.timing),this.checkForNewEntries()))},e.prototype.tick=function(e){this.checkMemory(),e&&this.checkForNewEntries()},e.prototype.shutdown=function(){this._listeners&&this._listeners.clear(),this._resourceUploader=void 0;var e=[];this._observer?(this._observer.takeRecords&&(e=this._observer.takeRecords()),this._observer.disconnect()):window.performance&&window.performance.getEntries&&(e=window.performance.getEntries()),e.length>300&&(e=e.slice(0,300),this._queue.enqueue({Kind:R.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this._observedBatches.push(e),this.tick(!0)},e.prototype.observe=function(){var e=this;if(!this._observer&&this._getEntriesSupported&&window.PerformanceObserver){this._observedBatches.push(performance.getEntries()),this._observer=new window.PerformanceObserver(function(t){var n=t.getEntries();e._observedBatches.push(n)});var t=["navigation","resource","measure","mark"];window.PerformancePaintTiming&&t.push("paint"),this._observer.observe({entryTypes:t})}},e.prototype.checkMemory=function(){if(this._memorySupported&&!this._ctx.recording.inFrame){var e=performance.memory;if(e){var t=e.usedJSHeapSize-this._lastUsedJSHeapSize;(0==this._lastUsedJSHeapSize||s.mathAbs(t/this._lastUsedJSHeapSize)>.2)&&(this.addPerfEvent(z.Memory,e,ni),this._lastUsedJSHeapSize=e.usedJSHeapSize)}}},e.prototype.recordEntry=function(e){switch(e.entryType){case"navigation":this.recordNavigation(e);break;case"resource":this.recordResource(e);break;case"paint":this.recordPaint(e);break;case"measure":this.recordMeasure(e);break;case"mark":this.recordMark(e);}},e.prototype.checkForNewEntries=function(){if(this._perfSupported&&this._getEntriesSupported){var e=this._observedBatches;this._observedBatches=[];for(var t=0,n=e;t<n.length;t++)for(var r=0,i=n[t];r<i.length;r++){var o=i[r];this.recordEntry(o)}}},e.prototype.recordTiming=function(e){this.addPerfEvent(z.Timing,e,$r)},e.prototype.recordNavigation=function(e){this.addPerfEvent(z.Navigation,e,Zr,{name:"navigation"})},e.prototype.recordResource=function(e){var t=this._ctx.options.orgId;"3E938"!=t&&"GDWG7"!=t&&this.addPerfEvent(z.Resource,e,ei,{name:e.initiatorType})},e.prototype.recordPaint=function(e){this.addPerfEvent(z.Paint,e,ti)},e.prototype.recordMark=function(e){this.addPerfEvent(z.Mark,e,ti)},e.prototype.recordMeasure=function(e){this.addPerfEvent(z.Measure,e,ti)},e.prototype.addPerfEvent=function(e,t,n,r){void 0===r&&(r={});for(var i=[e],o=0,s=n;o<s.length;o++){var a=s[o],u=t[a];if(void 0===u&&(u=-1),a in r){var c=ur(u,this._ctx.options.orgId,{source:"perfEntry",type:r[a]});u===c&&this.maybeUploadResource(e,t,c),u=c}i.push(u)}this._queue.enqueue({Kind:R.PERF_ENTRY,Args:i})},e.prototype.maybeUploadResource=function(e,t,n){this._resourceUploader&&e===z.Resource&&"css"===t.initiatorType&&this._resourceUploader.uploadIfNeeded(this._ctx.window,n)},e}();function ii(e){var t=0,n={id:t++,edges:{}};return e.split("\n").forEach(function(e){if(""!=(e=e.trim())){if(0==e.indexOf("/")||e.lastIndexOf("/")==e.length-1)throw new Error("Leading and trailing slashes are not supported");var r=n,i=e.split("/");i.forEach(function(e,n){if(""===(e=e.trim()))throw new Error("Empty elements are not allowed");if("**"!=e&&"*"!=e&&-1!=e.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;"**"==e?(r.loop=!0,o=r):e in r.edges&&(o=r.edges[e]),o||(o={id:t++,edges:{}},r.edges[e]=o),n==i.length-1&&(o.term=!0),r=o})}}),n}var oi=ii("**"),si="__fs__redacted";function ai(e,t,n){var r;if(n){r=1==n?oi:n;try{var i=0,o=[1],a=[],u={};return u[r.id]=r,a.push(u),s.jsonStringify(e,function(e,n){var r=n&&"object"==typeof n;if(""==e&&1==o.length)return o[0]--,r&&o.push(s.objectKeys(n).length),n;var u={},c=a[a.length-1],h=!0,d=!1,l=function(e){u[e.id]=e,h=!1,e.term&&(d=!0)};for(var p in c){var f=c[p];e in f.edges&&l(f.edges[e]),"*"in f.edges&&l(f.edges["*"]),f.loop&&l(f)}for((h||!r&&!d)&&(n=si),i+=e.length+2,(i+=r?2:null===n?4:n.toString().length)>=t&&(n=void 0),o[o.length-1]--,n&&n!==si&&r&&(o.push(s.objectKeys(n).length),a.push(u));o[o.length-1]<=0;)o.pop(),a.pop();return n})}catch(e){}return"[error serializing "+e.constructor.name+"]"}}var ui=function(){function e(e){this._requestTracker=e}return e.prototype.disable=function(){this._hook&&(this._hook.disable(),this._hook=null)},e.prototype.enable=function(e){var t,n=this,r=I(e),i=null===(t=null==r?void 0:r._w)||void 0===t?void 0:t.fetch;(i||e.fetch)&&(this._hook=Tt(i?r._w:e,"fetch"),this._hook&&this._hook.afterSync(function(e){return n.recordFetch(e.that,e.result,e.args[0],e.args[1])}))},e.prototype.recordFetch=function(e,t,n,r){var i,o="GET",s="",a={};if("string"==typeof n?s=n:"url"in n?(s=n.url,o=n.method,i=n.body,n.headers&&n.headers.forEach(function(e,t){a[e]=t})):s=""+n,r){o=r.method||o;var u=r.headers;if(u)if(nt(u))for(var c=0,h=u;c<h.length;c++){var d=h[c],l=d[0],p=d[1];a[l]=p}else if("function"==typeof u.forEach)u.forEach(function(e,t,n){a[t]=e});else for(var l in u)a[l]=u[l];i=r.body||i}if(s){for(var l in s=this._requestTracker.addPendingReq(t,o,s),a)this._requestTracker.addHeader(t,l,a[l]);i&&this._requestTracker.addRequestBody(t,i)}this.instrumentResponse(t,s,!!this._requestTracker.getRspWhitelist(s))},e.prototype.instrumentResponse=function(e,t,n){var r=this;e.then(Mt.wrap(function(t){var i=(t.headers.get("content-type")||"default").split(";")[0],o=["default","text/plain","text/json","application/json"].indexOf(i)>-1;n&&o?t.clone().text().then(Mt.wrap(function(i){var o=mi(i,n),s=o[0],a=o[1];r.onComplete(e,t,s,a)}))["catch"](Mt.wrap(function(n){r.onComplete(e,t,-1,void 0)})):r.onComplete(e,t,-1,void 0)}))["catch"](Mt.wrap(function(t){r.onComplete(e,t,-1,void 0)}))},e.prototype.onComplete=function(e,t,n,r){var i=this,o=-1,s="";if("headers"in t){o=t.status;s=this.serializeFetchHeaders(t.headers,function(e){return i._requestTracker.isHeaderInResponseHeaderWhitelist(e[0])})}return this._requestTracker.onComplete(e,s,o,n,r)},e.prototype.serializeFetchHeaders=function(e,t){var n="";return e.forEach(function(e,r){r=r.toLowerCase();var i=t([r,e]);n+=r+(i?": "+e:"")+di}),n},e}(),ci=function(){function e(e){this._requestTracker=e}return e.prototype.disable=function(){this._xhrOpenHook&&(this._xhrOpenHook.disable(),this._xhrOpenHook=null),this._xhrSetHeaderHook&&(this._xhrSetHeaderHook.disable(),this._xhrSetHeaderHook=null)},e.prototype.enable=function(e){var t,n=this,r=I(e),i=(null===(t=null==r?void 0:r._w)||void 0===t?void 0:t.XMLHttpRequest)||e.XMLHttpRequest;if(i){var o=i.prototype;this._xhrOpenHook=Tt(o,"open"),this._xhrOpenHook&&this._xhrOpenHook.before(function(e){var t=e.args[0],r=e.args[1];n._requestTracker.addPendingReq(e.that,t,r),e.that.addEventListener("load",Mt.wrap(function(t){n.onComplete(e.that)})),e.that.addEventListener("error",Mt.wrap(function(t){n.onComplete(e.that)}))}),this._xhrSendHook=Tt(o,"send"),this._xhrSendHook&&this._xhrSendHook.before(function(e){var t=e.args[0];n._requestTracker.addRequestBody(e.that,t)}),this._xhrSetHeaderHook=Tt(o,"setRequestHeader"),this._xhrSetHeaderHook&&this._xhrSetHeaderHook.before(function(e){var t=e.args[0],r=e.args[1];n._requestTracker.addHeader(e.that,t,r)})}},e.prototype.onComplete=function(e){var t=this,n=this.responseBody(e),r=n[0],i=n[1],o=Ei(function(e){var t=[];return e.split(di).forEach(function(e){var n=e.indexOf(":");-1!=n?t.push([e.slice(0,n).trim(),e.slice(n+1,e.length).trim()]):t.push([e.trim(),null])}),t}(e.getAllResponseHeaders()),function(e){return t._requestTracker.isHeaderInResponseHeaderWhitelist(e[0])});return this._requestTracker.onComplete(e,o,e.status,r,i)},e.prototype.responseBody=function(e){var t=this._requestTracker.pendingReq(e);if(!t)return[-1,void 0];var n=this._requestTracker.getRspWhitelist(t.url);if(e.responseType){var r=e.response;switch(r||o("Maybe response type was different that expected."),e.responseType){case"text":return mi(e.responseText,n);case"json":return function(e,t){if(!e)return[-1,void 0];return[yi(e),ai(e,te.MaxPayloadLength,t)]}(r,n);case"arraybuffer":return function(e,t){return[e?e.byteLength:-1,t?"[ArrayBuffer]":void 0]}(r,n);case"blob":return function(e,t){return[e?e.size:-1,t?"[Blob]":void 0]}(r,n);case"document":return function(e,t){return[-1,t?"[Document]":void 0]}(0,n);}}return mi(e.responseText,n)},e}();var hi,di="\r\n",li=["a-im","accept","accept-charset","accept-encoding","accept-language","accept-datetime","access-control-request-method,","access-control-request-headers","cache-control","connection","content-length","content-md5","content-type","date","expect","forwarded","from","host","if-match","if-modified-since","if-none-match","if-range","if-unmodified-since","max-forwards","origin","pragma","range","referer","te","user-agent","upgrade","via","warning"],pi=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","permanent","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-frame-options"],fi={BM7A6:["x-b3-traceid"],KD87S:["transactionid"],NHYJM:["x-att-conversationid"],GBNRN:["x-trace-id"],R16RC:["x-request-id"],DE9CX:["x-client","x-client-id","ot-baggage-original-client","x-req-id","x-datadog-trace-id","x-datadog-parent-id","x-datadog-sampling-priority"]},vi={"thefullstory.com":["x-cloud-trace-context"],TN1:["x-cloud-trace-context"],KD87S:["transactionid"],PPE96:["x-b3-traceid"],HWT6H:["x-b3-traceid"],PPEY7:["x-b3-traceid"],PPK3W:["x-b3-traceid"],NHYJM:["x-att-conversationid"],GBNRN:["x-trace-id"],NK5T9:["traceid","requestid"]},_i=function(){function e(e,t){this._ctx=e,this._queue=t,this._enabled=!1,this._tracker=new gi(e,t),this._xhr=new ci(this._tracker),this._fetch=new ui(this._tracker)}return e.prototype.isEnabled=function(){return this._enabled},e.prototype.enable=function(e){this._enabled||(this._enabled=!0,this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Ajax,!0,Y.AjaxFetch,!!e]}),this._xhr.enable(this._ctx.window),e&&this._fetch.enable(this._ctx.window))},e.prototype.disable=function(){this._enabled&&(this._enabled=!1,this._xhr.disable(),this._fetch.disable())},e.prototype.tick=function(e){this._tracker.tick(e)},e.prototype.setWatches=function(e){this._tracker.setWatches(e)},e}(),gi=function(){function e(e,t){this._ctx=e,this._queue=t,this._reqHeaderWhitelist={},this._rspHeaderWhitelist={},this._pendingReqs={},this._events=[],this._curId=1,this.addHeaderWhitelist(li,pi),this.addHeaderWhitelist(fi[e.options.orgId],vi[e.options.orgId])}return e.prototype.getReqWhitelist=function(e){var t=this.findWhitelistIndexFor(e);return t>=0&&this._reqWhitelist[t]},e.prototype.getRspWhitelist=function(e){var t=this.findWhitelistIndexFor(e);return t>=0&&this._rspWhitelist[t]},e.prototype.isHeaderInRequestHeaderWhitelist=function(e){return e in this._reqHeaderWhitelist},e.prototype.isHeaderInResponseHeaderWhitelist=function(e){return e in this._rspHeaderWhitelist},e.prototype.pushEvent=function(e){this._events.push(e)},e.prototype.setWatches=function(e){var t=this,n=[];this._reqWhitelist=[],this._rspWhitelist=[],e.forEach(function(e){n.push(e.URLRegex),t._reqWhitelist.push(Si(e.RecordReq,e.ReqWhitelist)),t._rspWhitelist.push(Si(e.RecordRsp,e.RspWhitelist))}),this._reqBodyRegex=new RegExp("("+n.join(")|(")+")")},e.prototype.addHeaderWhitelist=function(e,t){var n=this;e&&e.forEach(function(e){return n._reqHeaderWhitelist[e]=!0}),t&&t.forEach(function(e){return n._rspHeaderWhitelist[e]=!0})},e.prototype.tick=function(e){if(e){for(var t=0;t<this._events.length;t++)this._queue.enqueue({Kind:R.AJAX_REQUEST,Args:this._events[t]});this._events=[]}},e.prototype.pendingReq=function(e){var t=wi(e);return t?this._pendingReqs[t]:(o("missing xhr req id"),null)},e.prototype.deletePending=function(e){var t=wi(e);t&&delete this._pendingReqs[t]},e.prototype.addPendingReq=function(e,t,n){this.deletePending(e);var r=this._curId++;return n=function(e,t){return Qn.resolveToDocument(e,t)}(this._ctx.window,n),this._pendingReqs[r]={id:r,xhr:e,method:t,url:n,startTime:p(),headers:[],reqSize:0,reqBody:void 0},function(e,t){e._fs=t}(e,r),n},e.prototype.addHeader=function(e,t,n){var r=this.pendingReq(e);r&&r.headers.push([t,n])},e.prototype.addRequestBody=function(e,t){var n,r=this.pendingReq(e);r&&(n=this.requestBody(r.url,t),r.reqSize=n[0],r.reqBody=n[1])},e.prototype.onComplete=function(e,t,n,r,i){var o=this,s=this.pendingReq(e);if(s){this.deletePending(e);var a=p()-s.startTime,u=Ei(s.headers,function(e){return o.isHeaderInRequestHeaderWhitelist(e[0])}),c=s.reqBody||null,h=[s.method,ur(s.url,this._ctx.options.orgId,{source:"event",type:R.AJAX_REQUEST}),a,n,u,t,s.startTime,s.reqSize,r,c,i||null];this.pushEvent(h)}},e.prototype.findWhitelistIndexFor=function(e){if(this._reqBodyRegex){var t=this._reqBodyRegex.exec(e);if(t)for(var n=1;n<t.length;n++)if(void 0!==t[n])return n-1}return-1},e.prototype.requestBody=function(e,t){if(null==t)return[0,void 0];var n=this.getReqWhitelist(e),r=typeof t;if("string"==r)return function(e,t){return[e.length,bi(e,t)]}(t,n);if("object"==r){var i=r.constructor;switch(i){case String:case Object:default:return function(e,t){var n=void 0;!1!==t&&(n=ai(e,te.MaxPayloadLength,t));return[yi(e),n]}(t,n);case Blob:return function(e,t){var n=e.size,r=void 0;t&&(r="[Blob]");return[n,r]}(t,n);case ArrayBuffer:return function(e,t){var n=e.byteLength,r=void 0;t&&(r="[ArrayBuffer]");return[n,r]}(t,n);case Document:case FormData:case URLSearchParams:case ReadableStream:return[-1,n?""+i.name:void 0];}}return[-1,n?"[unknown]":void 0]},e}();function mi(e,t){return e?[e.length,bi(e,t)]:[-1,void 0]}function yi(e){try{return s.jsonStringify(e).length}catch(e){}return 0}function wi(e){return e._fs}function bi(e,t){if(0!=t)try{return ai(s.jsonParse(e),te.MaxPayloadLength,t)}catch(n){return 1==t?e.slice(0,te.MaxPayloadLength):void 0}}function Si(e,t){switch(e){default:case J.Elide:return!1;case J.Record:return!0;case J.Whitelist:try{return ii(t)}catch(e){return o("error parsing field whitelist ("+t+": "+e),!1}}}function Ei(e,t){var n="";return e.forEach(function(e){e[0]=e[0].toLowerCase();var r=t(e);n+=e[0]+(r?": "+e[1]:"")+di}),n}function Ti(e){return e?e.sheet:void 0}function ki(e){try{return e?e.cssRules||e.rules:void 0}catch(e){return}}function Ii(e,t){var n=function(e,t){var n=e;if("function"==typeof n.getPropertyCSSValue){var r=n.getPropertyCSSValue(t);if(null!=r){var i;switch(r.cssValueType){case 1:i=r;break;case 2:if(1!==r.length)return;var o=r.item(0);if(null==o)return;if(1!==o.cssValueType)return;i=o;break;default:return;}if(19===i.primitiveType){var s=Gn();hi||(hi=s.createElement("div"));var a=i.cssText;try{hi.style.cssText=t+": \""+a+"\";";var u=hi.style.getPropertyCSSValue(t);if(null==u)return;if(a!==u.cssText)return}catch(e){return}finally{hi.style.cssText=""}return"\""+a+"\""}}}}(e,t);return void 0!==n?n:e.getPropertyValue(t)}var Ci,Ri="EventQueue not defined for 'withEventQueueFor', likely caused by holding ref to callback",Ai=function(e){var t=e.ownerDocument;return t&&t.defaultView},xi=function(){function e(t,n){var r=this;this.ctx=t,this.queue=n,this.hooks=[],this.removeShims=[],this.nextSheetId=1;var i=e;this.throttle=new nn(i.ThrottleMax,i.ThrottleInterval,function(){return setTimeout(function(){r.queue.enqueue({Kind:R.FAIL_THROTTLED,Args:[Q.StyleSheetHooks]}),r.stop()})}),this.addInsert=this.throttle.guard(this.addInsert),this.addDelete=this.throttle.guard(this.addDelete)}return e.prototype.start=function(){var e=this;this.throttle.open();var t=this.ctx.window;if(t.CSSStyleSheet&&t.StyleSheet){var n,r=t.CSSStyleSheet.prototype;(n=Tt(r,"insertRule"))&&(n.afterSync(function(t){e.addInsert(t.that,t.args[0],t.args[1])}),this.hooks.push(n)),(n=Tt(r,"deleteRule"))&&(n.afterSync(function(t){e.addDelete(t.that,t.args[0])}),this.hooks.push(n)),this.removeShims.push(kt(t.StyleSheet,"disabled",function(t,n){return e.onDisableSheet(t,n)}),kt(t.Document,"adoptedStyleSheets",function(t,n){return e.onSetAdoptedStyleSheets(t)}),kt(t.ShadowRoot,"adoptedStyleSheets",function(t,n){return e.onSetAdoptedStyleSheets(t)}))}},e.prototype.onSetAdoptedStyleSheets=function(e){if(Mn(e)){var t=e.adoptedStyleSheets;if(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=this.snapshotConstructedStylesheet(o);n.push(s),!0===o.disabled&&this.onDisableSheet(o,!0)}this.queue.enqueue({Kind:R.ADOPTED_STYLESHEETS,Args:[Mn(e),n]})}}},e.prototype.snapshotEl=function(e,t){void 0===t&&(t=0);var n=Mn(e);if(n){var r=Ti(e);r&&this.snapshot([G.Node,n],r,t)}},e.prototype.snapshotConstructedStylesheet=function(e){var t=Pi(e);if(void 0!==t)return t;var n=this.nextSheetId++;return function(e,t){e._fs=t}(e,n),this.snapshot([G.Sheet,n],e),n},e.prototype.snapshot=function(e,t,n){void 0===n&&(n=0);var r=ki(t);if(r){for(var i=[],o=n;o<r.length;o++)try{i.push(Ci(r[o]))}catch(e){i.push("html {}")}this.queue.enqueue({Kind:R.CSSRULE_INSERT,Args:[e,i,n]})}},e.prototype.addInsert=function(t,n,r){var i=Fi(t,G.Node);i&&"string"==typeof n&&(n.length>e.MaxRuleBytes&&(o("CSSRule too large, inserting dummy instead: "+n.length),n="dummy {}"),this.withEventQueueForSheet(t,function(e){return e.enqueue({Kind:R.CSSRULE_INSERT,Args:"number"==typeof r?[i,[n],r]:[i,[n]]})}))},e.prototype.addDelete=function(e,t){var n=Fi(e,G.Node);n&&this.withEventQueueForSheet(e,function(e){return e.enqueue({Kind:R.CSSRULE_DELETE,Args:[n,t]})})},e.prototype.onDisableSheet=function(e,t){var n=Fi(e,G.Node);n&&this.withEventQueueForSheet(e,function(e){return e.enqueue({Kind:R.DISABLE_STYLESHEET,Args:[n,!!t]})})},e.prototype.withEventQueueForSheet=function(e,t){if(e.ownerNode)return n=this.ctx,r=e.ownerNode,i=t,void((o=I(Ai(r)||n.window))&&"function"==typeof o._withEventQueue&&o._withEventQueue(n.recording.pageSignature(),function(e){i({enqueue:function(t){Ft(null!=e,Ri)&&e.enqueue(t)},enqueueFirst:function(t){Ft(null!=e,Ri)&&e.enqueueFirst(t)}}),e=null}));var n,r,i,o;t(this.queue)},e.prototype.stop=function(){this.throttle.close();for(var e=0,t=this.hooks;e<t.length;e++){t[e].disable()}this.hooks=[];for(var n=0,r=this.removeShims;n<r.length;n++){(0,r[n])()}this.removeShims=[]},e.ThrottleMax=1e4,e.ThrottleInterval=1e4,e.MaxRuleBytes=16384,e}(),Oi=document.createElement("div");function Mi(e,t){if(void 0===t&&(t=0),!Ft(t<=20,"No deep recursion for CSS rules"))return"html { /* Depth limit exceeded! */ }";var n=function(e){switch(e.type){case CSSRule.PAGE_RULE:var t=e.selectorText||"";return t&&ct(t,"@page")?t:"@page "+t;case CSSRule.KEYFRAME_RULE:return e.keyText;case CSSRule.STYLE_RULE:return e.selectorText;case CSSRule.MEDIA_RULE:return"@media "+e.media.mediaText;case CSSRule.KEYFRAMES_RULE:return"@keyframes "+e.name;case CSSRule.SUPPORTS_RULE:return"@supports "+e.conditionText;default:return null;}}(e);if(null==n)return e.cssText;var r=function(e,t){var n=e,r=n.style;if(r){for(var i="",o=0;o<r.length;o++){var s=r[o],a=Ii(r,s);"initial"!==a&&("\""!==(u=a)[0]&&"'"!==u[0]||u[u.length-1]!==u[0])||(i+=s+": "+a,"important"===r.getPropertyPriority(s)&&(i+=" !important"),i+="; ")}return[r.cssText,i].filter(Boolean).join("\n")}var u;var c=n.cssRules;if(!c)return null;var h="";for(o=0;o<c.length;o++)h+=Mi(c[o],t+1);return h}(e,t);return null==r?e.cssText:n+" { "+r+"} "}Oi.style.width="initial",Ci=""!=Oi.style.cssText?function(e){return e.cssText}:Mi;var Li=/^\s*$/;function Fi(e,t){var n=function(e){var t=Pi(e);if(t)return[G.Sheet,t];var n=Mn(e.ownerNode);if(n)return[G.Node,n];return}(e);if(n){var r=n[0],i=n[1];return r===t?i:n}}function Pi(e){return e._fs}var qi=function(){function e(e,t,n){this._ctx=e,this._q=t,this._listeners=n.createChild()}return e.prototype.start=function(){var e=this,t=this._ctx.window.document;this._listeners.addCustom(t,this.getFullscreenChangeEvent(),!0,function(t){e.onFullscreenChange(t)}),this._listeners.addCustom(t,this.getFullscreenErrorEvent(),!0,function(t){e.onFullscreenError(t)})},e.prototype.stop=function(){this._listeners&&this._listeners.clear()},e.prototype.onFullscreenChange=function(e){var t=this.getFullscreenElement();if(t){var n=Mn(t);Ft(null==this._previousFullscreenFSID,"Error: Received fullscreen signal but we think we are already in fullscreen?"),this._q.enqueue({Kind:R.FULLSCREEN,Args:[n,!0]}),this._previousFullscreenFSID=n}else Ft(null!=this._previousFullscreenFSID,"Error: Received fullscreen exit signal but have no previous fullscreen event?"),this._q.enqueue({Kind:R.FULLSCREEN,Args:[this._previousFullscreenFSID,!1]}),this._previousFullscreenFSID=void 0},e.prototype.onFullscreenError=function(e){this._q.enqueue({Kind:R.FULLSCREEN_ERROR,Args:[]})},e.prototype.getFullscreenElement=function(){var e=this._ctx.window.document;return e[fe(e,"fullscreenElement")]},e.prototype.getFullscreenChangeEvent=function(){return fe(this._ctx.window.document,"onfullscreenchange").slice(2)},e.prototype.getFullscreenErrorEvent=function(){return fe(this._ctx.window.document,"onfullscreenerror").slice(2)},e}(),Ui=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Ni=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Wi=function(){function e(e,t){this._queue=t,this._registry=null,this._checkedNodeTags={};var n=e.window;this._registry=n.customElements&&n.customElements.get&&n.customElements.whenDefined&&n.customElements}return e.prototype.onCustomNodeVisited=function(e){return Ui(this,void 0,et,function(){var t,n;return Ni(this,function(r){switch(r.label){case 0:if(!this._registry)return[2];if(t=e.nodeName.toLowerCase(),this._checkedNodeTags.hasOwnProperty(t))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),n=!!this._registry.get(t),this._checkedNodeTags[t]=n,[4,this._registry.whenDefined(t)];case 2:return r.sent(),this._enqueue(t),[3,4];case 3:return r.sent(),[3,4];case 4:return[2];}})})},e.prototype._enqueue=function(e){this._queue.enqueue({Kind:R.CUSTOM_ELEMENT_DEFINED,Args:[e]})},e}(),Di=function(){function e(e,t,n,r,i,o,s,a){var u=this;this._ctx=e,this._queue=t,this._keep=n,this._onFrameCreated=o,this._beforeFrameRemoved=s,this._resourceUploader=a,this._curSelection=[],this._scrollTimeouts={},this._uploadResources=!1,this._modalHooks=[],this._initialized=!1,this._wnd=e.window,this._doc=this._wnd.document,this._loc=this._wnd.location,this._hst=this._wnd.history,this._listeners=i.createChild(),this._currentUrl=this._loc.href,this._inputWatcher=new Un(function(e){u.addChangeElem(e)},function(e){return!!Mn(e)}),this._ajaxWatcher=new _i(e,t),this._perfWatcher=new ri(e,t,this._listeners),this._styleSheetWatcher=new xi(e,t),this._fullscreenWatcher=new qi(e,t,this._listeners),this._customElementWatcher=new Wi(e,t),this._mutWatcher=new Qr(e,r,!0,function(e,t){return u.visitNode(e,t)},function(e){var t=e.node;if("iframe"==on(e.node))u._beforeFrameRemoved(e.node);else if("function"==typeof t.getElementsByTagName)for(var n=t.getElementsByTagName("iframe"),r=0;r<n.length;r++){var i=n[r];u._beforeFrameRemoved(i)}},function(e,t,n){if(!function(e){return Cn(e)||Rn(e)}(e)&&u._uploadResources)for(var r=0,i=function(e,t,n){var r,i=on(e);if(Hi[t]&&Hi[t][i])return[n];if("link"==i&&"href"==t&&(r=e.getAttribute("rel"))&&r.indexOf("stylesheet")>-1)return[n];if("srcset"==t&&("img"==i||"source"==i)){return null!=n.match(/^\s*$/)?[]:n.split(",").map(function(e){return e.trim().split(/\s+/)[0]})}var o=e;if("style"==t&&o.style){var s=o.style.backgroundImage;if(!s)return[];if(s.length>300)return[];var a=[],u=void 0;for(jt.lastIndex=0;u=jt.exec(s);){var c=u[1];c&&a.push(c.trim())}return a}return[]}(e,t,n);r<i.length;r++){var o=i[r];u._resourceUploader.uploadIfNeeded(u._wnd,o)}})}return e.prototype.watchEvents=function(){var e=this;this._mutWatcher.hookMutations(),this._inputWatcher.hookEvents(),this._styleSheetWatcher.start(),this._perfWatcher.start(this._resourceUploader),this._fullscreenWatcher.start(),this._listeners.add(this._wnd,"mousemove",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseMove(t)}),this._listeners.add(this._wnd,"mousedown",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseDown(t)}),this._listeners.add(this._wnd,"mouseup",!0,function(t){e.isSafePointerEvent(t)&&e.addMouseUp(t)}),this._listeners.add(this._wnd,"keydown",!0,function(){e.addKeyDown()}),this._listeners.add(this._wnd,"keyup",!0,function(){e.addKeyUp()}),this._listeners.add(this._wnd,"click",!0,function(t){e.isSafePointerEvent(t)&&e.addClick(t)}),this._listeners.add(this._wnd,"dblclick",!0,function(t){e.addDblClick(t)}),this._listeners.add(this._wnd,"focus",!0,function(t){e.addFocus(t)}),this._listeners.add(this._wnd,"blur",!0,function(t){e.addBlur(t)}),this._listeners.add(this._wnd,"change",!0,function(t){e.addChange(t)},!0),this._listeners.add(this._wnd,"touchstart",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHSTART),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchend",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHEND),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchmove",!0,function(t){e.isSafePointerEvent(t)&&(e.addTouchEvent(t,R.TOUCHMOVE),e.addWindowScrollOrResize())}),this._listeners.add(this._wnd,"touchcancel",!0,function(t){e.isSafePointerEvent(t)&&e.addTouchEvent(t,R.TOUCHCANCEL)}),this._listeners.add(this._wnd,"play",!0,function(t){e.addPlayEvent(t)}),this._listeners.add(this._wnd,"pause",!0,function(t){e.addPauseEvent(t)}),this._listeners.add(this._wnd,"scroll",!1,function(){e.addWindowScrollOrResize()}),this._listeners.add(this._wnd,"resize",!1,function(){e.addWindowScrollOrResize()}),this._listeners.add(this._wnd,"submit",!1,function(t){e.addFormSubmit(t)}),this._listeners.add(this._wnd,"focus",!1,function(){e.addWindowFocus()}),this._listeners.add(this._wnd,"blur",!1,function(){e.addWindowBlur()}),this._listeners.add(this._wnd,"popstate",!1,function(){e.addNavigate()}),this._listeners.add(this._wnd,"selectstart",!0,function(){e.addSelection()}),this._listeners.add(this._doc,"selectionchange",!0,function(){e.addSelection()});var t=this._wnd.visualViewport;t?(this._listeners.add(t,"scroll",!0,function(){return e.addWindowScrollOrResize()}),this._listeners.add(t,"resize",!0,function(){return e.addWindowScrollOrResize()})):this._listeners.add(this._wnd,"mousewheel",!0,function(){e.addWindowScrollOrResize()}),this._pushHook=Tt(this._hst,"pushState"),this._pushHook&&this._pushHook.afterSync(function(){return e.addNavigate()}),this._replaceHook=Tt(this._hst,"replaceState"),this._replaceHook&&this._replaceHook.afterSync(function(){return e.addNavigate()});for(var n=function(t){var n=Tt(r._wnd,t);if(!n)return"continue";r._modalHooks.push(n),n.before(function(){e._queue.enqueue({Kind:R.MODAL_OPEN,Args:[t]})}).afterSync(function(){e._queue.enqueue({Kind:R.MODAL_CLOSE,Args:[t]})})},r=this,i=0,o=ne;i<o.length;i++){n(o[i])}if("function"==typeof this._wnd.document.hasFocus&&this._queue.enqueue({Kind:this._wnd.document.hasFocus()?R.WINDOW_FOCUS:R.WINDOW_BLUR,Args:[]}),s.matchMedia)for(var a=function(t,n,r){var i=s.matchMedia(u._wnd,r);if(!i)return"continue";var o=function(){i.matches&&e._queue.enqueue({Kind:R.MEDIA_QUERY_CHANGE,Args:[t,n]})};u._listeners.add(i,"change",!0,o),o()},u=this,c=0,h=[["any-pointer","coarse","not screen and (any-pointer: fine)"],["any-pointer","fine","only screen and (any-pointer: fine)"],["any-hover","none","not screen and (any-hover: hover)"],["any-hover","hover","only screen and (any-hover: hover)"],["pointer","none","(pointer: none)"],["pointer","coarse","(pointer: coarse)"],["pointer","fine","(pointer: fine)"]];c<h.length;c++){var d=h[c];a(d[0],d[1],d[2])}this._initialized=!0},e.prototype.initResourceUploading=function(){this._resourceUploader.init(),this._uploadResources=!0},e.prototype.onDomLoad=function(){this.addDomLoaded(),this.addViewportChange(),this._mutWatcher._checkForMissingInsertions(ae)},e.prototype.onLoad=function(){var e=this,t=!1,n=Mt.wrap(function(){t||(t=!0,e._perfWatcher.onLoad(),e.addLoad(),e.addViewportChange())},"error");new tn(n,0).start(),s.requestWindowAnimationFrame&&s.requestWindowAnimationFrame(this._wnd,n)},e.prototype.ajaxWatcher=function(){return this._ajaxWatcher},e.prototype.bundleEvents=function(e){var t=this;return this._queue.enqueueSimultaneousEventsIn(function(n){return t._inputWatcher.tick(),t._perfWatcher.tick(e),t._ajaxWatcher.tick(e),t.addViewportChange(),t._mutWatcher.processMutations(n)})},e.prototype.shutdown=function(e){if(this._initialized){this._initialized=!1,this._listeners&&this._listeners.clear(),this._pushHook&&this._pushHook.disable(),this._replaceHook&&this._replaceHook.disable();for(var t=0,n=this._modalHooks;t<n.length;t++){n[t].disable()}this._modalHooks=[],this._perfWatcher.onLoad(),this._ctx.measurer.performMeasurementsNow(),this._queue.processEvents(),this._inputWatcher.shutdown(),this._mutWatcher.shutdown(),this._ajaxWatcher.disable(),this._perfWatcher.shutdown(),this._styleSheetWatcher.stop(),this._fullscreenWatcher.stop(),this._queue.shutdown(e)}},e.prototype.recordingIsDetached=function(){return this._mutWatcher.recordingIsDetached()},e.prototype.visitNode=function(e,t){var n=this;switch(e.nodeName){case"#document":case"#document-fragment":"#document-fragment"===e.nodeName&&this._listeners.add(e,"scroll",!0,function(e){return n.addScroll(Ki(e))});var r=e;try{if(!r.adoptedStyleSheets||0===r.adoptedStyleSheets.length)break}catch(e){break}t.push(function(){n._styleSheetWatcher.onSetAdoptedStyleSheets(e)});break;case"HTML":this._docElScrollListener&&this._listeners.remove(this._docElScrollListener),this._docElScrollListener=this._listeners.add(e,"scroll",!0,function(e){n.addScroll(Ki(e))});break;case"BODY":this.addViewportChange(),this.addSelection();break;case"INPUT":case"TEXTAREA":case"SELECT":this._inputWatcher.addInput(e);break;case"FRAME":case"IFRAME":this._onFrameCreated(e);break;case"VIDEO":case"AUDIO":e.paused||this._queue.enqueue({Kind:R.PLAY,Args:[Mn(e)]});break;case"LINK":if(!(i=e.sheet))break;!0===i.disabled&&this._styleSheetWatcher.onDisableSheet(i,!0);break;case"STYLE":var i,o=e;if(!(i=o.sheet))break;!0===i.disabled&&this._styleSheetWatcher.onDisableSheet(i,!0);var s=function(e){var t=e.textContent||"";if(!(t.length>5e5)){var n=ki(Ti(e));if(n){if(n.length>0&&Li.test(t))return 0;var r,i=Gn();ae?(r=i.createElement("style")).textContent=e.textContent:r=i.importNode(e,!0),i.head.appendChild(r);var o=ki(Ti(r));if(i.head.removeChild(r),o)return n.length>o.length?o.length:void 0}}}(o);void 0!==s&&t.push(function(){n._styleSheetWatcher.snapshotEl(o,s)});break;default:"#"!==e.nodeName[0]&&e.nodeName.indexOf("-")>-1&&this._customElementWatcher.onCustomNodeVisited(e);}if("scrollLeft"in e&&"scrollTop"in e){var a=e;this._ctx.measurer.requestMeasureTask(function(){0==a.scrollLeft&&0==a.scrollTop||n.addScroll(a)})}},e.prototype.isSafePointerEvent=function(e){var t=Ki(e);return!!Mn(t)&&!Cn(t)},e.prototype.addMouseMove=function(e){var t=Mn(Ki(e));this._queue.enqueue({Kind:R.MOUSEMOVE,Args:t?[e.clientX,e.clientY,t]:[e.clientX,e.clientY]})},e.prototype.addMouseDown=function(e){this._queue.enqueue({Kind:R.MOUSEDOWN,Args:[e.clientX,e.clientY]})},e.prototype.addMouseUp=function(e){this._queue.enqueue({Kind:R.MOUSEUP,Args:[e.clientX,e.clientY]})},e.prototype.addTouchEvent=function(e,t){if(void 0!==e.changedTouches)for(var n=0;n<e.changedTouches.length;++n){var r=e.changedTouches[n];isNaN(parseInt(r.identifier))&&(r.identifier=0);var i=[r.identifier,r.clientX,r.clientY];this._queue.enqueue({Kind:t,Args:i})}},e.prototype.addPlayEvent=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.PLAY,Args:[t]})},e.prototype.addPauseEvent=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.PAUSE,Args:[t]})},e.prototype.addWindowFocus=function(){this._queue.enqueue({Kind:R.WINDOW_FOCUS,Args:[]})},e.prototype.addWindowBlur=function(){this._queue.enqueue({Kind:R.WINDOW_BLUR,Args:[]})},e.prototype.maybeAddValueChange=function(){var e=ji(this._doc);e&&this._inputWatcher.onChange(e)},e.prototype.addKeyDown=function(){var e=ji(this._doc);e&&!Ln(e)||(this.maybeAddValueChange(),this._queue.enqueue({Kind:R.KEYDOWN,Args:[]}))},e.prototype.addKeyUp=function(){var e=ji(this._doc);e&&!Ln(e)||(this.maybeAddValueChange(),this._queue.enqueue({Kind:R.KEYUP,Args:[]}))},e.prototype.addViewportChange=function(){var e=this;this._ctx.measurer.requestMeasureTask(function(){return e._addViewportChangeImpl()})},e.prototype._addViewportChangeImpl=function(){var e=this.getWindowScrollingElement(),t=Mn(e);if(t){var n=function(e,t){var n=e.documentElement.getBoundingClientRect(),r=t.scrollWidth,i=t.scrollHeight;return{width:s.mathMax(n.width,r),height:s.mathMax(n.height,i)}}(this._wnd.document,e);Wt(n,this._curDocSize)||(this._curDocSize=n,this._queue.enqueue({Kind:R.RESIZE_DOCUMENT,Args:[n.width,n.height]}));var r,i,o,a,u=Yt(this._wnd,this._curLayoutViewport),c=function(e,t){return"visualViewport"in e?e.visualViewport:(void 0===t&&(t=Yt(e)),new Gt(e,t))}(this._wnd,u);u.hasKnownPosition?(Nt(u,this._curLayoutViewport)||this._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[t,u.pageLeft,u.pageTop]}),r=c,(i=this._curVisualViewport)&&r.offsetLeft==i.offsetLeft&&r.offsetTop==i.offsetTop||this._queue.enqueue({Kind:R.SCROLL_VISUAL_OFFSET,Args:[t,c.offsetLeft,c.offsetTop]})):Nt(c,this._curVisualViewport)||this._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[t,c.pageLeft,c.pageTop]}),function(e,t){return t&&e.width==t.width&&e.height==t.height&&e.clientWidth==t.clientWidth&&e.clientHeight==t.clientHeight}(u,this._curLayoutViewport)||(u.width==u.clientWidth&&u.height==u.clientHeight?this._queue.enqueue({Kind:R.RESIZE_LAYOUT,Args:[u.clientWidth,u.clientHeight]}):this._queue.enqueue({Kind:R.RESIZE_LAYOUT,Args:[u.clientWidth,u.clientHeight,u.width,u.height]})),Wt(c,this._curVisualViewport)||this._queue.enqueue({Kind:R.RESIZE_VISUAL,Args:[c.width,c.height]}),this._curLayoutViewport=((a=Dt(o=u)).clientWidth=o.clientWidth,a.clientHeight=o.clientHeight,a),this._curVisualViewport=function(e){var t=Dt(e);return t.offsetLeft=e.offsetLeft,t.offsetTop=e.offsetTop,t}(c)}},e.prototype.doWorkInScrollTimeout=function(e,t){var n=this;e in this._scrollTimeouts||(this._scrollTimeouts[e]=t,new tn(function(){n._ctx.measurer.requestMeasureTask(function(){if(e in n._scrollTimeouts){var t=n._scrollTimeouts[e];delete n._scrollTimeouts[e],t()}})},te.ScrollSampleInterval).start())},e.prototype._fireScrollTimeouts=function(){for(var e in this._scrollTimeouts)this._scrollTimeouts[e](),delete this._scrollTimeouts[e];this._scrollTimeouts=[]},e.prototype.getWindowScrollingElement=function(){return this._doc.scrollingElement||this._doc.body||this._doc.documentElement},e.prototype.addWindowScrollOrResize=function(){var e=this;this.doWorkInScrollTimeout(1,function(){return e.addViewportChange()})},e.prototype.addScroll=function(e){var t=this,n=Mn(e);n&&this.doWorkInScrollTimeout(n,function(){if(Mn(e)===n){var r=e;n&&"number"==typeof r.scrollLeft&&t._queue.enqueue({Kind:R.SCROLL_LAYOUT,Args:[n,r.scrollLeft,r.scrollTop]})}})},e.prototype.addDomLoaded=function(){this._queue.enqueue({Kind:R.DOMLOADED,Args:[]})},e.prototype.addLoad=function(){this._queue.enqueue({Kind:R.LOAD,Args:[]})},e.prototype.addNavigate=function(){var e=this._loc.href;this._currentUrl!=e&&(this._currentUrl=e,this._keep.onNavigate(e),this._queue.enqueue({Kind:R.NAVIGATE,Args:[ur(this._loc.href,this._ctx.options.orgId,{source:"event",type:R.NAVIGATE}),this._doc.title]}))},e.prototype.addClick=function(e){var t=Ki(e),n=Mn(t);if(n){var r=0,i=0,o=0,s=0;if(t&&t.getBoundingClientRect){var a=t.getBoundingClientRect();r=a.left,i=a.top,o=a.width,s=a.height}var u=xn(t);this._keep.onClick(u),this._queue.enqueue({Kind:R.CLICK,Args:[n,e.clientX,e.clientY,r,i,o,s]})}},e.prototype.addDblClick=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.DBL_CLICK,Args:[t]})},e.prototype.addFormSubmit=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.FORM_SUBMIT,Args:[t]})},e.prototype.addFocus=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.FOCUS,Args:[t]})},e.prototype.addBlur=function(e){var t=Mn(Ki(e));t&&this._queue.enqueue({Kind:R.BLUR,Args:[t]})},e.prototype.addChange=function(e){this._inputWatcher.onChange(Ki(e))},e.prototype.addChangeElem=function(e){var t=Ln(e);if(t){var n=Kn(e);Rn(e)&&(n=er(n)),this._queue.enqueue({Kind:R.VALUECHANGE,Args:[t,n]})}},e.prototype.addSelection=function(){var e=this;this._ctx.measurer.requestMeasureTask(function(){var t;try{t=e.selectionArgs()}catch(e){return}for(var n=!1,r=0;r<4;r++)if(e._curSelection[r]!==t[r]){n=!0;break}n&&(e._curSelection=t,e._queue.enqueue({Kind:R.SELECT,Args:t}))})},e.prototype.selectionArgs=function(){if(!this._wnd.getSelection)return[];var e=this._wnd.getSelection();if(!e)return[];if("None"==e.type)return[];if("Caret"==e.type){var t=Mn(e.anchorNode);return t?[t,e.anchorOffset]:[]}if(!e.anchorNode||!e.focusNode)return[];var n=Bi(e.anchorNode,e.anchorOffset),r=n[0],i=n[1],o=Bi(e.focusNode,e.focusOffset),s=o[0],a=o[1],u=Boolean(r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING),c=u?[r,s]:[s,r],h=c[0],d=c[1],l=u?[i,a]:[a,i],p=l[0],f=l[1];for(Mn(h)||(p=0);h&&!Mn(h)&&h!=d;)h=ut(h)||h.parentNode;for(Mn(d)||(f=0);d&&!Mn(d)&&d!=h;)d=vt(d)||d.parentNode;if(h==d&&p==f)return[];var v=Mn(h),_=Mn(d);return h&&d&&v&&_?[v,p,_,f,u]:[]},e}();function Bi(e,t){if(!e.firstChild)return[e,t];e=e.firstChild;for(var n=0;n<t-1;n++){var r=ut(e);if(!r)return[e,0];e=r}return[e,0]}var Hi={src:{img:!0,embed:!0},href:{use:!0,image:!0},data:{object:!0}};function ji(e){for(var t=e.activeElement;t&&t.shadowRoot;){var n=t.shadowRoot.activeElement;if(!n)return t;t=n}return t}function Ki(e){if(e.composed&&e.target){var t=e.target;if(t.nodeType==pn&&t.shadowRoot){var n=e.composedPath();if(n.length>0)return n[0]}}return e.target}var Vi=/^\s*at .*(\S+\:\d+|native|(<anonymous>))/m,zi=/^(eval@)?(\[native code\])?$/;function Yi(e){if(!e||"string"!=typeof e.stack)return[];var t=e;return t.stack.match(Vi)?t.stack.split("\n").filter(function(e){return!!e.match(Vi)}).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),n=Qi(t.pop());return Gi(t.join(" "),["eval","<anonymous>"].indexOf(n[0])>-1?"":n[0],n[1],n[2])}):function(e){return e.split("\n").filter(function(e){return!e.match(zi)}).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return[e,"",-1,-1];var t=e.split("@"),n=Qi(t.pop());return Gi(t.join("@"),n[0],n[1],n[2])})}(t.stack)}function Gi(e,t,n,r){return[e||"",t||"",parseInt(n||"-1"),parseInt(r||"-1")]}function Qi(e){if(!e||-1===e.indexOf(":"))return["","",""];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return t?[t[1]||"",t[2]||"",t[3]||""]:["","",""]}var Xi=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Ji=function(){function e(e,t,n){this._queue=t,this._enabled=!1,this._overflow=!1,this._total=0,this._hooks=[],this._wnd=e.window,this._listeners=n.createChild();var r=e.options.orgId;this.orgId=r,this.maxLogsPerPage="P2C"==r||"ESHFX"==r||"6HFXR"==r||"A0W9W"==r||"5V0ND"==r?3e3:"GF6RM"==r?1600:te.MaxLogsPerPage}return e.prototype._overflowMsg=function(){return"\"[received more than "+this.maxLogsPerPage+" messages]\""},e.prototype.enable=function(){var e=this;if(this._listeners.add(this._wnd,"error",!0,function(t){return e.addError(t)}),this._listeners.add(this._wnd,"unhandledrejection",!0,function(t){e.addLog("error",["Uncaught (in promise)",t.reason])},!0),!this._enabled)if(this._enabled=!0,this._queue.enqueue({Kind:R.REC_FEAT_SUPPORTED,Args:[Y.Console,!0]}),this._wnd.console)for(var t=function(t){var r=Tt(n._wnd.console,t);if(!r)return"continue";r.before(function(n){var r=n.args;return e.addLog(t,r)}),n._hooks.push(r)},n=this,r=0,i=["log","info","warn","error"];r<i.length;r++){t(i[r])}else this.addLog("log",["NOTE: Log messages cannot be captured on IE9"])},e.prototype.isEnabled=function(){return this._enabled},e.prototype.disable=function(){var e;if(this._listeners&&this._listeners.clear(),this._enabled)for(this._enabled=!1;e=this._hooks.pop();)e.disable()},e.prototype.logEvent=function(e,t){if(!this.checkOverflow())return null;var n;n=-1==["log","info","warn","error","debug","_fs_debug"].indexOf(e)?["log",$i(e,1e3,this.orgId)]:[e];for(var r=0;r<t.length;++r)n.push($i(t[r],1e3,this.orgId));return{Kind:R.LOG,Args:n}},e.prototype.addLog=function(e,t){var n=this.logEvent(e,t);n&&this._queue.enqueue(n)},e.prototype.addError=function(e){var t=e.message,n=e.filename,r=e.lineno;(t||n||r)&&this.checkOverflow()&&("object"==typeof t&&(t=$i(t,1e3,this.orgId)),"object"==typeof n&&(n=$i(n,100,this.orgId,!1)),"object"==typeof r&&(r=-1),this._queue.enqueue({Kind:R.ERROR,Args:Xi([t,n,r],Yi(e.error))}))},e.prototype.checkOverflow=function(){return!this._overflow&&(this._total==this.maxLogsPerPage?(this._queue.enqueue({Kind:R.LOG,Args:["warn",this._overflowMsg()]}),this._overflow=!0,!1):(this._total++,!0))},e}();function $i(e,t,n,r){void 0===r&&(r=!0);try{var i={tokens:[],opath:[],cyclic:Zi(e,t/4)};!function e(t,n,r,i){if(n<1)return 0;var o=t&&t.constructor==Date?eo(t):function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&e.nodeType>0&&"string"==typeof e.nodeName}(t)?function(e){return e.toString()}(t):void 0===t?"undefined":"object"!=typeof t||null==t?t:t instanceof Error?t.stack||t.name+": "+t.message:void 0;if(void 0!==o)return void 0===(o=s.jsonStringify(o))?0:("\""==o[0]&&(o=to(o,n,"...\"")),o.length<=n?(i.tokens.push(o),o.length):0);if(i.cyclic){i.opath.splice(r);var a=i.opath.lastIndexOf(t);if(a>-1){var u="<Cycle to ancestor #"+(r-a-1)+">";return u="\""+to(u,n-2)+"\"",i.tokens.push(u),u.length}i.opath.push(t)}var c=n,h=function(e){return c>=e.length&&(c-=e.length,i.tokens.push(e),!0)},d=function(e){","==i.tokens[i.tokens.length-1]?i.tokens[i.tokens.length-1]=e:h(e)};if(c<2)return 0;if(nt(t)){h("[");for(var l=0;l<t.length&&c>0;l++){var p=e(t[l],c-1,r+1,i);if(c-=p,0==p&&!h("null"))break;h(",")}d("]")}else{h("{");var f=Ze(t);for(l=0;l<f.length&&c>0;l++){var v=f[l],_=t[v];if(!h("\""+v+"\":"))break;if(0==(p=e(_,c-1,r+1,i))){i.tokens.pop();break}c-=p,h(",")}d("}")}return n==1/0?1:n-c}(e,t,0,i);var o=i.tokens.join("");return r?function(e,t){var n=t.replace(vr,"<email>");return n=n.replace(_r,function(t){return ur(t,e,{source:"log",type:"debug"})})}(n,o):o}catch(e){return mt(e)}}function Zi(e,t){var n=0;try{s.jsonStringify(e,function(e,r){if(n++>t)throw"break";if("object"==typeof r)return r})}catch(e){return"break"!=e}return!1}var eo=function(e){return isNaN(e)?"Invalid Date":e.toUTCString()},to=function(e,t,n){return void 0===n&&(n="..."),e.length<=t?e:e.length<=n.length||t<=n.length?e.substring(0,t):e.substring(0,t-n.length)+n};var no=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},ro=function(){function e(e,t){this._q=e,this._valueIndices=t,this._evts=[],this._curveEndMs=0}return e.prototype.add=function(e){0==this._evts.length?(this._q.push(e),this._curveEndMs=e.When):e.When>this._curveEndMs&&(this._curveEndMs=e.When),this._evts.push(e)},e.prototype.finish=function(e,t){void 0===t&&(t=[]);var n=this._evts.length;if(n<=1)return!1;for(var r=no([this._curveEndMs],t),i=this._evts[0].When,o=this._evts[n-1].When,s=0;s<this._valueIndices.length;++s){var a=this._valueIndices[s],u=this._evts[0].Args[a],c=(this._evts[1].When-i)/(o-i),h=(this._evts[1].Args[a]-u)/c,d=this._evts[n-2].Args[a],l=(o-this._evts[n-2].When)/(o-i),p=this._evts[n-1].Args[a],f=(p-d)/l;r.push(u,p,h,f)}return this._evts[0].Kind=e,this._evts[0].Args=r,!0},e.prototype.evts=function(){return this._evts},e}();var io=function(){function e(e,t,n,r){void 0===n&&(n=function(){return[]}),void 0===r&&(r=en),this._ctx=e,this._transport=t,this._gatherExternalEvents=n,this._tickerFactory=r,this._recordingDisabled=!1,this._activeSimultaneousEventsTransactions=0,this._lastWhen=-1,this._gotUnload=!1,this._eventQueue=[],this._sampleCurvesTicker=new this._tickerFactory(te.CurveSamplingInterval),this._processMutationsTicker=new this._tickerFactory(te.MutationProcessingInterval)}return e.prototype.startPipeline=function(e){var t,n,r=this;this._recordingDisabled||this._pipelineStarted||(this._pipelineStarted=!0,this._frameId=null!==(t=e.frameId)&&void 0!==t?t:0,this._parentIds=null!==(n=e.parentIds)&&void 0!==n?n:[],this.processEvents(),this._processMutationsTicker.start(function(){r.processEvents()}),this._sampleCurvesTicker.start(function(){r.processEvents(!0)}),this._transport.startPipeline(e))},e.prototype.enqueueSimultaneousEventsIn=function(e){0===this._activeSimultaneousEventsTransactions&&(this._lastWhen=this._ctx.time.now());try{return this._activeSimultaneousEventsTransactions++,e(this._lastWhen)}finally{this._activeSimultaneousEventsTransactions--,this._activeSimultaneousEventsTransactions<0&&(this._activeSimultaneousEventsTransactions=0)}},e.prototype.enqueue=function(e){var t=this._activeSimultaneousEventsTransactions>0?this._lastWhen:this._ctx.time.now();this.enqueueAt(t,e),Zt.checkForBrokenSchedulers()},e.prototype.enqueueAt=function(e,t){if(!this._recordingDisabled){e<this._lastWhen&&(e=this._lastWhen),this._lastWhen=e;var n=t;n.When=e,this._eventQueue.push(n)}},e.prototype.enqueueFirst=function(e){if(this._eventQueue.length>0){var t=e;t.When=this._eventQueue[0].When,this._eventQueue.unshift(t)}else this.enqueue(e)},e.prototype.addUnload=function(e){this._gotUnload||(this._gotUnload=!0,this.enqueue({Kind:R.UNLOAD,Args:[e]}),this.singSwanSong())},e.prototype.shutdown=function(e){this._flush(),this.addUnload(e),this._flush(),this._recordingDisabled=!0,this.stopPipeline()},e.prototype._flush=function(){this.processEvents(),this._transport.flush()},e.prototype.singSwanSong=function(){this._recordingDisabled||(this.processEvents(),this._transport.singSwanSong())},e.prototype.rebaseIframe=function(e){for(var t=0,n=this._eventQueue.length;t<n;t++){var r=this._eventQueue[t],i=r.When+this._ctx.time.startTime()-e;i<0&&(i=0),r.When=i}},e.prototype.processEvents=function(e){if(this._pipelineStarted){var t=this._eventQueue;this._eventQueue=[];var n=function(e){if(0==e.length)return e;for(var t,n=[],r=new ro(n,[0,1]),i={},o={},s={},a=0,u=e;a<u.length;a++){var c=u[a];switch(c.Kind){case R.MOUSEMOVE:r.add(c);break;case R.TOUCHMOVE:(l=c.Args[0])in i||(i[l]=new ro(n,[1,2])),i[l].add(c);break;case R.SCROLL_LAYOUT:(l=c.Args[0])in o||(o[l]=new ro(n,[1,2])),o[l].add(c);break;case R.SCROLL_VISUAL_OFFSET:(l=c.Args[0])in s||(s[l]=new ro(n,[1,2])),s[l].add(c);break;case R.RESIZE_VISUAL:t||(t=new ro(n,[0,1])),t.add(c);break;default:n.push(c);}}if(r.finish(R.MOUSEMOVE_CURVE)){var h=r.evts();if(h.length>0){var d=h[h.length-1].Args[2];if(d)h[0].Args[9]=d}}for(var l in o){o[p=parseInt(l)].finish(R.SCROLL_LAYOUT_CURVE,[p])}for(var l in s){s[p=parseInt(l)].finish(R.SCROLL_VISUAL_OFFSET_CURVE,[p])}for(var l in i){var p;i[p=parseInt(l)].finish(R.TOUCHMOVE_CURVE,[p])}return t&&t.finish(R.RESIZE_VISUAL_CURVE),n}(t);e||(n=n.concat(this._gatherExternalEvents(0!=n.length))),this.ensureFrameIds(n),0!=n.length&&this._transport.enqueueEvents(this._ctx.recording.pageSignature(),n)}},e.prototype.ensureFrameIds=function(e){if(this._frameId)for(var t=this._parentIds,n=t&&t.length>0,r=0;r<e.length;++r){var i=e[r];i.FId||(i.FId=this._frameId),n&&!i.PIds&&(i.PIds=t)}},e.prototype.stopPipeline=function(){this._pipelineStarted&&(this._sampleCurvesTicker.stop(),this._processMutationsTicker.stop(),this._eventQueue=[],this._transport.stopPipeline())},e}();function oo(){var e,t;return{promise:new et(function(n,r){e=n,t=r}),resolve:e,reject:t}}function so(e){return new et(function(t){s.setWindowTimeout(window,ie(t),e)})}var ao=function(){function e(e){void 0===e&&(e=4),this.hashCount=e,this.idx=0,this.hashMask=e-1,this.reset()}return e.prototype.reset=function(){this.idx=0,this.hash=[];for(var e=0;e<this.hashCount;++e)this.hash.push(2166136261)},e.prototype.write=function(e){for(var t=this.hashMask,n=this.idx,r=0;r<e.length;r++)this.hash[n]=this.hash[n]^e[r],this.hash[n]+=(this.hash[n]<<1)+(this.hash[n]<<4)+(this.hash[n]<<7)+(this.hash[n]<<8)+(this.hash[n]<<24),n=n+1&t;this.idx=n},e.prototype.writeAscii=function(e){for(var t=this.hashMask,n=this.idx,r=0;r<e.length;r++)this.hash[n]=this.hash[n]^e.charCodeAt(r),this.hash[n]+=(this.hash[n]<<1)+(this.hash[n]<<4)+(this.hash[n]<<7)+(this.hash[n]<<8)+(this.hash[n]<<24),n=n+1&t;this.idx=n},e.prototype.sum=function(){var e,t=this.sumAsHex();return e=t.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").map(Number),lo(String.fromCharCode.apply(window,e))},e.prototype.sumAsHex=function(){for(var e="",t=0;t<this.hashCount;++t)e+=("00000000"+(this.hash[t]>>>0).toString(16)).slice(-8);return e},e}();function uo(e){var t=new ao(1);return t.writeAscii(e),t.sumAsHex()}function co(e){var t=new Uint8Array(e);return lo(String.fromCharCode.apply(null,t))}var ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function lo(e){var t;return(null!==(t=window.btoa)&&void 0!==t?t:po)(e).replace(/\+/g,"-").replace(/\//g,"_")}function po(e){for(var t=String(e),n=[],r=0,i=0,o=0,s=ho;t.charAt(0|o)||(s="=",o%1);n.push(s.charAt(63&r>>8-o%1*8))){if((i=t.charCodeAt(o+=.75))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return n.join("")}var fo=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},vo=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},_o=1e4,go=25,mo=100;function yo(e,t,n,r){return void 0===r&&(r=new ao),fo(this,void 0,et,function(){var i,o,s,a;return vo(this,function(u){switch(u.label){case 0:i=e.now(),o=n.byteLength,s=0,u.label=1;case 1:return s<o?e.now()-i>go?[4,t(mo)]:[3,3]:[3,5];case 2:u.sent(),i=e.now(),u.label=3;case 3:a=new Uint8Array(n,s,Math.min(o-s,_o)),r.write(a),u.label=4;case 4:return s+=_o,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var wo=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},bo=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},So=6e6,Eo=function(){function e(e,t,n,r,i){void 0===r&&(r=window.FormData),void 0===i&&(i=tn),this.ctx=e,this.queue=t,this.protocol=n,this.FormDataCtr=r,this.Timeout=i,this.started={},this.byUrl={},this.batchReady=!1,this.existsBatch=[],this._sentToBugsnag=!1}return e.prototype.init=function(){this.FormDataCtr&&this.main()["catch"](function(e){Mt.sendToBugsnag(e,"error")})},e.prototype.main=function(){return wo(this,void 0,et,function(){var e,t,n,r,i,s,a,u,c,h,d,l,p,f,v,_,g,m,y,w,b,S,E,T,k,I;return bo(this,function(C){switch(C.label){case 0:e=this.ctx.options.orgId,C.label=1;case 1:return[4,this.getBatch()];case 2:for(t=C.sent(),n={fsnv:[],sha1:[]},r=0,i=t;r<i.length;r++)s=i[r],a=s.hash,v=s.hashAlgorithm,n[v].push(a);for(u={},c=0,h=t;c<h.length;c++)d=h[c],u[d.hash]=d;l=void 0,C.label=3;case 3:return C.trys.push([3,5,,6]),[4,this.protocol.queryResources({OrgId:e,HashesByAlgorithm:n})];case 4:return l=C.sent(),[3,6];case 5:return o("/rec/queryResources failed with status "+C.sent()),[3,1];case 6:for(p=0,f=l;p<f.length;p++)if((m=f[p]).Found&&m.CanonicalHash){if(!(y=u[m.QueryHash])){this.sendOnceToBugsnag("No resource found for hash");continue}if(y.blob=y.stringData=null,"fsnv"!==(v=m.CanonicalHash.Algorithm)){this.sendOnceToBugsnag("Unrecognized canonical hash type",{hashAlgorithm:v});continue}this.queue.enqueue({Kind:R.SYS_RESOURCEHASH,Args:["url",y.url,m.CanonicalHash.Hash]})}else;_=0,g=l,C.label=7;case 7:if(!(_<g.length))return[3,12];if((m=g[_]).Found&&m.CanonicalHash)return[3,11];if(null==(y=u[m.QueryHash]))return this.sendOnceToBugsnag("Server told us to upload a hash we don't have"),[3,11];if(w=y.url,b=y.contentType,!(S=y.blob||y.stringData))return this.sendOnceToBugsnag("Missing resource contents"),[3,11];if(E=y.blob||new Blob([S],{type:b}),null==S)return this.sendOnceToBugsnag("Tried to re-upload a resource"),[3,11];if((T=new this.FormDataCtr).append("orgId",e),T.append("baseUrl",w),"fsnv"===m.QueryAlgorithm)T.append("fsnvHash",m.QueryHash);else{if("sha1"!==m.QueryAlgorithm)return this.sendOnceToBugsnag("Unrecognized hash type from resource query",{hashAlgorithm:m.QueryAlgorithm}),[3,11];T.append("sha1Hash",m.QueryHash)}T.append("contents",E,"blob"),y.blob=y.stringData=null,C.label=8;case 8:return C.trys.push([8,10,,11]),[4,this.protocol.uploadResource(T)];case 9:return k=C.sent(),"fsnv"!=(I=JSON.parse(k)).Algorithm&&this.sendOnceToBugsnag("Unexpected hash type from resource upload",{hashAlgorithm:I.Algorithm}),this.queue.enqueue({Kind:R.SYS_RESOURCEHASH,Args:["url",w,I.Hash]}),[3,11];case 10:return C.sent(),o("Server error uploading resource"),[3,11];case 11:return _++,[3,7];case 12:return[3,1];case 13:return[2];}})})},e.prototype.getBatch=function(){var e=this,t=oo(),n=t.resolve,r=t.promise,i=function(){e.popBatch=null,e.batchReady=!1;var t=e.existsBatch;e.existsBatch=[],n(t)};return this.batchReady?i():this.popBatch=i,r},e.prototype.uploadIfNeeded=function(e,t){return wo(this,void 0,et,function(){var n,r,i=this;return bo(this,function(o){switch(o.label){case 0:return this.FormDataCtr?this.started[t]?[2]:function(e,t){var n=Xn(Jn(e),t);switch(n.protocol){case"blob:":return!0;case"http:":case"https:":switch(n.hostname){case"localhost":case"127.0.0.1":case"[::1]":return e.location.protocol===n.protocol&&e.location.host===n.host;case"::1":var r=n.port?"[::1]:"+n.port:"[::1]";return e.location.protocol===n.protocol&&e.location.host===r;default:return!1;}default:return!1;}}(e,t)?(this.started[t]=!0,[4,this.processResource(t)]):[2]:[2];case 1:return(n=o.sent())?(r=0==this.existsBatch.length,this.existsBatch.push(n),r&&new this.Timeout(function(){i.batchReady=!0,i.popBatch&&i.popBatch()},50).start(),[2]):[2];}})})},e.prototype.processResource=function(e){return wo(this,void 0,et,function(){var t,n,r,i,o;return bo(this,function(s){switch(s.label){case 0:return this.byUrl[e]?[2,this.byUrl[e]]:[4,To(e,this.ctx.options.orgId)];case 1:return(t=s.sent())?[4,ko(this.ctx,t.buffer)]:[2,null];case 2:return n=s.sent(),r=n.hash,i=n.algorithm,o={hash:r,hashAlgorithm:i,url:e,blob:t.blob,contentType:t.contentType},this.byUrl[o.url]=o,[2,o];}})})},e.prototype.sendOnceToBugsnag=function(e,t){this._sentToBugsnag||(this._sentToBugsnag=!0,o(e),Mt.sendToBugsnag(e,"error",t))},e}();function To(e,t){var n=oo(),r=n.resolve,i=n.promise,s=new XMLHttpRequest;return"string"!=typeof s.responseType?(r(null),i):(s.open("GET",e),s.responseType="blob",s.onerror=function(){r(null)},s.onload=function(){if(200!=s.status)return o("Error loading blob resource "+ur(e,t,{source:"log",type:"debug"})),void r(null);var n=s.response;if((n.size||n.length)>So){var i=ur(e,t,{source:"log",type:"bugsnag"});return Mt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:i,MaxResourceSizeBytes:So}),void r(null)}(function(e){var t=oo(),n=t.resolve,r=t.promise,i=new FileReader;return i.readAsArrayBuffer(e),i.onload=function(){n(i.result)},i.onerror=function(e){Mt.sendToBugsnag(e,"error"),n(null)},r})(n).then(function(e){r(e?{buffer:e,blob:n,contentType:n.type}:null)})},s.send(),i)}function ko(e,t){var n,r;return wo(this,void 0,et,function(){var i;return bo(this,function(o){switch(o.label){case 0:return i=e.window,(null===(r=null===(n=i.crypto)||void 0===n?void 0:n.subtle)||void 0===r?void 0:r.digest)?[4,i.crypto.subtle.digest({name:"sha-1"},t)]:[3,2];case 1:return[2,{hash:co(o.sent()),algorithm:"sha1"}];case 2:return[4,yo(e.time,so,t)];case 3:return[2,{hash:o.sent().hash,algorithm:"fsnv"}];}})})}var Io=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Co=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ro=function(){function e(e){this._byteCount=0,this._scheme=e.options.scheme,this._recHost=e.options.recHost}return e.prototype.page=function(e,t,n){this.post("/rec/page",gt(e),function(e){try{t(wt(e))}catch(e){n(0)}},function(e,t){if(t)try{return n(0,wt(t))}catch(e){}n(0)})},e.prototype.bundle=function(e){var t=gt(e.bundle);this._byteCount+=t.length,o("total bytes written: "+this._byteCount);var n=xo(e.bundle.Seq,e);return this.post(n,t,function(t){try{e.win(wt(t))}catch(n){Mt.sendToBugsnag("Failed to JSON parse /rec/bundle response","error",{rsp:t,error:n.toString()}),e.lose(0)}},e.lose),this._byteCount},e.prototype.bundleBeacon=function(e){return Mo(this._scheme,this._recHost,e)},e.prototype.exponentialBackoffMs=function(e,t){var n=s.mathMin(te.BackoffMax,5e3*s.mathPow(2,e));return t?n+.25*s.mathRandom()*n:n},e.prototype.post=function(e,t,n,r){Oo(this._scheme,this._recHost,e,t,n,r)},e}(),Ao=function(){function e(e){this._scheme=e.options.scheme,this._recHost=e.options.recHost}return e.prototype.uploadResource=function(e){var t=this;return new et(function(n,r){Oo(t._scheme,t._recHost,"/rec/uploadResource",e,n,r)})},e.prototype.queryResources=function(e){return Io(this,void 0,et,function(){var t,n,r=this;return Co(this,function(i){switch(i.label){case 0:return t=JSON.stringify(e),[4,new et(function(e,n){Oo(r._scheme,r._recHost,"/rec/queryResources",t,e,n)})];case 1:return n=i.sent(),[2,JSON.parse(n)];}})})},e}();function xo(e,t){var n="/rec/bundle?OrgId="+t.orgId+"&UserId="+t.userId+"&SessionId="+t.sessionId+"&PageId="+t.pageId+"&Seq="+e;return null!=t.serverPageStart&&(n+="&PageStart="+t.serverPageStart),null!=t.serverBundleTime&&(n+="&PrevBundleTime="+t.serverBundleTime),null!=t.lastUserActivity&&(n+="&LastActivity="+t.lastUserActivity),t.isNewSession&&(n+="&IsNewSession=true"),null!=t.deltaT&&(n+="&DeltaT="+t.deltaT),n}function Oo(e,t,n,r,i,o){var s="//"+t+n,a=!1,u=new XMLHttpRequest;if("withCredentials"in u)u.onreadystatechange=function(){if(u.readyState==fn){if(a)return;a=!0;try{200==u.status?i(u.responseText):o&&o(u.status,u.responseText)}catch(e){Mt.sendToBugsnag(e,"error")}}},u.open("POST",e+s,!0),u.withCredentials=!0,"function"!=typeof r.append&&u.setRequestHeader("Content-Type","text/plain"),u.send(r);else{var c=new XDomainRequest;c.onload=function(){i(c.responseText)},c.onerror=function(){o&&o("Not Found"==c.responseText?404:500,c.responseText)},c.onprogress=function(){},c.open("POST",s),c.send(r)}}function Mo(e,t,n){if("function"==typeof navigator.sendBeacon){var r=e+"//"+t+xo(n.bundle.Seq,n)+"&SkipResponseBody=true",i=gt(n.bundle);try{return navigator.sendBeacon(r,i)}catch(e){Mt.sendToBugsnag(e,"error",{url:r,data:i})}}return!1}var Lo=function(){function e(e,t,n){void 0===n&&(n=new Fo),this._ctx=e,this._q=t,this._matcher=n}return e.prototype.initialize=function(e){var t;if(e){this._setUrlKeeps(e);var n=null===(t=this._ctx.window.location)||void 0===t?void 0:t.href;this.onNavigate(n)}},e.prototype.onNavigate=function(e){return!!this._matcher.matches(e)&&(this._q.enqueue({Kind:R.KEEP_URL,Args:[this._scrubUrl(e)]}),!0)},e.prototype.onClick=function(e){return!(!e||!function(e){var t=xn(e);return!!t&&!0===t.matchesAnyKeepRule}(e.node))&&(this._q.enqueue({Kind:R.KEEP_ELEMENT,Args:[e.id]}),!0)},e.prototype.urlMatches=function(e){return this._matcher.matches(e)},e.prototype._setUrlKeeps=function(e){this._matcher.setRules(e)},e.prototype._scrubUrl=function(e){return ur(e,this._ctx.options.orgId,{source:"page",type:"base"})},e}(),Fo=function(){function e(){this._regexes=null}return e.prototype.setRules=function(e){var t=e.map(function(e){return e.Regex}).filter(this._isValidRegex);t.length>0&&(this._regexes=this._joinRegexes(t))},e.prototype.matches=function(e){return!!this._regexes&&this._regexes.test(e)},e.prototype._isValidRegex=function(e){try{return new RegExp(e),!0}catch(t){return Mt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:e,error:t.toString()}),!1}},e.prototype._joinRegexes=function(e){try{return new RegExp("("+e.join(")|(")+")","i")}catch(t){return Mt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:e,error:t.toString()}),null}},e}();function Po(e,t){var n=Mn(e)+" ";return e.id&&(n+="#"+e.id),n+="[src="+ur(e.src,t,{source:"log",type:"debug"})+"]"}var qo,Uo=function(e){var t=e.transport,n=e.frame,r=e.orgId,s=e.scheme,a=e.script,u=e.recHost,c=e.appHost,h=Po(n,r);o("Injecting into Frame "+h);try{if(function(e){return e.id==e.name&&No.test(e.id)}(n))return void o("Blacklisted iframe: "+h);if(function(e){if(!e.contentDocument||!e.contentWindow||!e.contentWindow.location)return!0;return function(e){return!!e.src&&"about:blank"!=e.src&&e.src.indexOf("javascript:")<0}(e)&&e.src!=e.contentWindow.location.href&&"loading"==e.contentDocument.readyState}(n))return void o("Frame not yet loaded: "+h);var d=n.contentWindow,l=n.contentDocument;if(!d||!l)return void o("Missing contentWindow or contentDocument: "+h);if(!l.head)return void o("Missing contentDocument.head: "+h);if(I(d))return void o("FS already defined in Frame contentWindow: "+h+". Ignoring.");d._fs_org=r,d._fs_script=a,d._fs_rec_host=u,d._fs_app_host=c,d._fs_debug=i(),d._fs_run_in_iframe=!0,t&&(d._fs_transport=t);var p=l.createElement("script");p.async=!0,p.crossOrigin="anonymous",p.src=s+"//"+a,"testdrive"==r&&(p.src+="?allowMoo=true"),l.head.appendChild(p)}catch(e){o("iFrame no injecty. Probably not same origin.")}},No=/^fb\d{18}$/;!function(e){e[e.NoInfoYet=1]="NoInfoYet",e[e.Enabled=2]="Enabled",e[e.Disabled=3]="Disabled"}(qo||(qo={}));var Wo=function(){function e(e,t,n,r){var i=this;this._ctx=e,this._transport=n,this._injector=r,this._bundleUploadInterval=te.DefaultBundleUploadInterval,this._iFrames=[],this._pendingChildFrameIdInits=[],this._listeners=new Ut,this._getCurrentSessionEnabled=qo.NoInfoYet,this._resourceUploadingEnabled=!1,this._tickerTasks=[],this._pendingIframes={},this._watcher=new yn,this._queue=new io(e,this._transport,function(e){for(var t=i._eventWatcher.bundleEvents(e),n=void 0;n=i._tickerTasks.pop();)n();return t},t),this._keep=new Lo(e,this._queue),this._eventWatcher=new Di(e,this._queue,this._keep,this._watcher,this._listeners,function(e){i.onFrameCreated(e)},function(e){i.beforeFrameRemoved(e)},new Eo(e,this._queue,new Ao(e))),this._consoleWatcher=new Ji(e,this._queue,this._listeners),this._scheme=e.options.scheme,this._script=e.options.script,this._recHost=e.options.recHost,this._appHost=e.options.appHost,this._orgId=e.options.orgId,this._wnd=e.window}return e.prototype.bundleUploadInterval=function(){return this._bundleUploadInterval},e.prototype.start=function(e,t){var n=this;this._onFullyStarted=t,"onpagehide"in this._wnd?this._listeners.add(this._wnd,"pagehide",!1,function(e){n.onUnload()}):this._listeners.add(this._wnd,"unload",!1,function(e){n.onUnload()}),this._listeners.add(this._wnd,"message",!1,function(e){if("string"==typeof e.data){var t=e.source;n.postMessageReceived(t,Bo(e.data))}});var r=this._wnd.Document?this._wnd.Document.prototype:this._wnd.document;this._docCloseHook=Tt(r,"close"),this._docCloseHook&&this._docCloseHook.afterAsync(function(){n._listeners.refresh()})},e.prototype.queue=function(){return this._queue},e.prototype.eventWatcher=function(){return this._eventWatcher},e.prototype.console=function(){return this._consoleWatcher},e.prototype.onDomLoad=function(){this._eventWatcher.onDomLoad()},e.prototype.onLoad=function(){this._eventWatcher.onLoad()},e.prototype.shutdown=function(e){this._eventWatcher.shutdown(e),this._consoleWatcher.disable(),this._listeners&&this._listeners.clear(),this._docCloseHook&&this._docCloseHook.disable(),this.tellAllFramesTo(["ShutdownFrame"])},e.prototype.tellAllFramesTo=function(e){for(var t=0;t<this._iFrames.length;t++){var n=this._iFrames[t];n.contentWindow&&Do(n.contentWindow,e)}},e.prototype.getCurrentSessionURL=function(e){var t=this._getCurrentSessionEnabled;if(t==qo.NoInfoYet)return null;if(t==qo.Disabled)return this._scheme+"//"+this._appHost+"/opt/upgrade";var n=this.getCurrentSession();return n?(e&&(n+=":"+this._ctx.time.wallTime()),this._scheme+"//"+this._appHost+"/ui/"+this._ctx.options.orgId+"/session/"+encodeURIComponent(n)):null},e.prototype.getCurrentSession=function(){var e=this._getCurrentSessionEnabled;return e==qo.NoInfoYet||e==qo.Disabled?null:this._userId?this._userId+":"+this._sessionId:null},e.prototype.setConsent=function(e){var t=this,n=function(){t._watcher.setConsent(e),t._queue.processEvents()},r=function(){t._queue.enqueue({Kind:R.SYS_SETCONSENT,Args:[e,K.Document]})};switch(e){case j.GrantConsent:r(),n();break;case j.RevokeConsent:n(),r();}this.tellAllFramesTo(["SetConsent",e])},e.prototype.pageSignature=function(){return this._userId+":"+this._sessionId+":"+this._pageId},e.prototype.fireFsReady=function(e){void 0===e&&(e=!1);var t=this._wnd._fs_ready;if(t)try{e?t(!0):t()}catch(e){o("exception in _fs_ready(): "+e)}},e.prototype.onUnload=function(){this._queue.addUnload(V.Unload),Zt.stopAll()},e.prototype.handleResponse=function(e){var t=e.Flags,n=t.AjaxFetch,r=t.AjaxWatcher,i=t.ConsoleWatcher,o=t.GetCurrentSession,s=t.WatchStrategy,a=t.ResourceUploading,u=t.WhitelistElements;this._pageRsp=e,this._userId=e.UserIntId,this._sessionId=e.SessionIntId,this._pageId=e.PageIntId,this._serverPageStart=e.PageStart,this._getCurrentSessionEnabled=o?qo.Enabled:qo.Disabled,"number"==typeof e.BundleUploadInterval&&(this._bundleUploadInterval=e.BundleUploadInterval),a&&this.enableResourceUploading(),r&&this.enableAjaxWatcher(!!n),i&&this.enableConsoleWatcher(),r&&e.AjaxWatches&&this._eventWatcher.ajaxWatcher().setWatches(e.AjaxWatches),this._watcher.initialize({blocks:e.ElementBlocks,keeps:e.ElementKeeps,watches:e.ElementWatches,flags:{whitelist:!!u,watchStrategy:null!=s?s:"matches"}}),this._keep.initialize(e.UrlKeeps),this._watcher.initializeConsent(!!e.Consented)},e.prototype.fullyStarted=function(){this._onFullyStarted()},e.prototype.enableResourceUploading=function(){this._resourceUploadingEnabled=!0,this._eventWatcher.initResourceUploading()},e.prototype.enableAjaxWatcher=function(e){this.eventWatcher().ajaxWatcher().enable(e)},e.prototype.enableConsoleWatcher=function(){this.console().enable()},e.prototype.flushPendingChildFrameInits=function(){if(this._pendingChildFrameIdInits.length>0){for(var e=0;e<this._pendingChildFrameIdInits.length;e++)this._pendingChildFrameIdInits[e]();this._pendingChildFrameIdInits=[]}},e.prototype.inject=function(e){var t=this;this._ctx.measurer.requestMeasureTask(function(){i()&&o("Injecting into a "+("none"!==getComputedStyle(e,null).display?"hidden":"visible")+" iframe: "+Po(e,t._orgId));var n={send:function(n,r,i){et.resolve().then(Mt.wrap(function(){t.postMessageReceived(e.contentWindow,[n,s.jsonParse(r),i])}))}};t._injector({frame:e,transport:n,orgId:t._orgId,scheme:t._scheme,script:t._script,recHost:t._recHost,appHost:t._appHost})})},e.prototype.onFrameCreated=function(e){var t=Mn(e);if(t){this._iFrames.push(e);var n=!1;if(e.contentWindow)try{n=!!I(e.contentWindow)}catch(e){n=!0}var r=function(e){var t=e.src,n=location.protocol+"//"+location.host;return!t||"about:blank"==t||ct(t,"javascript:")||ct(t,n)}(e),i=e.contentWindow&&e.contentWindow.postMessage;r&&!n||!i?r?this.initSameOriginIframe(e):o("Frame Doesn't need injecting. Probably cross domain "+Po(e,this._orgId)):this.initCrossOriginIframe(e,t)}else o("fsid missing or invalid for iFrame "+Po(e,this._orgId))},e.prototype.initCrossOriginIframe=function(e,t){var n=this;e.contentWindow&&e.contentWindow.postMessage?(o("Cross-origin iframe "+Po(e,this._orgId)),Do(e.contentWindow,["GreetFrame"]),i()&&(this._pendingIframes[t]=!0,setTimeout(function(){n._pendingIframes[t]&&o("iframe "+e.src+" is unresponsive")},5e3))):o("No content window on init of cross-origin iframe "+Po(e,this._orgId))},e.prototype.initSameOriginIframe=function(e){var t=this;o("Attempting to setup Frame "+Po(e,this._orgId)),this.inject(e),e.addEventListener("load",Mt.wrap(function(n){o("onload for frame "+Po(e,t._orgId)),t.inject(e)}))},e.prototype.beforeFrameRemoved=function(e){for(var t=0;t<this._iFrames.length;t++){if(e==this._iFrames[t])return void this._iFrames.splice(t,1)}},e.prototype.postMessageReceived=function(e,t){if(!e||e.parent==this._wnd)switch(t[0]){case"EvtBundle":var n=t[1],r=this.pageSignature(),i=t[2];if(r!=i)return Mt.sendToBugsnag("Page signature mismatch","warning",{pageSignature:r,messageSignature:i}),void(e&&Do(e,["ShutdownFrame"]));n.length>0&&this._transport.enqueueEvents(r,n);break;case"RequestFrameId":if(!e)return void o("No MessageEvent.source, iframe may have unloaded.");var s=this.iFrameWndToFsId(e);s?(o("Responding to FID request for frame "+s),this._pendingIframes[s]=!1,this.sendFrameIdToInnerFrame(e,s)):o("No FrameId found. Hoping to send one later.");}},e.prototype.sendFrameIdToInnerFrame=function(e,t){var n=this,r=function(){var r=[];0!=n._frameId&&(r=n._parentIds?n._parentIds.concat(n._frameId):[n._frameId]);var i=n._ctx.time.startTime();Do(e,["SetFrameId",t,r,i,n._scheme,n._script,n._appHost,n._orgId,n._pageRsp])};null==this._frameId?this._pendingChildFrameIdInits.push(r):r()},e.prototype.iFrameWndToFsId=function(e){for(var t=0;t<this._iFrames.length;t++)if(this._iFrames[t].contentWindow==e)return Mn(this._iFrames[t]);return o("Unable to locate frame for window"),NaN},e}();function Do(e,t){e&&e.postMessage&&e.postMessage(gt({__fs:t}),"*")}function Bo(e){try{var t=wt(e);if("__fs"in t)return t.__fs}catch(e){}return[]}function Ho(e){return e>=400&&502!==e||202==e||206==e}var jo=function(){return(jo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ko=function(){function e(e,t,n,r){void 0===r&&(r=tn),this._ctx=e,this._protocol=t,this._identity=n,this._timeoutFactory=r,this._recover()}return e.prototype.sing=function(e){o("Saving "+e.bundles.length+" bundles in swan-song.");var t=gt({OrgId:this._identity.orgId(),UserId:this._identity.userId(),SessionId:this._identity.sessionId(),PageId:e.pageId,Bundles:e.bundles,PageStartTime:this._ctx.time.startTime(),LastBundleTime:e.lastBundleTime,ServerPageStart:e.serverPageStart,ServerBundleTime:e.serverBundleTime,IsNewSession:e.isNewSession});if(!(t.length>2e6))try{localStorage._fs_swan_song=t}catch(e){}},e.prototype._recover=function(){try{if("_fs_swan_song"in localStorage){var e=localStorage._fs_swan_song||localStorage.singSwanSong;delete localStorage._fs_swan_song,delete localStorage.singSwanSong;var t=wt(e);if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return void o("Malformed swan song found. Ignoring it.");t.OrgId||(t.OrgId=this._identity.orgId()),t.Bundles.length>0&&(o("Sending "+t.Bundles.length+" bundles as prior page swan song"),this.sendSwanSongBundles(t))}}catch(e){o("Error recovering swan-song: "+e)}},e.prototype.sendSwanSongBundles=function(e,t){var n=this;void 0===t&&(t=0);var r=null;if(nt(e.Bundles)&&0!==e.Bundles.length&&void 0!==e.Bundles[0]){1==e.Bundles.length&&(r=this._ctx.time.wallTime()-(e.LastBundleTime||0));this._protocol.bundle({bundle:e.Bundles[0],deltaT:r,orgId:e.OrgId,pageId:e.PageId,serverBundleTime:e.ServerBundleTime,serverPageStart:e.ServerPageStart,sessionId:e.SessionId,userId:e.UserId,isNewSession:e.IsNewSession,win:function(t){o("Sent "+e.Bundles[0].Evts.length+" trailing events from last session as Seq "+e.Bundles[0].Seq),e.Bundles.shift(),e.Bundles.length>0?n.sendSwanSongBundles(jo(jo({},e),{ServerBundleTime:t.BundleTime})):o("Done with prior page swan song")},lose:function(r){Ho(r)?o("Fatal error while sending events, giving up"):(o("Failed to send events from last session, will retry while on this page"),n._lastSwanSongRetryTimeout=new n._timeoutFactory(n.sendSwanSongBundles,n._protocol.exponentialBackoffMs(t,!0),n,e,t+1).start())}})}},e}(),Vo=function(){function e(e,t,n,r){var i=this;void 0===t&&(t=new Ro(e)),void 0===n&&(n=en),void 0===r&&(r=tn),this._ctx=e,this._protocol=t,this._tickerFactory=n,this._backoffRetries=0,this._backoffTime=0,this._bundleSeq=1,this._lastPostTime=0,this._serverBundleTime=0,this._isNewSession=!1,this._largePageSize=16e6,this._outgoingEventQueue=[],this._bundleQueue=[],this._hibernating=!1,this._heartbeatInterval=0,this._lastUserActivity=this._ctx.time.wallTime(),this._finished=!1,this._scheme=e.options.scheme,this._identity=e.recording.identity,this._lastBundleTime=e.time.wallTime(),this._swanSong=new Ko(e,this._protocol,this._identity,r),this._heartbeatTimeout=new r(function(){i.onHeartbeat()}),this._hibernationTimeout=new r(function(){i.onHibernate()},te.PageInactivityTimeout)}return e.prototype.onShutdown=function(e){this._onShutdown=e},e.prototype.scheme=function(){return this._scheme},e.prototype.enqueueEvents=function(e,t){if(this.maybeHibernate(),this._hibernating){if(this._finished)return;for(var n=0,r=t;n<r.length;n++){if(re((u=r[n]).Kind)){this._ctx.recording.splitPage(V.Hibernation),this._finished=!0;break}}}else{for(var i=0,o=t;i<o.length;i++){if(re((u=o[i]).Kind)){this._hibernationTimeout.start(),this._heartbeatInterval=te.HeartbeatInitial,this._heartbeatTimeout.start(this._heartbeatInterval),this._lastUserActivity=this._ctx.time.wallTime();break}}for(var s=0,a=t;s<a.length;s++){var u=a[s];this._outgoingEventQueue.push(u)}}},e.prototype.initUploadTicker=function(){this._uploadTicker=new this._tickerFactory(this._ctx.recording.bundleUploadInterval())},e.prototype.startPipeline=function(e){var t=this;this._pageId=e.pageId,this._serverPageStart=e.serverPageStart,this._isNewSession=e.isNewSession,this.enqueueAndSendBundle(),this._uploadTicker||this.initUploadTicker(),this._uploadTicker.start(function(){t.enqueueAndSendBundle()}),this._heartbeatInterval=te.HeartbeatInitial,this._heartbeatTimeout.start(this._heartbeatInterval),this._hibernationTimeout.start()},e.prototype.stopPipeline=function(){this._uploadTicker&&this._uploadTicker.stop(),this._outgoingEventQueue=[],this._bundleQueue=[],this._hibernationTimeout.stop(),this._heartbeatTimeout.stop()},e.prototype.flush=function(){this.maybeSendNextBundle()},e.prototype.singSwanSong=function(){if(!this._hibernating&&(this._outgoingEventQueue.length>0&&this.enqueueNextBundle(!0),this._bundleQueue.length>0||this._pendingBundle)){var e=this._bundleQueue.concat();this._pendingBundle&&e.unshift(this._pendingBundle),this._swanSong.sing({pageId:this._pageId,bundles:e,lastBundleTime:this._lastBundleTime,serverPageStart:this._serverPageStart,serverBundleTime:this._serverBundleTime,isNewSession:this._isNewSession})}},e.prototype.maybeHibernate=function(){this._hibernating||this.calcLastUserActivityDuration()>=te.PageInactivityTimeout+5e3&&this.onHibernate()},e.prototype.calcLastUserActivityDuration=function(){return s.mathFloor(this._ctx.time.wallTime()-this._lastUserActivity)},e.prototype.onHeartbeat=function(){var e=this.calcLastUserActivityDuration();this._outgoingEventQueue.push({When:this._ctx.time.now(),Kind:R.HEARTBEAT,Args:[e]}),this._heartbeatInterval*=2,this._heartbeatInterval>te.HeartbeatMax&&(this._heartbeatInterval=te.HeartbeatMax),this._heartbeatTimeout.start(this._heartbeatInterval)},e.prototype.onHibernate=function(){this._hibernating||(this.calcLastUserActivityDuration()<=2*te.PageInactivityTimeout&&(this._outgoingEventQueue.push({When:this._ctx.time.now(),Kind:R.UNLOAD,Args:[V.Hibernation]}),this.singSwanSong()),this.stopPipeline(),this._hibernating=!0)},e.prototype.enqueueAndSendBundle=function(){this._pendingBundle?this._pendingBundleFailed&&this._sendPendingBundle():0!=this._outgoingEventQueue.length?this.enqueueNextBundle():this.maybeSendNextBundle()},e.prototype.enqueueNextBundle=function(e){void 0===e&&(e=!1);var t={When:this._outgoingEventQueue[0].When,Seq:this._bundleSeq++,Evts:this._outgoingEventQueue};this._outgoingEventQueue=[],this._bundleQueue.push(t),e?this._protocol.bundleBeacon({bundle:t,deltaT:null,orgId:this._identity.orgId(),pageId:this._pageId,serverBundleTime:this._serverBundleTime,serverPageStart:this._serverPageStart,isNewSession:this._isNewSession,sessionId:this._identity.sessionId(),userId:this._identity.userId(),win:function(){},lose:function(){}}):this.maybeSendNextBundle()},e.prototype.maybeSendNextBundle=function(){this._pageId&&this._serverPageStart&&!this._pendingBundle&&0!=this._bundleQueue.length&&(this._pendingBundle=this._bundleQueue.shift(),this._sendPendingBundle())},e.prototype._sendPendingBundle=function(){var e=this,t=this._ctx.time.wallTime();if(!(t<this._backoffTime)){var n=this._pendingBundle;n&&(this._pendingBundleFailed=!1,this._lastPostTime=this._lastBundleTime=t,this.sendBundle(n,function(t){o("Sent bundle "+n.Seq+" with "+n.Evts.length+" events"),e._serverBundleTime=t.BundleTime,e._pendingBundle=null,e._backoffTime=0,e._backoffRetries=0,e._ctx.time.wallTime()-e._lastPostTime>e._ctx.recording.bundleUploadInterval()&&e.maybeSendNextBundle()},function(t){if(o("Failed to send events."),Ho(t))return 206==t?Mt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):t>=500&&Mt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),void(e._onShutdown&&e._onShutdown());e._pendingBundleFailed=!0,e._backoffTime=e._lastPostTime+e._protocol.exponentialBackoffMs(e._backoffRetries++,!1)}))}},e.prototype.sendBundle=function(e,t,n){var r=s.mathFloor(this._ctx.time.wallTime()-this._lastUserActivity),i=this._protocol.bundle({bundle:e,deltaT:null,lastUserActivity:r,orgId:this._identity.orgId(),pageId:this._pageId,serverBundleTime:this._serverBundleTime,serverPageStart:this._serverPageStart,isNewSession:this._isNewSession,sessionId:this._identity.sessionId(),userId:this._identity.userId(),win:t,lose:n});i>this._largePageSize&&this._bundleSeq>16&&(o("splitting large page: "+i),this._ctx.recording.splitPage(V.Size))},e}(),zo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yo=function(e){function t(t,n,r,i,o){void 0===r&&(r=new Vo(t,n)),void 0===i&&(i=en),void 0===o&&(o=Uo);var s,a,u=e.call(this,t,i,r,o)||this;return u._protocol=n,u._domLoaded=!1,u._recordingDisabled=!1,u._integrationScriptFetched=!1,r.onShutdown(function(){return u.shutdown(V.SettingsBlocked)}),u._doc=u._wnd.document,u._frameId=0,u._identity=t.recording.identity,u._getCurrentSessionEnabled=qo.NoInfoYet,s=u._wnd,a=function(e){if(u._eventWatcher.shutdown(V.Api),e){var t=u._doc.getElementById(e);t&&t.setAttribute("_fs_embed_token",u._embedToken)}},s._fs_shutdown=a,u}return zo(t,e),t.prototype.onDomLoad=function(){var t=this;e.prototype.onDomLoad.call(this),this._domLoaded=!0,this.injectIntegrationScript(function(){t.fireFsReady(t._recordingDisabled)})},t.prototype.getReplayFlags=function(){var e=U(this._wnd);if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(e+=",forceSession",this._wnd.history)){var t=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(e,t,n){return n?t:""});this._wnd.history.replaceState({},"",this._wnd.location.href.replace(location.search,t))}return e},t.prototype.start=function(t,n){var r,i,o,s=this;e.prototype.start.call(this,t,n);var a=this.getReplayFlags(),u=Vt(this._doc),c=u[0],h=u[1],d=bt(this._wnd),l=d[0],p=d[1],f="";t||(f=this._identity.userId());var v=null!==(o=null===(i=null===(r=this._ctx)||void 0===r?void 0:r.recording)||void 0===i?void 0:i.preroll)&&void 0!==o?o:-1,_=ur(Jn(this._wnd),this._orgId,{source:"page",type:"base"}),g=ur(this._doc.referrer,this._orgId,{source:"page",type:"referrer"}),m=ur(this._wnd.location.href,this._orgId,{source:"page",type:"url"}),y={OrgId:this._orgId,UserId:f,Url:m,Base:_,Width:c,Height:h,ScreenWidth:l,ScreenHeight:p,Referrer:g,Preroll:v,Doctype:yt(this._doc),CompiledTimestamp:1591209308,AppId:this._identity.appId()};a&&(y.ReplayFlags=a),this._protocol.page(y,function(e){s.handleResponse(e),s.handleIdentity(e.CookieDomain,e.UserIntId,e.SessionIntId,e.PageIntId,e.EmbedToken),s.handleIntegrationScript(e.IntegrationScript),e.PreviewMode&&s.maybeInjectPreviewScript();var t=s._wnd._fs_pagestart;t&&t();var n=!!e.Consented;s._queue.enqueueFirst({Kind:R.SYS_REPORTCONSENT,Args:[n,K.Document]}),s._queue.enqueueFirst({Kind:R.SET_FRAME_BASE,Args:[ur(Jn(s._wnd),s._orgId,{source:"event",type:R.SET_FRAME_BASE}),yt(s._doc)]}),s._queue.startPipeline({pageId:e.PageIntId,serverPageStart:e.PageStart,isNewSession:!!e.IsNewSession}),s.fullyStarted()},function(e,t){t&&t.user_id&&t.cookie_domain&&t.reason_code==$.ReasonBlockedTrafficRamping&&f!=t.user_id&&s.handleIdentity(t.cookie_domain,t.user_id,"","",""),s.disableBecauseRecPageSaidSo()})},t.prototype.handleIntegrationScript=function(e){var t=this;this._integrationScriptFetched=!0,this._integrationScript=e,this.injectIntegrationScript(function(){t.fireFsReady(t._recordingDisabled)})},t.prototype.handleIdentity=function(e,t,n,r,i){var s=this._identity;s.setIds(this._wnd,e,t,n),this._embedToken=i,o("/User,"+s.userId()+"/Session,"+s.sessionId()+"/Page,"+r)},t.prototype.injectIntegrationScript=function(e){if(this._domLoaded&&this._integrationScriptFetched)if(this._integrationScript){var t=this._doc.createElement("script");this._wnd._fs_csp?(t.addEventListener("load",e),t.addEventListener("error",e),t.async=!0,t.src=this._scheme+"//"+this._recHost+"/rec/integrations?OrgId="+this._orgId,this._doc.head.appendChild(t)):(t.text=this._integrationScript,this._doc.head.appendChild(t),e())}else e()},t.prototype.maybeInjectPreviewScript=function(){if(!this._doc.getElementById("FullStory-preview-script")){var e=this._doc.createElement("script");e.id="FullStory-preview-script",e.async=!0,e.src=this._scheme+"//"+this._appHost+"/s/fspreview.js",this._doc.head.appendChild(e)}},t.prototype.disableBecauseRecPageSaidSo=function(){this.shutdown(V.SettingsBlocked),o("Disabling FS."),this._recordingDisabled=!0,this.fireFsReady(this._recordingDisabled)},t}(Wo),Go=function(){function e(e,t){void 0===t&&(t=new Qo(e)),this._wnd=e,this._messagePoster=t}return e.prototype.enqueueEvents=function(e,t){this._messagePoster.postMessage(this._wnd.parent,"EvtBundle",t,e)},e.prototype.startPipeline=function(){},e.prototype.stopPipeline=function(){},e.prototype.flush=function(){},e.prototype.singSwanSong=function(){},e.prototype.onShutdown=function(e){},e}(),Qo=function(){function e(e){this.wnd=e}return e.prototype.postMessage=function(e,t,n,r){var i=N(this.wnd);if(i)try{i.send(t,gt(n),r)}catch(e){i.send(t,gt(n))}else e.postMessage(function(e,t,n){var r=[e,t];n&&r.push(n);return gt({__fs:r})}(t,n,r),"*")},e}();var Xo,Jo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$o=function(e){function t(t,n,r,i,o){void 0===n&&(n=new Qo(t.window)),void 0===r&&(r=new Go(t.window)),void 0===i&&(i=en),void 0===o&&(o=Uo);var s=e.call(this,t,i,r,o)||this;return s._messagePoster=n,s}return Jo(t,e),t.prototype.start=function(t,n){var r=this;e.prototype.start.call(this,t,n),this.sendRequestForFrameId(),this._listeners.add(this._wnd,"load",!1,function(){r._eventWatcher.recordingIsDetached()&&(o("Recording wrong document. Restarting recording in iframe."),r._ctx.recording.splitPage(V.FsShutdownFrame))})},t.prototype.postMessageReceived=function(t,n){if(e.prototype.postMessageReceived.call(this,t,n),t==this._wnd.parent||t==this._wnd)switch(n[0]){case"GreetFrame":this.sendRequestForFrameId();break;case"SetFrameId":try{var r=n[1],i=n[2],s=n[3],a=n[4],u=n[5],c=n[6],h=n[7],d=n[8];if(!r)return void o("Outer page gave us a bogus frame Id! Iframe: "+ur(location.href,h,{source:"log",type:"debug"}));this.setFrameIdFromOutside(r,i,s,a,u,c,h,d)}catch(e){o("Failed to parse frameId from message: "+gt(n))}break;case"SetConsent":var l=n[1];this.setConsent(l);break;case"InitFrameMobile":try{var p=JSON.parse(n[1]),f=p.StartTime;if(n.length>2){var v=n[2];if(v.hasOwnProperty("ProtocolVersion"))v.ProtocolVersion>=20180723&&v.hasOwnProperty("OuterStartTime")&&(f=v.OuterStartTime)}var _=p.Host;this.setFrameIdFromOutside(0,[],f,"https:",H(_),B(_),p.OrgId,p.PageResponse)}catch(e){o("Failed to initialize mobile web recording from message: "+gt(n))}}},t.prototype.sendRequestForFrameId=function(){this._frameId||(0!=this._frameId?this._wnd.parent?(o("Asking for a frame ID."),this._messagePoster.postMessage(this._wnd.parent,"RequestFrameId",[])):o("Orphaned window."):o("For some reason the outer window attempted to request a frameId"))},t.prototype.setFrameIdFromOutside=function(e,t,n,r,i,s,a,u){if(this._frameId)this._frameId!=e?(o("Updating frame id from "+this._frameId+" to "+e),this._ctx.recording.splitPage(V.FsShutdownFrame)):o("frame Id is already set to "+this._frameId);else{o("FrameId received within frame "+ur(location.href,a,{source:"log",type:"debug"})+": "+e),this._scheme=r,this._script=i,this._appHost=s,this._orgId=a,this._frameId=e,this._parentIds=t,this.handleResponse(u),this.fireFsReady();var c=!!u.Consented;this._queue.enqueueFirst({Kind:R.SYS_REPORTCONSENT,Args:[c,K.Document]}),this._queue.enqueueFirst({Kind:R.SET_FRAME_BASE,Args:[ur(Jn(this._wnd),a,{source:"event",type:R.SET_FRAME_BASE}),yt(this._wnd.document)]}),this._queue.rebaseIframe(n),this._ctx.time.setStartTime(n),this._queue.startPipeline({pageId:this._pageId,serverPageStart:u.PageStart,isNewSession:!!u.IsNewSession,frameId:e,parentIds:t}),this.flushPendingChildFrameInits(),this.fullyStarted()}},t}(Wo),Zo="fsidentity",es="newuid",ts=function(){function e(e,t){void 0===e&&(e=document),void 0===t&&(t=function(){}),this._doc=e,this._onWriteFailure=t,this._cookies={},this._appId=void 0}return e.prototype.initFromCookies=function(e,t){this._cookies=y(this._doc);var n=this._cookies.fs_uid;if(!n)try{n=localStorage._fs_uid}catch(e){}var r=m(n);r&&r.host.replace(/^www\./,"")==e.replace(/^www\./,"")&&r.orgId==t?this._cookie=r:this._cookie={expirationAbsTimeSeconds:g(),host:e,orgId:t,userId:"",sessionId:"",appKeyHash:""}},e.prototype.initFromParsedCookie=function(e){this._cookie=e},e.prototype.clear=function(){this._cookie.userId=this._cookie.sessionId=this._cookie.appKeyHash=this._appId="",this._cookie.expirationAbsTimeSeconds=g(),this._write()},e.prototype.host=function(){return this._cookie.host},e.prototype.orgId=function(){return this._cookie.orgId},e.prototype.userId=function(){return this._cookie.userId},e.prototype.sessionId=function(){return this._cookie.sessionId},e.prototype.appKeyHash=function(){return this._cookie.appKeyHash},e.prototype.cookieData=function(){return this._cookie},e.prototype.cookies=function(){return this._cookies},e.prototype.setCookie=function(e,t,n){void 0===n&&(n=new Date(p()+6048e5).toUTCString());var r=e+"="+t;this._domain?r+="; domain=."+encodeURIComponent(this._domain):r+="; domain=",r+="; Expires="+n+"; path=/; SameSite=Strict","https:"===location.protocol&&(r+="; Secure"),this._doc.cookie=r},e.prototype.setIds=function(e,t,n,r){(C(t)||t.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(t="");var i=function(e){return e._fs_cookie_domain}(e);"string"==typeof i&&(t=i),this._domain=t,this._cookie.userId=n,this._cookie.sessionId=r,this._write()},e.prototype.clearAppId=function(){return!!this._cookie.appKeyHash&&(this._appId="",this._cookie.appKeyHash="",this._write(),!0)},e.prototype.setAppId=function(e){this._appId=e,this._cookie.appKeyHash=uo(e),this._write()},e.prototype.appId=function(){return this._appId},e.prototype.encode=function(){var e=this._cookie.host+"#"+this._cookie.orgId+"#"+this._cookie.userId+":"+this._cookie.sessionId;return this._cookie.appKeyHash&&(e+="#"+encodeURIComponent(this._cookie.appKeyHash)+"#"),e+="/"+this._cookie.expirationAbsTimeSeconds},e.prototype._write=function(){if(null!=this._domain){var e=this.encode(),t=new Date(1e3*this._cookie.expirationAbsTimeSeconds).toUTCString();this.setCookie("fs_uid",e,t);var n=[];-1===this._doc.cookie.indexOf(e)&&n.push(["fs_uid","cookie"]);try{localStorage._fs_uid=e,localStorage._fs_uid!==e&&n.push(["fs_uid","localStorage"])}catch(e){n.push(["fs_uid","localStorage",String(e)])}n.length>0&&this._onWriteFailure(n)}},e}();!function(e){e.rec="rec",e.user="user",e.account="account",e.consent="consent",e.customEvent="event",e.log="log"}(Xo||(Xo={}));var ns={acctId:"str",displayName:"str",website:"str"},rs={uid:"str",displayName:"str",email:"str"},is={str:os,bool:ss,real:as,"int":us,date:cs,strs:hs(os),bools:hs(ss),reals:hs(as),ints:hs(us),dates:hs(cs),objs:hs(ds),obj:ds};function os(e){return"string"==typeof e}function ss(e){return"boolean"==typeof e}function as(e){return"number"==typeof e}function us(e){return"number"==typeof e&&e-s.mathFloor(e)==0}function cs(e){return!!e&&(e.constructor===Date?!isNaN(e):("number"==typeof e||"string"==typeof e)&&!isNaN(new Date(e)))}function hs(e){return function(t){if(!(t instanceof Array))return!1;for(var n=0;n<t.length;n++)if(!e(t[n]))return!1;return!0}}function ds(e){return!!e&&"object"==typeof e}var ls=/^[a-zA-Z][a-zA-Z0-9_]*$/,ps=function(){function e(e){this._identity=e}return e.prototype.identity=function(){return this._identity},e.prototype.api=function(e,t,n){var r=!1,i=[];try{switch(e){case Xo.account:i.push.apply(i,this.rawEventsFromApi(X.Account,ns,t,n));break;case Xo.user:if("object"!=typeof t)o("Expected argument of type 'object' instead got type: '"+typeof t+"', value: "+gt(t));else if("uid"in t){var a=t.uid;if(!1===a)this._identity.clearAppId()&&(r=!0),delete t.uid;else{var u=function(e,t){"number"==typeof e&&s.mathFloor(e)==e&&(o("Expected appId of type 'string' instead got value: "+e+" of type: "+typeof e),e=""+e);if("string"!=typeof e)return o("blocking FS.identify API call; uid value ("+e+") must be a string"),[void 0,Zo];var n=e.trim();if(f.indexOf(n.toLowerCase())>=0)return o("blocking FS.identify API call; uid value ("+n+") is illegal"),[void 0,Zo];var r=uo(n),i=void 0;t&&t._cookie.appKeyHash&&t._cookie.appKeyHash!==r&&t._cookie.appKeyHash!==n&&(o("user re-identified; existing uid hash ("+t._cookie.appKeyHash+") does not match provided uid ("+n+")"),i=es);return[n,i]}(a,this._identity),c=u[0],h=u[1];if(!c){switch(h){case Zo:case void 0:break;default:o("unexpected failReason returned from setAppId: "+h);}return{events:i}}t.uid=c,this._identity.setAppId(t.uid),h==es&&(r=!0)}}i.push.apply(i,this.rawEventsFromApi(X.User,rs,t,n));break;case Xo.customEvent:var d=t.n,l=t.p;i.push.apply(i,this.rawEventsFromApi(X.Event,{},l,n,d));break;default:o("invalid operation \""+e+"\"; only \"rec\", \"account\", and \"user\" are supported at present");}}catch(t){o("unexpected exception handling "+e+" API call: "+t.message)}return{events:i,reidentify:r}},e.prototype.rawEventsFromApi=function(e,t,n,r,i){var a=function e(t,n,r){var i={PayloadToSend:{},ValidationErrors:[]},a=function(r){var o=e(t,n,r);return i.ValidationErrors=i.ValidationErrors.concat(o.ValidationErrors),o.PayloadToSend};return ht(r,function(e,r){var u=function(e,t,n,r){var i=t,a=typeof n;if("undefined"===a)return o("Cannot infer type of "+a+" "+n),r.push({Type:"vartype",FieldName:t,ValueType:a+" (unsupported)"}),null;if(s.objectHasOwnProp(e,t))return{name:t,type:e[t]};var u=t.lastIndexOf("_");if(-1==u||!vs(t.substring(u+1))){var c=function(e){for(var t in is)if(is[t](e))return t;return null}(n);if(null==c)return o("Cannot infer type of "+a+" "+n),n?r.push({Type:"vartype",FieldName:t}):r.push({Type:"vartype",FieldName:t,ValueType:"null (unsupported)"}),null;u=t.length,o("Warning: Inferring user variable \""+t+"\" to be of type \""+c+"\""),t=t+"_"+c}var h=[t.substring(0,u),t.substring(u+1)],d=h[0],l=h[1];if("object"===a&&!n)return o("null is not a valid object type"),r.push({Type:"vartype",FieldName:i,ValueType:"null (unsupported)"}),null;if(!ls.test(d)){d=d.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(d[0])&&(d=d.substring(1)),r.push({Type:"varname",FieldName:i});var p=d+"_"+l;if(o("Warning: variable \""+i+"\" has invalid characters. It should match /"+ls.source+"/. Converted name to \""+p+"\"."),""==d)return null;t=p}if(!vs(l))return o("Variable \""+i+"\" has invalid type \""+l+"\""),r.push({Type:"varname",FieldName:i}),null;if(!function(e,t){return is[e](t)}(l,n))return o("illegal value "+gt(n)+" for type "+l),"number"===a?a=n%1==0?"integer":"real":"object"==a&&null!=n&&n.constructor==Date&&(a=isNaN(n)?"invalid date":"date"),r.push({Type:"vartype",FieldName:i,ValueType:a}),null;return{name:t,type:l}}(n,r,e,i.ValidationErrors);if(u){var c=u.name,h=u.type;if("obj"!=h){if("objs"!=h){var d,l;i.PayloadToSend[c]=fs(h,e)}else{t!=X.Event&&i.ValidationErrors.push({Type:"vartype",FieldName:c,ValueType:"Array<Object> (unsupported)"});for(var p=e,f=[],v=0;v<p.length;v++){(_=a(p[v]))&&f.push(_)}f.length>0&&(i.PayloadToSend[c]=f)}}else{var _=a(e),g=(l="_obj").length>(d=r).length||d.substring(d.length-l.length)!=l?c.substring(0,c.length-"_obj".length):c;i.PayloadToSend[g]=_}}else i.PayloadToSend[r]=fs("",e)}),i}(e,t,n),u=[],c=e==X.Event,h=gt(a.PayloadToSend),d=!!r&&"fs"!==r;return c?u.push({When:0,Kind:R.SYS_CUSTOM,Args:d?[i,h,r]:[i,h]}):u.push({When:0,Kind:R.SYS_SETVAR,Args:d?[e,h,r]:[e,h]}),u},e}();function fs(e,t){return"str"==e&&null!=t&&(t=t.trim()),null==t||"date"!=e&&t.constructor!=Date||(t=function(e){var t,n=e.constructor===Date?e:new Date(e);try{t=n.toISOString()}catch(e){t=null}return t}(t)),t}function vs(e){return!!is[e]}var _s=function(){return(_s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},gs=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},ms=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function ys(e,t){return gs(this,void 0,et,function(){var n,r,i,s,u;return ms(this,function(c){switch(c.label){case 0:if(c.trys.push([0,2,,3]),ae||ce)return[2,_s(_s({},t),{status:1})];if(!e.document||0!==t.status)return[2,t];if(1===(n=function(e,t){var n=t.functions,r={},i=_s({},t.helpers);if(i.functionToString=function(e,t){var n,r,i=null===(n=e["__core-js_shared__"])||void 0===n?void 0:n.inspectSource;if(bs(i,1))return function(){return i(this)};var o=null===(r=e["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(bs(o))return o;var s=t.__zone_symbol__OriginalDelegate;if(bs(s))return s;if(bs(t))return t;return}(e,i.functionToString),!i.functionToString)return t;var o=!1;for(var s in n)if(n[s]){if(r[s]=Ts(i.functionToString,n[s]),r[s]||(r[s]=ks(i.functionToString,i,s)),!r[s])return t;r[s]!==n[s]&&(o=!0)}else r[s]=void 0;return{status:1,functions:o?r:n,helpers:i}}(e,t)).status)return[2,n];o("The window is dirty; rebuilding Windex from a fresh global."),(r=e.document.createElement("iframe")).id="FullStory-iframe",r.className="fs-hide",r.style.display="none",i=e.document.body||e.document.head||e.document.documentElement||e.document;try{i.appendChild(r)}catch(e){return[2,_s(_s({},t),{status:1})]}return r.contentWindow?(s=a(r.contentWindow,1),r.parentNode&&r.parentNode.removeChild(r),2===s.status?[2,_s(_s({},t),{status:1})]:[4,ws(s,t)]):[2,_s(_s({},t),{status:1})];case 1:return[2,c.sent()];case 2:return u=c.sent(),Mt.sendToBugsnag(u,"error"),[2,_s(_s({},t),{status:1})];case 3:return[2];}})})}function ws(e,t){var n,r=new et(function(e){return n=e});return setTimeout(function(){try{e.functions.jsonParse("[]").push(0)}catch(e){n(_s(_s({},t),{status:1}))}n(e)}),r}function bs(e,t){var n;if(void 0===t&&(t=0),!e)return!1;var r=function(e){try{return void e.call(null)}catch(e){return(e.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"")}},i=void 0;0!==t&&"number"==typeof Error.stackTraceLimit&&(i=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var o=[function(){throw new Error("")},e],s=function __fs_nomangle_check_stack(){return o.map(r)}(),a=s[0],u=s[1];if(void 0!==i&&(Error.stackTraceLimit=i),!a||!u)return!1;for(var c="\n".charCodeAt(0),h=a.length>u.length?u.length:a.length,d=1,l=d;l<h;l++){var p=a.charCodeAt(a.length-l),f=u.charCodeAt(u.length-l);if(p!=f)break;f!=c&&l!=h-1||(d=l)}return(null!==(n=u.slice(0,u.length-d+1).match(/\.js:\d+([:)]|$)/gm))&&void 0!==n?n:[]).length<=t}function Ss(e,t){return e.call(t).indexOf("[native code]")>=0}var Es=["__zone_symbol__OriginalDelegate","nr@original"];function Ts(e,t){if(t){for(var n=0,r=Es;n<r.length;n++){var i=t[r[n]];if("function"==typeof i&&Ss(e,i))return i}return Ss(e,t)?t:void 0}}function ks(e,t,n){switch(n){case"arrayIsArray":var r=Ts(e,t.objectToString);if(!r)return;return t.objectToString=r,function(e){return"[object Array]"==r.call(e)};default:return;}}var Is=function(){function e(e,t){void 0===t&&(t=function(e){return new WebSocket(e)}),this._newSock=t,this._connecting=!1,this._connected=!1,this._queue={},this._seq=1,this._scheme=e.options.scheme,this._host=e.options.recHost}return e.isSupported=function(){return"WebSocket"in window},e.prototype.page=function(e,t,n){this.request({Cmd:1,Page:e},function(e){return t(e.Page)},n)},e.prototype.bundle=function(e){var t=e.deltaT,n=e.serverPageStart,r=e.serverBundleTime;return this.request({Cmd:2,Bundle:{OrgId:e.orgId,UserId:e.userId,SessionId:e.sessionId,PageId:e.pageId,Seq:e.bundle.Seq,DeltaT:null===t?void 0:t,PageStart:null==n?void 0:n,PrevBundleTime:null==r?void 0:r,Bundle:e.bundle}},function(t){return e.win(t.Bundle)},e.lose)},e.prototype.bundleBeacon=function(e){return Mo(this._scheme,this._host,e)},e.prototype.exponentialBackoffMs=function(e,t){var n=s.mathMin(te.BackoffMax,5e3*s.mathPow(2,e));return t?n+.25*s.mathRandom()*n:n},e.prototype.request=function(e,t,n){e.Seq=this._seq++;var r=gt(e);return this._queue[e.Seq]={payload:r,win:t,lose:n},this.maybeConnect(),r.length},e.prototype.handleMessage=function(e){var t;try{t=wt(e)}catch(e){return void o("socket: error parsing frame: "+e.toString())}var n=this._queue[t.Seq];delete this._queue[t.Seq],n?3==t.Cmd?(o(t.Fail.Error),n.lose(t.Fail.Status)):n.win(t):o("socket: mismatched request seq "+t.Seq+"; ignoring")},e.prototype.drainQueue=function(){if(this._connected)for(var e in this._queue){var t=this._queue[e];t.sent||(this._sock.send(t.payload),t.sent=!0)}else o("socket: attempt to drain queue when disconnected.")},e.prototype.failPending=function(){for(var e in this._queue){var t=this._queue[e];t.sent&&(delete this._queue[e],t.lose(0))}},e.prototype.maybeConnect=function(){var e=this;if(this._connected)this.drainQueue();else if(!this._connecting){this._connecting=!0;var t=("https:"==this._scheme?"wss:":"ws:")+"//"+this._host+"/rec/sock";this._sock=this._newSock(t),this._sock.onopen=function(t){e._connecting=!1,e._connected=!0,e.drainQueue()},this._sock.onmessage=function(t){e.handleMessage(t.data),e.drainQueue()},this._sock.onclose=function(t){o("socket: closed; reconnecting"),e._connecting=e._connected=!1,e.failPending()},this._sock.onerror=function(t){o("socket: error; reconnecting"),e._connecting=e._connected=!1,e.failPending()}}},e}(),Cs=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rs=function(){function e(){var e=this;this.measurementTasks=null,this.performingMeasurements=!1,this.recursionDepth=0,this.performMeasurements=Mt.wrap(function(){if(e.performingMeasurements)Mt.sendToBugsnag("performMeasurements() already in progress","error");else{e.performingMeasurements=!0;try{if(!e.measurementTasks)return;for(var t=0;t<e.measurementTasks.length;t++)e.measurementTasks[t]();e.measurementTasks=null}finally{e.performingMeasurements=!1}}})}return e.create=function(e){return e.ResizeObserver?new As(e,e.ResizeObserver):s.requestWindowAnimationFrame&&e.MessageChannel?new xs(e,s.requestWindowAnimationFrame,e.MessageChannel):new Os(e)},e.prototype.requestMeasureTask=function(e){var t=this;if(this.recursionDepth>16)Mt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var n=this.performingMeasurements?this.recursionDepth:0,r=Mt.wrap(function(){var r=t.recursionDepth;t.recursionDepth=n+1;try{e()}finally{t.recursionDepth=r}});this.measurementTasks?this.measurementTasks.push(r):(this.measurementTasks=[r],this.schedule())}},e.prototype.performMeasurementsNow=function(){this.performMeasurements()},e}(),As=function(e){function t(t,n){var r=e.call(this)||this;return r.wnd=t,r.ResizeObserver=n,r}return Cs(t,e),t.prototype.schedule=function(){var e=this,t=this.ResizeObserver,n=this.wnd.document,r=n.body||n.documentElement||n.head,i=new t(function(){i.unobserve(r),e.performMeasurements()});i.observe(r)},t}(Rs),xs=function(e){function t(t,n,r){var i=e.call(this)||this;return i.wnd=t,i.requestWindowAnimationFrame=n,i.onRAF=Mt.wrap(function(){i.ch.port2.postMessage(void 0)}),i.ch=new r,i}return Cs(t,e),t.prototype.schedule=function(){this.ch.port1.onmessage=this.performMeasurements,this.requestWindowAnimationFrame(this.wnd,this.onRAF)},t}(Rs),Os=function(e){function t(t){var n=e.call(this)||this;return n.wnd=t,n}return Cs(t,e),t.prototype.schedule=function(){s.setWindowTimeout(this.wnd,this.performMeasurements,0)},t}(Rs),Ms=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Ls=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue;}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Fs=function(){function e(){}return e.prototype.createTopRecorder=function(e){var t=e.window._fs_use_socket&&Is.isSupported()?new Is(e):new Ro(e);return new Yo(e,t)},e.prototype.createInnerRecorder=function(e){return new $o(e)},e}(),Ps=function(){function e(e,t){void 0===e&&(e=window),void 0===t&&(t=new Fs),this.wnd=e,this.recMaker=t,this.scheme="https:",this.domDoneLoaded=!1,this.waitingOnStart=!1,this.reidentifyCount=0}return e.prototype.init=function(){var e,t;k(this.wnd)||(e=this.wnd,t=T(this.wnd),e[w]=t,t in e||(e[t]={}),function(e){gs(this,void 0,et,function(){var t;return ms(this,function(n){switch(n.label){case 0:return[4,ys(e,s.snapshot)];case 1:return t=n.sent(),s.rebuildFromSnapshot(t),[2];}})})}(this.wnd),this.initApi(),this.start())},e.prototype.getCurrentSessionURL=function(e){return this.recorder?this.recorder.getCurrentSessionURL(e):null},e.prototype.getCurrentSession=function(){return this.recorder?this.recorder.getCurrentSession():null},e.prototype.enableConsole=function(){this.recorder&&this.recorder.console().enable()},e.prototype.disableConsole=function(){this.recorder&&this.recorder.console().disable()},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._api(Xo.log,e)},e.prototype.shutdownApi=function(){this.shutdown(V.Api)},e.prototype.shutdown=function(e){this.recorder&&!this.deferredStart?(this.recorder.shutdown(e),this.recorder=null):o("Recording already shut down.")},e.prototype.restart=function(){if(this.deferredStart)return this.deferredStart(),void(this.deferredStart=null);this.recorder?o("Recording already started."):this.recorder=this.createRecorder(!0)},e.prototype.splitPage=function(e,t){return Ms(this,void 0,et,function(){return Ls(this,function(n){switch(n.label){case 0:return t&&null==this.identity?(o("Can't re-identify from an iframe"),[2]):this.waitingOnStart?(this.splitPending=[e,t],[2]):(this.shutdown(e),[4,so(0)]);case 1:return n.sent(),[4,so(0)];case 2:return n.sent(),t&&this.identity&&this.identity.clear(),this.restart(),[2];}})})},e.prototype.executeApiSequence=function(e,t,n){if(this.inFrame())return o("API calls may only be made from the top-most frame"),null;for(var r,i,s=[],a=!1,u=0;u<t.length;u++)try{var c=t[u],h=c[0],d=c[1];switch(h){case Xo.rec:r=!!d;break;case Xo.log:var l=d,p=l[0],f=l.slice(1),v=e.console().logEvent(p,f);v&&s.push(v);break;case Xo.consent:i=!!d;break;case Xo.account:case Xo.user:case Xo.customEvent:var _=this.vars.api(h,d,n),g=_.events;_.reidentify&&(s=[],i=void 0,a=!0),s.push.apply(s,g);break;default:o("Unrecognized api: "+h);}}catch(e){Mt.sendToBugsnag(e,"error")}return{reidentified:a,recordingShouldBeEnabled:r,applyApi:function(){void 0!==i&&e.setConsent(i);for(var t=e.queue(),n=0,r=s;n<r.length;n++){var o=r[n];t.enqueue(o)}}}},e.prototype._api=function(e,t,n){var r;if(this.recorder){var i=null!==(r=this.executeApiSequence(this.recorder,[[e,t]],n))&&void 0!==r?r:{reidentified:!1,applyApi:function(){}},s=i.reidentified,a=i.recordingShouldBeEnabled,u=i.applyApi;if(s){if(this.reidentifyCount>=8)return void o("reidentified too many times; giving up");this.reidentifyCount++,W(this.wnd,[e,t]),this.splitPage(V.Reidentify,!0)}else u();void 0!==a&&(a?this.restart():this.shutdown(V.Api))}else W(this.wnd,[e,t])},e.prototype._cookies=function(){return this.identity?this.identity.cookies():(o("Error in FS integration: Can't get cookies from inside an iframe"),null)},e.prototype._setCookie=function(e,t){this.identity?this.identity.setCookie(e,t):o("Error in FS integration: Can't set cookies from inside an iframe")},e.prototype._withEventQueue=function(e,t){if(this.recorder){var n=this.recorder.queue(),r=this.recorder.pageSignature();null!=n&&null!=r?e===r?t(n):Mt.sendToBugsnag("Error in _withEventQueue: Page Signature mismatch","error",{pageSignature:r,callerSignature:e}):o("Error getting event queue or page signature: Recorder not initialized")}else o("Error in FS integration: Recorder not initialized")},e.prototype.initApi=function(){var e=I(this.wnd);e?(e.getCurrentSessionURL=_t(this.getCurrentSessionURL,this),e.getCurrentSession=_t(this.getCurrentSession,this),e.enableConsole=_t(this.enableConsole,this),e.disableConsole=_t(this.disableConsole,this),e.log=_t(this.log,this),e.shutdown=_t(this.shutdownApi,this),e.restart=_t(this.restart,this),e._api=_t(this._api,this),e._cookies=_t(this._cookies,this),e._setCookie=_t(this._setCookie,this),e._withEventQueue=_t(this._withEventQueue,this)):o("Missing browser API namespace; couldn't initialize API.")},e.prototype.start=function(){var e,t=this;e=L(this.wnd),r=e,o("script version UNSET (compiled at 1591209308)");var n=P(this.wnd);if(n){this.orgId=n;var i,s=(i=this.wnd)._fs_script||H(D(i));if(s){this.script=s;var a=F(this.wnd);if(a){this.recHost=a;var u=function(e){return e._fs_app_host||B(D(e))}(this.wnd);u?(this.appHost=u,o("script: "+this.script),o("recording host: "+this.recHost),o("orgid: "+this.orgId),"localhost:8080"==this.recHost&&(this.scheme="http:"),this.inFrame()||(this.identity=new ts(this.wnd.document,function(e){for(var n,r=0,i=e;r<i.length;r++){var o=i[r];null===(n=t.recorder)||void 0===n||n.queue().enqueue({Kind:R.STORAGE_WRITE_FAILURE,Args:o})}}),this.vars=new ps(this.identity),this.identity.initFromCookies(this.recHost,this.orgId)),this.canRecord(this.orgId)?(this.recorder=this.createRecorder(),this.recorder.eventWatcher().watchEvents(),this.hookLoadEvents(),this.wnd.addEventListener("message",Mt.wrap(function(e){if("string"==typeof e.data&&(e.source==t.wnd.parent||e.source==t.wnd))switch(Bo(e.data)[0]){case"ShutdownFrame":t.shutdown(V.FsShutdownFrame);break;case"RestartFrame":t.restart();}}))):this.hailMary()):o("Missing global _fs_host or _fs_app_host. Recording disabled.")}else o("Missing global _fs_host or _fs_rec_host. Recording disabled.")}else o("Missing global _fs_host or _fs_rec_host. Recording disabled.")}else o("Missing global _fs_org. Recording disabled.")},e.prototype._context=function(e){var t,n=this,r=s.mathRound(null!==(t=ie(function(){var e;return null===(e=window.performance)||void 0===e?void 0:e.now()})())&&void 0!==t?t:-1);return{window:this.wnd,time:new rn,measurer:Rs.create(this.wnd),options:{orgId:this.orgId,scheme:this.scheme,script:this.script,recHost:this.recHost,appHost:this.appHost},recording:{bundleUploadInterval:function(){return e().bundleUploadInterval()},preroll:r,inFrame:this.inFrame(),vars:this.vars,identity:this.identity,splitPage:function(e,t){return n.splitPage(e,t)},pageSignature:function(){return e().pageSignature()}},queue:function(){return e().queue()}}},e.prototype.createRecorder=function(e){var t,n,r=this,i=this._context(function(){return n}),o=!1,s=!1;if(this.inFrame())n=this.recMaker.createInnerRecorder(i);else{n=this.recMaker.createTopRecorder(i);var a=null!==(t=this.executeApiSequence(n,function(e){var t=I(e);if(!t)return[];var n=t.q;return n?(delete t.q,n):[]}(this.wnd)))&&void 0!==t?t:{applyApi:function(){}},u=a.reidentified,c=a.recordingShouldBeEnabled,h=a.applyApi;void 0!==c&&(s=!c),o=!!u,h()}this.waitingOnStart=!0;var d=function(){n.start(o,function(){r.waitingOnStart=!1,e&&n.tellAllFramesTo(["RestartFrame"]),r.splitPending&&(r.splitPage(r.splitPending[0],r.splitPending[1]),r.splitPending=null)}),e&&n.eventWatcher().watchEvents()};return s?this.deferredStart=d:d(),n},e.prototype.inFrame=function(){if("boolean"==typeof this._inFrame)return this._inFrame;var e=N(this.wnd);return q(this.wnd)?this._inFrame=!1:this.wnd!=top?this._inFrame=!0:e?e.init&&e.init(this.orgId)&&(this._inFrame=!0):this._inFrame=!1,this._inFrame},e.prototype.canRecord=function(e){return(this.wnd.MutationObserver||this.wnd.MutationEvent)&&this.wnd.postMessage&&it&&2!==s.snapshot.status?!!function e(t){if(t==top||q(t)||function(e){return!!e._fs_run_in_iframe}(t)||N(t))return!0;try{return t.parent.document,e(t.parent)}catch(e){return!1}}(this.wnd)||(o("FullStory recording for this page is NOT allowed within an iFrame."),!1):(o("missing required browser features"),!1)},e.prototype.hailMary=function(){var e,t=this;if(this.identity){var n=U(this.wnd);o("Unable to record playback stream.");var r=document.createElement("script");this.wnd.__fs_startResponse=function(e){e&&t.identity.setIds(t.wnd,e.CookieDomain,e.UserIntId,e.SessionIntId),document.head&&document.head.removeChild(r)};var i=Vt(this.wnd.document),a=i[0],u=i[1],c=bt(this.wnd),h=c[0],d=c[1],l=ur(Jn(this.wnd),this.orgId,{source:"page",type:"base"}),p=ur(document.referrer,this.orgId,{source:"page",type:"referrer"}),f=ur(this.wnd.location.href,this.orgId,{source:"page",type:"url"}),v=s.mathRound(null!==(e=ie(function(){var e;return null===(e=window.performance)||void 0===e?void 0:e.now()})())&&void 0!==e?e:-1);r.src="//"+this.recHost+"/rec/page?OrgId="+this.orgId+"&UserId="+this.identity.userId()+"&Url="+encodeURIComponent(f)+"&Base="+encodeURIComponent(l)+"&Width="+a+"&Height="+u+"&ScreenWidth="+h+"&ScreenHeight="+d+"&Referrer="+encodeURIComponent(p)+"&Doctype="+encodeURIComponent(yt(document))+"&Preroll="+v+"&CompiledTimestamp=1591209308&Fallback=true"+(n?"&ReplayFlags="+n:""),document.head&&document.head.appendChild(r)}},e.prototype.hookLoadEvents=function(){var e=this,t=function(){e.domDoneLoaded||(e.domDoneLoaded=!0,e.recorder&&e.recorder.onDomLoad())},n=!1,r=function(){n||(n=!0,e.recorder&&e.recorder.onLoad())};switch(document.readyState){case"interactive":document.attachEvent||t();break;case"complete":t(),r();}this.domDoneLoaded||document.addEventListener("DOMContentLoaded",Mt.wrap(t)),n||this.wnd.addEventListener("load",Mt.wrap(function(e){t(),r()}))},e}();!function(){try{new Ps().init()}catch(e){Mt.sendToBugsnag(e,"error"),L(window)&&window.console&&console.log&&console.log("Failed to initialize FullStory.")}}()}]); diff --git a/x-pack/plugins/cloud_security_posture/common/constants.ts b/x-pack/plugins/cloud_security_posture/common/constants.ts index 795e90042a545..40abd28670662 100644 --- a/x-pack/plugins/cloud_security_posture/common/constants.ts +++ b/x-pack/plugins/cloud_security_posture/common/constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -export const INFO_ROUTE_PATH = '/internal/cloud_security_posture/setup_status'; +export const STATUS_ROUTE_PATH = '/internal/cloud_security_posture/status'; export const STATS_ROUTE_PATH = '/internal/cloud_security_posture/stats'; export const BENCHMARKS_ROUTE_PATH = '/internal/cloud_security_posture/benchmarks'; export const UPDATE_RULES_CONFIG_ROUTE_PATH = diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/csp_rule_metadata.ts b/x-pack/plugins/cloud_security_posture/common/schemas/csp_rule_metadata.ts index 4bda1af7e04a6..68a5c6fc9c504 100644 --- a/x-pack/plugins/cloud_security_posture/common/schemas/csp_rule_metadata.ts +++ b/x-pack/plugins/cloud_security_posture/common/schemas/csp_rule_metadata.ts @@ -6,11 +6,13 @@ */ import { schema as rt, TypeOf } from '@kbn/config-schema'; +export const benchmarkIdSchema = rt.oneOf([rt.literal('cis_k8s'), rt.literal('cis_eks')]); + export const cspRuleMetadataSchema = rt.object({ audit: rt.string(), benchmark: rt.object({ name: rt.string(), - id: rt.oneOf([rt.literal('cis_k8s'), rt.literal('cis_eks')]), + id: benchmarkIdSchema, version: rt.string(), }), default_value: rt.maybe(rt.string()), diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/csp_rules_configuration.ts b/x-pack/plugins/cloud_security_posture/common/schemas/csp_rules_configuration.ts index 9d1940c869498..5301a5bd84279 100644 --- a/x-pack/plugins/cloud_security_posture/common/schemas/csp_rules_configuration.ts +++ b/x-pack/plugins/cloud_security_posture/common/schemas/csp_rules_configuration.ts @@ -5,13 +5,12 @@ * 2.0. */ import { schema as rt, TypeOf } from '@kbn/config-schema'; +import { benchmarkIdSchema } from './csp_rule_metadata'; // cspRulesConfigSchema has to match the 'DataYaml' struct in https://github.com/elastic/cloudbeat/blob/main/config/config.go#L45-L51 export const cspRulesConfigSchema = rt.object({ data_yaml: rt.object({ - activated_rules: rt.object({ - cis_k8s: rt.arrayOf(rt.string()), - }), + activated_rules: rt.recordOf(benchmarkIdSchema, rt.arrayOf(rt.string())), }), }); diff --git a/x-pack/plugins/cloud_security_posture/common/types.ts b/x-pack/plugins/cloud_security_posture/common/types.ts index 43269ca39dd31..3fe552fef322a 100644 --- a/x-pack/plugins/cloud_security_posture/common/types.ts +++ b/x-pack/plugins/cloud_security_posture/common/types.ts @@ -6,6 +6,7 @@ */ import type { PackagePolicy, GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; +import type { CspRuleMetadata } from './schemas/csp_rule_metadata'; export type Evaluation = 'passed' | 'failed' | 'NA'; /** number between 1-100 */ @@ -47,10 +48,32 @@ export interface ComplianceDashboardData { trend: PostureTrend[]; } -export interface CspSetupStatus { - latestFindingsIndexStatus: 'applicable' | 'inapplicable'; +export type Status = + | 'indexed' // latest findings index exists and has results + | 'indexing' // index timeout was not surpassed since installation, assumes data is being indexed + | 'index-timeout' // index timeout was surpassed since installation + | 'not-deployed' // no healthy agents were deployed + | 'not-installed'; // number of installed csp integrations is 0; + +interface BaseCspSetupStatus { + latestPackageVersion: string; + installedIntegrations: number; + healthyAgents: number; +} + +interface CspSetupNotInstalledStatus extends BaseCspSetupStatus { + status: Extract<Status, 'not-installed'>; } +interface CspSetupInstalledStatus extends BaseCspSetupStatus { + status: Exclude<Status, 'not-installed'>; + // if installedPackageVersion == undefined but status != 'not-installed' it means the integration was installed in the past and findings were found + // status can be `indexed` but return with undefined package information in this case + installedPackageVersion: string | undefined; +} + +export type CspSetupStatus = CspSetupInstalledStatus | CspSetupNotInstalledStatus; + export interface CspRulesStatus { all: number; enabled: number; @@ -73,3 +96,5 @@ export interface Benchmark { agent_policy: Pick<GetAgentPoliciesResponseItem, 'id' | 'name' | 'agents'>; rules: CspRulesStatus; } + +export type BenchmarkId = CspRuleMetadata['benchmark']['id']; diff --git a/x-pack/plugins/cloud_security_posture/public/common/api/use_setup_status_api.ts b/x-pack/plugins/cloud_security_posture/public/common/api/use_setup_status_api.ts index c9ca47679942e..611aef07a27c6 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/api/use_setup_status_api.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/api/use_setup_status_api.ts @@ -8,11 +8,11 @@ import { useQuery } from 'react-query'; import { useKibana } from '../hooks/use_kibana'; import { CspSetupStatus } from '../../../common/types'; -import { INFO_ROUTE_PATH } from '../../../common/constants'; +import { STATUS_ROUTE_PATH } from '../../../common/constants'; -const getCspSetupStatusQueryKey = 'csp_info_key'; +const getCspSetupStatusQueryKey = 'csp_status_key'; export const useCspSetupStatusApi = () => { const { http } = useKibana().services; - return useQuery([getCspSetupStatusQueryKey], () => http.get<CspSetupStatus>(INFO_ROUTE_PATH)); + return useQuery([getCspSetupStatusQueryKey], () => http.get<CspSetupStatus>(STATUS_ROUTE_PATH)); }; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx index 71362c2c92525..7f9b405d1c073 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx @@ -196,9 +196,9 @@ describe('<ComplianceDashboard />', () => { ); }; - it('shows noDataConfig when latestFindingsIndexStatus is inapplicable', () => { + it('shows noDataConfig when status is not deployed', () => { (useCspSetupStatusApi as jest.Mock).mockImplementation(() => - createReactQueryResponse({ status: 'success', data: 'inapplicable' }) + createReactQueryResponse({ status: 'success', data: 'not-deployed' }) ); (useComplianceDashboardDataApi as jest.Mock).mockImplementation(() => createReactQueryResponse({ status: 'success', data: undefined }) @@ -210,11 +210,11 @@ describe('<ComplianceDashboard />', () => { expect(screen.queryByTestId(DASHBOARD_CONTAINER)).not.toBeInTheDocument(); }); - it('shows dashboard when latestFindingsIndexStatus is applicable', () => { + it('shows dashboard when there are findings in latest findings index', () => { (useCspSetupStatusApi as jest.Mock).mockImplementation(() => ({ isLoading: false, isSuccess: true, - data: { latestFindingsIndexStatus: 'applicable' }, + data: { status: 'indexed' }, })); (useComplianceDashboardDataApi as jest.Mock).mockImplementation(() => ({ diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx index 606d7671125da..41d006e925852 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx @@ -57,7 +57,7 @@ const NoData = ({ onClick }: { onClick: () => void }) => ( export const ComplianceDashboard = () => { const getInfo = useCspSetupStatusApi(); - const isFindingsIndexApplicable = getInfo.data?.latestFindingsIndexStatus === 'applicable'; + const isFindingsIndexApplicable = getInfo.data?.status === 'indexed'; const getDashboardData = useComplianceDashboardDataApi({ enabled: isFindingsIndexApplicable, }); diff --git a/x-pack/plugins/cloud_security_posture/server/create_transforms/create_transforms.test.ts b/x-pack/plugins/cloud_security_posture/server/create_transforms/create_transforms.test.ts index 65a4507de2511..e701e7c94cada 100644 --- a/x-pack/plugins/cloud_security_posture/server/create_transforms/create_transforms.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/create_transforms/create_transforms.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { createTransformIfNotExists, startTransformIfNotStarted } from './create_transforms'; import { latestFindingsTransform } from './latest_findings_transform'; diff --git a/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts b/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts index be81e6dac27f9..92e06ad95536d 100644 --- a/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts +++ b/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts @@ -24,10 +24,10 @@ import { CSP_RULE_SAVED_OBJECT_TYPE, CSP_RULE_TEMPLATE_SAVED_OBJECT_TYPE, } from '../../common/constants'; -import type { CspRule, CspRuleMetadata, CspRuleTemplate } from '../../common/schemas'; +import type { CspRule, CspRuleTemplate } from '../../common/schemas'; +import type { BenchmarkId } from '../../common/types'; type CloudbeatInputType = keyof typeof CIS_INTEGRATION_INPUTS_MAP; -type BenchmarkId = CspRuleMetadata['benchmark']['id']; const getBenchmarkTypeFilter = (type: BenchmarkId): string => `${CSP_RULE_TEMPLATE_SAVED_OBJECT_TYPE}.attributes.metadata.benchmark.id: "${type}"`; diff --git a/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts b/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts new file mode 100644 index 0000000000000..e482f0af210a4 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { uniq, map } from 'lodash'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { + PackagePolicyServiceInterface, + AgentPolicyServiceInterface, + AgentService, +} from '@kbn/fleet-plugin/server'; +import type { + GetAgentPoliciesResponseItem, + PackagePolicy, + AgentPolicy, + ListResult, +} from '@kbn/fleet-plugin/common'; +import { + BENCHMARK_PACKAGE_POLICY_PREFIX, + BenchmarksQueryParams, +} from '../../common/schemas/benchmark'; + +export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies'; + +const getPackageNameQuery = (packageName: string, benchmarkFilter?: string): string => { + const integrationNameQuery = `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${packageName}`; + const kquery = benchmarkFilter + ? `${integrationNameQuery} AND ${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.name: *${benchmarkFilter}*` + : integrationNameQuery; + + return kquery; +}; + +export const addRunningAgentToAgentPolicy = async ( + agentService: AgentService, + agentPolicies: AgentPolicy[] +): Promise<GetAgentPoliciesResponseItem[]> => { + if (!agentPolicies.length) return []; + + return Promise.all( + agentPolicies.map((agentPolicy) => + agentService.asInternalUser + .getAgentStatusForAgentPolicy(agentPolicy.id) + .then((agentStatus) => ({ + ...agentPolicy, + agents: agentStatus.total, + })) + ) + ); +}; + +export const getCspAgentPolicies = async ( + soClient: SavedObjectsClientContract, + packagePolicies: PackagePolicy[], + agentPolicyService: AgentPolicyServiceInterface +): Promise<AgentPolicy[]> => + agentPolicyService.getByIds(soClient, uniq(map(packagePolicies, 'policy_id'))); + +export const getCspPackagePolicies = ( + soClient: SavedObjectsClientContract, + packagePolicyService: PackagePolicyServiceInterface, + packageName: string, + queryParams: Partial<BenchmarksQueryParams> +): Promise<ListResult<PackagePolicy>> => { + const sortField = queryParams.sort_field?.replaceAll(BENCHMARK_PACKAGE_POLICY_PREFIX, ''); + + return packagePolicyService.list(soClient, { + kuery: getPackageNameQuery(packageName, queryParams.benchmark_name), + page: queryParams.page, + perPage: queryParams.per_page, + sortField, + sortOrder: queryParams.sort_order, + }); +}; diff --git a/x-pack/plugins/cloud_security_posture/server/lib/is_latest_findings_index_exists.ts b/x-pack/plugins/cloud_security_posture/server/lib/is_latest_findings_index_exists.ts new file mode 100644 index 0000000000000..3b43bde45184d --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/server/lib/is_latest_findings_index_exists.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ElasticsearchClient } from '@kbn/core/server'; +import { CspAppContext } from '../plugin'; +import { LATEST_FINDINGS_INDEX_DEFAULT_NS } from '../../common/constants'; + +export const isLatestFindingsIndexExists = async ( + esClient: ElasticsearchClient, + logger: CspAppContext['logger'] +): Promise<boolean> => { + try { + const queryResult = await esClient.search({ + index: LATEST_FINDINGS_INDEX_DEFAULT_NS, + query: { + match_all: {}, + }, + size: 1, + }); + + return !!queryResult.hits.hits.length; + } catch (e) { + logger.error(e.message); + return false; + } +}; diff --git a/x-pack/plugins/cloud_security_posture/server/plugin.test.ts b/x-pack/plugins/cloud_security_posture/server/plugin.test.ts index 2e3e872e059a5..f18ea55f5eb1a 100644 --- a/x-pack/plugins/cloud_security_posture/server/plugin.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/plugin.test.ts @@ -82,9 +82,20 @@ describe('Cloud Security Posture Plugin', () => { const findMock = mockRouteContext.core.savedObjects.client.find as jest.Mock; findMock.mockReturnValue( Promise.resolve({ - saved_objects: [], - total: 0, - per_page: 0, + saved_objects: [ + { + type: 'csp_rule', + attributes: { + enabled: false, + metadata: { + rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, + }, + }, + }, + ], + total: 1, + per_page: 10, page: 1, }) ); @@ -295,6 +306,9 @@ describe('Cloud Security Posture Plugin', () => { { type: 'csp-rule-template', id: 'csp_rule_template-41308bcdaaf665761478bb6f0d745a5c', + benchmark: { + id: 'cis_k8s', + }, }, ], }) diff --git a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.test.ts index 9f66386eb4144..861fd1365fe4f 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.test.ts @@ -10,20 +10,19 @@ import { loggingSystemMock, savedObjectsClientMock, } from '@kbn/core/server/mocks'; -import { - ElasticsearchClientMock, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { KibanaRequest } from '@kbn/core/server'; import { benchmarksQueryParamsSchema, DEFAULT_BENCHMARKS_PER_PAGE, } from '../../../common/schemas/benchmark'; import { - defineGetBenchmarksRoute, PACKAGE_POLICY_SAVED_OBJECT_TYPE, getCspPackagePolicies, - getAgentPolicies, + getCspAgentPolicies, +} from '../../lib/fleet_util'; +import { + defineGetBenchmarksRoute, createBenchmarkEntry, addPackagePolicyCspRules, } from './benchmarks'; @@ -69,6 +68,7 @@ function createMockAgentPolicy(props: Partial<AgentPolicy> = {}): AgentPolicy { ...props, }; } + describe('benchmarks API', () => { let logger: ReturnType<typeof loggingSystemMock.createLogger>; @@ -307,7 +307,7 @@ describe('benchmarks API', () => { const agentPolicyService = createMockAgentPolicyService(); const packagePolicies = [createPackagePolicyMock(), createPackagePolicyMock()]; - await getAgentPolicies(mockSoClient, packagePolicies, agentPolicyService); + await getCspAgentPolicies(mockSoClient, packagePolicies, agentPolicyService); expect(agentPolicyService.getByIds.mock.calls[0][1]).toHaveLength(1); }); @@ -320,7 +320,7 @@ describe('benchmarks API', () => { packagePolicy2.policy_id = 'AnotherId'; const packagePolicies = [packagePolicy1, packagePolicy2]; - await getAgentPolicies(mockSoClient, packagePolicies, agentPolicyService); + await getCspAgentPolicies(mockSoClient, packagePolicies, agentPolicyService); expect(agentPolicyService.getByIds.mock.calls[0][1]).toHaveLength(2); }); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts index cd635eabe47ec..0bd6996a05590 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts @@ -4,31 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -import { uniq, map } from 'lodash'; import type { SavedObjectsClientContract, SavedObjectsFindResponse } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; -import type { - PackagePolicyServiceInterface, - AgentPolicyServiceInterface, - AgentService, -} from '@kbn/fleet-plugin/server'; -import type { - GetAgentPoliciesResponseItem, - PackagePolicy, - AgentPolicy, - ListResult, -} from '@kbn/fleet-plugin/common'; +import type { GetAgentPoliciesResponseItem, PackagePolicy } from '@kbn/fleet-plugin/common'; import { BENCHMARKS_ROUTE_PATH, CLOUD_SECURITY_POSTURE_PACKAGE_NAME, CSP_RULE_SAVED_OBJECT_TYPE, } from '../../../common/constants'; -import { - BENCHMARK_PACKAGE_POLICY_PREFIX, - benchmarksQueryParamsSchema, - BenchmarksQueryParams, -} from '../../../common/schemas/benchmark'; +import { benchmarksQueryParamsSchema } from '../../../common/schemas/benchmark'; import { CspAppContext } from '../../plugin'; import type { Benchmark, CspRulesStatus } from '../../../common/types'; import type { CspRule } from '../../../common/schemas'; @@ -37,73 +21,20 @@ import { isNonNullable, } from '../../../common/utils/helpers'; import { CspRouter } from '../../types'; +import { + addRunningAgentToAgentPolicy, + getCspAgentPolicies, + getCspPackagePolicies, +} from '../../lib/fleet_util'; export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies'; -const getPackageNameQuery = (packageName: string, benchmarkFilter?: string): string => { - const integrationNameQuery = `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${packageName}`; - const kquery = benchmarkFilter - ? `${integrationNameQuery} AND ${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.name: *${benchmarkFilter}*` - : integrationNameQuery; - - return kquery; -}; - -export const getCspPackagePolicies = ( - soClient: SavedObjectsClientContract, - packagePolicyService: PackagePolicyServiceInterface, - packageName: string, - queryParams: Partial<BenchmarksQueryParams> -): Promise<ListResult<PackagePolicy>> => { - if (!packagePolicyService) { - throw new Error('packagePolicyService is undefined'); - } - - const sortField = queryParams.sort_field?.startsWith(BENCHMARK_PACKAGE_POLICY_PREFIX) - ? queryParams.sort_field.substring(BENCHMARK_PACKAGE_POLICY_PREFIX.length) - : queryParams.sort_field; - - return packagePolicyService?.list(soClient, { - kuery: getPackageNameQuery(packageName, queryParams.benchmark_name), - page: queryParams.page, - perPage: queryParams.per_page, - sortField, - sortOrder: queryParams.sort_order, - }); -}; - -export const getAgentPolicies = async ( - soClient: SavedObjectsClientContract, - packagePolicies: PackagePolicy[], - agentPolicyService: AgentPolicyServiceInterface -): Promise<AgentPolicy[]> => { - const agentPolicyIds = uniq(map(packagePolicies, 'policy_id')); - const agentPolicies = await agentPolicyService.getByIds(soClient, agentPolicyIds); - - return agentPolicies; -}; - -const addRunningAgentToAgentPolicy = async ( - agentService: AgentService, - agentPolicies: AgentPolicy[] -): Promise<GetAgentPoliciesResponseItem[]> => { - if (!agentPolicies?.length) return []; - return Promise.all( - agentPolicies.map((agentPolicy) => - agentService.asInternalUser - .getAgentStatusForAgentPolicy(agentPolicy.id) - .then((agentStatus) => ({ - ...agentPolicy, - agents: agentStatus.total, - })) - ) - ); -}; export interface RulesStatusAggregation { enabled_status: { doc_count: number; }; } + export const getCspRulesStatus = ( soClient: SavedObjectsClientContract, packagePolicy: PackagePolicy @@ -125,6 +56,7 @@ export const getCspRulesStatus = ( }, perPage: 0, }); + return cspRules; }; @@ -138,6 +70,7 @@ export const addPackagePolicyCspRules = async ( enabled: rules.aggregations?.enabled_status.doc_count || 0, disabled: rules.total - (rules.aggregations?.enabled_status.doc_count || 0), }; + return packagePolicyRules; }; @@ -191,6 +124,7 @@ const createBenchmarks = ( const benchmark = createBenchmarkEntry(agentPolicy, cspPackage, cspRulesStatus); return benchmark; }); + return benchmarks; }) ); @@ -229,7 +163,7 @@ export const defineGetBenchmarksRoute = (router: CspRouter, cspContext: CspAppCo query ); - const agentPolicies = await getAgentPolicies( + const agentPolicies = await getCspAgentPolicies( soClient, cspPackagePolicies.items, agentPolicyService diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts index 587eb53768cc5..ffed0854858af 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.test.ts @@ -5,8 +5,6 @@ * 2.0. */ import { httpServerMock, httpServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; -import // eslint-disable-next-line @kbn/eslint/no-restricted-paths -'@kbn/core/server/elasticsearch/client/mocks'; import type { KibanaRequest } from '@kbn/core/server'; import { defineGetComplianceDashboardRoute } from './compliance_dashboard'; diff --git a/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.test.ts index 4b5ed5ddfc662..57cbd63e9177c 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.test.ts @@ -4,8 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { savedObjectsClientMock, httpServiceMock, @@ -140,6 +139,7 @@ describe('Update rules configuration API', () => { enabled: true, metadata: { rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -149,6 +149,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_2', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -158,6 +159,7 @@ describe('Update rules configuration API', () => { enabled: true, metadata: { rego_rule_id: 'cis_1_1_3', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -181,6 +183,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -190,6 +193,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_2', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -199,6 +203,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_3', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -253,6 +258,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -262,6 +268,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_2', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -271,6 +278,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_3', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -315,6 +323,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -324,6 +333,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_2', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -333,6 +343,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_3', + benchmark: { id: 'cis_k8s' }, }, }, }, @@ -389,6 +400,7 @@ describe('Update rules configuration API', () => { enabled: false, metadata: { rego_rule_id: 'cis_1_1_1', + benchmark: { id: 'cis_k8s' }, }, }, }, diff --git a/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.ts b/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.ts index 0ade8c95b6641..6098d9c6f1295 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.ts @@ -65,21 +65,26 @@ export const getCspRules = ( }); }; +const getEnabledRulesByBenchmark = (rules: SavedObjectsFindResponse<CspRule>['saved_objects']) => + rules.reduce<CspRulesConfiguration['data_yaml']['activated_rules']>( + (benchmarks, rule) => { + const benchmark = benchmarks[rule.attributes.metadata.benchmark.id]; + if (!rule.attributes.enabled || !benchmark) return benchmarks; + + benchmark.push(rule.attributes.metadata.rego_rule_id); + + return benchmarks; + }, + { cis_k8s: [], cis_eks: [] } + ); + export const createRulesConfig = ( cspRules: SavedObjectsFindResponse<CspRule> -): CspRulesConfiguration => { - const activatedRules = cspRules.saved_objects.filter((cspRule) => cspRule.attributes.enabled); - const config = { - data_yaml: { - activated_rules: { - cis_k8s: activatedRules.map( - (activatedRule) => activatedRule.attributes.metadata.rego_rule_id - ), - }, - }, - }; - return config; -}; +): CspRulesConfiguration => ({ + data_yaml: { + activated_rules: getEnabledRulesByBenchmark(cspRules.saved_objects), + }, +}); export const convertRulesConfigToYaml = (config: CspRulesConfiguration): string => { return yaml.safeDump(config); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/es_pit/es_pit.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/es_pit/es_pit.test.ts index b540db9f08f7b..c432e1e0a2968 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/es_pit/es_pit.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/es_pit/es_pit.test.ts @@ -5,8 +5,7 @@ * 2.0. */ import { Chance } from 'chance'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { ElasticsearchClient } from '@kbn/core/server'; import { httpServerMock, httpServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; import { DEFAULT_PIT_KEEP_ALIVE, defineEsPitRoute, esPitInputSchema } from './es_pit'; diff --git a/x-pack/plugins/cloud_security_posture/server/routes/index.ts b/x-pack/plugins/cloud_security_posture/server/routes/index.ts index dab857ab7118a..e332068b8ee93 100755 --- a/x-pack/plugins/cloud_security_posture/server/routes/index.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/index.ts @@ -8,7 +8,7 @@ import { defineGetComplianceDashboardRoute } from './compliance_dashboard/compliance_dashboard'; import { defineGetBenchmarksRoute } from './benchmarks/benchmarks'; import { defineUpdateRulesConfigRoute } from './configuration/update_rules_configuration'; -import { defineGetCspSetupStatusRoute } from './setup_status/setup_status'; +import { defineGetCspSetupStatusRoute } from './status/status'; import { defineEsPitRoute } from './es_pit/es_pit'; import { CspAppContext } from '../plugin'; import { CspRouter } from '../types'; diff --git a/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.test.ts deleted file mode 100644 index e796a14cf9d64..0000000000000 --- a/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { CspAppService } from '../../lib/csp_app_services'; -import { CspAppContext } from '../../plugin'; -import { defineGetCspSetupStatusRoute } from './setup_status'; -import { httpServerMock, httpServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; -import { ESSearchResponse } from '@kbn/core/types/elasticsearch'; -import { securityMock } from '@kbn/security-plugin/server/mocks'; - -describe('CspSetupStatus route', () => { - const logger: ReturnType<typeof loggingSystemMock.createLogger> = - loggingSystemMock.createLogger(); - const mockResponse = httpServerMock.createResponseFactory(); - const mockRequest = httpServerMock.createKibanaRequest(); - const mockEsClient = elasticsearchClientMock.createElasticsearchClient(); - const mockContext = { - core: { - elasticsearch: { client: { asCurrentUser: mockEsClient } }, - }, - }; - const router = httpServiceMock.createRouter(); - const cspAppContextService = new CspAppService(); - - const cspContext: CspAppContext = { - logger, - service: cspAppContextService, - security: securityMock.createSetup(), - }; - - beforeEach(() => { - jest.clearAllMocks(); - }); - - it('validate the API route path', async () => { - defineGetCspSetupStatusRoute(router, cspContext); - const [config] = router.get.mock.calls[0]; - - expect(config.path).toEqual('/internal/cloud_security_posture/setup_status'); - }); - - it('validate the API result when there are no findings in latest findings index', async () => { - defineGetCspSetupStatusRoute(router, cspContext); - mockEsClient.search.mockResponse({ - hits: { - hits: [], - }, - } as unknown as ESSearchResponse); - - const [_, handler] = router.get.mock.calls[0]; - - await handler(mockContext, mockRequest, mockResponse); - const [call] = mockResponse.ok.mock.calls; - const body = call[0]!.body; - - expect(mockResponse.ok).toHaveBeenCalledTimes(1); - await expect(body).toEqual({ latestFindingsIndexStatus: 'inapplicable' }); - }); - - it('validate the API result when there are findings in latest findings index', async () => { - defineGetCspSetupStatusRoute(router, cspContext); - mockEsClient.search.mockResponse({ - hits: { - hits: [{}], - }, - } as unknown as ESSearchResponse); - - const [_, handler] = router.get.mock.calls[0]; - - await handler(mockContext, mockRequest, mockResponse); - const [call] = mockResponse.ok.mock.calls; - const body = call[0]!.body; - - expect(mockResponse.ok).toHaveBeenCalledTimes(1); - await expect(body).toEqual({ latestFindingsIndexStatus: 'applicable' }); - }); -}); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.ts b/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.ts deleted file mode 100644 index e63158db5fe5c..0000000000000 --- a/x-pack/plugins/cloud_security_posture/server/routes/setup_status/setup_status.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { transformError } from '@kbn/securitysolution-es-utils'; -import { ElasticsearchClient } from '@kbn/core/server'; -import { INFO_ROUTE_PATH, LATEST_FINDINGS_INDEX_DEFAULT_NS } from '../../../common/constants'; -import { CspAppContext } from '../../plugin'; -import { CspRouter } from '../../types'; -import { CspSetupStatus } from '../../../common/types'; - -const getLatestFindingsStatus = async ( - esClient: ElasticsearchClient -): Promise<CspSetupStatus['latestFindingsIndexStatus']> => { - try { - const queryResult = await esClient.search({ - index: LATEST_FINDINGS_INDEX_DEFAULT_NS, - query: { - match_all: {}, - }, - size: 1, - }); - const hasLatestFinding = !!queryResult.hits.hits.length; - - return hasLatestFinding ? 'applicable' : 'inapplicable'; - } catch (e) { - return 'inapplicable'; - } -}; - -export const defineGetCspSetupStatusRoute = (router: CspRouter, cspContext: CspAppContext): void => - router.get( - { - path: INFO_ROUTE_PATH, - validate: false, - options: { - tags: ['access:cloud-security-posture-read'], - }, - }, - async (context, _, response) => { - try { - const esClient = (await context.core).elasticsearch.client.asCurrentUser; - const latestFindingsIndexStatus = await getLatestFindingsStatus(esClient); - - const body: CspSetupStatus = { - latestFindingsIndexStatus, - }; - - return response.ok({ - body, - }); - } catch (err) { - const error = transformError(err); - cspContext.logger.error(`Error while fetching findings status: ${err}`); - - return response.customError({ - body: { message: error.message }, - statusCode: error.statusCode, - }); - } - } - ); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/status/status.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/status/status.test.ts new file mode 100644 index 0000000000000..61227275eaea4 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/server/routes/status/status.test.ts @@ -0,0 +1,431 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CspAppContext } from '../../plugin'; +import { defineGetCspSetupStatusRoute, INDEX_TIMEOUT_IN_MINUTES } from './status'; +import { httpServerMock, httpServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import type { ESSearchResponse } from '@kbn/core/types/elasticsearch'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; +import { + createMockAgentPolicyService, + createMockAgentService, + createMockPackageService, + createPackagePolicyServiceMock, + xpackMocks, +} from '@kbn/fleet-plugin/server/mocks'; +import { + AgentClient, + AgentPolicyServiceInterface, + AgentService, + PackageClient, + PackagePolicyServiceInterface, + PackageService, +} from '@kbn/fleet-plugin/server'; +import { + AgentPolicy, + GetAgentStatusResponse, + Installation, + RegistryPackage, +} from '@kbn/fleet-plugin/common'; +import { createPackagePolicyMock } from '@kbn/fleet-plugin/common/mocks'; + +const mockCspPackageInfo: Installation = { + verification_status: 'verified', + installed_kibana: [], + installed_kibana_space_id: 'default', + installed_es: [], + package_assets: [], + es_index_patterns: { findings: 'logs-cloud_security_posture.findings-*' }, + name: 'cloud_security_posture', + version: '0.0.14', + install_version: '0.0.14', + install_status: 'installed', + install_started_at: '2022-06-16T15:24:58.281Z', + install_source: 'registry', +}; + +const mockLatestCspPackageInfo: RegistryPackage = { + format_version: 'mock', + name: 'cloud_security_posture', + title: 'CIS Kubernetes Benchmark', + version: '0.0.14', + release: 'experimental', + description: 'Check Kubernetes cluster compliance with the Kubernetes CIS benchmark.', + type: 'integration', + download: '/epr/cloud_security_posture/cloud_security_posture-0.0.14.zip', + path: '/package/cloud_security_posture/0.0.14', + policy_templates: [], + owner: { github: 'elastic/cloud-security-posture' }, + categories: ['containers', 'kubernetes'], +}; + +describe('CspSetupStatus route', () => { + const router = httpServiceMock.createRouter(); + const logger: ReturnType<typeof loggingSystemMock.createLogger> = + loggingSystemMock.createLogger(); + let mockContext: ReturnType<typeof xpackMocks.createRequestHandlerContext>; + let mockPackagePolicyService: jest.Mocked<PackagePolicyServiceInterface>; + let mockAgentPolicyService: jest.Mocked<AgentPolicyServiceInterface>; + let mockAgentService: jest.Mocked<AgentService>; + let mockAgentClient: jest.Mocked<AgentClient>; + let mockPackageService: PackageService; + let mockPackageClient: jest.Mocked<PackageClient>; + let cspContext: CspAppContext; + + beforeEach(() => { + jest.clearAllMocks(); + + mockContext = xpackMocks.createRequestHandlerContext(); + mockPackagePolicyService = createPackagePolicyServiceMock(); + mockAgentPolicyService = createMockAgentPolicyService(); + mockAgentService = createMockAgentService(); + mockPackageService = createMockPackageService(); + + mockAgentClient = mockAgentService.asInternalUser as jest.Mocked<AgentClient>; + mockPackageClient = mockPackageService.asInternalUser as jest.Mocked<PackageClient>; + + cspContext = { + logger, + service: { + agentService: mockAgentService, + agentPolicyService: mockAgentPolicyService, + packagePolicyService: mockPackagePolicyService, + packageService: mockPackageService, + }, + security: securityMock.createSetup(), + } as unknown as CspAppContext; + }); + + it('validate the API route path', async () => { + defineGetCspSetupStatusRoute(router, cspContext); + const [config, _] = router.get.mock.calls[0]; + + expect(config.path).toEqual('/internal/cloud_security_posture/status'); + }); + + it('Verify the API result when there are findings and no installed policies', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [{ Findings: 'foo' }], + }, + } as unknown as ESSearchResponse); + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 0, + page: 1, + perPage: 100, + }); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]?.body; + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toEqual({ + status: 'indexed', + latestPackageVersion: '0.0.14', + installedIntegrations: 0, + healthyAgents: 0, + installedPackageVersion: undefined, + }); + }); + + it('Verify the API result when there are findings, installed policies, no running agents', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [{ Findings: 'foo' }], + }, + } as unknown as ESSearchResponse); + + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + mockPackageClient.getInstallation.mockResolvedValueOnce(mockCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 3, + page: 1, + perPage: 100, + }); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]?.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toEqual({ + status: 'indexed', + latestPackageVersion: '0.0.14', + installedIntegrations: 3, + healthyAgents: 0, + installedPackageVersion: '0.0.14', + }); + }); + + it('Verify the API result when there are findings, installed policies, running agents', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [{ Findings: 'foo' }], + }, + } as unknown as ESSearchResponse); + + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + mockPackageClient.getInstallation.mockResolvedValueOnce(mockCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 3, + page: 1, + perPage: 100, + }); + + mockAgentPolicyService.getByIds.mockResolvedValue([ + { package_policies: createPackagePolicyMock() }, + ] as unknown as AgentPolicy[]); + + mockAgentClient.getAgentStatusForAgentPolicy.mockResolvedValue({ + total: 1, + } as unknown as GetAgentStatusResponse['results']); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]!.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toEqual({ + status: 'indexed', + latestPackageVersion: '0.0.14', + installedIntegrations: 3, + healthyAgents: 1, + installedPackageVersion: '0.0.14', + }); + }); + + it('Verify the API result when there are no findings and no installed policies', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [], + }, + } as unknown as ESSearchResponse); + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 0, + page: 1, + perPage: 100, + }); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]!.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toMatchObject({ + status: 'not-installed', + latestPackageVersion: '0.0.14', + installedIntegrations: 0, + healthyAgents: 0, + }); + }); + + it('Verify the API result when there are no findings, installed agent but no deployed agent', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [], + }, + } as unknown as ESSearchResponse); + + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + mockPackageClient.getInstallation.mockResolvedValueOnce(mockCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 1, + page: 1, + perPage: 100, + }); + + mockAgentPolicyService.getByIds.mockResolvedValue([ + { package_policies: createPackagePolicyMock() }, + ] as unknown as AgentPolicy[]); + + mockAgentClient.getAgentStatusForAgentPolicy.mockResolvedValue({ + total: 0, + } as unknown as GetAgentStatusResponse['results']); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]!.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toMatchObject({ + status: 'not-deployed', + latestPackageVersion: '0.0.14', + installedIntegrations: 1, + healthyAgents: 0, + installedPackageVersion: '0.0.14', + }); + }); + + it('Verify the API result when there are no findings, installed agent, deployed agent, before index timeout', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [], + }, + } as unknown as ESSearchResponse); + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + + const currentTime = new Date(); + mockCspPackageInfo.install_started_at = new Date( + currentTime.setMinutes(currentTime.getMinutes() - INDEX_TIMEOUT_IN_MINUTES + 1) + ).toUTCString(); + + mockPackageClient.getInstallation.mockResolvedValueOnce(mockCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 1, + page: 1, + perPage: 100, + }); + + mockAgentPolicyService.getByIds.mockResolvedValue([ + { package_policies: createPackagePolicyMock() }, + ] as unknown as AgentPolicy[]); + + mockAgentClient.getAgentStatusForAgentPolicy.mockResolvedValue({ + total: 1, + } as unknown as GetAgentStatusResponse['results']); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + const [context, req, res] = [mockContext, mockRequest, mockResponse]; + + await handler(context, req, res); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]!.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toMatchObject({ + status: 'indexing', + latestPackageVersion: '0.0.14', + installedIntegrations: 1, + healthyAgents: 1, + installedPackageVersion: '0.0.14', + }); + }); + + it('Verify the API result when there are no findings, installed agent, deployed agent, after index timeout', async () => { + mockContext.core.elasticsearch.client.asCurrentUser.search.mockResponseOnce({ + hits: { + hits: [], + }, + } as unknown as ESSearchResponse); + mockPackageClient.fetchFindLatestPackage.mockResolvedValueOnce(mockLatestCspPackageInfo); + + const currentTime = new Date(); + mockCspPackageInfo.install_started_at = new Date( + currentTime.setMinutes(currentTime.getMinutes() - INDEX_TIMEOUT_IN_MINUTES - 1) + ).toUTCString(); + + mockPackageClient.getInstallation.mockResolvedValueOnce(mockCspPackageInfo); + + mockPackagePolicyService.list.mockResolvedValueOnce({ + items: [], + total: 1, + page: 1, + perPage: 100, + }); + + mockAgentPolicyService.getByIds.mockResolvedValue([ + { package_policies: createPackagePolicyMock() }, + ] as unknown as AgentPolicy[]); + + mockAgentClient.getAgentStatusForAgentPolicy.mockResolvedValue({ + total: 1, + } as unknown as GetAgentStatusResponse['results']); + + // Act + defineGetCspSetupStatusRoute(router, cspContext); + + const [_, handler] = router.get.mock.calls[0]; + + const mockResponse = httpServerMock.createResponseFactory(); + const mockRequest = httpServerMock.createKibanaRequest(); + + await handler(mockContext, mockRequest, mockResponse); + + // Assert + const [call] = mockResponse.ok.mock.calls; + const body = call[0]!.body; + + expect(mockResponse.ok).toHaveBeenCalledTimes(1); + + await expect(body).toMatchObject({ + status: 'index-timeout', + latestPackageVersion: '0.0.14', + installedIntegrations: 1, + healthyAgents: 1, + installedPackageVersion: '0.0.14', + }); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts new file mode 100644 index 0000000000000..63d5d321330bf --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts @@ -0,0 +1,174 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { transformError } from '@kbn/securitysolution-es-utils'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { + AgentPolicyServiceInterface, + AgentService, + PackagePolicyServiceInterface, + PackageService, +} from '@kbn/fleet-plugin/server'; +import moment, { MomentInput } from 'moment'; +import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import { CLOUD_SECURITY_POSTURE_PACKAGE_NAME, STATUS_ROUTE_PATH } from '../../../common/constants'; +import type { CspAppContext } from '../../plugin'; +import type { CspRouter } from '../../types'; +import type { CspSetupStatus, Status } from '../../../common/types'; +import { + addRunningAgentToAgentPolicy, + getCspAgentPolicies, + getCspPackagePolicies, +} from '../../lib/fleet_util'; +import { isLatestFindingsIndexExists } from '../../lib/is_latest_findings_index_exists'; + +export const INDEX_TIMEOUT_IN_MINUTES = 10; + +// this function currently returns all agents instead of healthy agents only +const getHealthyAgents = async ( + soClient: SavedObjectsClientContract, + installedIntegrations: PackagePolicy[], + agentPolicyService: AgentPolicyServiceInterface, + agentService: AgentService +): Promise<number> => { + const agentPolicies = await getCspAgentPolicies( + soClient, + installedIntegrations, + agentPolicyService + ); + + const enrichedAgentPolicies = await addRunningAgentToAgentPolicy( + agentService, + agentPolicies || [] + ); + + return enrichedAgentPolicies.reduce( + (previousValue, currentValue) => previousValue + (currentValue.agents || 0), + 0 + ); +}; + +const getMinutesPassedSinceMoment = (momentInput: MomentInput): number => + moment().diff(moment(momentInput), 'minutes'); + +const getStatus = ( + findingsIndexExists: boolean, + installedIntegrations: number, + healthyAgents: number, + minutesPassedSinceInstallation: number +): Status => { + if (findingsIndexExists) return 'indexed'; + if (installedIntegrations === 0) return 'not-installed'; + if (healthyAgents === 0) return 'not-deployed'; + if (minutesPassedSinceInstallation <= INDEX_TIMEOUT_IN_MINUTES) return 'indexing'; + if (minutesPassedSinceInstallation > INDEX_TIMEOUT_IN_MINUTES) return 'index-timeout'; + + throw new Error('Could not determine csp setup status'); +}; + +const getCspSetupStatus = async ( + logger: CspAppContext['logger'], + esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, + packageService: PackageService, + packagePolicyService: PackagePolicyServiceInterface, + agentPolicyService: AgentPolicyServiceInterface, + agentService: AgentService +): Promise<CspSetupStatus> => { + const [findingsIndexExists, installationPackageInfo, latestPackageInfo, installedIntegrations] = + await Promise.all([ + isLatestFindingsIndexExists(esClient, logger), + packageService.asInternalUser.getInstallation(CLOUD_SECURITY_POSTURE_PACKAGE_NAME), + packageService.asInternalUser.fetchFindLatestPackage(CLOUD_SECURITY_POSTURE_PACKAGE_NAME), + getCspPackagePolicies(soClient, packagePolicyService, CLOUD_SECURITY_POSTURE_PACKAGE_NAME, { + per_page: 10000, + }), + ]); + + const healthyAgents = await getHealthyAgents( + soClient, + installedIntegrations.items, + agentPolicyService, + agentService + ); + + const installedIntegrationsTotal = installedIntegrations.total; + const latestPackageVersion = latestPackageInfo.version; + + const status = getStatus( + findingsIndexExists, + installedIntegrationsTotal, + healthyAgents, + getMinutesPassedSinceMoment(installationPackageInfo?.install_started_at || 0) + ); + + if (status === 'not-installed') + return { + status, + latestPackageVersion, + healthyAgents, + installedIntegrations: installedIntegrationsTotal, + }; + + return { + status, + latestPackageVersion, + healthyAgents, + installedIntegrations: installedIntegrationsTotal, + installedPackageVersion: installationPackageInfo?.install_version, + }; +}; + +export const defineGetCspSetupStatusRoute = (router: CspRouter, cspContext: CspAppContext): void => + router.get( + { + path: STATUS_ROUTE_PATH, + validate: false, + options: { + tags: ['access:cloud-security-posture-read'], + }, + }, + async (context, _, response) => { + try { + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + const soClient = (await context.core).savedObjects.client; + + const packageService = cspContext.service.packageService; + const agentService = cspContext.service.agentService; + const agentPolicyService = cspContext.service.agentPolicyService; + const packagePolicyService = cspContext.service.packagePolicyService; + + if (!agentPolicyService || !agentService || !packagePolicyService || !packageService) { + throw new Error(`Failed to get Fleet services`); + } + + const cspSetupStatus = await getCspSetupStatus( + cspContext.logger, + esClient, + soClient, + packageService, + packagePolicyService, + agentPolicyService, + agentService + ); + + const body: CspSetupStatus = cspSetupStatus; + + return response.ok({ + body, + }); + } catch (err) { + const error = transformError(err); + cspContext.logger.error(`Error while fetching status: ${err}`); + + return response.customError({ + body: { message: error.message }, + statusCode: error.statusCode, + }); + } + } + ); diff --git a/x-pack/plugins/dashboard_enhanced/public/plugin.ts b/x-pack/plugins/dashboard_enhanced/public/plugin.ts index 8c16c8c7d14bb..43f281ebed599 100644 --- a/x-pack/plugins/dashboard_enhanced/public/plugin.ts +++ b/x-pack/plugins/dashboard_enhanced/public/plugin.ts @@ -30,10 +30,10 @@ export interface StartDependencies { dashboard: DashboardStart; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SetupContract {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface StartContract {} export class DashboardEnhancedPlugin diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx index c8715c9e3b416..582133890a4bc 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx @@ -88,6 +88,10 @@ export class FlyoutCreateDrilldownAction implements Action<EmbeddableContext> { closed$.next(true); handle.close(); }; + const closeFlyout = () => { + close(); + }; + const triggers = [ ...ensureNestedTriggers(embeddable.supportedTriggers()), CONTEXT_MENU_TRIGGER, @@ -111,11 +115,11 @@ export class FlyoutCreateDrilldownAction implements Action<EmbeddableContext> { ); // Close flyout on application change. - core.application.currentAppId$.pipe(takeUntil(closed$), skip(1), take(1)).subscribe(() => { - close(); - }); + core.application.currentAppId$ + .pipe(takeUntil(closed$), skip(1), take(1)) + .subscribe(closeFlyout); - // Close flyout on dashboard switch to "view" mode. + // Close flyout on dashboard switch to "view" mode or on embeddable destroy. embeddable .getInput$() .pipe( @@ -125,8 +129,6 @@ export class FlyoutCreateDrilldownAction implements Action<EmbeddableContext> { filter((mode) => mode !== ViewMode.EDIT), take(1) ) - .subscribe(() => { - close(); - }); + .subscribe({ next: closeFlyout, complete: closeFlyout }); } } diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx index 44bfbb26421c6..f7cd8981451ea 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx @@ -67,6 +67,10 @@ export class FlyoutEditDrilldownAction implements Action<EmbeddableContext> { closed$.next(true); handle.close(); }; + const closeFlyout = () => { + close(); + }; + const handle = core.overlays.openFlyout( toMountPoint( <plugins.uiActionsEnhanced.DrilldownManager @@ -85,11 +89,11 @@ export class FlyoutEditDrilldownAction implements Action<EmbeddableContext> { ); // Close flyout on application change. - core.application.currentAppId$.pipe(takeUntil(closed$), skip(1), take(1)).subscribe(() => { - close(); - }); + core.application.currentAppId$ + .pipe(takeUntil(closed$), skip(1), take(1)) + .subscribe(closeFlyout); - // Close flyout on dashboard switch to "view" mode. + // Close flyout on dashboard switch to "view" mode or on embeddable destroy. embeddable .getInput$() .pipe( @@ -99,8 +103,6 @@ export class FlyoutEditDrilldownAction implements Action<EmbeddableContext> { filter((mode) => mode !== ViewMode.EDIT), take(1) ) - .subscribe(() => { - close(); - }); + .subscribe({ next: closeFlyout, complete: closeFlyout }); } } diff --git a/x-pack/plugins/dashboard_enhanced/server/plugin.ts b/x-pack/plugins/dashboard_enhanced/server/plugin.ts index 18ae458ea9873..64014202a3618 100644 --- a/x-pack/plugins/dashboard_enhanced/server/plugin.ts +++ b/x-pack/plugins/dashboard_enhanced/server/plugin.ts @@ -20,10 +20,10 @@ export interface StartDependencies { uiActionsEnhanced: AdvancedUiActionsStart; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SetupContract {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface StartContract {} export class DashboardEnhancedPlugin diff --git a/x-pack/plugins/data_visualizer/common/types/field_stats.ts b/x-pack/plugins/data_visualizer/common/types/field_stats.ts index 75fa662281fb3..4f0fb1b81d8f9 100644 --- a/x-pack/plugins/data_visualizer/common/types/field_stats.ts +++ b/x-pack/plugins/data_visualizer/common/types/field_stats.ts @@ -32,11 +32,6 @@ export function isValidField(arg: unknown): arg is Field { return isPopulatedObject(arg, ['fieldName', 'type']) && typeof arg.fieldName === 'string'; } -export interface HistogramField { - fieldName: string; - type: string; -} - export interface Distribution { percentiles: Array<{ value?: number; percent: number; minValue: number; maxValue: number }>; minPercentile: number; @@ -107,13 +102,6 @@ export interface FieldExamples { examples: unknown[]; } -export interface NumericColumnStats { - interval: number; - min: number; - max: number; -} -export type NumericColumnStatsMap = Record<string, NumericColumnStats>; - export interface AggHistogram { histogram: estypes.AggregationsHistogramAggregation; } diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx index 38689f73541d6..f7702adaf293d 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx @@ -108,7 +108,7 @@ export function EmbeddedMapComponent({ setupEmbeddable(); // we want this effect to execute exactly once after the component mounts - // eslint-disable-next-line + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides_validation.js b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides_validation.js index 281131892e1e6..11fa66a89e937 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides_validation.js +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides_validation.js @@ -104,7 +104,7 @@ export function isTimestampFormatValid(timestampFormat) { 'xpack.dataVisualizer.file.editFlyout.overrides.timestampLetterSValidationErrorMessage', { defaultMessage: - 'Letter { length, plural, one { {lg} } other { group {lg} } } in {format} is not supported because it is not preceded by ss and a separator from {sep}', // eslint-disable-line + 'Letter { length, plural, one { {lg} } other { group {lg} } } in {format} is not supported because it is not preceded by ss and a separator from {sep}', values: { length, lg: letterGroup, diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/overall_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/overall_stats.ts index a25b3974d45b0..7bf8640c89fce 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/overall_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/overall_stats.ts @@ -9,6 +9,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { get } from 'lodash'; import { Query } from '@kbn/es-query'; import { IKibanaSearchResponse } from '@kbn/data-plugin/common'; +import type { AggCardinality } from '@kbn/ml-agg-utils'; import { buildSamplerAggregation, getSamplerAggregationsResponsePath } from '@kbn/ml-agg-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { @@ -17,7 +18,7 @@ import { } from '../../../../../common/utils/query_utils'; import { getDatafeedAggregations } from '../../../../../common/utils/datafeed_utils'; import { AggregatableField, NonAggregatableField } from '../../types/overall_stats'; -import { AggCardinality, Aggs } from '../../../../../common/types/field_stats'; +import { Aggs } from '../../../../../common/types/field_stats'; export const checkAggregatableFieldsExistRequest = ( dataViewTitle: string, diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/plugin.ts b/x-pack/plugins/drilldowns/url_drilldown/public/plugin.ts index aa1b4500a2298..aa12e1ac109c2 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/plugin.ts +++ b/x-pack/plugins/drilldowns/url_drilldown/public/plugin.ts @@ -25,10 +25,10 @@ export interface StartDependencies { uiActionsEnhanced: AdvancedUiActionsStart; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SetupContract {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface StartContract {} export class UrlDrilldownPlugin diff --git a/x-pack/plugins/embeddable_enhanced/public/plugin.ts b/x-pack/plugins/embeddable_enhanced/public/plugin.ts index 8f82efdb10671..61958c114c632 100644 --- a/x-pack/plugins/embeddable_enhanced/public/plugin.ts +++ b/x-pack/plugins/embeddable_enhanced/public/plugin.ts @@ -41,10 +41,10 @@ export interface StartDependencies { uiActionsEnhanced: AdvancedUiActionsStart; } -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SetupContract {} -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface StartContract {} export class EmbeddableEnhancedPlugin @@ -126,7 +126,7 @@ export class EmbeddableEnhancedPlugin }); dynamicActions.start().catch((error) => { - /* eslint-disable */ + /* eslint-disable no-console */ console.log('Failed to start embeddable dynamic actions', embeddable); console.error(error); @@ -135,7 +135,7 @@ export class EmbeddableEnhancedPlugin const stop = () => { dynamicActions.stop().catch((error) => { - /* eslint-disable */ + /* eslint-disable no-console */ console.log('Failed to stop embeddable dynamic actions', embeddable); console.error(error); diff --git a/x-pack/plugins/enterprise_search/server/types/crawler.ts b/x-pack/plugins/enterprise_search/common/types/crawler.ts similarity index 100% rename from x-pack/plugins/enterprise_search/server/types/crawler.ts rename to x-pack/plugins/enterprise_search/common/types/crawler.ts diff --git a/x-pack/plugins/enterprise_search/common/types/indices.ts b/x-pack/plugins/enterprise_search/common/types/indices.ts index 4b3007c36ec1d..09735acc90b98 100644 --- a/x-pack/plugins/enterprise_search/common/types/indices.ts +++ b/x-pack/plugins/enterprise_search/common/types/indices.ts @@ -12,9 +12,11 @@ import { Uuid, } from '@elastic/elasticsearch/lib/api/types'; +import { Connector } from './connectors'; +import { Crawler } from './crawler'; + export interface ElasticsearchIndex { health?: HealthStatus; - name: IndexName; status?: IndicesStatsIndexMetadataState; total: { @@ -28,3 +30,15 @@ export interface ElasticsearchIndex { }; uuid?: Uuid; } + +export interface ConnectorIndex extends ElasticsearchIndex { + connector: Connector; +} + +export interface CrawlerIndex extends ElasticsearchIndex { + crawler: Crawler; +} +export interface ElasticsearchIndexWithIngestion extends ElasticsearchIndex { + connector?: Connector; + crawler?: Crawler; +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.test.ts index 1d8873da7f816..ca2bff383d2b5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.test.ts @@ -12,7 +12,7 @@ import { omit } from 'lodash'; import { nextTick } from '@kbn/test-jest-helpers'; -import { Schema, SchemaConflicts, SchemaType } from '../../../shared/schema/types'; +import { AdvancedSchema, SchemaConflicts, SchemaType } from '../../../shared/schema/types'; import { itShowsServerErrorAsFlashMessage } from '../../../test_helpers'; @@ -45,6 +45,7 @@ describe('ResultSettingsLogic', () => { }; const SELECTORS = { + validResultFields: {}, serverResultFields: {}, reducedServerResultFields: {}, resultFieldsEmpty: true, @@ -55,8 +56,11 @@ describe('ResultSettingsLogic', () => { queryPerformanceScore: 0, }; + const FUNCTIONAL_SELECTORS = ['isSnippetAllowed']; + // Values without selectors - const resultSettingLogicValues = () => omit(ResultSettingsLogic.values, Object.keys(SELECTORS)); + const resultSettingLogicValues = () => + omit(ResultSettingsLogic.values, FUNCTIONAL_SELECTORS, Object.keys(SELECTORS)); beforeEach(() => { jest.clearAllMocks(); @@ -65,7 +69,7 @@ describe('ResultSettingsLogic', () => { it('has expected default values', () => { mount(); - expect(ResultSettingsLogic.values).toEqual({ + expect(omit(ResultSettingsLogic.values, FUNCTIONAL_SELECTORS)).toEqual({ ...DEFAULT_VALUES, ...SELECTORS, }); @@ -77,10 +81,10 @@ describe('ResultSettingsLogic', () => { foo: { raw: { size: 5 } }, bar: { raw: { size: 5 } }, }; - const schema: Schema = { - foo: SchemaType.Text, - bar: SchemaType.Number, - baz: SchemaType.Text, + const schema: AdvancedSchema = { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + baz: { type: SchemaType.Text, capabilities: {} }, }; const schemaConflicts: SchemaConflicts = { foo: { @@ -213,10 +217,16 @@ describe('ResultSettingsLogic', () => { foo: { raw: true, snippet: true, snippetFallback: true }, bar: { raw: true, snippet: true, snippetFallback: true }, }, + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + }, }; it('should update settings for an individual field', () => { - mount(initialValues); + mount({ + ...initialValues, + }); ResultSettingsLogic.actions.updateField('foo', { raw: true, @@ -226,6 +236,7 @@ describe('ResultSettingsLogic', () => { expect(resultSettingLogicValues()).toEqual({ ...DEFAULT_VALUES, + ...initialValues, // the settings for foo are updated below for any *ResultFields state in which they appear resultFields: { foo: { raw: true, snippet: false, snippetFallback: false }, @@ -268,13 +279,54 @@ describe('ResultSettingsLogic', () => { }); describe('selectors', () => { + describe('validResultFields', () => { + it('should filter out nested fields and keep subfields only', () => { + mount({ + schema: { + simple_field: { type: SchemaType.Text, capabilities: {} }, + nested_object: { type: SchemaType.Nested, capabilities: {} }, + 'nested_object.subfield': { type: SchemaType.Text, capabilities: {} }, + 'simple_object.subfield': { type: SchemaType.Number, capabilities: {} }, + }, + resultFields: { + simple_field: { raw: true }, + nested_object: { raw: true }, + 'nested_object.subfield': { raw: true }, + 'simple_object.subfield': { raw: true }, + }, + }); + + expect(ResultSettingsLogic.values.validResultFields).toEqual({ + simple_field: { raw: true }, + 'nested_object.subfield': { raw: true }, + 'simple_object.subfield': { raw: true }, + }); + }); + + it('should filter out field that are missing in the schema', () => { + mount({ + schema: { + simple_field: { type: SchemaType.Text, capabilities: {} }, + }, + resultFields: { + simple_field: { raw: true }, + invalid_field: { raw: true }, + }, + }); + + expect(ResultSettingsLogic.values.validResultFields).toEqual({ + simple_field: { raw: true }, + }); + }); + }); + describe('textResultFields', () => { it('should return only resultFields that have a type of "text" in the engine schema', () => { mount({ schema: { - foo: 'text', - bar: 'number', - baz: 'text', + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + baz: { type: SchemaType.Text, capabilities: {} }, }, resultFields: { foo: { raw: true, rawSize: 5 }, @@ -294,9 +346,9 @@ describe('ResultSettingsLogic', () => { it('should return only resultFields that have a type other than "text" in the engine schema', () => { mount({ schema: { - foo: 'text', - bar: 'number', - baz: 'text', + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + baz: { type: SchemaType.Text, capabilities: {} }, }, resultFields: { foo: { raw: true, rawSize: 5 }, @@ -311,6 +363,27 @@ describe('ResultSettingsLogic', () => { }); }); + describe('isSnippetAllowed', () => { + it('should return true if field have the snippet capability', () => { + mount({ + schema: { + foo: { type: SchemaType.Text, capabilities: { snippet: true } }, + }, + }); + + expect(ResultSettingsLogic.values.isSnippetAllowed('foo')).toEqual(true); + }); + + it('should return false otherwise', () => { + mount({ + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + }, + }); + expect(ResultSettingsLogic.values.isSnippetAllowed('foo')).toEqual(false); + }); + }); + describe('resultFieldsAtDefaultSettings', () => { it('should return true if all fields are at their default settings', () => { mount({ @@ -318,6 +391,10 @@ describe('ResultSettingsLogic', () => { foo: { raw: true, snippet: false, snippetFallback: false }, bar: { raw: true, snippet: false, snippetFallback: false }, }, + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Text, capabilities: {} }, + }, }); expect(ResultSettingsLogic.values.resultFieldsAtDefaultSettings).toEqual(true); @@ -329,6 +406,10 @@ describe('ResultSettingsLogic', () => { foo: { raw: true, snippet: false, snippetFallback: false }, bar: { raw: true, snippet: true, snippetFallback: false }, }, + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Text, capabilities: {} }, + }, }); expect(ResultSettingsLogic.values.resultFieldsAtDefaultSettings).toEqual(false); @@ -401,6 +482,11 @@ describe('ResultSettingsLogic', () => { snippetFallback: false, }, }, + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + baz: { type: SchemaType.Text, capabilities: {} }, + }, }); expect(ResultSettingsLogic.values.serverResultFields).toEqual({ @@ -424,6 +510,10 @@ describe('ResultSettingsLogic', () => { }, bar: {}, }, + schema: { + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + }, }); expect(ResultSettingsLogic.values.reducedServerResultFields).toEqual({ @@ -438,7 +528,7 @@ describe('ResultSettingsLogic', () => { it('considers a text value with raw set (but no size) as worth 1.5', () => { mount({ resultFields: { foo: { raw: true } }, - schema: { foo: SchemaType.Text }, + schema: { foo: { type: SchemaType.Text, capabilities: {} } }, }); expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(1.5); }); @@ -446,7 +536,7 @@ describe('ResultSettingsLogic', () => { it('considers a text value with raw set and a size over 250 as also worth 1.5', () => { mount({ resultFields: { foo: { raw: true, rawSize: 251 } }, - schema: { foo: SchemaType.Text }, + schema: { foo: { type: SchemaType.Text, capabilities: {} } }, }); expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(1.5); }); @@ -454,7 +544,7 @@ describe('ResultSettingsLogic', () => { it('considers a text value with raw set and a size less than or equal to 250 as worth 1', () => { mount({ resultFields: { foo: { raw: true, rawSize: 250 } }, - schema: { foo: SchemaType.Text }, + schema: { foo: { type: SchemaType.Text, capabilities: {} } }, }); expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(1); }); @@ -462,7 +552,7 @@ describe('ResultSettingsLogic', () => { it('considers a text value with a snippet set as worth 2', () => { mount({ resultFields: { foo: { snippet: true, snippetSize: 50, snippetFallback: true } }, - schema: { foo: SchemaType.Text }, + schema: { foo: { type: SchemaType.Text, capabilities: {} } }, }); expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(2); }); @@ -470,7 +560,7 @@ describe('ResultSettingsLogic', () => { it('will sum raw and snippet values if both are set', () => { mount({ resultFields: { foo: { snippet: true, raw: true } }, - schema: { foo: SchemaType.Text }, + schema: { foo: { type: SchemaType.Text, capabilities: {} } }, }); // 1.5 (raw) + 2 (snippet) = 3.5 expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(3.5); @@ -479,7 +569,7 @@ describe('ResultSettingsLogic', () => { it('considers a non-text value with raw set as 0.2', () => { mount({ resultFields: { foo: { raw: true } }, - schema: { foo: SchemaType.Number }, + schema: { foo: { type: SchemaType.Number, capabilities: {} } }, }); expect(ResultSettingsLogic.values.queryPerformanceScore).toEqual(0.2); }); @@ -492,9 +582,9 @@ describe('ResultSettingsLogic', () => { baz: { raw: true }, }, schema: { - foo: SchemaType.Text, - bar: SchemaType.Text, - baz: SchemaType.Number, + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + baz: { type: SchemaType.Text, capabilities: {} }, }, }); // 1.5 (foo) + 3.5 (bar) + baz (.2) = 5.2 @@ -522,8 +612,8 @@ describe('ResultSettingsLogic', () => { }, }; const schema = { - foo: 'text', - bar: 'number', + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, }; const schemaConflicts = { baz: { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts index 6b4de636b9c25..fbc0d479d953c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts @@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n'; import { flashAPIErrors, flashSuccessToast } from '../../../shared/flash_messages'; import { HttpLogic } from '../../../shared/http'; -import { Schema, SchemaConflicts, SchemaType } from '../../../shared/schema/types'; +import { AdvancedSchema, SchemaConflicts, SchemaType } from '../../../shared/schema/types'; import { EngineLogic } from '../engine'; import { DEFAULT_SNIPPET_SIZE } from './constants'; @@ -36,11 +36,11 @@ import { interface ResultSettingsActions { initializeResultFields( serverResultFields: ServerFieldResultSettingObject, - schema: Schema, + schema: AdvancedSchema, schemaConflicts?: SchemaConflicts ): { resultFields: FieldResultSettingObject; - schema: Schema; + schema: AdvancedSchema; schemaConflicts: SchemaConflicts; }; clearAllFields(): void; @@ -68,9 +68,10 @@ interface ResultSettingsValues { saving: boolean; resultFields: FieldResultSettingObject; lastSavedResultFields: FieldResultSettingObject; - schema: Schema; + schema: AdvancedSchema; schemaConflicts: SchemaConflicts; // Selectors + validResultFields: FieldResultSettingObject; textResultFields: FieldResultSettingObject; nonTextResultFields: FieldResultSettingObject; serverResultFields: ServerFieldResultSettingObject; @@ -79,6 +80,7 @@ interface ResultSettingsValues { stagedUpdates: true; reducedServerResultFields: ServerFieldResultSettingObject; queryPerformanceScore: number; + isSnippetAllowed: (fieldName: string) => boolean; } const SAVE_CONFIRMATION_MESSAGE = i18n.translate( @@ -170,22 +172,38 @@ export const ResultSettingsLogic = kea<MakeLogicType<ResultSettingsValues, Resul ], }), selectors: ({ selectors }) => ({ - textResultFields: [ + validResultFields: [ () => [selectors.resultFields, selectors.schema], - (resultFields: FieldResultSettingObject, schema: Schema) => { + (resultFields: FieldResultSettingObject, schema: AdvancedSchema): FieldResultSettingObject => + Object.entries(resultFields).reduce((validResultFields, [fieldName, fieldSettings]) => { + if (!schema[fieldName] || schema[fieldName].type === SchemaType.Nested) { + return validResultFields; + } + return { ...validResultFields, [fieldName]: fieldSettings }; + }, {}), + ], + textResultFields: [ + () => [selectors.validResultFields, selectors.schema], + (resultFields: FieldResultSettingObject, schema: AdvancedSchema) => { const { textResultFields } = splitResultFields(resultFields, schema); return textResultFields; }, ], nonTextResultFields: [ - () => [selectors.resultFields, selectors.schema], - (resultFields: FieldResultSettingObject, schema: Schema) => { + () => [selectors.validResultFields, selectors.schema], + (resultFields: FieldResultSettingObject, schema: AdvancedSchema) => { const { nonTextResultFields } = splitResultFields(resultFields, schema); return nonTextResultFields; }, ], + isSnippetAllowed: [ + () => [selectors.schema], + (schema: AdvancedSchema) => { + return (fieldName: string): boolean => !!schema[fieldName]?.capabilities.snippet; + }, + ], serverResultFields: [ - () => [selectors.resultFields], + () => [selectors.validResultFields], (resultFields: FieldResultSettingObject) => { return Object.entries(resultFields).reduce((serverResultFields, [fieldName, settings]) => { return { @@ -196,11 +214,11 @@ export const ResultSettingsLogic = kea<MakeLogicType<ResultSettingsValues, Resul }, ], resultFieldsAtDefaultSettings: [ - () => [selectors.resultFields], + () => [selectors.validResultFields], (resultFields) => areFieldsAtDefaultSettings(resultFields), ], resultFieldsEmpty: [ - () => [selectors.resultFields], + () => [selectors.validResultFields], (resultFields) => areFieldsEmpty(resultFields), ], stagedUpdates: [ @@ -222,11 +240,11 @@ export const ResultSettingsLogic = kea<MakeLogicType<ResultSettingsValues, Resul ], queryPerformanceScore: [ () => [selectors.serverResultFields, selectors.schema], - (serverResultFields: ServerFieldResultSettingObject, schema: Schema) => { + (serverResultFields: ServerFieldResultSettingObject, schema: AdvancedSchema) => { return Object.entries(serverResultFields).reduce((acc, [fieldName, resultField]) => { let newAcc = acc; if (resultField.raw) { - if (schema[fieldName] !== 'text') { + if (schema[fieldName].type !== SchemaType.Text) { newAcc += 0.2; } else if ( typeof resultField.raw === 'object' && @@ -301,7 +319,7 @@ export const ResultSettingsLogic = kea<MakeLogicType<ResultSettingsValues, Resul schemaConflicts, searchSettings: { result_fields: serverFieldResultSettings }, } = await http.get<{ - schema: Record<string, SchemaType>; + schema: AdvancedSchema; schemaConflicts?: SchemaConflicts; searchSettings: { result_fields: Record<string, ServerFieldResultSetting> }; }>(url); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.test.tsx index 6f2f4c9f9acbf..3081ccc445655 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.test.tsx @@ -37,6 +37,7 @@ describe('TextFieldsBody', () => { snippetFallback: false, }, }, + isSnippetAllowed: () => true, }; const actions = { @@ -111,6 +112,15 @@ describe('TextFieldsBody', () => { snippetCheckbox.simulate('change'); expect(actions.toggleSnippetForField).toHaveBeenCalledWith('foo'); }); + + describe('when "isSnippetAllowed" return false', () => { + values.isSnippetAllowed = () => false; + + it('the snippet checkbox is disabled', () => { + const snippetCheckbox = getSnippetCheckbox(); + expect(snippetCheckbox.prop('disabled')).toEqual(true); + }); + }); }); describe('the "fallback" checkbox within each table row', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.tsx index c3b46f5852724..67e782886ae75 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/text_fields_body.tsx @@ -18,7 +18,7 @@ import { FieldResultSetting } from '../types'; import { FieldNumber } from './field_number'; export const TextFieldsBody: React.FC = () => { - const { textResultFields } = useValues(ResultSettingsLogic); + const { isSnippetAllowed, textResultFields } = useValues(ResultSettingsLogic); const { toggleRawForField, updateRawSizeForField, @@ -75,6 +75,7 @@ export const TextFieldsBody: React.FC = () => { data-test-subj="ResultSettingSnippetTextBox" id={`${fieldName}-snippet}`} checked={!!fieldSettings.snippet} + disabled={!isSnippetAllowed(fieldName)} onChange={() => { toggleSnippetForField(fieldName); }} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.test.ts index a2dae8cbdcb4c..38b617b8f119e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.test.ts @@ -56,7 +56,7 @@ describe('convertServerResultFieldsToResultFields', () => { }, }, { - foo: SchemaType.Text, + foo: { type: SchemaType.Text, capabilities: {} }, } ) ).toEqual({ @@ -132,8 +132,9 @@ describe('splitResultFields', () => { }, }, { - foo: SchemaType.Text, - bar: SchemaType.Number, + foo: { type: SchemaType.Text, capabilities: {} }, + bar: { type: SchemaType.Number, capabilities: {} }, + nested_object: { type: SchemaType.Nested, capabilities: {} }, } ) ).toEqual({ diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.ts index 0146a1fe0ed51..60d12c0b5889f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/utils.ts @@ -7,7 +7,7 @@ import { isEqual } from 'lodash'; -import { Schema } from '../../../shared/schema/types'; +import { AdvancedSchema, SchemaType } from '../../../shared/schema/types'; import { DEFAULT_FIELD_SETTINGS, DISABLED_FIELD_SETTINGS } from './constants'; import { @@ -64,7 +64,7 @@ export const resetAllFields = (fields: FieldResultSettingObject) => export const convertServerResultFieldsToResultFields = ( serverResultFields: ServerFieldResultSettingObject, - schema: Schema + schema: AdvancedSchema ) => { const resultFields: FieldResultSettingObject = Object.keys(schema).reduce( (acc: FieldResultSettingObject, fieldName: string) => ({ @@ -100,17 +100,16 @@ export const convertToServerFieldResultSetting = (fieldResultSetting: FieldResul return serverFieldResultSetting; }; -export const splitResultFields = (resultFields: FieldResultSettingObject, schema: Schema) => { - const textResultFields: FieldResultSettingObject = {}; - const nonTextResultFields: FieldResultSettingObject = {}; - const keys = Object.keys(schema); - keys.forEach((fieldName) => { - (schema[fieldName] === 'text' ? textResultFields : nonTextResultFields)[fieldName] = - resultFields[fieldName]; - }); - - return { textResultFields, nonTextResultFields }; -}; +export const splitResultFields = (resultFields: FieldResultSettingObject, schema: AdvancedSchema) => + Object.entries(resultFields).reduce( + (acc, [fieldName, resultFieldSettings]) => { + const fieldType = schema[fieldName].type; + const targetField = + fieldType === SchemaType.Text ? 'textResultFields' : 'nonTextResultFields'; + return { ...acc, [targetField]: { ...acc[targetField], [fieldName]: resultFieldSettings } }; + }, + { textResultFields: {}, nonTextResultFields: {} } + ); export const areFieldsEmpty = (fields: FieldResultSettingObject) => { const anyNonEmptyField = Object.values(fields).find((field) => { diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx index 416c4a428c848..9e3a59aee83df 100644 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx @@ -25,8 +25,8 @@ import { import { i18n } from '@kbn/i18n'; +import { useCloudDetails } from '../../../shared/cloud_details/cloud_details'; import { HttpLogic } from '../../../shared/http'; -import { KibanaLogic } from '../../../shared/kibana'; import { TelemetryLogic } from '../../../shared/telemetry'; import { SendTelemetryHelper } from '../../../shared/telemetry/telemetry_logic'; @@ -34,19 +34,6 @@ const onFocusHandler = (e: React.FocusEvent<HTMLInputElement>): void => { e.target.select(); }; -interface CloudDetails { - cloudId: string | undefined; - deploymentUrl: string | undefined; -} - -const useCloudDetails = (): CloudDetails => { - const { cloud } = useValues(KibanaLogic); - return { - cloudId: cloud?.cloudId, - deploymentUrl: cloud?.deploymentUrl, - }; -}; - const copyCloudIdHandler = ( copy: () => void, sendTelemetry: ({ action, metric }: SendTelemetryHelper) => void diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/index.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/index.ts index 297bbaf36c454..f15a3acbb6394 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -export { searchIndices } from './search_indices.mock'; export { searchEngines } from './search_engines.mock'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts index 5ca71c9870d5e..4dd3dcf35733f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/__mocks__/search_indices.mock.ts @@ -5,39 +5,59 @@ * 2.0. */ -import { SearchIndex } from '../types'; +import { ConnectorStatus, SyncStatus } from '../../../../common/types/connectors'; +import { ElasticsearchIndexWithIngestion } from '../../../../common/types/indices'; -export const searchIndices = [ +export const indices: ElasticsearchIndexWithIngestion[] = [ { - name: 'Our API Index', - elasticsearch_index_name: 'ent-search-api-one', - document_count: 100, - health: 'green', - data_ingestion: 'connected', - storage: '9.3mb', + name: 'api', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, }, { - name: 'Customer Feedback', - elasticsearch_index_name: 'es-index-two', - document_count: 100, - health: 'green', - data_ingestion: 'connected', - storage: '9.3mb', + connector: { + api_key_id: null, + configuration: {}, + id: '2', + index_name: 'connector', + last_seen: null, + last_synced: null, + scheduling: { + enabled: false, + interval: '', + }, + service_type: null, + status: ConnectorStatus.CONFIGURED, + sync_error: null, + sync_now: false, + sync_status: SyncStatus.COMPLETED, + }, + name: 'connector', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, }, { - name: 'Dharma Crawler', - elasticsearch_index_name: 'ent-search-crawler-one', - document_count: 100, - health: 'yellow', - data_ingestion: 'incomplete', - storage: '9.3mb', + crawler: { + id: '3', + index_name: 'crawler', + }, + name: 'crawler', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, }, - { - name: 'My Custom Source', - elasticsearch_index_name: 'ent-search-custom-source-one', - document_count: 1, - health: 'red', - data_ingestion: 'incomplete', - storage: '0mb', - }, -] as SearchIndex[]; +]; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts index e7a959cedff47..8857ef95a32fa 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts @@ -10,12 +10,19 @@ import { HttpLogic } from '../../../shared/http'; import { CrawlerDomain } from './types'; -export interface GetCrawlerDomainsArgs { +export interface DeleteCrawlerDomainArgs { domain: CrawlerDomain; indexName: string; } -export const deleteCrawlerDomain = async ({ domain, indexName }: GetCrawlerDomainsArgs) => { +export interface DeleteCrawlerDomainResponse { + domain: CrawlerDomain; +} + +export const deleteCrawlerDomain = async ({ + domain, + indexName, +}: DeleteCrawlerDomainArgs): Promise<DeleteCrawlerDomainResponse> => { await HttpLogic.values.http.delete( `/internal/enterprise_search/indices/${indexName}/crawler/domains/${domain.id}` ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/generate_api_key/generate_api_key_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/generate_api_key/generate_api_key_logic.ts new file mode 100644 index 0000000000000..d5d0f6c691dd2 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/generate_api_key/generate_api_key_logic.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; +import { HttpLogic } from '../../../shared/http'; + +interface APIKeyResponse { + apiKey: { + api_key: string; + encoded: string; + id: string; + name: string; + }; +} + +export const generateApiKey = async ({ + indexName, + keyName, +}: { + indexName: string; + keyName: string; +}) => { + const route = `/internal/enterprise_search/${indexName}/api_keys`; + + return await HttpLogic.values.http.post<APIKeyResponse>(route, { + body: JSON.stringify({ + keyName, + }), + }); +}; + +export const GenerateApiKeyLogic = createApiLogic(['generate_api_key_logic'], generateApiKey); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts index 87ab8ecc700ba..7a4f5883716b4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts @@ -5,14 +5,14 @@ * 2.0. */ +import { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices'; import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; import { HttpLogic } from '../../../shared/http'; -import { IndexData } from '../../types'; export const fetchIndex = async ({ indexName }: { indexName: string }) => { const route = `/internal/enterprise_search/indices/${indexName}`; - return await HttpLogic.values.http.get<IndexData>(route); + return await HttpLogic.values.http.get<ElasticsearchIndexWithIngestion>(route); }; export const FetchIndexApiLogic = createApiLogic(['fetch_index_api_logic'], fetchIndex); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.test.ts new file mode 100644 index 0000000000000..94383be1022b9 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.test.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { mockHttpValues } from '../../../__mocks__/kea_logic'; + +import { nextTick } from '@kbn/test-jest-helpers'; + +import { fetchIndices } from './fetch_indices_api_logic'; + +describe('FetchIndicesApiLogic', () => { + const { http } = mockHttpValues; + beforeEach(() => { + jest.clearAllMocks(); + }); + describe('fetchIndicesApiLogic', () => { + it('calls correct api', async () => { + const promise = Promise.resolve({ result: 'result' }); + http.get.mockReturnValue(promise); + const result = fetchIndices({ + meta: { page: { current: 1, size: 20, total_pages: 10, total_results: 10 } }, + returnHiddenIndices: false, + }); + await nextTick(); + expect(http.get).toHaveBeenCalledWith('/internal/enterprise_search/indices', { + query: { page: 1, return_hidden_indices: false, search_query: null, size: 20 }, + }); + expect(result).resolves.toEqual({ isInitialRequest: true, result: 'result' }); + }); + it('sets initialRequest to false if page is not the first page', async () => { + const promise = Promise.resolve({ result: 'result' }); + http.get.mockReturnValue(promise); + const result = fetchIndices({ + meta: { page: { current: 2, size: 20, total_pages: 10, total_results: 10 } }, + returnHiddenIndices: false, + }); + await nextTick(); + expect(http.get).toHaveBeenCalledWith('/internal/enterprise_search/indices', { + query: { page: 2, return_hidden_indices: false, search_query: null, size: 20 }, + }); + expect(result).resolves.toEqual({ isInitialRequest: false, result: 'result' }); + }); + it('sets initialRequest to false if searchQuery is not empty', async () => { + const promise = Promise.resolve({ result: 'result' }); + http.get.mockReturnValue(promise); + const result = fetchIndices({ + meta: { page: { current: 1, size: 20, total_pages: 10, total_results: 10 } }, + returnHiddenIndices: false, + searchQuery: 'a', + }); + await nextTick(); + expect(http.get).toHaveBeenCalledWith('/internal/enterprise_search/indices', { + query: { page: 1, return_hidden_indices: false, search_query: 'a', size: 20 }, + }); + expect(result).resolves.toEqual({ isInitialRequest: false, result: 'result' }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.ts new file mode 100644 index 0000000000000..a1ca3a9c3141f --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_indices_api_logic.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Meta } from '../../../../../common/types'; +import { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices'; + +import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; +import { HttpLogic } from '../../../shared/http'; + +export const fetchIndices = async ({ + meta, + returnHiddenIndices, + searchQuery, +}: { + meta: Meta; + returnHiddenIndices: boolean; + searchQuery?: string; +}) => { + const { http } = HttpLogic.values; + const route = '/internal/enterprise_search/indices'; + const query = { + page: meta.page.current, + return_hidden_indices: returnHiddenIndices, + search_query: searchQuery || null, + size: 20, + }; + const response = await http.get<{ indices: ElasticsearchIndexWithIngestion[]; meta: Meta }>( + route, + { + query, + } + ); + + // We need this to determine whether to show the empty state on the indices page + const isInitialRequest = meta.page.current === 1 && !searchQuery; + + return { ...response, isInitialRequest }; +}; + +export const FetchIndicesAPILogic = createApiLogic(['content', 'indices_api_logic'], fetchIndices); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/api_key/api_key.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/api_key/api_key.tsx index f24fc6234d0c8..1fc67699c9a6d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/api_key/api_key.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/api_key/api_key.tsx @@ -7,23 +7,36 @@ import React from 'react'; -import { EuiCodeBlock, EuiFormLabel, EuiSpacer } from '@elastic/eui'; +import { EuiCodeBlock, EuiFormLabel, EuiSpacer, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; interface ApiKeyProps { + actions?: React.ReactNode; apiKey: string; label?: string; } -export const ApiKey: React.FC<ApiKeyProps> = ({ apiKey, label }) => ( - <> - {label && ( - <> - <EuiFormLabel>{label}</EuiFormLabel> - <EuiSpacer size="xs" /> - </> - )} +export const ApiKey: React.FC<ApiKeyProps> = ({ apiKey, label, actions }) => { + const codeBlock = ( <EuiCodeBlock fontSize="m" paddingSize="m" color="dark" isCopyable> {apiKey} </EuiCodeBlock> - </> -); + ); + return ( + <> + {label && ( + <> + <EuiFormLabel>{label}</EuiFormLabel> + <EuiSpacer size="xs" /> + </> + )} + {actions ? ( + <EuiFlexGroup alignItems="center"> + <EuiFlexItem>{codeBlock}</EuiFlexItem> + <EuiFlexItem grow={false}>{actions}</EuiFlexItem> + </EuiFlexGroup> + ) : ( + codeBlock + )} + </> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail.tsx index c4303be878e9c..b4c913db555ec 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail.tsx @@ -22,7 +22,8 @@ import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; import { CrawlCustomSettingsFlyout } from '../search_index/crawler/crawl_custom_settings_flyout/crawl_custom_settings_flyout'; import { CrawlerStatusIndicator } from '../search_index/crawler/crawler_status_indicator/crawler_status_indicator'; import { CrawlerStatusBanner } from '../search_index/crawler/domain_management/crawler_status_banner'; -import { getDeleteDomainConfirmationMessage } from '../search_index/crawler/utils'; +import { DeleteDomainModal } from '../search_index/crawler/domain_management/delete_domain_modal'; +import { DeleteDomainModalLogic } from '../search_index/crawler/domain_management/delete_domain_modal_logic'; import { IndexNameLogic } from '../search_index/index_name_logic'; import { SearchIndexTabId } from '../search_index/search_index'; import { baseBreadcrumbs } from '../search_indices'; @@ -40,8 +41,9 @@ export const CrawlerDomainDetail: React.FC = () => { const { indexName } = useValues(IndexNameLogic); const crawlerDomainDetailLogic = CrawlerDomainDetailLogic({ domainId }); - const { deleteLoading, domain, getLoading } = useValues(crawlerDomainDetailLogic); - const { fetchDomainData, deleteDomain } = useActions(crawlerDomainDetailLogic); + const { domain, getLoading } = useValues(crawlerDomainDetailLogic); + const { fetchDomainData } = useActions(crawlerDomainDetailLogic); + const { showModal } = useActions(DeleteDomainModalLogic); useEffect(() => { fetchDomainData(domainId); @@ -58,11 +60,11 @@ export const CrawlerDomainDetail: React.FC = () => { rightSideItems: [ <CrawlerStatusIndicator />, <EuiButton - isLoading={getLoading || deleteLoading} + isLoading={getLoading} color="danger" onClick={() => { - if (window.confirm(getDeleteDomainConfirmationMessage(domainUrl))) { - deleteDomain(); + if (domain) { + showModal(domain); } }} > @@ -110,6 +112,7 @@ export const CrawlerDomainDetail: React.FC = () => { <DeduplicationPanel /> </> )} + <DeleteDomainModal /> <CrawlCustomSettingsFlyout /> </EnterpriseSearchContentPageTemplate> ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts index 5beb863ce579d..96e2c4a3411d3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts @@ -9,12 +9,19 @@ import { kea, MakeLogicType } from 'kea'; import { i18n } from '@kbn/i18n'; +import { HttpError, Status } from '../../../../../common/types/api'; + import { generateEncodedPath } from '../../../shared/encode_path_params'; import { flashAPIErrors, flashSuccessToast } from '../../../shared/flash_messages'; import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; +import { + DeleteCrawlerDomainApiLogic, + DeleteCrawlerDomainArgs, + DeleteCrawlerDomainResponse, +} from '../../api/crawler/delete_crawler_domain_api_logic'; import { CrawlerDomain, CrawlerDomainFromServer, @@ -33,14 +40,17 @@ export interface CrawlerDomainDetailProps { export interface CrawlerDomainDetailValues { deleteLoading: boolean; + deleteStatus: Status; domain: CrawlerDomain | null; domainId: string; getLoading: boolean; } interface CrawlerDomainDetailActions { + deleteApiError(error: HttpError): HttpError; + deleteApiSuccess(response: DeleteCrawlerDomainResponse): DeleteCrawlerDomainResponse; deleteDomain(): void; - deleteDomainComplete(): void; + deleteMakeRequest(args: DeleteCrawlerDomainArgs): DeleteCrawlerDomainArgs; fetchDomainData(domainId: string): { domainId: string }; receiveDomainData(domain: CrawlerDomain): { domain: CrawlerDomain }; submitDeduplicationUpdate(payload: { enabled?: boolean; fields?: string[] }): { @@ -56,6 +66,17 @@ export const CrawlerDomainDetailLogic = kea< MakeLogicType<CrawlerDomainDetailValues, CrawlerDomainDetailActions> >({ path: ['enterprise_search', 'crawler', 'crawler_domain_detail_logic'], + connect: { + actions: [ + DeleteCrawlerDomainApiLogic, + [ + 'apiError as deleteApiError', + 'apiSuccess as deleteApiSuccess', + 'makeRequest as deleteMakeRequest', + ], + ], + values: [DeleteCrawlerDomainApiLogic, ['status as deleteStatus']], + }, actions: { deleteDomain: () => true, deleteDomainComplete: () => true, @@ -67,13 +88,6 @@ export const CrawlerDomainDetailLogic = kea< updateSitemaps: (sitemaps) => ({ sitemaps }), }, reducers: ({ props }) => ({ - deleteLoading: [ - false, - { - deleteDomain: () => true, - deleteDomainComplete: () => false, - }, - ], domain: [ null, { @@ -94,34 +108,44 @@ export const CrawlerDomainDetailLogic = kea< }, ], }), + selectors: ({ selectors }) => ({ + deleteLoading: [ + () => [selectors.deleteStatus], + (deleteStatus: Status) => deleteStatus === Status.LOADING, + ], + }), listeners: ({ actions, values }) => ({ deleteDomain: async () => { - const { http } = HttpLogic.values; - const { domain, domainId } = values; + const { domain } = values; const { indexName } = IndexNameLogic.values; - try { - await http.delete( - `/internal/enterprise_search/indices/${indexName}/crawler/domains/${domainId}` - ); - flashSuccessToast( - i18n.translate('xpack.enterpriseSearch.crawler.action.deleteDomain.successMessage', { - defaultMessage: "Domain '{domainUrl}' was deleted", - values: { - domainUrl: domain?.url, - }, - }) - ); - KibanaLogic.values.navigateToUrl( - generateEncodedPath(SEARCH_INDEX_TAB_PATH, { - indexName, - tabId: SearchIndexTabId.DOMAIN_MANAGEMENT, - }) - ); - } catch (e) { - flashAPIErrors(e); + if (domain) { + actions.deleteMakeRequest({ + domain, + indexName, + }); } - actions.deleteDomainComplete(); }, + deleteApiSuccess: ({ domain }) => { + const { indexName } = IndexNameLogic.values; + flashSuccessToast( + i18n.translate('xpack.enterpriseSearch.crawler.action.deleteDomain.successMessage', { + defaultMessage: "Domain '{domainUrl}' was deleted", + values: { + domainUrl: domain?.url, + }, + }) + ); + KibanaLogic.values.navigateToUrl( + generateEncodedPath(SEARCH_INDEX_TAB_PATH, { + indexName, + tabId: SearchIndexTabId.DOMAIN_MANAGEMENT, + }) + ); + }, + deleteApiError: (error) => { + flashAPIErrors(error); + }, + fetchDomainData: async ({ domainId }) => { const { http } = HttpLogic.values; const { indexName } = IndexNameLogic.values; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/button_group.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/button_group.tsx index 4c9d9c081f82a..1bcaa80deef6d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/button_group.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/button_group.tsx @@ -69,8 +69,8 @@ export const ButtonGroup: React.FC<Props> = ({ onChange, options, selected }) => <EuiTitle size="xs"> <h4>{option.label}</h4> </EuiTitle> - <EuiSpacer size="xs" /> - <EuiText size="xs" color="subdued"> + <EuiSpacer size="s" /> + <EuiText size="s" color="subdued"> <p>{option.description}</p> </EuiText> </EuiFlexItem> @@ -88,7 +88,7 @@ export const ButtonGroup: React.FC<Props> = ({ onChange, options, selected }) => </EuiFlexGroup> </EuiSplitPanel.Inner> <EuiSplitPanel.Inner color={isSelected ? 'success' : 'subdued'} paddingSize="s"> - <EuiText size="xs" color={isSelected ? 'success' : 'subdued'}> + <EuiText size="s" color={isSelected ? 'success' : 'subdued'}> <p> <strong>{option.footer}</strong> </p> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api.tsx index a5b2cfdb74a3b..22dc277fbe8a5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api.tsx @@ -27,29 +27,12 @@ export const MethodApi: React.FC = () => { defaultMessage="Index using the API" /> } - description={ - <EuiText size="s"> - <FormattedMessage - id="xpack.enterpriseSearch.content.newIndex.methodApi.description" - defaultMessage="Provide a name and optionally select a language analyzer for your documents. An Elasticsearch index will be created. In the next step, well display API instructions." - /> - </EuiText> - } - docsUrl="#" type="api" onSubmit={() => null} > <EuiSteps steps={[ { - title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', - { - defaultMessage: 'Create an Elasticsearch index', - } - ), - - titleSize: 'xs', children: ( <EuiText size="s"> <p> @@ -57,22 +40,23 @@ export const MethodApi: React.FC = () => { 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content', { defaultMessage: - 'Provide a unique name for your index and select an optional language analyzer.', + 'Provide a unique name for your index and select an optional index language.', } )} </p> </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', + 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', { - defaultMessage: 'Configure ingestion settings', + defaultMessage: 'Create an Elasticsearch index', } ), + titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -87,15 +71,15 @@ export const MethodApi: React.FC = () => { </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', { - defaultMessage: 'Build a search experience', + defaultMessage: 'Configure ingestion settings', } ), titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -110,6 +94,13 @@ export const MethodApi: React.FC = () => { </EuiText> ), status: 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + { + defaultMessage: 'Build a search experience', + } + ), + titleSize: 'xs', }, ]} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector.tsx index b15a7f03a7193..5633e4730f3b9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector.tsx @@ -31,15 +31,9 @@ export const MethodConnector: React.FC = () => { AddConnectorPackageLogic.mount(); return ( <NewSearchIndexTemplate - title="Build a custom connector package" - description={i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.methodConnector.description', - { - defaultMessage: - 'Ingest data from content sources like GitHub, Google Drive or SharePoint You can also build your own connectors using Custom API sources.', - } - )} - docsUrl="#" + title={i18n.translate('xpack.enterpriseSearch.content.newIndex.steps.buildConnector.title', { + defaultMessage: 'Build a connector', + })} type="connector" onSubmit={(name) => makeRequest({ indexName: name })} formDisabled={status === Status.LOADING} @@ -48,14 +42,6 @@ export const MethodConnector: React.FC = () => { <EuiSteps steps={[ { - title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', - { - defaultMessage: 'Create an Elasticsearch index', - } - ), - - titleSize: 'xs', children: ( <EuiText size="s"> <p> @@ -63,22 +49,23 @@ export const MethodConnector: React.FC = () => { 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content', { defaultMessage: - 'Provide a unique name for your index and select an optional language analyzer.', + 'Provide a unique name for your index and select an optional index language.', } )} </p> </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', + 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', { - defaultMessage: 'Configure ingestion settings', + defaultMessage: 'Create an Elasticsearch index', } ), + titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -86,22 +73,22 @@ export const MethodConnector: React.FC = () => { 'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.configureIngestion.content', { defaultMessage: - 'Clone the connector package repository on GitHub and build a custom connector that suits your needs.', + 'TODO TODO TODO Clone the connector package repository on GitHub and build a custom connector that suits your needs.', } )} </p> </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', { - defaultMessage: 'Build a search experience', + defaultMessage: 'Configure ingestion settings', } ), titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -116,6 +103,13 @@ export const MethodConnector: React.FC = () => { </EuiText> ), status: 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + { + defaultMessage: 'Build a search experience', + } + ), + titleSize: 'xs', }, ]} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx index b1433d2d7a172..638f249ee65ad 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx @@ -32,15 +32,12 @@ export const MethodCrawler: React.FC = () => { return ( <NewSearchIndexTemplate - title="Crawler" - description={i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.methodCrawler.description', + title={i18n.translate( + 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.crawler.title', { - defaultMessage: - 'The Elastic Web Crawler allows you to easily and automatically index content from public-facing websites and knowledge bases.', + defaultMessage: 'Index using the web crawler', } )} - docsUrl="#" type="crawler" onSubmit={(indexName, language) => makeRequest({ indexName, language })} formDisabled={status === Status.LOADING} @@ -49,14 +46,6 @@ export const MethodCrawler: React.FC = () => { <EuiSteps steps={[ { - title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', - { - defaultMessage: 'Create an Elasticsearch index', - } - ), - - titleSize: 'xs', children: ( <EuiText size="s"> <p> @@ -64,22 +53,23 @@ export const MethodCrawler: React.FC = () => { 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content', { defaultMessage: - 'Provide a unique name for your index and select an optional language analyzer.', + 'Provide a unique name for your index and select an optional index language.', } )} </p> </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', + 'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', { - defaultMessage: 'Configure ingestion settings', + defaultMessage: 'Create an Elasticsearch index', } ), + titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -87,22 +77,22 @@ export const MethodCrawler: React.FC = () => { 'xpack.enterpriseSearch.content.newIndex.methodCrawler.steps.configureIngestion.content', { defaultMessage: - 'Enter the domains you’d like to crawl, configure crawl rules and entry points, set up a crawl schedule and let Enterprise Search do the rest.', + 'Configure the domains you’d like to crawl, and when ready trigger your first crawl. Let Enterprise Search do the rest.', } )} </p> </EuiText> ), status: 'incomplete', - }, - { title: i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + 'xpack.enterpriseSearch.content.newIndex.steps.configureIngestion.title', { - defaultMessage: 'Build a search experience', + defaultMessage: 'Configure ingestion settings', } ), titleSize: 'xs', + }, + { children: ( <EuiText size="s"> <p> @@ -117,6 +107,13 @@ export const MethodCrawler: React.FC = () => { </EuiText> ), status: 'incomplete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title', + { + defaultMessage: 'Build a search experience', + } + ), + titleSize: 'xs', }, ]} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_es.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_es.tsx deleted file mode 100644 index d002b57b7e29b..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_es.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/** - * TODO: - * - Need to add documentation URLs (search for `#`s) - * - Need get dynamic Enterprise Search API URL - * - Port over existing elasticsearch view from App Search to the panel below. - * - Replace `onNameChange` logic with that from App Search - * - Need to implement the logic for the attaching search engines functionality - */ - -import React from 'react'; - -import { EuiPanel, EuiTitle } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -import { NewSearchIndexTemplate } from './new_search_index_template'; - -export const MethodEs: React.FC = () => { - const onNameChange = (value: string) => value; - - return ( - <NewSearchIndexTemplate - title="Elasticsearch" - description={i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.methodElasticsearch.description', - { - defaultMessage: - 'Serve results from an existing Elasticsearch index alongside your other content. Use Enterprise Search features like curations and relevance tuning.', - } - )} - docsUrl="#" - type="elasticsearch" - onNameChange={(value: string) => onNameChange(value)} - onSubmit={() => null} - > - <EuiPanel - color="subdued" - style={{ - minHeight: '30rem', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - }} - > - <EuiTitle size="s"> - <h4>Place the Elasticsearch index selectable list here... </h4> - </EuiTitle> - </EuiPanel> - </NewSearchIndexTemplate> - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_json.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_json.tsx deleted file mode 100644 index 25888c4e6a228..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_json.tsx +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/** - * TODO: - * - Need to add documentation URLs (search for `#`s) - * - Port over existing JSON view from App Search to the panel below. - * - Replace `onNameChange` logic with that from App Search - */ - -import React from 'react'; - -import { EuiPanel, EuiTitle } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -import { NewSearchIndexTemplate } from './new_search_index_template'; - -export const MethodJson: React.FC = () => { - const onNameChange = (value: string) => value; - - return ( - <NewSearchIndexTemplate - title="json" - description={i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.methodJson.description', - { - defaultMessage: 'Paste or upload JSON data.', - } - )} - docsUrl="#" - type="json" - onNameChange={(value: string) => onNameChange(value)} - onSubmit={() => null} - > - <EuiPanel - color="subdued" - style={{ - minHeight: '30rem', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - }} - > - <EuiTitle size="s"> - <h4>Place the JSON tabs here...</h4> - </EuiTitle> - </EuiPanel> - </NewSearchIndexTemplate> - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx index 01edd11940c8a..fc179343330e4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx @@ -33,67 +33,68 @@ import { SearchIndexEmptyState } from './empty_state'; import { MethodApi } from './method_api'; import { MethodConnector } from './method_connector'; import { MethodCrawler } from './method_crawler/method_crawler'; -import { MethodEs } from './method_es'; -import { MethodJson } from './method_json'; const METHOD_BUTTON_GROUP_OPTIONS: ButtonGroupOption[] = [ { - id: 'crawler', - icon: 'globe', - label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.crawler.label', { - defaultMessage: 'Use the web crawler', - }), description: i18n.translate( 'xpack.enterpriseSearch.content.newIndex.buttonGroup.crawler.description', { - defaultMessage: 'Index content from your websites', + defaultMessage: 'Discover, extract, index, and sync of all your website content', } ), footer: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.crawler.footer', { defaultMessage: 'No development required', }), + icon: 'globe', + id: 'crawler', + label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.crawler.label', { + defaultMessage: 'Use the web crawler', + }), }, { - id: 'api', - icon: 'visVega', - label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.api.label', { - defaultMessage: 'Use the API', - }), description: i18n.translate( 'xpack.enterpriseSearch.content.newIndex.buttonGroup.api.description', { - defaultMessage: 'Use a variety of client libraries to add documents to your search index', + defaultMessage: 'Add documents programmatically by connecting with the API', } ), footer: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.api.footer', { defaultMessage: 'Some development required', }), + icon: 'visVega', + id: 'api', + label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.api.label', { + defaultMessage: 'Use the API', + }), }, { - id: 'connector', - icon: 'package', - label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.connector.label', { - defaultMessage: 'Build a connector package', - }), + badge: ( + <EuiBadge iconType="beaker"> + <EuiText size="xs">Technical Preview</EuiText> + </EuiBadge> + ), description: i18n.translate( 'xpack.enterpriseSearch.content.newIndex.buttonGroup.connector.description', { - defaultMessage: 'Clone the connector package repo and build a custom connector', + defaultMessage: + 'Use the connector framework to quickly build connectors for custom data sources', } ), footer: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.connector.footer', { defaultMessage: 'Development required', }), - badge: ( - <EuiBadge iconType="beaker"> - <EuiText size="xs">Technical Preview</EuiText> - </EuiBadge> - ), + icon: 'package', + id: 'connector', + label: i18n.translate('xpack.enterpriseSearch.content.newIndex.buttonGroup.connector.label', { + defaultMessage: 'Build a connector', + }), }, ]; export const NewIndex: React.FC = () => { - const [selectedMethod, setSelectedMethod] = useState<ButtonGroupOption>(); + const [selectedMethod, setSelectedMethod] = useState<ButtonGroupOption>( + METHOD_BUTTON_GROUP_OPTIONS[0] + ); return ( <EnterpriseSearchContentPageTemplate @@ -114,21 +115,21 @@ export const NewIndex: React.FC = () => { <EuiFlexGroup> <EuiFlexItem grow={false} style={{ maxWidth: '24rem' }}> <EuiPanel hasShadow={false} paddingSize="m" grow={false} color="subdued"> - <EuiTitle size="xs"> + <EuiTitle size="s"> <h2> {i18n.translate('xpack.enterpriseSearch.content.newIndex.selectSearchIndex.title', { defaultMessage: 'Select an ingestion method', })} </h2> </EuiTitle> - <EuiSpacer size="xs" /> - <EuiText size="xs"> + <EuiSpacer size="s" /> + <EuiText size="s"> <p> {i18n.translate( 'xpack.enterpriseSearch.content.newIndex.selectSearchIndex.description', { defaultMessage: - 'Add your content to Enterprise Search by creating a search index.', + 'Create a search optimized Elasticsearch index by selecting an ingestion method for your use case.', } )} </p> @@ -146,9 +147,7 @@ export const NewIndex: React.FC = () => { <> {selectedMethod.id === 'crawler' && <MethodCrawler />} {selectedMethod.id === 'api' && <MethodApi />} - {selectedMethod.id === 'elasticsearch' && <MethodEs />} {selectedMethod.id === 'connector' && <MethodConnector />} - {selectedMethod.id === 'json' && <MethodJson />} </> ) : ( <SearchIndexEmptyState /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.test.tsx index 8274d6b7008f1..2626074285a77 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.test.tsx @@ -19,20 +19,18 @@ import { describe('NewSearchIndexTemplate', () => { const mockProps: NewSearchIndexTemplateProps = { - title: 'Index using the API', - description: 'Provide a name and optionally select a language analyzer.', - docsUrl: 'http://www.elastic.co/guide', onSubmit: jest.fn(), + title: 'Index using the API', type: 'api', }; beforeEach(() => { jest.clearAllMocks(); setMockValues({ - name: 'my-name', - rawName: 'MY$_RAW_$NAME', language: null, languageSelectValue: UNIVERSAL_LANGUAGE_VALUE, + name: 'my-name', + rawName: 'MY$_RAW_$NAME', }); setMockActions({ makeRequest: jest.fn(), setLanguageSelectValue: jest.fn() }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx index b5696f6a4535c..dc28aae0d3567 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx @@ -27,7 +27,6 @@ import { EuiPanel, EuiSelect, EuiSpacer, - EuiText, EuiTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -37,20 +36,17 @@ import { NewSearchIndexLogic } from './new_search_index_logic'; import { LanguageForOptimization } from './types'; export interface Props { - title: React.ReactNode; - description: React.ReactNode; - docsUrl: string; - type: string; - onNameChange?(name: string): void; - onSubmit(name: string, language: LanguageForOptimization): void; buttonLoading?: boolean; formDisabled?: boolean; + onNameChange?(name: string): void; + onSubmit(name: string, language: LanguageForOptimization): void; + title: React.ReactNode; + type: string; } export const NewSearchIndexTemplate: React.FC<Props> = ({ children, title, - description, onNameChange, onSubmit, formDisabled, @@ -85,19 +81,6 @@ export const NewSearchIndexTemplate: React.FC<Props> = ({ <EuiTitle size="s"> <h2>{title}</h2> </EuiTitle> - <EuiText size="s" color="subdued"> - <p> - {description} - <EuiLink target="_blank" href="#"> - {i18n.translate( - 'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMore.linkText', - { - defaultMessage: 'Learn more', - } - )} - </EuiLink> - </p> - </EuiText> </EuiFlexItem> <EuiFlexItem grow> <EuiFlexGroup> @@ -141,13 +124,13 @@ export const NewSearchIndexTemplate: React.FC<Props> = ({ label={i18n.translate( 'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputLabel', { - defaultMessage: 'Document language', + defaultMessage: 'Language analyzer', } )} helpText={i18n.translate( 'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputHelpText', { - defaultMessage: 'Analyzers can be changed later, but may require a reindex', + defaultMessage: 'Language can be changed later, but may require a reindex', } )} > diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.test.tsx new file mode 100644 index 0000000000000..50fbf06e65c60 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.test.tsx @@ -0,0 +1,97 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { setMockValues, setMockActions } from '../../../../../__mocks__/kea_logic'; +import '../../../../../shared/doc_links/__mocks__/doc_links.mock'; + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { EuiContextMenuItem, EuiContextMenuPanel } from '@elastic/eui'; + +import { docLinks } from '../../../../../shared/doc_links'; + +import { ClientLibrariesPopover } from './popover'; + +const librariesList = [ + { + href: docLinks.clientsJavaIntroduction, + + text: 'Java', + }, + { + href: docLinks.clientsJsIntro, + + text: 'Javascript / Node', + }, + { + href: docLinks.clientsRubyOverview, + + text: 'Ruby', + }, + { + href: docLinks.clientsGoIndex, + + text: 'Go', + }, + { + href: docLinks.clientsNetIntroduction, + + text: '.NET', + }, + { + href: docLinks.clientsPhpGuide, + text: 'PHP', + }, + { + href: docLinks.clientsPerlGuide, + text: 'Perl', + }, + { + href: docLinks.clientsPythonOverview, + text: 'Python', + }, + { + href: docLinks.clientsRustOverview, + text: 'Rust', + }, +]; + +const mockValues = { + isClientsPopoverOpen: false, +}; + +const mockActions = { toggleClientsPopover: jest.fn() }; + +describe('ClientLibrariesPopover', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should render all urls correctly', () => { + setMockValues({ + ...mockValues, + indices: [], + }); + setMockActions(mockActions); + + const wrapper = shallow(<ClientLibrariesPopover />); + const contextMenuItems = + wrapper + .find(EuiContextMenuPanel) + .prop('items') + ?.map((item) => shallow(<div>{item}</div>)) || []; + + expect(contextMenuItems.length > 0).toBeTruthy(); + + contextMenuItems.forEach((item, index) => { + const menuItem = item.find(EuiContextMenuItem); + expect(menuItem.prop('href')).toEqual(librariesList[index].href); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.tsx new file mode 100644 index 0000000000000..b89f489952ab8 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/client_libraries_popover/popover.tsx @@ -0,0 +1,131 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; + +import { useActions, useValues } from 'kea'; + +import { + EuiPopover, + EuiButton, + EuiContextMenuPanel, + EuiContextMenuItem, + EuiText, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { docLinks } from '../../../../../shared/doc_links'; + +import { OverviewLogic } from '../../overview.logic'; + +const libraries = [ + { + href: docLinks.clientsJavaIntroduction, + key: 'java', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.java', + { defaultMessage: 'Java' } + ), + }, + { + href: docLinks.clientsJsIntro, + key: 'javascript', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.javascript', + { defaultMessage: 'Javascript / Node' } + ), + }, + { + href: docLinks.clientsRubyOverview, + key: 'ruby', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.ruby', + { defaultMessage: 'Ruby' } + ), + }, + { + href: docLinks.clientsGoIndex, + key: 'go', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.go', + { defaultMessage: 'Go' } + ), + }, + { + href: docLinks.clientsNetIntroduction, + key: 'dotnet', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.dotnet', + { defaultMessage: '.NET' } + ), + }, + { + href: docLinks.clientsPhpGuide, + key: 'php', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.php', + { defaultMessage: 'PHP' } + ), + }, + { + href: docLinks.clientsPerlGuide, + key: 'perl', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.perl', + { defaultMessage: 'Perl' } + ), + }, + { + href: docLinks.clientsPythonOverview, + key: 'python', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.python', + { defaultMessage: 'Python' } + ), + }, + { + href: docLinks.clientsRustOverview, + key: 'rust', + text: i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.clientLibraries.rust', + { defaultMessage: 'Rust' } + ), + }, +]; + +export const ClientLibrariesPopover: React.FC = () => { + const { isClientsPopoverOpen } = useValues(OverviewLogic); + const { toggleClientsPopover } = useActions(OverviewLogic); + + return ( + <EuiPopover + isOpen={isClientsPopoverOpen} + closePopover={toggleClientsPopover} + button={ + <EuiButton iconType="arrowDown" iconSide="right" onClick={toggleClientsPopover}> + {i18n.translate( + 'xpack.enterpriseSearch.content,overview.documentExample.clientLibraries.label', + { defaultMessage: 'Client Libraries' } + )} + </EuiButton> + } + > + <EuiContextMenuPanel + size="s" + items={libraries.map((item) => { + return ( + <EuiContextMenuItem key={item.key} href={item.href} target="_blank"> + <EuiText> + <p>{item.text}</p> + </EuiText> + </EuiContextMenuItem> + ); + })} + /> + </EuiPopover> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts new file mode 100644 index 0000000000000..596ec459bc992 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts @@ -0,0 +1,153 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LogicMounter, mockFlashMessageHelpers } from '../../../../../__mocks__/kea_logic'; + +import { HttpError, Status } from '../../../../../../../common/types/api'; +import { GenerateApiKeyLogic } from '../../../../api/generate_api_key/generate_api_key_logic'; + +import { GenerateApiKeyModalLogic } from './generate_api_key_modal.logic'; + +const DEFAULT_VALUES = { + apiKey: '', + data: undefined, + isLoading: false, + isSuccess: false, + keyName: '', + status: Status.IDLE, +}; + +describe('IndicesLogic', () => { + const { mount: apiLogicMount } = new LogicMounter(GenerateApiKeyLogic); + const { mount } = new LogicMounter(GenerateApiKeyModalLogic); + + beforeEach(() => { + jest.clearAllMocks(); + apiLogicMount(); + mount(); + }); + + it('has expected default values', () => { + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + }); + + describe('actions', () => { + describe('setKeyName', () => { + it('sets keyName value to the reducer', () => { + const keyName = 'test-key-name 8888*^7896&*^*&'; + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + GenerateApiKeyModalLogic.actions.setKeyName(keyName); + expect(GenerateApiKeyModalLogic.values).toEqual({ + ...DEFAULT_VALUES, + keyName, + }); + }); + }); + }); + + describe('reducers', () => { + describe('keyName', () => { + it('updates when setKeyName action is triggered', () => { + const keyName = 'test-key-name'; + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + GenerateApiKeyModalLogic.actions.setKeyName(keyName); + expect(GenerateApiKeyModalLogic.values).toEqual({ + ...DEFAULT_VALUES, + keyName, + }); + }); + }); + }); + + describe('listeners', () => { + it('calls clearFlashMessages on new makeRequest', () => { + GenerateApiKeyModalLogic.actions.makeRequest({ indexName: 'test', keyName: 'test' }); + expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1); + }); + + it('calls flashAPIErrors on apiError', () => { + GenerateApiKeyModalLogic.actions.apiError({} as HttpError); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({}); + }); + }); + + describe('selectors', () => { + describe('apiKey', () => { + it('updates when apiSuccess listener triggered', () => { + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + GenerateApiKeyLogic.actions.apiSuccess({ + apiKey: { + api_key: 'some-api-key-123123', + encoded: 'encoded-api-key123123==', + id: 'api_key_id', + name: 'test-key-123', + }, + }); + + expect(GenerateApiKeyModalLogic.values).toEqual({ + apiKey: 'encoded-api-key123123==', + data: { + apiKey: { + api_key: 'some-api-key-123123', + encoded: 'encoded-api-key123123==', + id: 'api_key_id', + name: 'test-key-123', + }, + }, + isLoading: false, + isSuccess: true, + keyName: '', + status: Status.SUCCESS, + }); + }); + }); + + describe('isLoading', () => { + it('should update with API status', () => { + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + GenerateApiKeyModalLogic.actions.makeRequest({ indexName: 'test', keyName: 'test' }); + + expect(GenerateApiKeyModalLogic.values).toEqual({ + ...DEFAULT_VALUES, + isLoading: true, + status: Status.LOADING, + }); + }); + }); + + describe('isSuccess', () => { + it('should update with API status', () => { + expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES); + GenerateApiKeyLogic.actions.apiSuccess({ + apiKey: { + api_key: 'some-api-key-123123', + encoded: 'encoded-api-key123123==', + id: 'api_key_id', + name: 'test-key-123', + }, + }); + + expect(GenerateApiKeyModalLogic.values).toEqual({ + apiKey: 'encoded-api-key123123==', + data: { + apiKey: { + api_key: 'some-api-key-123123', + encoded: 'encoded-api-key123123==', + id: 'api_key_id', + name: 'test-key-123', + }, + }, + isLoading: false, + isSuccess: true, + keyName: '', + status: Status.SUCCESS, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts new file mode 100644 index 0000000000000..654a984a171ca --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +import { HttpError, Status } from '../../../../../../../common/types/api'; + +import { flashAPIErrors, clearFlashMessages } from '../../../../../shared/flash_messages'; + +import { GenerateApiKeyLogic } from '../../../../api/generate_api_key/generate_api_key_logic'; + +interface GenerateApiKeyModalActions { + apiError(error: HttpError): HttpError; + makeRequest: typeof GenerateApiKeyLogic.actions.makeRequest; + setKeyName(keyName: string): { keyName: string }; +} + +interface GenerateApiKeyModalValues { + apiKey: string; + data: typeof GenerateApiKeyLogic.values.data; + isLoading: boolean; + isSuccess: boolean; + keyName: string; + status: typeof GenerateApiKeyLogic.values.status; +} + +export const GenerateApiKeyModalLogic = kea< + MakeLogicType<GenerateApiKeyModalValues, GenerateApiKeyModalActions> +>({ + actions: { + setKeyName: (keyName) => ({ keyName }), + }, + connect: { + actions: [GenerateApiKeyLogic, ['makeRequest', 'apiError']], + values: [GenerateApiKeyLogic, ['data', 'status']], + }, + listeners: () => ({ + apiError: (e) => flashAPIErrors(e), + makeRequest: () => clearFlashMessages(), + }), + path: ['enterprise_search', 'search_index', 'generate_api_key_modal'], + reducers: () => ({ + keyName: [ + '', + { + setKeyName: (_, { keyName }) => keyName, + }, + ], + }), + selectors: ({ selectors }) => ({ + apiKey: [() => [selectors.data], (data) => data?.apiKey?.encoded || ''], + isLoading: [() => [selectors.status], (status) => status === Status.LOADING], + isSuccess: [() => [selectors.status], (status) => status === Status.SUCCESS], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.test.tsx new file mode 100644 index 0000000000000..325d52ab2d2fd --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.test.tsx @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { setMockValues, setMockActions } from '../../../../../__mocks__/kea_logic'; + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { EuiModal, EuiFieldText } from '@elastic/eui'; + +const mockActions = { makeRequest: jest.fn(), setKeyName: jest.fn() }; + +const mockValues = { apiKey: '', isLoading: false, isSuccess: false, keyName: '' }; + +import { ApiKey } from '../../../api_key/api_key'; + +import { GenerateApiKeyModal } from './modal'; + +const onCloseMock = jest.fn(); +describe('GenerateApiKeyModal', () => { + beforeEach(() => { + jest.clearAllMocks(); + setMockValues(mockValues); + setMockActions(mockActions); + }); + + it('renders the empty modal', () => { + const wrapper = shallow( + <GenerateApiKeyModal indexName="test-index-123" onClose={onCloseMock} /> + ); + expect(wrapper.find(EuiModal)).toHaveLength(1); + + wrapper.find(EuiModal).prop('onClose')(); + expect(onCloseMock).toHaveBeenCalled(); + }); + + describe('Modal content', () => { + it('renders API key name form', () => { + const wrapper = shallow( + <GenerateApiKeyModal indexName="test-index-123" onClose={onCloseMock} /> + ); + expect(wrapper.find(EuiFieldText)).toHaveLength(1); + expect(wrapper.find('[data-test-subj="generateApiKeyButton"]')).toHaveLength(1); + }); + + it('sets keyName name on form', () => { + const wrapper = shallow( + <GenerateApiKeyModal indexName="test-index-123" onClose={onCloseMock} /> + ); + const textField = wrapper.find(EuiFieldText); + expect(textField).toHaveLength(1); + textField.simulate('change', { currentTarget: { value: 'changeEvent-key-name' } }); + expect(mockActions.setKeyName).toHaveBeenCalledWith('changeEvent-key-name'); + }); + + it('should trigger api call from the form', () => { + setMockValues({ ...mockValues, indexName: 'test-123', keyName: ' with-spaces ' }); + const wrapper = shallow( + <GenerateApiKeyModal indexName="test-index-123" onClose={onCloseMock} /> + ); + expect(wrapper.find(EuiFieldText)).toHaveLength(1); + wrapper.find('[data-test-subj="generateApiKeyButton"]').simulate('click'); + + expect(mockActions.makeRequest).toHaveBeenCalledWith({ + indexName: 'test-index-123', + keyName: 'with-spaces', + }); + }); + it('renders created API key results', () => { + setMockValues({ + ...mockValues, + apiKey: 'apiKeyFromBackend123123==', + indexName: 'test-123', + isSuccess: true, + keyName: 'keyname', + }); + const wrapper = shallow( + <GenerateApiKeyModal indexName="test-index-123" onClose={onCloseMock} /> + ); + expect(wrapper.find(EuiFieldText)).toHaveLength(0); + expect(wrapper.find('[data-test-subj="generateApiKeyButton"]')).toHaveLength(0); + expect(wrapper.find(ApiKey)).toHaveLength(1); + expect(wrapper.find(ApiKey).prop('apiKey')).toEqual('apiKeyFromBackend123123=='); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx new file mode 100644 index 0000000000000..7ab10db5d9ccf --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx @@ -0,0 +1,158 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useValues, useActions } from 'kea'; + +import { + EuiModal, + EuiModalHeader, + EuiModalHeaderTitle, + EuiModalBody, + EuiModalFooter, + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiButton, + EuiButtonEmpty, + EuiButtonIcon, + EuiFieldText, + EuiFormRow, + EuiText, + EuiSpacer, + EuiLink, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { ApiKey } from '../../../api_key/api_key'; + +import { GenerateApiKeyModalLogic } from './generate_api_key_modal.logic'; + +interface GenerateApiKeyModalProps { + indexName: string; + onClose(): void; +} + +export const GenerateApiKeyModal: React.FC<GenerateApiKeyModalProps> = ({ indexName, onClose }) => { + const { keyName, apiKey, isLoading, isSuccess } = useValues(GenerateApiKeyModalLogic); + const { setKeyName, makeRequest } = useActions(GenerateApiKeyModalLogic); + + return ( + <EuiModal onClose={onClose}> + <EuiModalHeader> + <EuiModalHeaderTitle> + {i18n.translate('xpack.enterpriseSearch.content.overview.generateApiKeyModal.title', { + defaultMessage: 'Generate API Key', + })} + </EuiModalHeaderTitle> + </EuiModalHeader> + <EuiModalBody> + <> + <EuiText size="m"> + <p> + {i18n.translate('xpack.enterpriseSearch.content.overview.generateApiKeyModal.info', { + defaultMessage: + "Before you can start posting documents to your Elasticsearch index you'll need to create at least one API key.", + })} +   + <EuiLink href={/* TODO link to docs */ '#'} external> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore', + { defaultMessage: 'Learn more about API keys' } + )} + </EuiLink> + </p> + </EuiText> + <EuiSpacer /> + <EuiPanel hasShadow={false} color="primary"> + <EuiFlexGroup direction="column"> + <EuiFlexItem> + <EuiFlexGroup direction="row" alignItems="flexEnd"> + {!isSuccess ? ( + <> + <EuiFlexItem> + <EuiFormRow label="Name your API key" fullWidth> + <EuiFieldText + fullWidth + placeholder="Type a name for your API key" + onChange={(event) => setKeyName(event.currentTarget.value)} + isLoading={isLoading} + /> + </EuiFormRow> + </EuiFlexItem> + + <EuiFlexItem grow={false}> + <EuiButton + data-test-subj="generateApiKeyButton" + iconSide="left" + iconType="plusInCircle" + fill + onClick={() => { + makeRequest({ + indexName, + keyName: keyName.trim(), + }); + }} + disabled={keyName.trim().length <= 0} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.generateApiKeyModal.generateButton', + { + defaultMessage: 'Generate API key', + } + )} + </EuiButton> + </EuiFlexItem> + </> + ) : ( + <ApiKey + apiKey={apiKey} + label={keyName} + actions={ + <EuiButtonIcon + iconType="download" + href={encodeURI(`data:text/csv;charset=utf-8,${apiKey}`)} + download={`${keyName}.csv`} + /> + } + /> + )} + </EuiFlexGroup> + </EuiFlexItem> + <EuiFlexItem> + <EuiFlexGroup direction="row"> + <EuiFlexItem> + <EuiText size="s" color="#006bb8"> + <p> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.generateApiKeyModal.apiKeyWarning', + { + defaultMessage: + "Elastic does not store API keys. Once generated, you'll only be able to view the key one time. Make sure you save it somewhere secure. If you lose access to it you'll need to generate a new API key from this screen.", + } + )} + </p> + </EuiText> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + </EuiFlexGroup> + </EuiPanel> + </> + </EuiModalBody> + <EuiModalFooter> + <EuiButtonEmpty onClick={onClose}> + {i18n.translate('xpack.enterpriseSearch.content.overview.generateApiKeyModal.cancel', { + defaultMessage: 'Cancel', + })} + </EuiButtonEmpty> + </EuiModalFooter> + </EuiModal> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.logic.ts new file mode 100644 index 0000000000000..2e13e60006822 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.logic.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +interface HeaderActionsLogicValues { + isSearchEnginesPopoverOpen: boolean; +} + +interface HeaderActionsLogicActions { + toggleSearchEnginesPopover: void; +} + +export const HeaderActionsLogic = kea< + MakeLogicType<HeaderActionsLogicValues, HeaderActionsLogicActions> +>({ + actions: { + toggleSearchEnginesPopover: true, + }, + path: ['enterprise_search', 'search_index', 'header'], + reducers: () => ({ + isSearchEnginesPopoverOpen: [ + false, + { + toggleSearchEnginesPopover: (state) => !state, + }, + ], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx new file mode 100644 index 0000000000000..a03f2736a8584 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useActions, useValues } from 'kea'; + +import { + EuiButton, + EuiPopover, + EuiContextMenuPanel, + EuiContextMenuItem, + EuiText, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { APP_SEARCH_PLUGIN } from '../../../../../../../common/constants'; +import { ENGINE_CREATION_PATH } from '../../../../../app_search/routes'; +import { KibanaLogic } from '../../../../../shared/kibana'; + +import { HeaderActionsLogic } from './header_actions.logic'; + +const SearchEnginesPopover: React.FC = () => { + const { isSearchEnginesPopoverOpen } = useValues(HeaderActionsLogic); + const { toggleSearchEnginesPopover } = useActions(HeaderActionsLogic); + + return ( + <EuiPopover + isOpen={isSearchEnginesPopoverOpen} + closePopover={toggleSearchEnginesPopover} + button={ + <EuiButton iconSide="right" iconType="arrowDown" onClick={toggleSearchEnginesPopover}> + {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.label', { + defaultMessage: 'Search Engines', + })} + </EuiButton> + } + > + <EuiContextMenuPanel + size="s" + items={[ + <EuiContextMenuItem + icon="eye" + onClick={() => { + KibanaLogic.values.navigateToUrl(APP_SEARCH_PLUGIN.URL, { + shouldNotCreateHref: true, + }); + }} + > + <EuiText> + <p> + {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.viewEngines', { + defaultMessage: 'View App Search engines', + })} + </p> + </EuiText> + </EuiContextMenuItem>, + <EuiContextMenuItem + icon="plusInCircle" + onClick={() => { + KibanaLogic.values.navigateToUrl(APP_SEARCH_PLUGIN.URL + ENGINE_CREATION_PATH, { + shouldNotCreateHref: true, + }); + }} + > + <EuiText> + <p> + {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.createEngine', { + defaultMessage: 'Create a new App Search engine', + })} + </p> + </EuiText> + </EuiContextMenuItem>, + ]} + /> + </EuiPopover> + ); +}; + +export const headerActions = [<SearchEnginesPopover />]; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout.tsx new file mode 100644 index 0000000000000..94f33e5ca383d --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout.tsx @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useActions } from 'kea'; + +import { + EuiButton, + EuiLink, + EuiText, + EuiCallOut, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { IndexCreatedCalloutLogic } from './callout_logic'; + +interface IndexCreatedCalloutProps { + indexName: string; +} + +export const IndexCreatedCallout: React.FC<IndexCreatedCalloutProps> = ({ indexName }) => { + const { dismissIndexCreatedCallout } = useActions(IndexCreatedCalloutLogic); + return ( + <EuiCallOut + color="success" + iconType="check" + title={i18n.translate('xpack.enterpriseSearch.content.index.indexCreatedCallout.title', { + defaultMessage: 'Elasticsearch index created successfully', + })} + > + <EuiText size="m"> + {i18n.translate('xpack.enterpriseSearch.content.index.indexCreatedCallout.info', { + defaultMessage: + 'You can use App Search engines to build a search experience for your new Elasticsearch index.', + })} + <EuiLink external href={/* TODO */ '#'}> + {i18n.translate('xpack.enterpriseSearch.content.index.readDocumentation.link', { + defaultMessage: 'Read the documentation', + })} + </EuiLink> + </EuiText> + <EuiSpacer /> + <EuiFlexGroup> + <EuiFlexItem grow={false}> + <EuiButton + fill + color="success" + onClick={() => { + // TODO bind it to AppSearch + // eslint-disable-next-line no-console + console.log(indexName); + }} + > + {i18n.translate('xpack.enterpriseSearch.content.index.createAppSearchEngine.button', { + defaultMessage: 'Create an App Search engine', + })} + </EuiButton> + </EuiFlexItem> + <EuiFlexItem grow={false}> + <EuiButton color="success" iconType="cross" onClick={dismissIndexCreatedCallout}> + {i18n.translate('xpack.enterpriseSearch.content.index.dismiss.button', { + defaultMessage: 'Dismiss', + })} + </EuiButton> + </EuiFlexItem> + </EuiFlexGroup> + </EuiCallOut> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts new file mode 100644 index 0000000000000..d8421137a859d --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/index_created_callout/callout_logic.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +interface IndexCreatedCalloutLogicValues { + isCalloutVisible: boolean; +} + +interface IndexCreatedCalloutLogicActions { + dismissIndexCreatedCallout: void; + showIndexCreatedCallout: void; +} + +export const IndexCreatedCalloutLogic = kea< + MakeLogicType<IndexCreatedCalloutLogicValues, IndexCreatedCalloutLogicActions> +>({ + actions: { + dismissIndexCreatedCallout: true, + showIndexCreatedCallout: true, + }, + path: ['enterprise_search', 'search_index', 'index_created_callout'], + reducers: () => ({ + isCalloutVisible: [ + false, + { + dismissIndexCreatedCallout: () => false, + showIndexCreatedCallout: () => true, + }, + ], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx new file mode 100644 index 0000000000000..b4b7e9bb038de --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/manage_api_keys_popover/popover.tsx @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useActions, useValues } from 'kea'; + +import { + EuiPopover, + EuiButton, + EuiContextMenuPanel, + EuiContextMenuItem, + EuiText, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { KibanaLogic } from '../../../../../shared/kibana'; + +import { OverviewLogic } from '../../overview.logic'; + +export const ManageKeysPopover: React.FC = () => { + const { isManageKeysPopoverOpen } = useValues(OverviewLogic); + const { toggleManageApiKeyPopover, openGenerateModal } = useActions(OverviewLogic); + + return ( + <EuiPopover + isOpen={isManageKeysPopoverOpen} + closePopover={toggleManageApiKeyPopover} + button={ + <EuiButton fill iconType="arrowDown" iconSide="right" onClick={toggleManageApiKeyPopover}> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.generateApiKeyButton.label', + { defaultMessage: 'Manage API keys' } + )} + </EuiButton> + } + > + <EuiContextMenuPanel + size="s" + items={[ + <EuiContextMenuItem + icon="eye" + onClick={() => + KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', { + shouldNotCreateHref: true, + }) + } + > + <EuiText> + <p> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.viewAll', + { defaultMessage: 'View all API keys' } + )} + </p> + </EuiText> + </EuiContextMenuItem>, + <EuiContextMenuItem icon="plusInCircle" onClick={openGenerateModal}> + <EuiText> + <p> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.createNew', + { defaultMessage: 'Create a new API key' } + )} + </p> + </EuiText> + </EuiContextMenuItem>, + ]} + /> + </EuiPopover> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.test.ts index 0b1eceb379282..2327c1c394cee 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.test.ts @@ -32,8 +32,8 @@ describe('AutomaticCrawlSchedulerLogic', () => { expect(AutomaticCrawlSchedulerLogic.values).toEqual({ crawlAutomatically: false, - crawlFrequency: 7, - crawlUnit: CrawlUnits.days, + crawlFrequency: 24, + crawlUnit: CrawlUnits.hours, isSubmitting: false, }); }); @@ -51,8 +51,8 @@ describe('AutomaticCrawlSchedulerLogic', () => { expect(AutomaticCrawlSchedulerLogic.values).toMatchObject({ crawlAutomatically: false, - crawlFrequency: 7, - crawlUnit: CrawlUnits.days, + crawlFrequency: 24, + crawlUnit: CrawlUnits.hours, }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.ts index 736027540dc37..51452dbbd581a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/automatic_crawl_scheduler/automatic_crawl_scheduler_logic.ts @@ -22,8 +22,8 @@ export interface AutomaticCrawlSchedulerLogicValues { } const DEFAULT_VALUES: Pick<AutomaticCrawlSchedulerLogicValues, 'crawlFrequency' | 'crawlUnit'> = { - crawlFrequency: 7, - crawlUnit: CrawlUnits.days, + crawlFrequency: 24, + crawlUnit: CrawlUnits.hours, }; export interface AutomaticCrawlSchedulerLogicActions { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal.tsx new file mode 100644 index 0000000000000..76a736277a002 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal.tsx @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useActions, useValues } from 'kea'; + +import { + EuiButton, + EuiButtonEmpty, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + EuiText, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { CANCEL_BUTTON_LABEL } from '../../../../../shared/constants'; + +import { DeleteCrawlerDomainApiLogic } from '../../../../api/crawler/delete_crawler_domain_api_logic'; + +import { DeleteDomainModalLogic } from './delete_domain_modal_logic'; + +export const DeleteDomainModal: React.FC = () => { + DeleteCrawlerDomainApiLogic.mount(); + const { deleteDomain, hideModal } = useActions(DeleteDomainModalLogic); + const { domain, isLoading, isHidden } = useValues(DeleteDomainModalLogic); + + if (isHidden) { + return null; + } + + return ( + <EuiModal + onClose={hideModal} + aria-label={i18n.translate('xpack.enterpriseSearch.crawler.deleteDomainModal.title', { + defaultMessage: 'Delete domain', + })} + > + <EuiModalHeader> + <EuiModalHeaderTitle> + {i18n.translate('xpack.enterpriseSearch.crawler.deleteDomainModal.title', { + defaultMessage: 'Delete domain', + })} + </EuiModalHeaderTitle> + </EuiModalHeader> + <EuiModalBody> + <EuiText> + <FormattedMessage + id="xpack.enterpriseSearch.crawler.deleteDomainModal.description" + defaultMessage="Remove the domain {domainUrl} from your crawler. This will also delete all entry points and crawl rules you have set up. Any documents related to this domain will be removed on the next crawl. {thisCannotBeUndoneMessage}" + values={{ + domainUrl: <strong>{domain?.url}</strong>, + thisCannotBeUndoneMessage: ( + <strong> + {i18n.translate( + 'xpack.enterpriseSearch.crawler.deleteDomainModal.thisCannotBeUndoneMessage', + { + defaultMessage: 'This cannot be undone.', + } + )} + </strong> + ), + }} + /> + </EuiText> + </EuiModalBody> + <EuiModalFooter> + <EuiButtonEmpty onClick={hideModal}>{CANCEL_BUTTON_LABEL}</EuiButtonEmpty> + <EuiButton onClick={deleteDomain} isLoading={isLoading} color="danger" fill> + {i18n.translate( + 'xpack.enterpriseSearch.crawler.deleteDomainModal.deleteDomainButtonLabel', + { + defaultMessage: 'Delete domain', + } + )} + </EuiButton> + </EuiModalFooter> + </EuiModal> + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts new file mode 100644 index 0000000000000..96294170d6b77 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts @@ -0,0 +1,105 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +import { i18n } from '@kbn/i18n'; + +import { Status } from '../../../../../../../common/types/api'; +import { Actions } from '../../../../../shared/api_logic/create_api_logic'; +import { flashAPIErrors, flashSuccessToast } from '../../../../../shared/flash_messages'; +import { + DeleteCrawlerDomainApiLogic, + DeleteCrawlerDomainResponse, + DeleteCrawlerDomainArgs, +} from '../../../../api/crawler/delete_crawler_domain_api_logic'; +import { CrawlerDomain } from '../../../../api/crawler/types'; +import { IndexNameLogic } from '../../index_name_logic'; +import { CrawlerLogic } from '../crawler_logic'; + +interface DeleteDomainModalValues { + domain: CrawlerDomain | null; + isHidden: boolean; + isLoading: boolean; + status: Status; +} + +type DeleteDomainModalActions = Pick< + Actions<DeleteCrawlerDomainArgs, DeleteCrawlerDomainResponse>, + 'apiError' | 'apiSuccess' | 'makeRequest' +> & { + deleteDomain(): void; + hideModal(): void; + showModal(domain: CrawlerDomain): { domain: CrawlerDomain }; +}; + +export const DeleteDomainModalLogic = kea< + MakeLogicType<DeleteDomainModalValues, DeleteDomainModalActions> +>({ + path: ['enterprise_search', 'delete_domain_modal'], + connect: { + actions: [DeleteCrawlerDomainApiLogic, ['apiError', 'apiSuccess']], + values: [DeleteCrawlerDomainApiLogic, ['status']], + }, + actions: { + deleteDomain: () => true, + hideModal: () => true, + showModal: (domain) => ({ domain }), + }, + reducers: { + domain: [ + null, + { + showModal: (_, { domain }) => domain, + }, + ], + isHidden: [ + true, + { + apiError: () => true, + apiSuccess: () => true, + hideModal: () => true, + showModal: () => false, + }, + ], + }, + listeners: ({ values }) => ({ + apiError: (error) => { + flashAPIErrors(error); + }, + apiSuccess: ({ domain }) => { + flashSuccessToast( + i18n.translate('xpack.enterpriseSearch.crawler.domainsTable.action.delete.successMessage', { + defaultMessage: "Successfully deleted domain '{domainUrl}'", + values: { + domainUrl: domain.url, + }, + }) + ); + CrawlerLogic.actions.fetchCrawlerData(); + }, + deleteDomain: () => { + const { domain } = values; + const { indexName } = IndexNameLogic.values; + if (domain) { + DeleteCrawlerDomainApiLogic.actions.makeRequest({ domain, indexName }); + } + }, + }), + selectors: ({ selectors }) => ({ + isLoading: [ + () => [selectors.status], + (status: DeleteDomainModalValues['status']) => status === Status.LOADING, + ], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management.tsx index 0f6211e07945a..3400dd19347d2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management.tsx @@ -18,6 +18,7 @@ import { GetCrawlerDomainsApiLogic } from '../../../../api/crawler/get_crawler_d import { AddDomainFlyout } from './add_domain/add_domain_flyout'; import { CrawlerStatusBanner } from './crawler_status_banner'; +import { DeleteDomainModal } from './delete_domain_modal'; import { DomainManagementLogic } from './domain_management_logic'; import { DomainsPanel } from './domains_panel'; import { EmptyStatePanel } from './empty_state_panel'; @@ -36,6 +37,7 @@ export const SearchIndexDomainManagement: React.FC = () => { <EuiSpacer /> <CrawlerStatusBanner /> {domains.length > 0 ? <DomainsPanel /> : <EmptyStatePanel />} + <DeleteDomainModal /> <AddDomainFlyout /> </> ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.test.tsx index b5d66f3078858..1edac9de49f53 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.test.tsx @@ -66,9 +66,10 @@ const values = { const actions = { // CrawlerDomainsLogic - deleteDomain: jest.fn(), fetchCrawlerDomainsData: jest.fn(), onPaginate: jest.fn(), + // DeleteDomainModalLogic + showModal: jest.fn(), }; describe('DomainsTable', () => { @@ -161,21 +162,9 @@ describe('DomainsTable', () => { describe('delete action', () => { it('clicking the action and confirming deletes the domain', () => { - jest.spyOn(global, 'confirm').mockReturnValueOnce(true); - - getDeleteAction().simulate('click'); - - expect(actions.deleteDomain).toHaveBeenCalledWith( - expect.objectContaining({ id: '1234' }) - ); - }); - - it('clicking the action and not confirming does not delete the engine', () => { - jest.spyOn(global, 'confirm').mockReturnValueOnce(false); - getDeleteAction().simulate('click'); - expect(actions.deleteDomain).not.toHaveBeenCalled(); + expect(actions.showModal).toHaveBeenCalled(); }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.tsx index 94c7c3ed32cf6..44a22f258b506 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_table.tsx @@ -26,14 +26,14 @@ import { CrawlerDomain } from '../../../../api/crawler/types'; import { SEARCH_INDEX_CRAWLER_DOMAIN_DETAIL_PATH } from '../../../../routes'; import { IndexNameLogic } from '../../index_name_logic'; -import { getDeleteDomainConfirmationMessage } from '../utils'; - +import { DeleteDomainModalLogic } from './delete_domain_modal_logic'; import { DomainManagementLogic } from './domain_management_logic'; export const DomainsTable: React.FC = () => { const { indexName } = useValues(IndexNameLogic); const { domains, meta, isLoading } = useValues(DomainManagementLogic); - const { deleteDomain, onPaginate } = useActions(DomainManagementLogic); + const { onPaginate } = useActions(DomainManagementLogic); + const { showModal } = useActions(DeleteDomainModalLogic); const columns: Array<EuiBasicTableColumn<CrawlerDomain>> = [ { @@ -106,9 +106,7 @@ export const DomainsTable: React.FC = () => { icon: 'trash', color: 'danger', onClick: (domain) => { - if (window.confirm(getDeleteDomainConfirmationMessage(domain.url))) { - deleteDomain(domain); - } + showModal(domain); }, }, ], diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx index c3148876608e6..be81b8a12131e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx @@ -7,60 +7,100 @@ import React from 'react'; +import { useActions, useValues } from 'kea'; + import { + EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiPanel, - EuiText, - EuiButtonIcon, - EuiButton, - EuiCodeBlock, + EuiSpacer, + EuiTitle, } from '@elastic/eui'; -import { getEnterpriseSearchUrl } from '../../../shared/enterprise_search_url'; +import { i18n } from '@kbn/i18n'; + +import { useCloudDetails } from '../../../shared/cloud_details/cloud_details'; import { DOCUMENTS_API_JSON_EXAMPLE } from '../new_index/constants'; +import { ClientLibrariesPopover } from './components/client_libraries_popover/popover'; +import { GenerateApiKeyModal } from './components/generate_api_key_modal/modal'; +import { ManageKeysPopover } from './components/manage_api_keys_popover/popover'; + +import { OverviewLogic } from './overview.logic'; + +const getDeploymentUrls = (cloudId: string) => { + const [host, kibanaHost, elasticHost] = window.atob(cloudId); + return { + elasticUrl: `https://${elasticHost}.${host}`, + kibanaUrl: `https://${kibanaHost}.${host}`, + }; +}; export const GenerateApiKeyPanel: React.FC = () => { - const searchIndexApiUrl = getEnterpriseSearchUrl('/api/ent/v1/search_indices/'); - const apiKey = 'Create an API Key'; + const { apiKey, isGenerateModalOpen, indexData } = useValues(OverviewLogic); + const { closeGenerateModal } = useActions(OverviewLogic); + + const cloudContext = useCloudDetails(); + const searchIndexApiUrl = cloudContext.cloudId + ? getDeploymentUrls(cloudContext.cloudId).elasticUrl + : '<elasticsearch-host>:<elasticsearch-port>/'; + + const apiKeyExample = apiKey || '<Create an API Key>'; return ( - <EuiFlexGroup> - <EuiFlexItem> - <EuiPanel> - <EuiFlexGroup direction="column"> - <EuiFlexItem> - <EuiFlexGroup justifyContent="spaceBetween" alignItems="center"> - <EuiFlexItem> - <EuiText> - <h2>Indexing by API</h2> - </EuiText> - </EuiFlexItem> - <EuiFlexItem grow={false}> - <EuiFlexGroup justifyContent="flexEnd" alignItems="center"> - <EuiFlexItem> - <EuiButtonIcon iconType="iInCircle" /> - </EuiFlexItem> - <EuiFlexItem> - <EuiButton>Generate an API key</EuiButton> - </EuiFlexItem> - </EuiFlexGroup> - </EuiFlexItem> - </EuiFlexGroup> - </EuiFlexItem> - <EuiFlexItem> - <EuiCodeBlock language="bash" fontSize="m" isCopyable> - {`\ -curl -X POST '${searchIndexApiUrl}${name}/document' \\ --H 'Content-Type: application/json' \\ --H 'Authorization: Bearer ${apiKey}' \\ --d '${JSON.stringify(DOCUMENTS_API_JSON_EXAMPLE, null, 2)}' + <> + {isGenerateModalOpen && ( + <GenerateApiKeyModal indexName={indexData?.name ?? ''} onClose={closeGenerateModal} /> + )} + <EuiFlexGroup> + <EuiFlexItem> + <EuiPanel hasBorder> + <EuiFlexGroup direction="column"> + <EuiFlexItem> + <EuiFlexGroup justifyContent="spaceBetween" alignItems="center"> + <EuiFlexItem> + {indexData?.name[0] !== '.' && ( + <EuiTitle size="s"> + <h2> + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documentExample.title', + { defaultMessage: 'Adding documents to your index' } + )} + </h2> + </EuiTitle> + )} + </EuiFlexItem> + <EuiFlexItem grow={false}> + <EuiFlexGroup justifyContent="flexEnd" alignItems="center"> + <EuiFlexItem> + <ClientLibrariesPopover /> + </EuiFlexItem> + <EuiFlexItem> + <ManageKeysPopover /> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + {indexData?.name[0] !== '.' && ( + <> + <EuiSpacer /> + <EuiFlexItem> + <EuiCodeBlock language="bash" fontSize="m" isCopyable> + {`\ +curl -X POST '${searchIndexApiUrl}${indexData?.name}/_doc' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: ApiKey ${apiKeyExample}' \\ + -d '${JSON.stringify(DOCUMENTS_API_JSON_EXAMPLE, null, 2)}' `} - </EuiCodeBlock> - </EuiFlexItem> - </EuiFlexGroup> - </EuiPanel> - </EuiFlexItem> - </EuiFlexGroup> + </EuiCodeBlock> + </EuiFlexItem> + </> + )} + </EuiFlexGroup> + </EuiPanel> + </EuiFlexItem> + </EuiFlexGroup> + </> ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts new file mode 100644 index 0000000000000..cfdfda598eed6 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { kea, MakeLogicType } from 'kea'; + +import { Status } from '../../../../../common/types/api'; + +import { GenerateApiKeyLogic } from '../../api/generate_api_key/generate_api_key_logic'; +import { FetchIndexApiLogic } from '../../api/index/fetch_index_api_logic'; + +interface OverviewLogicActions { + apiReset: typeof GenerateApiKeyLogic.actions.apiReset; + closeGenerateModal: void; + openGenerateModal: void; + toggleClientsPopover: void; + toggleManageApiKeyPopover: void; +} + +interface OverviewLogicValues { + apiKey: string; + apiKeyData: typeof GenerateApiKeyLogic.values.data; + apiKeyStatus: typeof GenerateApiKeyLogic.values.status; + data: typeof FetchIndexApiLogic.values.data; + indexData: typeof FetchIndexApiLogic.values.data; + isClientsPopoverOpen: boolean; + isGenerateModalOpen: boolean; + isLoading: boolean; + isManageKeysPopoverOpen: boolean; + isSuccess: boolean; + status: typeof FetchIndexApiLogic.values.status; +} + +export const OverviewLogic = kea<MakeLogicType<OverviewLogicValues, OverviewLogicActions>>({ + actions: { + closeGenerateModal: true, + openGenerateModal: true, + toggleClientsPopover: true, + toggleManageApiKeyPopover: true, + }, + connect: { + actions: [GenerateApiKeyLogic, ['apiReset']], + values: [ + FetchIndexApiLogic, + ['data', 'status'], + GenerateApiKeyLogic, + ['data as apiKeyData', 'status as apiKeyStatus'], + ], + }, + listeners: ({ actions }) => ({ + openGenerateModal: () => { + actions.apiReset(); + }, + }), + path: ['enterprise_search', 'search_index', 'overview'], + reducers: () => ({ + isClientsPopoverOpen: [ + false, + { + toggleClientsPopover: (state) => !state, + }, + ], + isGenerateModalOpen: [ + false, + { + closeGenerateModal: () => false, + openGenerateModal: () => true, + }, + ], + isManageKeysPopoverOpen: [ + false, + { + openGenerateModal: () => false, + toggleManageApiKeyPopover: (state) => !state, + }, + ], + }), + selectors: ({ selectors }) => ({ + apiKey: [ + () => [selectors.apiKeyStatus, selectors.apiKeyData], + (apiKeyStatus, apiKeyData) => + apiKeyStatus === Status.SUCCESS ? apiKeyData.apiKey.api_key : '', + ], + indexData: [() => [selectors.data], (data) => data], + isLoading: [() => [selectors.status], (status) => status === Status.LOADING], + isSuccess: [() => [selectors.status], (status) => status === Status.SUCCESS], + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx index 774783f9da473..7267f52680b2b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.tsx @@ -13,19 +13,18 @@ import { EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { FetchIndexApiLogic } from '../../api/index/fetch_index_api_logic'; - import { CrawlDetailsFlyout } from './crawler/crawl_details_flyout/crawl_details_flyout'; import { CrawlRequestsPanel } from './crawler/crawl_requests_panel/crawl_requests_panel'; import { CrawlerTotalStats } from './crawler_total_stats'; import { GenerateApiKeyPanel } from './generate_api_key_panel'; +import { OverviewLogic } from './overview.logic'; import { TotalStats } from './total_stats'; export const SearchIndexOverview: React.FC = () => { - const { data } = useValues(FetchIndexApiLogic); + const { indexData } = useValues(OverviewLogic); - const isCrawler = typeof data?.crawler !== 'undefined'; - const isConnector = typeof data?.connector !== 'undefined'; + const isCrawler = typeof indexData?.crawler !== 'undefined'; + const isConnector = typeof indexData?.connector !== 'undefined'; const isApi = !(isCrawler || isConnector); return ( @@ -52,10 +51,15 @@ export const SearchIndexOverview: React.FC = () => { } /> )} - <EuiSpacer /> - {isApi && <GenerateApiKeyPanel />} + {isApi && ( + <> + <EuiSpacer /> + <GenerateApiKeyPanel /> + </> + )} {isCrawler && ( <> + <EuiSpacer /> <CrawlRequestsPanel /> <CrawlDetailsFlyout /> </> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index 0c0e2e2925be0..786fec0b96adb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -24,6 +24,9 @@ import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; import { baseBreadcrumbs } from '../search_indices'; +import { headerActions } from './components/header_actions/header_actions'; +import { IndexCreatedCallout } from './components/index_created_callout/callout'; +import { IndexCreatedCalloutLogic } from './components/index_created_callout/callout_logic'; import { ConnectorConfiguration } from './connector/connector_configuration'; import { ConnectorSchedulingComponent } from './connector/connector_scheduling'; import { AutomaticCrawlScheduler } from './crawler/automatic_crawl_scheduler/automatic_crawl_scheduler'; @@ -50,11 +53,13 @@ export enum SearchIndexTabId { export const SearchIndex: React.FC = () => { const { makeRequest, apiReset } = useActions(FetchIndexApiLogic); const { data: indexData, status: indexApiStatus } = useValues(FetchIndexApiLogic); - const { indexName } = useValues(IndexNameLogic); + const { isCalloutVisible } = useValues(IndexCreatedCalloutLogic); const { tabId = SearchIndexTabId.OVERVIEW } = useParams<{ tabId?: string; }>(); + const { indexName } = useValues(IndexNameLogic); + useEffect(() => { makeRequest({ indexName }); return apiReset; @@ -144,11 +149,17 @@ export const SearchIndex: React.FC = () => { isLoading={indexApiStatus === Status.LOADING || indexApiStatus === Status.IDLE} pageHeader={{ pageTitle: indexName, - rightSideItems: indexData?.crawler ? [<CrawlerStatusIndicator />] : [], + rightSideItems: [ + ...headerActions, + ...(indexData?.crawler ? [<CrawlerStatusIndicator />] : []), + ], }} > - <EuiTabbedContent tabs={tabs} selectedTab={selectedTab} onTabClick={onTabClick} /> - {indexData?.crawler && <CrawlCustomSettingsFlyout />} + <> + {isCalloutVisible && <IndexCreatedCallout indexName={indexName} />} + <EuiTabbedContent tabs={tabs} selectedTab={selectedTab} onTabClick={onTabClick} /> + {indexData?.crawler && <CrawlCustomSettingsFlyout />} + </> </EnterpriseSearchContentPageTemplate> ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx index b3ed64e1b6e9f..318fa3f988941 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/total_stats.tsx @@ -13,23 +13,18 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiStat, EuiStatProps } from '@ela import { i18n } from '@kbn/i18n'; -import { Status } from '../../../../../common/types/api'; - -import { CustomFormattedTimestamp } from '../../../shared/custom_formatted_timestamp/custom_formatted_timestamp'; -import { FetchIndexApiLogic } from '../../api/index/fetch_index_api_logic'; +import { OverviewLogic } from './overview.logic'; interface TotalStatsProps { additionalItems?: EuiStatProps[]; ingestionType: string; + lastUpdated?: string; } export const TotalStats: React.FC<TotalStatsProps> = ({ ingestionType, additionalItems = [] }) => { - const { data, status } = useValues(FetchIndexApiLogic); - const documentCount = data?.index.total.docs.count ?? 0; - const lastUpdated = ( - <CustomFormattedTimestamp timestamp={Date.now() - 1000 * 60 * 12 /* TODO: Implement this */} /> - ); - const isLoading = status !== Status.SUCCESS; + const { indexData, isSuccess } = useValues(OverviewLogic); + const documentCount = indexData?.total.docs.count ?? 0; + const isLoading = !isSuccess; const stats: EuiStatProps[] = [ { description: i18n.translate( @@ -51,16 +46,6 @@ export const TotalStats: React.FC<TotalStatsProps> = ({ ingestionType, additiona isLoading, title: documentCount, }, - { - description: i18n.translate( - 'xpack.enterpriseSearch.content.searchIndex.totalStats.lastUpdatedCardLabel', - { - defaultMessage: 'Last updated', - } - ), - isLoading, - title: lastUpdated, - }, ...additionalItems, ]; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts new file mode 100644 index 0000000000000..bffc987149de5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts @@ -0,0 +1,422 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_logic'; + +import { indices } from '../../__mocks__/search_indices.mock'; + +import { nextTick } from '@kbn/test-jest-helpers'; + +import { HttpError, Status } from '../../../../../common/types/api'; + +import { ConnectorStatus, SyncStatus } from '../../../../../common/types/connectors'; +import { DEFAULT_META } from '../../../shared/constants'; + +import { FetchIndicesAPILogic } from '../../api/index/fetch_indices_api_logic'; + +import { IndicesLogic, IngestionMethod, IngestionStatus, ViewSearchIndex } from './indices_logic'; + +const DEFAULT_VALUES = { + data: undefined, + hasNoIndices: false, + indices: [], + isLoading: false, + meta: DEFAULT_META, + status: Status.IDLE, +}; + +const apiIndex: ViewSearchIndex = { + ingestionMethod: IngestionMethod.API, + ingestionStatus: IngestionStatus.CONNECTED, + lastUpdated: null, + name: 'api', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, +}; +const connectorIndex: ViewSearchIndex = { + connector: { + api_key_id: null, + configuration: {}, + id: '2', + index_name: 'connector', + last_seen: null, + last_synced: null, + scheduling: { + enabled: false, + interval: '', + }, + service_type: null, + status: ConnectorStatus.CONFIGURED, + sync_error: null, + sync_now: false, + sync_status: SyncStatus.COMPLETED, + }, + ingestionMethod: IngestionMethod.CONNECTOR, + ingestionStatus: IngestionStatus.INCOMPLETE, + lastUpdated: 'never', + name: 'connector', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, +}; +const crawlerIndex: ViewSearchIndex = { + crawler: { + id: '3', + index_name: 'crawler', + }, + ingestionMethod: IngestionMethod.CRAWLER, + ingestionStatus: IngestionStatus.INCOMPLETE, + lastUpdated: null, + name: 'crawler', + total: { + docs: { + count: 1, + deleted: 0, + }, + store: { size_in_bytes: '8024' }, + }, +}; + +const viewSearchIndices = [apiIndex, connectorIndex, crawlerIndex]; + +describe('IndicesLogic', () => { + const { mount: apiLogicMount } = new LogicMounter(FetchIndicesAPILogic); + const { mount } = new LogicMounter(IndicesLogic); + + beforeEach(() => { + jest.clearAllMocks(); + jest.useRealTimers(); + apiLogicMount(); + mount(); + }); + + it('has expected default values', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + }); + + describe('actions', () => { + describe('onPaginate', () => { + it('updates meta with newPageIndex', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.onPaginate(3); + expect(IndicesLogic.values).toEqual({ + ...DEFAULT_VALUES, + meta: { + page: { + ...DEFAULT_META.page, + current: 3, + }, + }, + }); + }); + }); + }); + describe('reducers', () => { + describe('meta', () => { + it('updates when apiSuccess listener triggered', () => { + const newMeta = { + page: { + current: 2, + size: 5, + total_pages: 10, + total_results: 52, + }, + }; + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices, + isInitialRequest: true, + meta: newMeta, + }); + expect(IndicesLogic.values).toEqual({ + data: { + indices, + isInitialRequest: true, + meta: newMeta, + }, + hasNoIndices: false, + indices: viewSearchIndices, + isLoading: false, + meta: newMeta, + status: Status.SUCCESS, + }); + }); + }); + describe('hasNoIndices', () => { + it('updates to true when apiSuccess returns initialRequest: true with no indices', () => { + const meta = { + page: { + current: 1, + size: 0, + total_pages: 1, + total_results: 0, + }, + }; + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: [], + isInitialRequest: true, + meta, + }); + expect(IndicesLogic.values).toEqual({ + data: { + indices: [], + isInitialRequest: true, + meta, + }, + hasNoIndices: true, + indices: [], + isLoading: false, + meta, + status: Status.SUCCESS, + }); + }); + it('updates to false when apiSuccess returns initialRequest: false with no indices', () => { + const meta = { + page: { + current: 1, + size: 0, + total_pages: 1, + total_results: 0, + }, + }; + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: [], + isInitialRequest: false, + meta, + }); + expect(IndicesLogic.values).toEqual({ + data: { + indices: [], + isInitialRequest: false, + meta, + }, + hasNoIndices: false, + indices: [], + isLoading: false, + meta, + status: Status.SUCCESS, + }); + }); + }); + }); + + describe('listeners', () => { + it('calls clearFlashMessages on new makeRequest', () => { + IndicesLogic.actions.makeRequest({ meta: DEFAULT_META, returnHiddenIndices: false }); + expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1); + }); + it('calls flashAPIErrors on apiError', () => { + IndicesLogic.actions.apiError({} as HttpError); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({}); + }); + it('calls makeRequest on fetchIndices', async () => { + jest.useFakeTimers(); + IndicesLogic.actions.makeRequest = jest.fn(); + IndicesLogic.actions.fetchIndices({ meta: DEFAULT_META, returnHiddenIndices: false }); + jest.advanceTimersByTime(150); + await nextTick(); + expect(IndicesLogic.actions.makeRequest).toHaveBeenCalledWith({ + meta: DEFAULT_META, + returnHiddenIndices: false, + }); + }); + it('calls makeRequest once on two fetchIndices calls within 150ms', async () => { + jest.useFakeTimers(); + IndicesLogic.actions.makeRequest = jest.fn(); + IndicesLogic.actions.fetchIndices({ meta: DEFAULT_META, returnHiddenIndices: false }); + jest.advanceTimersByTime(130); + await nextTick(); + IndicesLogic.actions.fetchIndices({ meta: DEFAULT_META, returnHiddenIndices: false }); + jest.advanceTimersByTime(150); + await nextTick(); + expect(IndicesLogic.actions.makeRequest).toHaveBeenCalledWith({ + meta: DEFAULT_META, + returnHiddenIndices: false, + }); + expect(IndicesLogic.actions.makeRequest).toHaveBeenCalledTimes(1); + }); + it('calls makeRequest twice on two fetchIndices calls outside 150ms', async () => { + jest.useFakeTimers(); + IndicesLogic.actions.makeRequest = jest.fn(); + IndicesLogic.actions.fetchIndices({ meta: DEFAULT_META, returnHiddenIndices: false }); + jest.advanceTimersByTime(150); + await nextTick(); + IndicesLogic.actions.fetchIndices({ meta: DEFAULT_META, returnHiddenIndices: false }); + jest.advanceTimersByTime(150); + await nextTick(); + expect(IndicesLogic.actions.makeRequest).toHaveBeenCalledWith({ + meta: DEFAULT_META, + returnHiddenIndices: false, + }); + expect(IndicesLogic.actions.makeRequest).toHaveBeenCalledTimes(2); + }); + }); + + describe('selectors', () => { + describe('indices', () => { + it('updates when apiSuccess listener triggered', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: viewSearchIndices, + isInitialRequest: true, + meta: DEFAULT_META, + }); + + expect(IndicesLogic.values).toEqual({ + data: { + indices: viewSearchIndices, + isInitialRequest: true, + meta: DEFAULT_META, + }, + hasNoIndices: false, + indices: viewSearchIndices, + isLoading: false, + meta: DEFAULT_META, + status: Status.SUCCESS, + }); + }); + it('updates ingestionStatus for connector to connected when connected', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: [ + { + ...indices[1], + connector: { ...indices[1].connector!, status: ConnectorStatus.CONNECTED }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }); + + expect(IndicesLogic.values).toEqual({ + data: { + indices: [ + { + ...indices[1], + connector: { ...indices[1].connector!, status: ConnectorStatus.CONNECTED }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }, + hasNoIndices: false, + indices: [ + { + ...connectorIndex, + connector: { + ...connectorIndex.connector, + status: ConnectorStatus.CONNECTED, + }, + ingestionStatus: IngestionStatus.CONNECTED, + }, + ], + isLoading: false, + meta: DEFAULT_META, + status: Status.SUCCESS, + }); + }); + it('updates ingestionStatus for connector to error when error is present', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: [ + { + ...indices[1], + connector: { ...indices[1].connector!, status: ConnectorStatus.ERROR }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }); + + expect(IndicesLogic.values).toEqual({ + data: { + indices: [ + { + ...indices[1], + connector: { ...indices[1].connector!, status: ConnectorStatus.ERROR }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }, + hasNoIndices: false, + indices: [ + { + ...connectorIndex, + connector: { ...connectorIndex.connector, status: ConnectorStatus.ERROR }, + ingestionStatus: IngestionStatus.ERROR, + }, + ], + isLoading: false, + meta: DEFAULT_META, + status: Status.SUCCESS, + }); + }); + it('updates ingestionStatus for connector to sync error when sync error is present', () => { + expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); + IndicesLogic.actions.apiSuccess({ + indices: [ + { + ...indices[1], + connector: { + ...indices[1].connector!, + status: ConnectorStatus.CONNECTED, + sync_status: SyncStatus.ERROR, + }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }); + + expect(IndicesLogic.values).toEqual({ + data: { + indices: [ + { + ...indices[1], + connector: { + ...indices[1].connector!, + status: ConnectorStatus.CONNECTED, + sync_status: SyncStatus.ERROR, + }, + }, + ], + isInitialRequest: true, + meta: DEFAULT_META, + }, + hasNoIndices: false, + indices: [ + { + ...connectorIndex, + connector: { + ...connectorIndex.connector, + status: ConnectorStatus.CONNECTED, + sync_status: SyncStatus.ERROR, + }, + ingestionStatus: IngestionStatus.SYNC_ERROR, + }, + ], + isLoading: false, + meta: DEFAULT_META, + status: Status.SUCCESS, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.tsx deleted file mode 100644 index 66c1432e0b3b4..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_logic'; -import { searchIndices } from '../../__mocks__/search_indices.mock'; - -import { HttpError, Status } from '../../../../../common/types/api'; - -import { DEFAULT_META } from '../../../shared/constants'; - -import { IndicesAPILogic } from '../../logic/indices_api/indices_api_logic'; - -import { IndicesLogic } from './indices_logic'; - -const DEFAULT_VALUES = { - data: undefined, - indices: [], - isLoading: false, - meta: DEFAULT_META, - status: Status.IDLE, -}; - -describe('IndicesLogic', () => { - const { mount: apiLogicMount } = new LogicMounter(IndicesAPILogic); - const { mount } = new LogicMounter(IndicesLogic); - - beforeEach(() => { - jest.clearAllMocks(); - apiLogicMount(); - mount(); - }); - - it('has expected default values', () => { - expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); - }); - - describe('actions', () => { - describe('onPaginate', () => { - it('updates meta with newPageIndex', () => { - expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); - IndicesLogic.actions.onPaginate(3); - expect(IndicesLogic.values).toEqual({ - ...DEFAULT_VALUES, - meta: { - page: { - ...DEFAULT_META.page, - current: 3, - }, - }, - }); - }); - }); - }); - describe('reducers', () => { - describe('meta', () => { - it('updates when apiSuccess listener triggered', () => { - const newMeta = { - page: { - current: 2, - size: 5, - total_pages: 10, - total_results: 52, - }, - }; - expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); - IndicesLogic.actions.apiSuccess({ indices: searchIndices, meta: newMeta }); - expect(IndicesLogic.values).toEqual({ - data: { - indices: searchIndices, - meta: newMeta, - }, - indices: searchIndices, - isLoading: false, - meta: newMeta, - status: Status.SUCCESS, - }); - }); - }); - }); - - describe('listeners', () => { - it('calls clearFlashMessages on new makeRequest', () => { - IndicesLogic.actions.makeRequest({ meta: DEFAULT_META }); - expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1); - }); - it('calls flashAPIErrors on apiError', () => { - IndicesLogic.actions.apiError({} as HttpError); - expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1); - expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({}); - }); - }); - - describe('selectors', () => { - describe('indices', () => { - it('updates when apiSuccess listener triggered', () => { - expect(IndicesLogic.values).toEqual(DEFAULT_VALUES); - IndicesLogic.actions.apiSuccess({ indices: searchIndices, meta: DEFAULT_META }); - - expect(IndicesLogic.values).toEqual({ - data: { - indices: searchIndices, - meta: DEFAULT_META, - }, - indices: searchIndices, - isLoading: false, - meta: DEFAULT_META, - status: Status.SUCCESS, - }); - }); - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts index d1af09e459a56..21df543049eef 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts @@ -9,37 +9,118 @@ import { kea, MakeLogicType } from 'kea'; import { Meta } from '../../../../../common/types'; import { HttpError, Status } from '../../../../../common/types/api'; +import { ConnectorStatus, SyncStatus } from '../../../../../common/types/connectors'; +import { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices'; import { DEFAULT_META } from '../../../shared/constants'; import { flashAPIErrors, clearFlashMessages } from '../../../shared/flash_messages'; import { updateMetaPageIndex } from '../../../shared/table_pagination'; -import { IndicesAPILogic } from '../../logic/indices_api/indices_api_logic'; -import { SearchIndex } from '../../types'; +import { FetchIndicesAPILogic } from '../../api/index/fetch_indices_api_logic'; + +export const enum IngestionMethod { + CONNECTOR, + CRAWLER, + API, +} + +export const enum IngestionStatus { + CONNECTED, + ERROR, + SYNC_ERROR, + INCOMPLETE, +} + +export interface ViewSearchIndex extends ElasticsearchIndexWithIngestion { + ingestionMethod: IngestionMethod; + ingestionStatus: IngestionStatus; + lastUpdated: Date | 'never' | null; +} + +function getIngestionMethod(index?: ElasticsearchIndexWithIngestion): IngestionMethod { + if (index?.connector) { + return IngestionMethod.CONNECTOR; + } + if (index?.crawler) { + return IngestionMethod.CRAWLER; + } + return IngestionMethod.API; +} + +function getIngestionStatus( + index: ElasticsearchIndexWithIngestion, + ingestionMethod: IngestionMethod +): IngestionStatus { + if (ingestionMethod === IngestionMethod.API) { + return IngestionStatus.CONNECTED; + } + if (ingestionMethod === IngestionMethod.CONNECTOR) { + if (index.connector?.sync_status === SyncStatus.ERROR) { + return IngestionStatus.SYNC_ERROR; + } + if (index.connector?.status === ConnectorStatus.CONNECTED) { + return IngestionStatus.CONNECTED; + } + if (index.connector?.status === ConnectorStatus.ERROR) { + return IngestionStatus.ERROR; + } + } + return IngestionStatus.INCOMPLETE; +} export interface IndicesActions { apiError(error: HttpError): HttpError; - apiSuccess({ indices, meta }: { indices: SearchIndex[]; meta: Meta }): { - indices: SearchIndex[]; + apiSuccess({ + indices, + isInitialRequest, + meta, + }: { + indices: ElasticsearchIndexWithIngestion[]; + isInitialRequest: boolean; + meta: Meta; + }): { + indices: ElasticsearchIndexWithIngestion[]; + isInitialRequest: boolean; meta: Meta; }; - makeRequest: typeof IndicesAPILogic.actions.makeRequest; + fetchIndices({ + meta, + returnHiddenIndices, + searchQuery, + }: { + meta: Meta; + returnHiddenIndices: boolean; + searchQuery?: string; + }): { meta: Meta; returnHiddenIndices: boolean; searchQuery?: string }; + makeRequest: typeof FetchIndicesAPILogic.actions.makeRequest; onPaginate(newPageIndex: number): { newPageIndex: number }; } export interface IndicesValues { - data: typeof IndicesAPILogic.values.data; - indices: SearchIndex[]; + data: typeof FetchIndicesAPILogic.values.data; + hasNoIndices: boolean; + indices: ViewSearchIndex[]; isLoading: boolean; meta: Meta; - status: typeof IndicesAPILogic.values.status; + status: typeof FetchIndicesAPILogic.values.status; } export const IndicesLogic = kea<MakeLogicType<IndicesValues, IndicesActions>>({ - actions: { onPaginate: (newPageIndex) => ({ newPageIndex }) }, + actions: { + fetchIndices: ({ meta, returnHiddenIndices, searchQuery }) => ({ + meta, + returnHiddenIndices, + searchQuery, + }), + onPaginate: (newPageIndex) => ({ newPageIndex }), + }, connect: { - actions: [IndicesAPILogic, ['makeRequest', 'apiSuccess', 'apiError']], - values: [IndicesAPILogic, ['data', 'status']], + actions: [FetchIndicesAPILogic, ['makeRequest', 'apiSuccess', 'apiError']], + values: [FetchIndicesAPILogic, ['data', 'status']], }, - listeners: () => ({ + listeners: ({ actions }) => ({ apiError: (e) => flashAPIErrors(e), + fetchIndices: async (input, breakpoint) => { + await breakpoint(150); + actions.makeRequest(input); + }, makeRequest: () => clearFlashMessages(), }), path: ['enterprise_search', 'content', 'indices_logic'], @@ -53,7 +134,24 @@ export const IndicesLogic = kea<MakeLogicType<IndicesValues, IndicesActions>>({ ], }), selectors: ({ selectors }) => ({ - indices: [() => [selectors.data], (data) => data?.indices || []], + hasNoIndices: [ + // We need this to show the landing page on the overview page if there are no indices + // We can't rely just on there being no indices, because user might have entered a search query + () => [selectors.data], + (data) => (data?.isInitialRequest && data?.indices && data.indices.length === 0) ?? false, + ], + indices: [ + () => [selectors.data], + (data) => + data?.indices + ? data.indices.map((index: ElasticsearchIndexWithIngestion) => ({ + ...index, + ingestionMethod: getIngestionMethod(index), + ingestionStatus: getIngestionStatus(index, getIngestionMethod(index)), + lastUpdated: index.connector ? index.connector.last_synced ?? 'never' : null, + })) + : [], + ], isLoading: [ () => [selectors.status], (status) => { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx new file mode 100644 index 0000000000000..170185548cebb --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_table.tsx @@ -0,0 +1,230 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { generatePath } from 'react-router-dom'; + +import { + CriteriaWithPagination, + EuiBadge, + EuiBasicTable, + EuiBasicTableColumn, + EuiIcon, + EuiText, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedRelative } from '@kbn/i18n-react'; + +import { Meta } from '../../../../../common/types'; +import { EuiLinkTo, EuiButtonIconTo } from '../../../shared/react_router_helpers'; +import { convertMetaToPagination } from '../../../shared/table_pagination'; +import { SEARCH_INDEX_PATH } from '../../routes'; + +import { ViewSearchIndex, IngestionMethod, IngestionStatus } from './indices_logic'; + +const healthColorsMap = { + green: 'success', + red: 'danger', + unavailable: '', + yellow: 'warning', +}; + +function ingestionMethodToText(ingestionMethod: IngestionMethod) { + if (ingestionMethod === IngestionMethod.CONNECTOR) { + return i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionMethod.connector.label', + { + defaultMessage: 'Connector', + } + ); + } + if (ingestionMethod === IngestionMethod.CRAWLER) { + return i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionMethod.crawler.label', + { + defaultMessage: 'Crawler', + } + ); + } + return i18n.translate('xpack.enterpriseSearch.content.searchIndices.ingestionMethod.api.label', { + defaultMessage: 'API', + }); +} + +const columns: Array<EuiBasicTableColumn<ViewSearchIndex>> = [ + { + field: 'name', + name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.name.columnTitle', { + defaultMessage: 'Index name', + }), + render: (name: string) => ( + <EuiLinkTo + data-test-subj="search-index-link" + to={generatePath(SEARCH_INDEX_PATH, { indexName: name })} + > + {name} + </EuiLinkTo> + ), + sortable: true, + truncateText: true, + }, + { + field: 'health', + name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.health.columnTitle', { + defaultMessage: 'Index health', + }), + render: (health: 'red' | 'green' | 'yellow' | 'unavailable') => ( + <span> + <EuiIcon type="dot" color={healthColorsMap[health] ?? ''} /> +  {health ?? '-'} + </span> + ), + sortable: true, + truncateText: true, + }, + { + field: 'total.docs.count', + name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.docsCount.columnTitle', { + defaultMessage: 'Docs count', + }), + sortable: true, + truncateText: true, + }, + { + field: 'ingestionMethod', + name: i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionMethod.columnTitle', + { + defaultMessage: 'Ingestion method', + } + ), + render: (ingestionMethod: IngestionMethod) => ( + <EuiText size="s">{ingestionMethodToText(ingestionMethod)}</EuiText> + ), + truncateText: true, + }, + { + field: 'lastUpdated', + name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.columnTitle', { + defaultMessage: 'Last updated', + }), + render: (dateString: string) => { + if (dateString === 'never') { + return ( + <EuiText size="s"> + {i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.never', { + defaultMessage: 'Never', + })} + </EuiText> + ); + } + return dateString ? ( + <FormattedRelative value={new Date(dateString)} /> + ) : ( + <EuiText size="s"> + {i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.none', { + defaultMessage: 'Unknown', + })} + </EuiText> + ); + }, + sortable: true, + truncateText: true, + }, + { + field: 'ingestionStatus', + name: i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionStatus.columnTitle', + { + defaultMessage: 'Ingestion status', + } + ), + render: (ingestionStatus: IngestionStatus) => { + const getBadge = (status: string, text: string) => { + return <EuiBadge color={status}>{text}</EuiBadge>; + }; + if (ingestionStatus === IngestionStatus.CONNECTED) { + return getBadge( + 'success', + i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionStatus.connected.label', + { defaultMessage: 'Connected' } + ) + ); + } + if (ingestionStatus === IngestionStatus.ERROR) { + return getBadge( + 'error', + i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionStatus.connectorError.label', + { defaultMessage: 'Connector failure' } + ) + ); + } + if (ingestionStatus === IngestionStatus.SYNC_ERROR) { + return getBadge( + 'error', + i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionStatus.syncError.label', + { defaultMessage: 'Sync failure' } + ) + ); + } + return getBadge( + 'warning', + i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.ingestionStatus.incomplete.label', + { defaultMessage: 'Incomplete' } + ) + ); + }, + truncateText: true, + }, + { + actions: [ + { + render: ({ name }) => ( + <EuiButtonIconTo + aria-label={name} + iconType="eye" + data-test-subj="view-search-index-button" + to={generatePath(SEARCH_INDEX_PATH, { + indexName: name, + })} + /> + ), + }, + ], + name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.actions.columnTitle', { + defaultMessage: 'Actions', + }), + }, +]; + +interface IndicesTableProps { + indices: ViewSearchIndex[]; + isLoading: boolean; + meta: Meta; + onChange: (criteria: CriteriaWithPagination<ViewSearchIndex>) => void; +} + +export const IndicesTable: React.FC<IndicesTableProps> = ({ + indices, + isLoading, + meta, + onChange, +}) => ( + <EuiBasicTable + items={indices} + columns={columns} + onChange={onChange} + pagination={{ ...convertMetaToPagination(meta), showPerPageOptions: false }} + tableLayout="auto" + loading={isLoading} + /> +); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.scss b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.scss new file mode 100644 index 0000000000000..9645deb7ea4c8 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.scss @@ -0,0 +1,3 @@ +.entSearchIndicesSearchBar { + max-width: $euiSizeXXL * 10 +} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.test.tsx index ed4fada464985..105d287260b57 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.test.tsx @@ -7,28 +7,31 @@ import '../../../__mocks__/shallow_useeffect.mock'; import { setMockValues, setMockActions } from '../../../__mocks__/kea_logic'; -import { searchIndices } from '../../__mocks__'; + +import { indices } from '../../__mocks__/search_indices.mock'; import React from 'react'; import { shallow } from 'enzyme'; -import { EuiBasicTable, EuiCallOut, EuiButton } from '@elastic/eui'; +import { EuiCallOut, EuiButton } from '@elastic/eui'; import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt'; import { DEFAULT_META } from '../../../shared/constants'; import { ElasticsearchResources } from '../../../shared/elasticsearch_resources'; import { GettingStartedSteps } from '../../../shared/getting_started_steps'; +import { IndicesTable } from './indices_table'; + import { SearchIndices } from './search_indices'; const mockValues = { - indices: searchIndices, + indices, meta: DEFAULT_META, }; const mockActions = { - makeRequest: jest.fn(), + fetchIndices: jest.fn(), onPaginate: jest.fn(), }; @@ -38,35 +41,36 @@ describe('SearchIndices', () => { global.localStorage.clear(); }); describe('Empty state', () => { - it('renders when Indices are empty', () => { + it('renders when Indices are empty on initial query', () => { setMockValues({ ...mockValues, + hasNoIndices: true, indices: [], }); setMockActions(mockActions); const wrapper = shallow(<SearchIndices />); expect(wrapper.find(AddContentEmptyPrompt)).toHaveLength(1); - expect(wrapper.find(EuiBasicTable)).toHaveLength(0); + expect(wrapper.find(IndicesTable)).toHaveLength(0); expect(wrapper.find(GettingStartedSteps)).toHaveLength(1); expect(wrapper.find(ElasticsearchResources)).toHaveLength(1); }); }); - it('renders with Data', () => { + it('renders with Data', async () => { setMockValues(mockValues); setMockActions(mockActions); const wrapper = shallow(<SearchIndices />); expect(wrapper.find(AddContentEmptyPrompt)).toHaveLength(0); - expect(wrapper.find(EuiBasicTable)).toHaveLength(1); + expect(wrapper.find(IndicesTable)).toHaveLength(1); expect(wrapper.find(GettingStartedSteps)).toHaveLength(0); expect(wrapper.find(ElasticsearchResources)).toHaveLength(0); - expect(mockActions.makeRequest).toHaveBeenCalledTimes(1); + expect(mockActions.fetchIndices).toHaveBeenCalled(); expect(wrapper.find(EuiCallOut)).toHaveLength(1); }); @@ -83,22 +87,24 @@ describe('SearchIndices', () => { expect(global.localStorage.getItem('enterprise-search-indices-callout-dismissed')).toBe('true'); }); - it('sets table pagination correctly', () => { - setMockValues(mockValues); - setMockActions(mockActions); + // Move this test to the indices table when writing tests there - const wrapper = shallow(<SearchIndices />); - const table = wrapper.find(EuiBasicTable); + // it('sets table pagination correctly', () => { + // setMockValues(mockValues); + // setMockActions(mockActions); - expect(table.prop('pagination')).toEqual({ - pageIndex: 0, - pageSize: 10, - showPerPageOptions: false, - totalItemCount: 0, - }); + // const wrapper = shallow(<SearchIndices />); + // const table = wrapper.find(IndicesTable); - table.simulate('change', { page: { index: 2 } }); - expect(mockActions.onPaginate).toHaveBeenCalledTimes(1); - expect(mockActions.onPaginate).toHaveBeenCalledWith(3); // API's are 1 indexed, but table is 0 indexed - }); + // expect(table.prop('pagination')).toEqual({ + // pageIndex: 0, + // pageSize: 10, + // showPerPageOptions: false, + // totalItemCount: 0, + // }); + + // table.simulate('change', { page: { index: 2 } }); + // expect(mockActions.onPaginate).toHaveBeenCalledTimes(1); + // expect(mockActions.onPaginate).toHaveBeenCalledWith(3); // API's are 1 indexed, but table is 0 indexed + // }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx index b4587025a551a..928b9653a562e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx @@ -5,152 +5,60 @@ * 2.0. */ -import React, { useEffect } from 'react'; - -import { generatePath } from 'react-router-dom'; +import React, { useEffect, useState } from 'react'; import { useValues, useActions } from 'kea'; import { - EuiBasicTable, EuiButton, - EuiBadge, EuiCallOut, EuiFlexGroup, EuiFlexItem, - EuiIcon, EuiSpacer, EuiTitle, - HorizontalAlignment, + EuiSwitch, + EuiSearchBar, } from '@elastic/eui'; + import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt'; import { ElasticsearchResources } from '../../../shared/elasticsearch_resources'; import { GettingStartedSteps } from '../../../shared/getting_started_steps'; -import { EuiLinkTo, EuiButtonIconTo } from '../../../shared/react_router_helpers'; -import { convertMetaToPagination, handlePageChange } from '../../../shared/table_pagination'; +import { EuiLinkTo } from '../../../shared/react_router_helpers'; +import { handlePageChange } from '../../../shared/table_pagination'; import { useLocalStorage } from '../../../shared/use_local_storage'; -import { NEW_INDEX_PATH, SEARCH_INDEX_PATH } from '../../routes'; -import { SearchIndex } from '../../types'; +import { NEW_INDEX_PATH } from '../../routes'; import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; import { IndicesLogic } from './indices_logic'; +import { IndicesTable } from './indices_table'; -const healthColorsMap = { - green: 'success', - red: 'danger', - unavailable: '', - yellow: 'warning', -}; +import './search_indices.scss'; export const baseBreadcrumbs = [ i18n.translate('xpack.enterpriseSearch.content.searchIndices.content.breadcrumb', { defaultMessage: 'Content', }), i18n.translate('xpack.enterpriseSearch.content.searchIndices.searchIndices.breadcrumb', { - defaultMessage: 'Search indices', + defaultMessage: 'Elasticsearch indices', }), ]; export const SearchIndices: React.FC = () => { - const { makeRequest, onPaginate } = useActions(IndicesLogic); - const { meta, indices, isLoading } = useValues(IndicesLogic); + const { fetchIndices, onPaginate } = useActions(IndicesLogic); + const { meta, indices, hasNoIndices, isLoading } = useValues(IndicesLogic); + const [showHiddenIndices, setShowHiddenIndices] = useState(false); + const [searchQuery, setSearchValue] = useState(''); const [calloutDismissed, setCalloutDismissed] = useLocalStorage<boolean>( 'enterprise-search-indices-callout-dismissed', false ); - useEffect(() => { - makeRequest({ meta }); - }, [meta.page.current]); - - const columns = [ - { - field: 'name', - name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.name.columnTitle', { - defaultMessage: 'Index name', - }), - render: (name: string) => ( - <EuiLinkTo - data-test-subj="search-index-link" - to={generatePath(SEARCH_INDEX_PATH, { indexName: name })} - > - {name} - </EuiLinkTo> - ), - sortable: true, - truncateText: true, - }, - { - field: 'total.docs.count', - name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.docsCount.columnTitle', { - defaultMessage: 'Docs count', - }), - sortable: true, - truncateText: true, - }, - { - field: 'health', - name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.health.columnTitle', { - defaultMessage: 'Index health', - }), - render: (health: 'red' | 'green' | 'yellow' | 'unavailable') => ( - <span> - <EuiIcon type="dot" color={healthColorsMap[health] ?? ''} /> -  {health ?? '-'} - </span> - ), - sortable: true, - truncateText: true, - }, - { - field: 'data_ingestion', - name: i18n.translate( - 'xpack.enterpriseSearch.content.searchIndices.dataIngestion.columnTitle', - { - defaultMessage: 'Data ingestion', - } - ), - render: (dataIngestionStatus: string) => - dataIngestionStatus ? ( - <EuiBadge color={dataIngestionStatus === 'connected' ? 'success' : 'warning'}> - {dataIngestionStatus} - </EuiBadge> - ) : null, - truncateText: true, - }, - { - align: 'right' as HorizontalAlignment, - field: 'total.store.size_in_bytes', - name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.storage.columnTitle', { - defaultMessage: 'Storage', - }), - sortable: true, - truncateText: true, - }, - { - actions: [ - { - render: ({ name }: SearchIndex) => ( - <EuiButtonIconTo - aria-label={name} - iconType="eye" - data-test-subj="view-search-index-button" - to={generatePath(SEARCH_INDEX_PATH, { - indexName: name, - })} - /> - ), - }, - ], - name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.actions.columnTitle', { - defaultMessage: 'Actions', - }), - }, - ]; + fetchIndices({ meta, returnHiddenIndices: showHiddenIndices, searchQuery }); + }, [searchQuery, meta.page.current, showHiddenIndices]); const createNewIndexButton = ( <EuiLinkTo data-test-subj="create-new-index-button" to={NEW_INDEX_PATH}> @@ -183,10 +91,23 @@ export const SearchIndices: React.FC = () => { </> ); + const hiddenIndicesSwitch = ( + <EuiSwitch + checked={showHiddenIndices} + label={i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.searchIndices.includeHidden.label', + { + defaultMessage: 'Show hidden indices', + } + )} + onChange={(event) => setShowHiddenIndices(event.target.checked)} + /> + ); + const pageTitle = indices.length !== 0 ? i18n.translate('xpack.enterpriseSearch.content.searchIndices.searchIndices.pageTitle', { - defaultMessage: 'Content', + defaultMessage: 'Elasticsearch Indices', }) : i18n.translate( 'xpack.enterpriseSearch.content.searchIndices.searchIndices.emptyPageTitle', @@ -206,62 +127,95 @@ export const SearchIndices: React.FC = () => { rightSideItems: [createNewIndexButton], }} > - {indices.length !== 0 || isLoading ? ( - <> - <EuiTitle> - <h2> - {i18n.translate( - 'xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle', - { - defaultMessage: 'Search Indices', - } - )} - </h2> - </EuiTitle> - <EuiSpacer size="l" /> + {!hasNoIndices ? ( + <EuiFlexGroup direction="column"> {!calloutDismissed && ( - <EuiCallOut - size="m" - title={i18n.translate('xpack.enterpriseSearch.content.callout.title', { - defaultMessage: 'Introducing Elasticsearch indices in Enterprise Search', - })} - iconType="iInCircle" - > - <p> - <FormattedMessage - id="xpack.enterpriseSearch.content.indices.callout.text" - defaultMessage="Your Elasticsearch indices are now front and center in Enterprise Search. You can create new indices and build search experiences with them directly. To learn more about how to use Elasticsearch indices in Enterprise Search {docLink}" - values={{ - docLink: ( - <EuiLinkTo data-test-subj="search-index-link" to="#"> - {i18n.translate( - 'xpack.enterpriseSearch.content.indices.callout.docLink', - { - defaultMessage: 'read the documentation', - } - )} - </EuiLinkTo> - ), - }} - /> - </p> - <EuiButton fill onClick={() => setCalloutDismissed(true)}> - {i18n.translate('xpack.enterpriseSearch.content.callout.dismissButton', { - defaultMessage: 'Dismiss', + <EuiFlexItem> + <EuiSpacer size="l" /> + <EuiCallOut + size="m" + title={i18n.translate('xpack.enterpriseSearch.content.callout.title', { + defaultMessage: 'Introducing Elasticsearch indices in Enterprise Search', })} - </EuiButton> - </EuiCallOut> + iconType="iInCircle" + > + <p> + <FormattedMessage + id="xpack.enterpriseSearch.content.indices.callout.text" + defaultMessage="Your Elasticsearch indices are now front and center in Enterprise Search. You can create new indices and build search experiences with them directly. To learn more about how to use Elasticsearch indices in Enterprise Search {docLink}" + values={{ + docLink: ( + <EuiLinkTo data-test-subj="search-index-link" to="#"> + {i18n.translate( + 'xpack.enterpriseSearch.content.indices.callout.docLink', + { + defaultMessage: 'read the documentation', + } + )} + </EuiLinkTo> + ), + }} + /> + </p> + <EuiButton fill onClick={() => setCalloutDismissed(true)}> + {i18n.translate('xpack.enterpriseSearch.content.callout.dismissButton', { + defaultMessage: 'Dismiss', + })} + </EuiButton> + </EuiCallOut> + </EuiFlexItem> )} - <EuiSpacer size="l" /> - <EuiBasicTable - items={indices} - columns={columns} - onChange={handlePageChange(onPaginate)} - pagination={{ ...convertMetaToPagination(meta), showPerPageOptions: false }} - tableLayout="auto" - loading={isLoading} - /> - </> + <EuiFlexItem> + <EuiFlexGroup justifyContent="spaceBetween" alignItems="center"> + <EuiFlexItem grow={false}> + <EuiTitle> + <h2> + {i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle', + { + defaultMessage: 'Available indices', + } + )} + </h2> + </EuiTitle> + </EuiFlexItem> + <EuiFlexItem> + <EuiFlexGroup justifyContent="flexEnd" alignItems="center"> + <EuiFlexItem grow={false}>{hiddenIndicesSwitch}</EuiFlexItem> + <EuiFlexItem className="entSearchIndicesSearchBar"> + <EuiSearchBar + query={searchQuery} + box={{ + incremental: true, + placeholder: i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder', + { + defaultMessage: 'Filter Elasticsearch indices', + } + ), + }} + aria-label={i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel', + { + defaultMessage: 'Filter Elasticsearch indices', + } + )} + onChange={(event) => setSearchValue(event.queryText)} + /> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + <EuiFlexItem> + <IndicesTable + indices={indices} + meta={meta} + onChange={handlePageChange(onPaginate)} + isLoading={isLoading} + /> + </EuiFlexItem> + </EuiFlexGroup> ) : ( <> <AddContentEmptyPrompt /> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/logic/indices_api/indices_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/logic/indices_api/indices_api_logic.ts deleted file mode 100644 index 29dfc6b833411..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/logic/indices_api/indices_api_logic.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { Meta } from '../../../../../common/types'; -import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; -import { HttpLogic } from '../../../shared/http'; -import { SearchIndex } from '../../types'; - -export const indicesApi = async ({ meta }: { meta: Meta }) => { - const { http } = HttpLogic.values; - const route = '/internal/enterprise_search/indices'; - const query = { - page: meta.page.current, - size: meta.page.size, - }; - const response = await http.get<{ indices: SearchIndex[]; meta: Meta }>(route, { - query, - }); - - return response; -}; - -export const IndicesAPILogic = createApiLogic(['content', 'indices_api_logic'], indicesApi); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts index b6c88caf63ed6..8ff7dc30f34ea 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/types.ts @@ -5,42 +5,6 @@ * 2.0. */ -/** - * As of 2022-04-04, this shape is still in debate. Specifically, the `source_type` will be changing as we get closer to 8.3. - * These merely serve as placeholders for static data for now. - */ - -import { HealthStatus } from '@elastic/elasticsearch/lib/api/types'; - -import { Connector } from '../../../common/types/connectors'; - -export interface SearchIndex { - data_ingestion: 'connected' | 'incomplete'; - document_count: number; - elasticsearch_index_name: string; - health: HealthStatus; - name: string; - - storage: string; -} - export interface Crawler { domains: []; } - -export interface IndexData { - connector?: Connector; - crawler?: Crawler; - index: { - aliases: string[]; - health: string; - name: string; - total: { - docs: { - count: number; - deleted: number; - }; - }; - uuid: string; - }; -} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/cloud_details/cloud_details.ts b/x-pack/plugins/enterprise_search/public/applications/shared/cloud_details/cloud_details.ts new file mode 100644 index 0000000000000..b46a7f9c130fb --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/cloud_details/cloud_details.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useValues } from 'kea'; + +import { KibanaLogic } from '../kibana'; + +export interface CloudDetails { + cloudId: string | undefined; + deploymentUrl: string | undefined; +} + +export const useCloudDetails = (): CloudDetails => { + const { cloud } = useValues(KibanaLogic); + return { + cloudId: cloud?.cloudId, + deploymentUrl: cloud?.deploymentUrl, + }; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/__mocks__/doc_links.mock.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/__mocks__/doc_links.mock.ts new file mode 100644 index 0000000000000..7529b22fe1336 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/__mocks__/doc_links.mock.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { docLinksServiceMock } from '@kbn/core/public/mocks'; + +const mockLinks = { + DOC_LINK_VERSION: docLinksServiceMock.createStartContract().DOC_LINK_VERSION, + ELASTIC_WEBSITE_URL: docLinksServiceMock.createStartContract().ELASTIC_WEBSITE_URL, + links: docLinksServiceMock.createStartContract().links, +}; + +jest.mock('../doc_links', () => ({ docLinks: mockLinks })); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts index 7d27d10a6ca85..9132dbdfb05b2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts @@ -42,7 +42,9 @@ class DocLinks { public clientsNetIntroduction: string; public clientsNetNest: string; public clientsNetSingleNode: string; + public clientsPerlGuide: string; public clientsPhpConnecting: string; + public clientsPhpGuide: string; public clientsPhpInstallation: string; public clientsPhpOverview: string; public clientsPythonAuthentication: string; @@ -130,7 +132,9 @@ class DocLinks { this.clientsNetIntroduction = ''; this.clientsNetNest = ''; this.clientsNetSingleNode = ''; + this.clientsPerlGuide = ''; this.clientsPhpConnecting = ''; + this.clientsPhpGuide = ''; this.clientsPhpInstallation = ''; this.clientsPhpOverview = ''; this.clientsPythonAuthentication = ''; @@ -220,7 +224,9 @@ class DocLinks { this.clientsNetIntroduction = docLinks.links.clients.netIntroduction; this.clientsNetNest = docLinks.links.clients.netNest; this.clientsNetSingleNode = docLinks.links.clients.netSingleNode; + this.clientsPerlGuide = docLinks.links.clients.perlGuide; this.clientsPhpConnecting = docLinks.links.clients.phpConnecting; + this.clientsPhpGuide = docLinks.links.clients.phpGuide; this.clientsPhpInstallation = docLinks.links.clients.phpInstallation; this.clientsPhpOverview = docLinks.links.clients.phpOverview; this.clientsPythonAuthentication = docLinks.links.clients.pythonAuthentication; diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/fetch_connectors.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/fetch_connectors.ts index eaeeaff88003a..4c0356c3f04fc 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/fetch_connectors.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/fetch_connectors.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { IScopedClusterClient } from '@kbn/core/server'; import { CONNECTORS_INDEX } from '../..'; @@ -58,7 +59,10 @@ export const fetchConnectorByIndexName = async ( } }; -export const fetchConnectors = async (client: IScopedClusterClient): Promise<Connector[]> => { +export const fetchConnectors = async ( + client: IScopedClusterClient, + indexNames?: string[] +): Promise<Connector[]> => { try { const connectorResult = await client.asCurrentUser.search<ConnectorDocument>({ from: 0, @@ -68,11 +72,14 @@ export const fetchConnectors = async (client: IScopedClusterClient): Promise<Con }); let connectors = connectorResult.hits.hits; let length = connectors.length; + const query: QueryDslQueryContainer = indexNames + ? { terms: { 'index_name.keyword': indexNames } } + : { match_all: {} }; while (length >= 1000) { const newConnectorResult = await client.asCurrentUser.search<ConnectorDocument>({ from: 0, index: CONNECTORS_INDEX, - query: { match_all: {} }, + query, size: 1000, }); connectors = connectors.concat(newConnectorResult.hits.hits); diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts index 15ccaa680cc92..0cde2901736c7 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.test.ts @@ -54,22 +54,20 @@ describe('fetchIndex lib function', () => { }; const result = { - index: { - aliases: [], - health: 'green', - name: 'index_name', - status: 'open', - total: { - docs: { - count: 100, - deleted: 0, - }, - store: { - size_in_bytes: '105.47kb', - }, + aliases: [], + health: 'green', + name: 'index_name', + status: 'open', + total: { + docs: { + count: 100, + deleted: 0, + }, + store: { + size_in_bytes: '105.47kb', }, - uuid: '83a81e7e-5955-4255-b008-5d6961203f57', }, + uuid: '83a81e7e-5955-4255-b008-5d6961203f57', }; it('should return data and stats for index if no connector or crawler is present', async () => { diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts index ad13cbb145413..182780b572956 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_index.ts @@ -7,12 +7,17 @@ import { IScopedClusterClient } from '@kbn/core/server'; -import { Crawler } from '../../types/crawler'; +import { Crawler } from '../../../common/types/crawler'; +import { ElasticsearchIndexWithIngestion } from '../../../common/types/indices'; + import { fetchConnectorByIndexName } from '../connectors/fetch_connectors'; import { mapIndexStats } from './fetch_indices'; -export const fetchIndex = async (client: IScopedClusterClient, index: string) => { +export const fetchIndex = async ( + client: IScopedClusterClient, + index: string +): Promise<ElasticsearchIndexWithIngestion> => { const indexDataResult = await client.asCurrentUser.indices.get({ index }); const indexData = indexDataResult[index]; const { indices } = await client.asCurrentUser.indices.stats({ index }); @@ -25,8 +30,8 @@ export const fetchIndex = async (client: IScopedClusterClient, index: string) => const connector = await fetchConnectorByIndexName(client, index); if (connector) { return { + ...indexResult, connector, - index: indexResult, }; } @@ -37,11 +42,8 @@ export const fetchIndex = async (client: IScopedClusterClient, index: string) => const crawler = crawlerResult.hits.hits[0]?._source; if (crawler) { - return { - crawler, - index: indexResult, - }; + return { ...indexResult, crawler }; } - return { index: indexResult }; + return indexResult; }; diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts index f44f580f3d328..41f15530475f4 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.test.ts @@ -52,11 +52,14 @@ describe('fetchIndices lib function', () => { }); it('should return regular index without aliases', async () => { - mockClient.asCurrentUser.indices.get.mockImplementation(() => regularIndexResponse); + mockClient.asCurrentUser.indices.get.mockImplementation(() => ({ + ...regularIndexResponse, + hidden: { aliases: {}, settings: { index: { hidden: 'true' } } }, + })); mockClient.asCurrentUser.indices.stats.mockImplementation(() => regularIndexStatsResponse); await expect( - fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', /search-.*/) + fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false) ).resolves.toEqual([ { health: 'green', @@ -77,7 +80,7 @@ describe('fetchIndices lib function', () => { expect(mockClient.asCurrentUser.indices.get).toHaveBeenCalledWith({ expand_wildcards: ['open'], features: ['aliases', 'settings'], - filter_path: ['*.aliases'], + filter_path: ['*.aliases', '*.settings.index.hidden'], index: 'search-*', }); @@ -88,6 +91,43 @@ describe('fetchIndices lib function', () => { }); }); + it('should return hidden indices without aliases if specified', async () => { + mockClient.asCurrentUser.indices.get.mockImplementation(() => regularIndexResponse); + mockClient.asCurrentUser.indices.stats.mockImplementation(() => regularIndexStatsResponse); + + await expect( + fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', true, /search-.*/) + ).resolves.toEqual([ + { + health: 'green', + name: 'search-regular-index', + status: 'open', + total: { + docs: { + count: 100, + deleted: 0, + }, + store: { + size_in_bytes: '105.47kb', + }, + }, + uuid: '83a81e7e-5955-4255-b008-5d6961203f57', + }, + ]); + expect(mockClient.asCurrentUser.indices.get).toHaveBeenCalledWith({ + expand_wildcards: ['hidden', 'all'], + features: ['aliases', 'settings'], + filter_path: ['*.aliases', '*.settings.index.hidden'], + index: 'search-*', + }); + + expect(mockClient.asCurrentUser.indices.stats).toHaveBeenCalledWith({ + expand_wildcards: ['hidden', 'all'], + index: 'search-*', + metric: ['docs', 'store'], + }); + }); + it('should return index with aliases', async () => { const aliasedIndexResponse = { 'index-without-prefix': { @@ -107,7 +147,7 @@ describe('fetchIndices lib function', () => { mockClient.asCurrentUser.indices.get.mockImplementationOnce(() => aliasedIndexResponse); mockClient.asCurrentUser.indices.stats.mockImplementationOnce(() => aliasedStatsResponse); await expect( - fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', /search-.*/) + fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false, /^search-*/) ).resolves.toEqual([ { health: 'green', @@ -154,7 +194,7 @@ describe('fetchIndices lib function', () => { // simulates when an index has been deleted after get indices call // deleted index won't be present in the indices stats call response await expect( - fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', /search-.*/) + fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false) ).resolves.toEqual([ { health: undefined, @@ -177,7 +217,7 @@ describe('fetchIndices lib function', () => { it('should return empty array when no index found', async () => { mockClient.asCurrentUser.indices.get.mockImplementationOnce(() => ({})); await expect( - fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', /search-.*/) + fetchIndices(mockClient as unknown as IScopedClusterClient, 'search-*', false) ).resolves.toEqual([]); expect(mockClient.asCurrentUser.indices.stats).not.toHaveBeenCalled(); }); diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts index 769b853f7765f..a563c7c0838b9 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/fetch_indices.ts @@ -5,7 +5,11 @@ * 2.0. */ -import { IndicesIndexState, IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; +import { + ExpandWildcard, + IndicesIndexState, + IndicesStatsIndicesStats, +} from '@elastic/elasticsearch/lib/api/types'; import { ByteSizeValue } from '@kbn/config-schema'; import { IScopedClusterClient } from '@kbn/core/server'; @@ -43,42 +47,53 @@ export const mapIndexStats = ( export const fetchIndices = async ( client: IScopedClusterClient, indexPattern: string, - indexRegExp: RegExp + returnHiddenIndices: boolean, + indexRegExp?: RegExp ): Promise<ElasticsearchIndex[]> => { // This call retrieves alias and settings information about indices - const indices = await client.asCurrentUser.indices.get({ - expand_wildcards: ['open'], + const expandWildcards: ExpandWildcard[] = returnHiddenIndices ? ['hidden', 'all'] : ['open']; + const totalIndices = await client.asCurrentUser.indices.get({ + expand_wildcards: expandWildcards, // for better performance only compute aliases and settings of indices but not mappings features: ['aliases', 'settings'], // only get specified index properties from ES to keep the response under 536MB // node.js string length limit: https://github.com/nodejs/node/issues/33960 - filter_path: ['*.aliases'], + filter_path: ['*.aliases', '*.settings.index.hidden'], index: indexPattern, }); - if (!Object.keys(indices).length) { + const indicesNames = returnHiddenIndices + ? Object.keys(totalIndices) + : Object.keys(totalIndices).filter( + (indexName) => !(totalIndices[indexName]?.settings?.index?.hidden === 'true') + ); + if (indicesNames.length === 0) { return []; } const { indices: indicesStats = {} } = await client.asCurrentUser.indices.stats({ - expand_wildcards: ['open'], + expand_wildcards: expandWildcards, index: indexPattern, metric: ['docs', 'store'], }); - const indicesNames = Object.keys(indices); - return indicesNames + const resultIndices = indicesNames .map((indexName: string) => { - const indexData = indices[indexName]; + const indexData = totalIndices[indexName]; const indexStats = indicesStats[indexName]; return mapIndexStats(indexData, indexStats, indexName); }) .flatMap(({ name, aliases, ...engineData }) => { + // expand aliases and add to results const engines = []; engines.push({ name, ...engineData }); + aliases.forEach((alias) => { engines.push({ name: alias, ...engineData }); }); return engines; - }) - .filter(({ name }) => name.match(indexRegExp)); + }); + + // The previous step could have added indices that don't match the index pattern, so filter those out again + // We wildcard RegExp the pattern unless user provides a more specific regex + return indexRegExp ? resultIndices.filter(({ name }) => name.match(indexRegExp)) : resultIndices; }; diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts index 6a0fd3935628c..e11928aee2093 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/indices.ts @@ -7,6 +7,8 @@ import { schema } from '@kbn/config-schema'; +import { fetchConnectors } from '../../lib/connectors/fetch_connectors'; + import { createApiIndex } from '../../lib/indices/create_index'; import { fetchIndex } from '../../lib/indices/fetch_index'; import { fetchIndices } from '../../lib/indices/fetch_indices'; @@ -19,7 +21,7 @@ export function registerIndexRoutes({ router }: RouteDependencies) { async (context, _, response) => { const { client } = (await context.core).elasticsearch; try { - const indices = await fetchIndices(client, 'search-*', /^search-.*/); + const indices = await fetchIndices(client, 'search-*', false, /^search-.*/); return response.ok({ body: indices, headers: { 'content-type': 'application/json' }, @@ -38,26 +40,41 @@ export function registerIndexRoutes({ router }: RouteDependencies) { validate: { query: schema.object({ page: schema.number({ defaultValue: 0, min: 0 }), + return_hidden_indices: schema.maybe(schema.boolean()), + search_query: schema.maybe(schema.string()), size: schema.number({ defaultValue: 10, min: 0 }), }), }, }, async (context, request, response) => { - const { page, size } = request.query; + const { + page, + size, + return_hidden_indices: returnHiddenIndices, + search_query: searchQuery, + } = request.query; const { client } = (await context.core).elasticsearch; try { - const indices = await fetchIndices(client, '*', /.*/); - const totalResults = indices.length; - const totalPages = Math.ceil(totalResults / size); + const indexPattern = searchQuery ? `*${searchQuery}*` : '*'; + const totalIndices = await fetchIndices(client, indexPattern, !!returnHiddenIndices); + const totalResults = totalIndices.length; + const totalPages = Math.ceil(totalResults / size) || 1; const startIndex = (page - 1) * size; const endIndex = page * size; + const selectedIndices = totalIndices.slice(startIndex, endIndex); + const indexNames = selectedIndices.map(({ name }) => name); + const connectors = await fetchConnectors(client, indexNames); + const indices = selectedIndices.map((index) => ({ + ...index, + connector: connectors.find((connector) => connector.index_name === index.name), + })); return response.ok({ body: { - indices: indices.slice(startIndex, endIndex), + indices, meta: { page: { current: page, - size, + size: indices.length, total_pages: totalPages, total_results: totalResults, }, @@ -125,7 +142,6 @@ export function registerIndexRoutes({ router }: RouteDependencies) { } } ); - router.post( { path: '/internal/enterprise_search/indices', diff --git a/x-pack/plugins/event_log/server/es/context.mock.ts b/x-pack/plugins/event_log/server/es/context.mock.ts index e0c3e34f84431..c974a63a6407f 100644 --- a/x-pack/plugins/event_log/server/es/context.mock.ts +++ b/x-pack/plugins/event_log/server/es/context.mock.ts @@ -12,6 +12,8 @@ import { namesMock } from './names.mock'; import { IClusterClientAdapter } from './cluster_client_adapter'; import { clusterClientAdapterMock } from './cluster_client_adapter.mock'; +export const MOCK_RETRY_DELAY = 20; + const createContextMock = () => { const mock: jest.Mocked<EsContext> & { esAdapter: jest.Mocked<IClusterClientAdapter>; @@ -23,6 +25,7 @@ const createContextMock = () => { waitTillReady: jest.fn(async () => true), esAdapter: clusterClientAdapterMock.create(), initialized: true, + retryDelay: MOCK_RETRY_DELAY, }; return mock; }; diff --git a/x-pack/plugins/event_log/server/es/context.ts b/x-pack/plugins/event_log/server/es/context.ts index c98710a53f96d..614ea79d97257 100644 --- a/x-pack/plugins/event_log/server/es/context.ts +++ b/x-pack/plugins/event_log/server/es/context.ts @@ -12,14 +12,17 @@ import { initializeEs } from './init'; import { ClusterClientAdapter, IClusterClientAdapter } from './cluster_client_adapter'; import { createReadySignal, ReadySignal } from '../lib/ready_signal'; +export const RETRY_DELAY = 2000; + export interface EsContext { - logger: Logger; - esNames: EsNames; - esAdapter: IClusterClientAdapter; + readonly logger: Logger; + readonly esNames: EsNames; + readonly esAdapter: IClusterClientAdapter; initialize(): void; shutdown(): Promise<void>; waitTillReady(): Promise<boolean>; - initialized: boolean; + readonly initialized: boolean; + readonly retryDelay: number; } export interface EsError { @@ -44,12 +47,14 @@ class EsContextImpl implements EsContext { public esAdapter: IClusterClientAdapter; private readonly readySignal: ReadySignal<boolean>; public initialized: boolean; + public readonly retryDelay: number; constructor(params: EsContextCtorParams) { this.logger = params.logger; this.esNames = getEsNames(params.indexNameRoot, params.kibanaVersion); this.readySignal = createReadySignal(); this.initialized = false; + this.retryDelay = RETRY_DELAY; this.esAdapter = new ClusterClientAdapter({ logger: params.logger, elasticsearchClientPromise: params.elasticsearchClientPromise, diff --git a/x-pack/plugins/event_log/server/es/init.test.ts b/x-pack/plugins/event_log/server/es/init.test.ts index 6a261438de1af..5165dc69cd7ef 100644 --- a/x-pack/plugins/event_log/server/es/init.test.ts +++ b/x-pack/plugins/event_log/server/es/init.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { contextMock } from './context.mock'; +import { contextMock, MOCK_RETRY_DELAY } from './context.mock'; import { initializeEs, parseIndexAliases } from './init'; describe('initializeEs', () => { @@ -454,3 +454,91 @@ describe('parseIndexAliases', () => { ]); }); }); + +describe('retries', () => { + let esContext = contextMock.create(); + // set up context APIs to return defaults indicating already created + beforeEach(() => { + esContext = contextMock.create(); + esContext.esAdapter.getExistingLegacyIndexTemplates.mockResolvedValue({}); + esContext.esAdapter.getExistingIndices.mockResolvedValue({}); + esContext.esAdapter.getExistingIndexAliases.mockResolvedValue({}); + esContext.esAdapter.doesIlmPolicyExist.mockResolvedValue(true); + esContext.esAdapter.doesIndexTemplateExist.mockResolvedValue(true); + esContext.esAdapter.doesAliasExist.mockResolvedValue(true); + }); + + test('createIlmPolicyIfNotExists with 1 retry', async () => { + esContext.esAdapter.doesIlmPolicyExist.mockRejectedValueOnce(new Error('retry 1')); + + const timeStart = Date.now(); + await initializeEs(esContext); + const timeElapsed = Date.now() - timeStart; + + expect(timeElapsed).toBeGreaterThanOrEqual(MOCK_RETRY_DELAY); + + expect(esContext.esAdapter.getExistingLegacyIndexTemplates).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesIlmPolicyExist).toHaveBeenCalledTimes(2); + expect(esContext.esAdapter.doesIndexTemplateExist).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesAliasExist).toHaveBeenCalledTimes(1); + + const prefix = `eventLog initialization operation failed and will be retried: createIlmPolicyIfNotExists`; + expect(esContext.logger.warn).toHaveBeenCalledTimes(1); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 4 more times; error: retry 1`); + }); + + test('createIndexTemplateIfNotExists with 2 retries', async () => { + esContext.esAdapter.doesIndexTemplateExist.mockRejectedValueOnce(new Error('retry 2a')); + esContext.esAdapter.doesIndexTemplateExist.mockRejectedValueOnce(new Error('retry 2b')); + + const timeStart = Date.now(); + await initializeEs(esContext); + const timeElapsed = Date.now() - timeStart; + + expect(timeElapsed).toBeGreaterThanOrEqual(MOCK_RETRY_DELAY * (1 + 2)); + + expect(esContext.esAdapter.getExistingLegacyIndexTemplates).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesIlmPolicyExist).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesIndexTemplateExist).toHaveBeenCalledTimes(3); + expect(esContext.esAdapter.doesAliasExist).toHaveBeenCalledTimes(1); + + const prefix = `eventLog initialization operation failed and will be retried: createIndexTemplateIfNotExists`; + expect(esContext.logger.warn).toHaveBeenCalledTimes(2); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 4 more times; error: retry 2a`); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 3 more times; error: retry 2b`); + }); + + test('createInitialIndexIfNotExists', async () => { + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5a')); + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5b')); + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5c')); + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5d')); + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5e')); + // make sure it only tries 5 times - this one should not be reported + esContext.esAdapter.doesAliasExist.mockRejectedValueOnce(new Error('retry 5f')); + + const timeStart = Date.now(); + await initializeEs(esContext); + const timeElapsed = Date.now() - timeStart; + + expect(timeElapsed).toBeGreaterThanOrEqual(MOCK_RETRY_DELAY * (1 + 2 + 4 + 8)); + + expect(esContext.esAdapter.getExistingLegacyIndexTemplates).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesIlmPolicyExist).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesIndexTemplateExist).toHaveBeenCalledTimes(1); + expect(esContext.esAdapter.doesAliasExist).toHaveBeenCalledTimes(5); + + const prefix = `eventLog initialization operation failed and will be retried: createInitialIndexIfNotExists`; + expect(esContext.logger.warn).toHaveBeenCalledTimes(5); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 4 more times; error: retry 5a`); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 3 more times; error: retry 5b`); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 2 more times; error: retry 5c`); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 1 more times; error: retry 5d`); + expect(esContext.logger.warn).toHaveBeenCalledWith(`${prefix}; 0 more times; error: retry 5e`); + + expect(esContext.logger.error).toHaveBeenCalledTimes(1); + expect(esContext.logger.error).toHaveBeenCalledWith( + `error initializing elasticsearch resources: retry 5e` + ); + }); +}); diff --git a/x-pack/plugins/event_log/server/es/init.ts b/x-pack/plugins/event_log/server/es/init.ts index 4440102fcd381..da98a18e9d758 100644 --- a/x-pack/plugins/event_log/server/es/init.ts +++ b/x-pack/plugins/event_log/server/es/init.ts @@ -8,9 +8,12 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { asyncForEach } from '@kbn/std'; import { groupBy } from 'lodash'; +import pRetry, { FailedAttemptError } from 'p-retry'; import { getIlmPolicy, getIndexTemplate } from './documents'; import { EsContext } from './context'; +const MAX_RETRY_DELAY = 30000; + export async function initializeEs(esContext: EsContext): Promise<boolean> { esContext.logger.debug('initializing elasticsearch resources starting'); @@ -28,10 +31,33 @@ export async function initializeEs(esContext: EsContext): Promise<boolean> { async function initializeEsResources(esContext: EsContext) { const steps = new EsInitializationSteps(esContext); - await steps.setExistingAssetsToHidden(); - await steps.createIlmPolicyIfNotExists(); - await steps.createIndexTemplateIfNotExists(); - await steps.createInitialIndexIfNotExists(); + // today, setExistingAssetsToHidden() never throws, but just in case ... + await retry(steps.setExistingAssetsToHidden); + await retry(steps.createIlmPolicyIfNotExists); + await retry(steps.createIndexTemplateIfNotExists); + await retry(steps.createInitialIndexIfNotExists); + + async function retry(stepMethod: () => Promise<void>): Promise<void> { + // call the step method with retry options via p-retry + await pRetry(() => stepMethod.call(steps), getRetryOptions(esContext, stepMethod.name)); + } +} + +function getRetryOptions(esContext: EsContext, operation: string) { + const logger = esContext.logger; + // should retry on the order of 2s, 4s, 8s, 16s + // see: https://github.com/tim-kos/node-retry#retryoperationoptions + return { + minTimeout: esContext.retryDelay, + maxTimeout: MAX_RETRY_DELAY, + retries: 4, + factor: 2, + randomize: true, + onFailedAttempt: (err: FailedAttemptError) => { + const message = `eventLog initialization operation failed and will be retried: ${operation}; ${err.retriesLeft} more times; error: ${err.message}`; + logger.warn(message); + }, + }; } export interface ParsedIndexAlias extends estypes.IndicesAliasDefinition { diff --git a/x-pack/plugins/fleet/.storybook/context/http.ts b/x-pack/plugins/fleet/.storybook/context/http.ts index ff5b36a82aa66..70a766aca92e4 100644 --- a/x-pack/plugins/fleet/.storybook/context/http.ts +++ b/x-pack/plugins/fleet/.storybook/context/http.ts @@ -93,6 +93,14 @@ export const getHttp = (basepath = BASE_PATH) => { }; } + if (path.match('/api/fleet/agent_download_sources')) { + return { + items: [ + { name: 'Default Download Source', is_default: true, host: 'https://www.example.com' }, + ], + }; + } + action(path)(`UNSUPPORTED ROUTE: GET ${path}`); return {}; }) as HttpHandler, diff --git a/x-pack/plugins/fleet/cypress/integration/agent.spec.ts b/x-pack/plugins/fleet/cypress/integration/agent.spec.ts index 3881a66d8b603..6dc7ba2c88104 100644 --- a/x-pack/plugins/fleet/cypress/integration/agent.spec.ts +++ b/x-pack/plugins/fleet/cypress/integration/agent.spec.ts @@ -5,63 +5,7 @@ * 2.0. */ -// 8.1.0 is not significant its just a version < current version -const createAgentDoc = ( - id: string, - policy: string, - status = 'online', - version: string = '8.1.0' -) => ({ - access_api_key_id: 'abcdefghijklmn', - action_seq_no: [-1], - active: true, - agent: { - id, - version, - }, - enrolled_at: '2022-03-07T14:02:00Z', - local_metadata: { - elastic: { - agent: { - 'build.original': version, - id, - log_level: 'info', - snapshot: true, - upgradeable: true, - version, - }, - }, - host: { - architecture: 'x86_64', - hostname: id, - id: 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE', - ip: ['127.0.0.1/8'], - mac: ['ab:cd:12:34:56:78'], - name: id, - }, - os: { - family: 'darwin', - full: 'Mac OS X(10.16)', - kernel: '21.3.0', - name: 'Mac OS X', - platform: 'darwin', - version: '10.16', - }, - }, - policy_id: policy, - type: 'PERMANENT', - default_api_key: 'abcdefg', - default_api_key_id: 'abcd', - policy_output_permissions_hash: 'somehash', - updated_at: '2022-03-07T16:35:03Z', - last_checkin_status: status, - last_checkin: new Date(), - policy_revision_idx: 1, - policy_coordinator_idx: 1, - policy_revision: 1, - status, - packages: [], -}); +import { createAgentDoc } from '../tasks/agents'; const createAgentDocs = (kibanaVersion: string) => [ createAgentDoc('agent-1', 'policy-1'), // this agent will have upgrade available diff --git a/x-pack/plugins/fleet/cypress/integration/fleet_agent_flyout.spec.ts b/x-pack/plugins/fleet/cypress/integration/fleet_agent_flyout.spec.ts new file mode 100644 index 0000000000000..626fa1427f8f1 --- /dev/null +++ b/x-pack/plugins/fleet/cypress/integration/fleet_agent_flyout.spec.ts @@ -0,0 +1,119 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ADD_AGENT_BUTTON, ADD_AGENT_FLYOUT } from '../screens/fleet'; +import { cleanupAgentPolicies } from '../tasks/cleanup'; +import { createAgentDoc } from '../tasks/agents'; +import { setFleetServerHost } from '../tasks/fleet'; +import { FLEET, navigateTo } from '../tasks/navigation'; + +const FLEET_SERVER_POLICY_ID = 'fleet-server-policy'; + +function cleanUp() { + cy.task('deleteDocsByQuery', { + index: '.fleet-agents', + query: { match_all: {} }, + ignoreUnavailable: true, + }); + cy.task('deleteDocsByQuery', { + index: '.fleet-servers', + query: { match_all: {} }, + ignoreUnavailable: true, + }); + cleanupAgentPolicies(); +} +let kibanaVersion: string; +describe('Fleet add agent flyout', () => { + describe('With a Fleet Server already setup', () => { + beforeEach(() => { + cleanUp(); + let policyId: string; + // Create a Fleet server policy + cy.request({ + method: 'POST', + url: '/api/fleet/agent_policies', + headers: { 'kbn-xsrf': 'xx' }, + body: { + id: FLEET_SERVER_POLICY_ID, + name: 'Fleet Server policy', + namespace: 'default', + has_fleet_server: true, + }, + }).then((response: any) => { + // setup Fleet server + policyId = response.body.item.id; + }); + + cy.getKibanaVersion().then((version) => { + kibanaVersion = version; + }); + + cy.wrap(null).then(() => { + cy.task('insertDocs', { + index: '.fleet-agents', + docs: [createAgentDoc('agent1', policyId, 'online', kibanaVersion)], + }); + cy.task('insertDocs', { + index: '.fleet-servers', + docs: [ + { + '@timestamp': new Date().toISOString(), + }, + ], + }); + setFleetServerHost(); + }); + }); + + afterEach(() => { + cleanUp(); + }); + + it('works in managed mode without agent policy created', () => { + const AGENT_ID = 'agent' + Date.now(); + navigateTo(FLEET); + + cy.getBySel(ADD_AGENT_BUTTON).click(); + cy.intercept('POST', '/api/fleet/agent_policies?sys_monitoring=true').as('createAgentPolicy'); + + cy.getBySel('createPolicyBtn').click(); + + let agentPolicyId: string; + const startTime = Date.now(); + cy.wait('@createAgentPolicy', { timeout: 180000 }).then((xhr: any) => { + cy.log('Create agent policy took: ' + (Date.now() - startTime) / 1000 + ' s'); + agentPolicyId = xhr.response.body.item.id; + }); + // verify create button changed to dropdown + cy.getBySel('agentPolicyDropdown'); + + cy.wrap(null).then(() => { + cy.task('insertDoc', { + index: '.fleet-agents', + id: AGENT_ID, + doc: createAgentDoc(AGENT_ID, agentPolicyId!, 'online', kibanaVersion), + }); + }); + + cy.getBySel(ADD_AGENT_FLYOUT.CONFIRM_AGENT_ENROLLMENT_BUTTON); + + cy.wrap(null).then(() => { + cy.task('insertDoc', { + index: 'logs-cypress-test', + id: 'test-' + Date.now(), + doc: { + '@timestamp': new Date().toISOString(), + 'agent.id': AGENT_ID, + message: 'Test log 1', + }, + }); + }); + + cy.getBySel(ADD_AGENT_FLYOUT.INCOMING_DATA_CONFIRMED_CALL_OUT); + }); + }); +}); diff --git a/x-pack/plugins/fleet/cypress/plugins/index.ts b/x-pack/plugins/fleet/cypress/plugins/index.ts index 09021b12f567c..d11dbb1e38ada 100644 --- a/x-pack/plugins/fleet/cypress/plugins/index.ts +++ b/x-pack/plugins/fleet/cypress/plugins/index.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line + +// eslint-disable-next-line import/no-extraneous-dependencies import { createEsClientForTesting } from '@kbn/test'; const plugin: Cypress.PluginConfig = (on, config) => { @@ -12,10 +13,13 @@ const plugin: Cypress.PluginConfig = (on, config) => { esUrl: config.env.ELASTICSEARCH_URL, }); on('task', { + async insertDoc({ index, doc, id }: { index: string; doc: any; id: string }) { + return client.create({ id, document: doc, index, refresh: 'wait_for' }); + }, async insertDocs({ index, docs }: { index: string; docs: any[] }) { const operations = docs.flatMap((doc) => [{ index: { _index: index } }, doc]); - return client.bulk({ operations }); + return client.bulk({ operations, refresh: 'wait_for' }); }, async deleteDocsByQuery({ index, @@ -26,7 +30,12 @@ const plugin: Cypress.PluginConfig = (on, config) => { query: any; ignoreUnavailable?: boolean; }) { - return client.deleteByQuery({ index, query, ignore_unavailable: ignoreUnavailable }); + return client.deleteByQuery({ + index, + query, + ignore_unavailable: ignoreUnavailable, + refresh: true, + }); }, }); }; diff --git a/x-pack/plugins/fleet/cypress/screens/fleet.ts b/x-pack/plugins/fleet/cypress/screens/fleet.ts index ef3389b90bd5d..25677c823833f 100644 --- a/x-pack/plugins/fleet/cypress/screens/fleet.ts +++ b/x-pack/plugins/fleet/cypress/screens/fleet.ts @@ -23,3 +23,8 @@ export const FLEET_SERVER_MISSING_PRIVILEGES_TITLE = 'fleetServerMissingPrivileg export const AGENT_POLICY_SAVE_INTEGRATION = 'saveIntegration'; export const PACKAGE_POLICY_TABLE_LINK = 'PackagePoliciesTableLink'; export const ADD_PACKAGE_POLICY_BTN = 'addPackagePolicyButton'; + +export const ADD_AGENT_FLYOUT = { + CONFIRM_AGENT_ENROLLMENT_BUTTON: 'ConfirmAgentEnrollmentButton', + INCOMING_DATA_CONFIRMED_CALL_OUT: 'IncomingDataConfirmedCallOut', +}; diff --git a/x-pack/plugins/fleet/cypress/tasks/agents.ts b/x-pack/plugins/fleet/cypress/tasks/agents.ts new file mode 100644 index 0000000000000..c8341e5acdc7b --- /dev/null +++ b/x-pack/plugins/fleet/cypress/tasks/agents.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const createAgentDoc = ( + id: string, + policy: string, + status = 'online', + version: string = '8.1.0' +) => ({ + access_api_key_id: 'abcdefghijklmn', + action_seq_no: [-1], + active: true, + agent: { + id, + version, + }, + enrolled_at: new Date().toISOString(), + local_metadata: { + elastic: { + agent: { + 'build.original': version, + id, + log_level: 'info', + snapshot: true, + upgradeable: true, + version, + }, + }, + host: { + architecture: 'x86_64', + hostname: id, + id: 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE', + ip: ['127.0.0.1/8'], + mac: ['ab:cd:12:34:56:78'], + name: id, + }, + os: { + family: 'darwin', + full: 'Mac OS X(10.16)', + kernel: '21.3.0', + name: 'Mac OS X', + platform: 'darwin', + version: '10.16', + }, + }, + policy_id: policy, + type: 'PERMANENT', + default_api_key: 'abcdefg', + default_api_key_id: 'abcd', + policy_output_permissions_hash: 'somehash', + updated_at: '2022-03-07T16:35:03Z', + last_checkin_status: status, + last_checkin: new Date().toISOString(), + policy_revision_idx: 1, + policy_coordinator_idx: 1, + policy_revision: 1, + status, + packages: [], +}); diff --git a/x-pack/plugins/fleet/cypress/tasks/fleet.ts b/x-pack/plugins/fleet/cypress/tasks/fleet.ts index 926734503ae0c..53f2846b3a981 100644 --- a/x-pack/plugins/fleet/cypress/tasks/fleet.ts +++ b/x-pack/plugins/fleet/cypress/tasks/fleet.ts @@ -56,3 +56,14 @@ export function verifyAgentPackage() { cy.visit('/app/integrations/installed'); cy.getBySel('integration-card:epr:elastic_agent'); } + +export function setFleetServerHost(host = 'https://fleetserver:8220') { + cy.request({ + method: 'PUT', + url: '/api/fleet/settings', + headers: { 'kbn-xsrf': 'xx' }, + body: { + fleet_server_hosts: [host], + }, + }); +} diff --git a/x-pack/plugins/fleet/dev_docs/api/agents_acks.md b/x-pack/plugins/fleet/dev_docs/api/agents_acks.md deleted file mode 100644 index f4924ac55fa18..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/agents_acks.md +++ /dev/null @@ -1,37 +0,0 @@ -# Fleet agent acks API - -Agent acks -Acknowledge actions received during checkin - -## Request - -`POST /api/fleet/agents/{agentId}/acks` - -## Headers - -- `Authorization` (Required, string) A valid fleet access api key.. - -## Request body - -- `action_ids` (Required, array) An array of action id that the agent received. - -## Response code - -- `200` Indicates a successful call. - -## Example - -```js -POST /api/fleet/agents/a4937110-e53e-11e9-934f-47a8e38a522c/acks -Authorization: ApiKey VALID_ACCESS_API_KEY -{ - "action_ids": ["action-1", "action-2"] -} -``` - -```js -{ - "action": "acks", - "success": true, -} -``` diff --git a/x-pack/plugins/fleet/dev_docs/api/agents_checkin.md b/x-pack/plugins/fleet/dev_docs/api/agents_checkin.md deleted file mode 100644 index 7d7cdeaecaccb..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/agents_checkin.md +++ /dev/null @@ -1,47 +0,0 @@ -# Fleet agent checkin API - -Agent checkin -Report current state of a Fleet agent. - -## Request - -`POST /api/fleet/agents/{agentId}/checkin` - -## Headers - -- `Authorization` (Required, string) A valid fleet access api key.. - -## Request body - -- `events` (Required, array) An array of events with the properties `type`, `subtype`, `message`, `timestamp`, `payload`, and `agent_id`. - -- `local_metadata` (Optional, object) An object that contains the local metadata for an agent. The metadata is a dictionary of strings (example: `{ "os": "macos" }`). - -## Response code - -- `200` Indicates a successful call. - -## Example - -```js -POST /api/fleet/agents/a4937110-e53e-11e9-934f-47a8e38a522c/checkin -Authorization: ApiKey VALID_ACCESS_API_KEY -{ - "events": [{ - "type": "STATE", - "subtype": "STARTING", - "message": "state changed from STOPPED to STARTING", - "timestamp": "2019-10-01T13:42:54.323Z", - "payload": {}, - "agent_id": "a4937110-e53e-11e9-934f-47a8e38a522c" - }] -} -``` - -```js -{ - "action": "checkin", - "success": true, - "actions": [] -} -``` diff --git a/x-pack/plugins/fleet/dev_docs/api/agents_enroll.md b/x-pack/plugins/fleet/dev_docs/api/agents_enroll.md deleted file mode 100644 index 7dd56338b31fa..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/agents_enroll.md +++ /dev/null @@ -1,69 +0,0 @@ -# Enroll Fleet agent API - -Enroll agent - -## Request - -`POST /api/fleet/agents/enroll` - -## Headers - -- `Authorization` (Required, string) a valid enrollemnt api key. - -## Request body - -- `type` (Required, string) Agent type should be one of `EPHEMERAL`, `TEMPORARY`, `PERMANENT` -- `metadata` (Optional, object) Objects with `local` and `user_provided` properties that contain the metadata for an agent. The metadata is a dictionary of strings (example: `"local": { "os": "macos" }`). - -## Response code - -`200` Indicates a successful call. -`400` For an invalid request. -`401` For an invalid api key. - -## Example - -```js -POST /api/fleet/agents/enroll -Authorization: ApiKey VALID_API_KEY -{ - "type": "PERMANENT", - "metadata": { - "local": { "os": "macos"}, - "userProvided": { "region": "us-east"} - } -} -``` - -The API returns the following: - -```js -{ - "action": "created", - "success": true, - "item": { - "id": "a4937110-e53e-11e9-934f-47a8e38a522c", - "active": true, - "policy_id": "default", - "type": "PERMANENT", - "enrolled_at": "2019-10-02T18:01:22.337Z", - "user_provided_metadata": {}, - "local_metadata": {}, - "actions": [], - "access_api_key": "ACCESS_API_KEY" - } -} -``` - -## Expected errors - -The API will return a response with a `401` status code and an error if the enrollment apiKey is invalid like this: - -```js -{ - "statusCode": 401, - "error": "Unauthorized", - "message": "Enrollment apiKey is not valid: Enrollement api key does not exists or is not active" -} -``` - diff --git a/x-pack/plugins/fleet/dev_docs/api/agents_list.md b/x-pack/plugins/fleet/dev_docs/api/agents_list.md deleted file mode 100644 index dcc832ee65b0b..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/agents_list.md +++ /dev/null @@ -1,22 +0,0 @@ -# Fleet agent listing API - -## Request - -`GET /api/fleet/agents` - -## Query - -- `showInactive` (Optional, boolean) Show inactive agents (default to false) -- `kuery` (Optional, string) Filter using kibana query language -- `page` (Optional, number) -- `perPage` (Optional, number) - -## Response code - -- `200` Indicates a successful call. - -## Example - -```js -GET /api/fleet/agents?kuery=fleet-agents.last_checkin:2019-10-01T13:42:54.323Z -``` diff --git a/x-pack/plugins/fleet/dev_docs/api/agents_unenroll.md b/x-pack/plugins/fleet/dev_docs/api/agents_unenroll.md deleted file mode 100644 index fbf8122ec70f3..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/agents_unenroll.md +++ /dev/null @@ -1,40 +0,0 @@ -# Enroll Fleet agent API - -Unenroll an agent - -## Request - -`POST /api/fleet/agents/unenroll` - -## Request body - -- `ids` (Optional, string) An list of agent id to unenroll. -- `kuery` (Optional, string) a kibana query to search for agent to unenroll. - -> Note: one and only of this keys should be present: - -## Response code - -`200` Indicates a successful call. - -## Example - -```js -POST /api/fleet/agents/enroll -{ - "ids": ['agent1'], -} -``` - -The API returns the following: - -```js -{ - "results": [{ - "success":true, - "id":"agent1", - "action":"unenrolled" - }], - "success":true -} -``` diff --git a/x-pack/plugins/fleet/dev_docs/api/epm.md b/x-pack/plugins/fleet/dev_docs/api/epm.md deleted file mode 100644 index 1588e228c438b..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/api/epm.md +++ /dev/null @@ -1,24 +0,0 @@ -This document is part of the original drafts for ingest management documentation in `docs/ingest_manager` and may be outdated. -Overall documentation of Ingest Management is now maintained in the `elastic/stack-docs` repository. - -# Elastic Package Manager API - -The Package Manager offers an API. Here an example on how they can be used. - -List installed packages: - -``` -curl localhost:5601/api/fleet/epm/packages -``` - -Install a package: - -``` -curl -X POST localhost:5601/api/fleet/epm/packages/iptables/1.0.4 -``` - -Delete a package: - -``` -curl -X DELETE localhost:5601/api/fleet/epm/packages/iptables/1.0.4 -``` diff --git a/x-pack/plugins/fleet/dev_docs/definitions.md b/x-pack/plugins/fleet/dev_docs/definitions.md index d9ff597c5e84b..128ca02968743 100644 --- a/x-pack/plugins/fleet/dev_docs/definitions.md +++ b/x-pack/plugins/fleet/dev_docs/definitions.md @@ -1,67 +1,136 @@ -This document is part of the original drafts for ingest management documentation in `docs/ingest_manager` and may be outdated. -Overall documentation of Ingest Management is now maintained in the `elastic/stack-docs` repository. +As you can probably tell pretty quickly, the overall Fleet & Agent effort has a lot of parts. The +glossary below attempts to identify the main components of this project along with additional terminology +you might encounter. Please help with filling out and updating this glossary as part of your onboarding journey. -# Ingest Management Definitions +## Fleet -This section is to define terms used across ingest management. +Fleet is an application that manages Elastic Agent. Fleet allows users to manage their many Elastic Agents, +deploy configuration updates, and access the data generated by their Agents within Kibana. -## Package policy +## Fleet Server -A package policy is a definition on how to collect data from a service, for example `nginx`. A package policy contains -definitions for one or multiple inputs and each input can contain one or multiple streams. +Fleet Server is a specialized instance of Elastic Agent that handles the communication and coordination +between Elastic Agents and Fleet. It’s responsible for pushing configuration changes out to Agents +and receiving check-in and status data from running Agents. -With the example of the nginx Package policy, it contains two inputs: `logs` and `nginx/metrics`. Logs and metrics are collected -differently. The `logs` input contains two streams, `access` and `error`, the `nginx/metrics` input contains the stubstatus stream. +## Agent -## Data stream +Elastic Agent is a unified process that runs on a given host and ships data from the host to Elasticsearch. +It’s intended to meet the same needs that Beats does, but with the added benefits of remote +configuration management, support for out-of-the-box integrations, and more. -Data streams are a [new concept](https://github.com/elastic/elasticsearch/issues/53100) in Elasticsearch which simplify -ingesting data and the setup of Elasticsearch. +## Beats -## Elastic Agent +Beats are lightweight, single-purpose data shipping utilities that run on a given host. They can handle shipping +data like logs, metrics, network data, and more based on a user’s needs. -A single, unified agent that users can deploy to hosts or containers. It controls which data is collected from the host or containers and where the data is sent. It will run Beats, Endpoint or other monitoring programs as needed. It can operate standalone or pull an agent policy from Fleet. +## EPR (Elastic Package Registry) -## Elastic Package Registry +The Elastic Package Registry hosts the various integrations supported by Fleet and Agent. These packages contain +configuration files, Kibana assets, and anything necessary for Agent to ship data related to the integration +to Elasticsearch. -The Elastic Package Registry (EPR) is a service which runs under [https://epr.elastic.co]. It serves the packages through its API. -More details about the registry can be found [here](https://github.com/elastic/package-registry). +## EPM (Elastic Package Manager) -## Fleet +EPM refers to the “Integrations” Kibana application where users can browse, manage, and install Integrations +for their Elastic Agent policies. + +EPM related code is typically nested within an `epm` directory in the Fleet codebase, and this also +refers to the "Integrations UI" application. + +## ECK (Elastic Cloud on Kubernetes) + +https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet.html + +## Integrations + +An Integration is a distributable set of Kibana assets and configuration files that allows Elastic Agent to +ship data related to some platform or service. For example, the Nginx integration contains Kibana +visualizations, dashboard, and config files that provide an “out of the box” experience for getting data related +to Nginx into a user’s Elasticsearch and Kibana infrastructure. + +See https://github.com/elastic/integrations for more info -Fleet is the part of the Ingest Manager UI in Kibana that handles the part of enrolling Elastic Agents, managing agents and sending policies to the Elastic Agent. +## Packages -## Indexing Strategy +A Package refers to a “top-level” set of installable integrations. For example the AWS package contains many +configurable Integrations for various AWS services. -Ingest Management + Elastic Agent follow a strict new indexing strategy: `{type}-{dataset}-{namespace}`. An example +## Agent policies + +An Agent Policy refers to a set of configuration options that is deployable to many agents. For example, a user +may configure a policy for all of their Nginx web servers and deploy an identical Agent to each of them. + +## Integration policies / Package policies + +An integration policy is a definition on how to collect data from a service, for example `nginx`. An integration +policy contains definitions for one or multiple inputs and each input can contain one or multiple streams. + +With the example of the nginx integration policy, it contains two inputs: `logs` and `nginx/metrics`. Logs and metrics are collected +differently. The `logs` input contains two streams, `access` and `error`, the `nginx/metrics` input contains the stubstatus stream. + +Previously, the term used for these policy objects was "package policy", and they're still referenced as such within the Fleet +codebase. When presenting user-facing data or UI elements, though, the term "integration policy" should be used. + +## Indexing strategy / Data stream naming scheme + +Fleet + Elastic Agent follow a strict new indexing strategy: `{type}-{dataset}-{namespace}`. An example for this is `logs-nginx.access-default`. More details about it can be found in the Index Strategy below. All data of the index strategy is sent to data streams. +## Data stream + +Data streams are a [concept](https://github.com/elastic/elasticsearch/issues/53100) in Elasticsearch which simplify +ingesting data and the setup of Elasticsearch. + +## Stream + +A stream is a configuration unit in the Elastic Agent policy. A stream is part of an input and defines how the data +fetched by this input should be processed and which Data Stream to send it to. + +## Namespace + +A user-specified string that will be used to part of the index name in Elasticsearch. It helps users identify logs +coming from a specific environment (like prod or test), an application, or other identifiers. + ## Input An input is the configuration unit in an Agent policy that defines the options on how to collect data from an endpoint. This could be username / password which are need to authenticate with a service or a host url as an example. -An input is part of a Package policy and contains streams. +An input is part of a Package policy and contains data streams, which are simply referred to as "streams" +within the package manifest and package policy objects. -## Integration +## Enrollment tokens -An integration is a package with the type integration. An integration package has at least 1 package policy -and usually collects data from / about a service. +TBD -## Namespace +## Index templates -A user-specified string that will be used to part of the index name in Elasticsearch. It helps users identify logs coming from a specific environment (like prod or test), an application, or other identifiers. +TBD -## Package +## Ingest pipelines -A package contains all the assets for the Elastic Stack. A more detailed definition of a -package can be found under https://github.com/elastic/package-registry. +TBD -Besides the assets, a package contains the package policy definitions with its inputs and streams. +## Transforms -## Stream +TBD -A stream is a configuration unit in the Elastic Agent policy. A stream is part of an input and defines how the data -fetched by this input should be processed and which Data Stream to send it to. +## APM (Application Performance Monitoring) + +Monitor software services by collecting performance information (e.g errors, HTTP requests, database queries). +Elastic offers APM agents in a variety of languages to collect performance data and send them to the +APM server for storage in elastic. + +See the [APM docs](https://www.elastic.co/guide/en/apm/guide/current/index.html) for more information. + +## Endpoint + +Endpoint is part of the Security Solution, and also relates to a given Integration package the Elastic Agent +can deploy. When deployed a separate Endpoint relating process is started on the host. + +--- + +Check more acronyms: https://wiki.elastic.co/pages/viewpage.action?spaceKey=CC&title=Amazing+Acronyms diff --git a/x-pack/plugins/fleet/dev_docs/epm.md b/x-pack/plugins/fleet/dev_docs/epm.md index 7fa96378d7c6d..61472ebd11bc3 100644 --- a/x-pack/plugins/fleet/dev_docs/epm.md +++ b/x-pack/plugins/fleet/dev_docs/epm.md @@ -1,3 +1,5 @@ +TODO: consolidate with docs issue: https://github.com/elastic/observability-docs/issues/1603 + This document is part of the original drafts for ingest management documentation in `docs/ingest_manager` and may be outdated. Overall documentation of Ingest Management is now maintained in the `elastic/stack-docs` repository. diff --git a/x-pack/plugins/fleet/dev_docs/fleet_agent_communication.md b/x-pack/plugins/fleet/dev_docs/fleet_agent_communication.md index 8430983dc4e1d..ae2b147a59a99 100644 --- a/x-pack/plugins/fleet/dev_docs/fleet_agent_communication.md +++ b/x-pack/plugins/fleet/dev_docs/fleet_agent_communication.md @@ -1,3 +1,4 @@ +TODO: needs to be updated for Fleet Server # Fleet <> Agent communication protocal 1. Makes request to the [`agent/enroll` endpoint](/docs/api/fleet.asciidoc) using the [enrollment API key](api_keys.md) as a barrier token, the policy ID being enrolled to, and the type of the agent. diff --git a/x-pack/plugins/fleet/dev_docs/fleet_agents_interactions_detailed.md b/x-pack/plugins/fleet/dev_docs/fleet_agents_interactions_detailed.md index 834b1dc6afb1a..46356675fd491 100644 --- a/x-pack/plugins/fleet/dev_docs/fleet_agents_interactions_detailed.md +++ b/x-pack/plugins/fleet/dev_docs/fleet_agents_interactions_detailed.md @@ -1,3 +1,5 @@ +TODO: combine with fleet_agent_communication.md + # Fleet <-> Agent Interactions ## Agent enrollment and checkin diff --git a/x-pack/plugins/fleet/dev_docs/fleet_ui_extensions.md b/x-pack/plugins/fleet/dev_docs/fleet_ui_extensions.md index 94363934f5ad4..32486a8db3df5 100644 --- a/x-pack/plugins/fleet/dev_docs/fleet_ui_extensions.md +++ b/x-pack/plugins/fleet/dev_docs/fleet_ui_extensions.md @@ -1,3 +1,4 @@ +TODO: update with additional extension points (Integration app, add agent flyout etc.) # Fleet UI Extensions Fleet's Kibana UI supports two types of UI extensions: diff --git a/x-pack/plugins/fleet/dev_docs/indexing_strategy.md b/x-pack/plugins/fleet/dev_docs/indexing_strategy.md index 42a0bbc218869..5f6b8157dbdd3 100644 --- a/x-pack/plugins/fleet/dev_docs/indexing_strategy.md +++ b/x-pack/plugins/fleet/dev_docs/indexing_strategy.md @@ -1,3 +1,5 @@ +TODO: combine with data_streams.md + This document is part of the original drafts for ingest management documentation in `docs/ingest_manager` and may be outdated. Overall documentation of Ingest Management is now maintained in the `elastic/stack-docs` repository. diff --git a/x-pack/plugins/fleet/dev_docs/integrations_overview.md b/x-pack/plugins/fleet/dev_docs/integrations_overview.md new file mode 100644 index 0000000000000..b6ce0f5ce9917 --- /dev/null +++ b/x-pack/plugins/fleet/dev_docs/integrations_overview.md @@ -0,0 +1,165 @@ +# Overview of Integrations + +Elastic Agent integrations are mechanisms for installing assets that provide an opinionated "out of the box" experience for ingesting data from various pieces of software, third party services, and even internal Elastic products. Fleet provides an interface for installing and managing these integrations. Integrations tell Elastic Agent where and how to retrieve data, and how it should be ingested into Elasticsearch. + +In terms of what an integration actually _is_, it's a set of mostly YML files in a particular directory structure with particular naming conventions. These conventions are captured in a specification maintained by Elastic called the [package spec](https://github.com/elastic/package-spec/). + +This document will detail some of the key files and fields defined by the package spec that we'll commonly deal with in Fleet, and will attempt to provide an informed mental model around integrations. We'll use Fleet's integration policy editor UI to show how integrations' configuration files are translated into the Fleet interface we present to users. + +## References + +- https://github.com/elastic/package-spec +- https://github.com/elastic/integrations/tree/main/packages + +## Top level `manifest.yml` + +🔗 [Package spec reference](https://github.com/elastic/package-spec/blob/main/versions/1/integration/manifest.spec.yml) + +- Basic metadata for the integration like name, title, version, description, categories, etc +- Kibana compatibility spec +- Screenshots and icon assets + +### `policy_templates` + +🔗 [Package spec reference](https://github.com/elastic/package-spec/blob/main/versions/1/integration/manifest.spec.yml#L186-L273) + +The top level `manifest.yml` file defines a set of `policy_templates` which define a grouping of fields used to configure the integration. These `policy_templates` control what’s rendered in Fleet UI’s “policy editor” when creating or editing integration policies. + +Most integrations will only specify a single `policy_template` as they don’t require this level of structure. For integrations that export many “sub-integrations,” however, they rely on defining multiple templates. + +For example, Nginx defines only a single `policy_template` - aptly named `nginx`: + +```yml +# https://github.com/elastic/integrations/blob/main/packages/nginx/manifest.yml +policy_templates: + - name: nginx + title: Nginx logs and metrics + description: Collect logs and metrics from Nginx instances + inputs: + # ... +``` + +This results in a policy editor UI that looks like this: + +![Nginx policy editor screenshot](https://user-images.githubusercontent.com/6766512/171722222-b7e663d4-5668-4925-88df-ddabd9f590a5.png) + +In contrast, the AWS integration defines many `policy_templates`, as it allows users to configure policy values for many distinct services like EC2, S3, or RDS. See the `policy_templates` definition for AWS [here](https://github.com/elastic/integrations/blob/main/packages/aws/manifest.yml#L77). + +The AWS policy editor has a section for each provided `policy_template` value, e.g. + +![AWS policy editor screenshot](https://user-images.githubusercontent.com/6766512/171722802-3f2705a1-71b6-4747-b5fb-c48ea069c597.png) + +Each policy template is also exposed as its own distinct integration, and can be installed or managed separately as if it were a first-class integration: + +![AWS integrations screenshot](https://user-images.githubusercontent.com/6766512/171723125-4d34a42c-de5b-4699-9683-99951d4f5bb1.png) + +#### `inputs` + +🔗 [Package spec reference](https://github.com/elastic/package-spec/blob/main/versions/1/integration/manifest.spec.yml#L221-L261) + +Each `policy_template` entry defines a set of `inputs`. An `input` is essentially a named grouping of fields related to a particular type of data to be ingested. +Each `input` declares a `type` that typically maps to a Beats input like [httpjson](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-httpjson.html) or [filestream](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-filestream.html). Elastic Agent manages Beats under the hood, +so these `inputs` are how we can configure the individual Beats that Agent is managing. + +For example, the Nginx integration defines three inputs: + +1. `logfile` +2. `httpjson` +3. `nginx/metrics` + +These inputs appear in the policy editor UI as separate fieldsets, e.g. + +![Nginx inputs screenshot](https://user-images.githubusercontent.com/6766512/171724709-724bd7a1-bbcf-4c6a-bc36-f3aeac2c06f8.png) + +Each input can define a list of `vars` that will allow a user to configure variables via form fields in the Fleet policy editor UI. + +For example, on the Nginx integration's `httpjson` input, there are several "input level variables" configure, which are rendered as below: + +![image](https://user-images.githubusercontent.com/6766512/171725972-351f3cd3-de86-49cf-81bc-6aa6dd4dec89.png) + +These input level variables are defined in the Nginx integration [here](https://github.com/elastic/integrations/blob/main/packages/nginx/manifest.yml#L43). + +It's important to note that integration also define variables at the data stream level, which we'll get into later in this doc. In the screenshot above, for example, the section beneath the "Settings" section of the `httpjson` input contains data stream variables for the streams configured as part of the `httpjson` input. + +## `data_stream` directory + +Each integration includes a `data_stream` directory that contains configuration for, well, [data streams](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html). + +Data streams are a construct in Elasticsearch designed for storing "append-only" time series data across multiple backing indices. They give Elastic Agent an easy and performant way to ingest logs and metrics data into Elasticsearch. + +Inside of the `data_stream` directory, each data stream is defined as its own directory. For example, the Nginx integration's `data_stream` [directory](https://github.com/elastic/integrations/tree/main/packages/nginx/data_stream) contains three data streams: + +1. `access` +2. `error` +3. `substatus` + +Elastic Agent data streams conform to a [naming schema](https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme) of `{type}-{dataset}-{namespace}`. The `type` of a data stream is either `logs` or `metrics`. The `dataset` of a datastream is controlled in most cases by an interpolation of the integration's `name` field and the directory name containing the data stream's `manifest.yml` file. The `namespace` value is provided by the user for the purpose of grouping or organizing data. + +Each data stream directory contains a `manifest.yml` file that controls the configuration for the data stream, as well as Elasticsearch/Kibana assets, configuration for Agent, and more. Generally, though, the `manifest.yml` file is the most critical one in a given data stream directory. + +In a data stream's `manifest.yml` file, the integration defines a list of `streams`. Each item in that `streams` list is tied to a single `input`, and defines its own list of `vars` that controls the set of form fields that appear in the policy editor UI. + +For example, the Nginx integration's `access` data stream defines an entry in its `streams` list tied to the `logfile` input mentioned above that includes variables like `paths` and `tags`. The variables appear as form fields in the policy editor UI as below: + +![Nginx data streams screenshot](https://user-images.githubusercontent.com/6766512/171729648-3936f0a8-2487-4862-8732-b0b93748274f.png) + +The "Nginx access logs" fieldset we see in the policy editor UI is defined [here](https://github.com/elastic/integrations/blob/main/packages/nginx/data_stream/access/manifest.yml#L4-L40) in the `data_streams/access/manifest.yml` file within the Nginx integration. It's `input` value is set to `logfile`, so it appears under the "Collect logs from Nginx instances" section in the policy editor. The `title` and `description` values control what appears on the left-hand side to describe the fieldset. + +### Data stream assets + +Each data stream directory may contain an `elasticsearch` or `kibana` directory that contains assets (like ingest pipelines or Kibana dashboards) for a given +stack component. These assets are usually YML or JSON files that Fleet passes off to the corresponding stack component to install. For example, the Nginx integration's `data_stream/access` directory contains an `elasticsearch/ingest_pipeline` directory that contains the following files: + +- `default.yml` +- `third-party.yml` + +These files represent two ingest pipelines that ship with the Nginx integration to provide out-of-the-box mappings, field processing, etc for Nginx data. + +For more information on data streams, see Fleet's dev docs [here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/dev_docs/data_streams.md). + +### `agent/stream` directory + +Each data stream contains an `agent/stream` directory that includes YML files for configuring agent. These are template files that are compiled by Fleet when +generating the full agent policy. + +_TODO: Document this in more detail_ + +### `fields` directory + +The `fields` directory contains YML files that define the [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) for a given data stream. There may be any number of `fields` files based on the integration maintainers preferred organization for their mappings. For example, many integrations +contain a `base-fields.yml` file for common mappings, an `ecs.yml` file for [ECS](https://www.elastic.co/guide/en/ecs/current/index.html)-compliant fields, an +`agent.yml` file for mappings specific to the actual agent process, and a `fields.yml` file for everything else. + +The mappings defined by `fields` files are used by Fleet to generate an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html) for each data stream. This index template composes all of the mappings and settings and ensures that all documents ingested by +the data stream are indexed as configured. + +## `docs` directory + +Contains the README file rendered on the integrations detail page for the integration. + +## `img` directory + +Contains screenshots rendered on the integrations detail page for the integration. + +## `kibana` directory + +Contains top level Kibana assets (dashboards, visualizations, saved searches etc) for the integration. + +## Relationship diagram + +Reference the following diagram to understand the relationship between the various components of an integration: + +```mermaid +erDiagram + Integration ||--|{ PolicyTemplate : "Many policy templates" + Integration ||--|{ DataStream : "Many data streams" + + PolicyTemplate ||--|{ Input : "Many inputs" + + DataStream ||--|{ Input : "Many inputs" + + Integration {} + PolicyTemplate {} + Input {} + DataStream {} +``` diff --git a/x-pack/plugins/fleet/dev_docs/tracing.md b/x-pack/plugins/fleet/dev_docs/tracing.md deleted file mode 100644 index e560766745043..0000000000000 --- a/x-pack/plugins/fleet/dev_docs/tracing.md +++ /dev/null @@ -1,25 +0,0 @@ -# Using APM for server traces -Kibana ships with the [Elastic APM Node.js Agent](https://github.com/elastic/apm-agent-nodejs) built-in for debugging purposes. We don't currently merge this to release builds, but it can be very helpful to diagnose or confirm the flow & timing of a request traveling through multiple services. - -To use it in Fleet, - 1. Import the shared apm instance as needed (HTTP handler, service layer, etc) - `import { apm } from '../path/to/ingest_manager/server'` - 1. add <code>apm.startTransaction</code> and/or <code>apm.startSpan</code></summary> - - TODO: More details around rules / conventions for tracing - - One example from `reporting` plugin: - https://github.com/elastic/kibana/blob/a537f9af500bc3d3a6e2ceea8817ee89c474cbb0/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts#L30-L31 - - <details><summary>an example for <code>startTransaction</code></summary> <a href="https://www.elastic.co/guide/en/apm/agent/nodejs/current/transaction-api.html"><code>Transaction</code> docs</a><p><img width="700" alt="Screen Shot 2020-11-02 at 9 06 50 AM" src="https://user-images.githubusercontent.com/57655/97877262-e7b11800-1cea-11eb-9883-aeb4fb6b4554.png"></details> - - <details><summary>an example for <code>startSpan</code></summary><a href="https://www.elastic.co/guide/en/apm/agent/nodejs/current/span-api.html"><code>Span</code> docs</a><p><img width="1008" alt="Screen Shot 2020-06-02 at 9 15 42 PM" src="https://user-images.githubusercontent.com/57655/83584866-590b5580-a516-11ea-8133-286353000d5c.png"></details> - 1. start Kibana with APM enabled (as described in [Instrumenting with Elastic APM](https://github.com/elastic/kibana/blob/main/docs/developer/getting-started/debugging.asciidoc#instrumenting-with-elastic-apm)) - - <details><summary>via env variable or <code>config/apm.dev.js</code></summary> - <code>ELASTIC_APM_ACTIVE=true yarn start</code> - <p>or <code>module.exports = { - active: true, - };</code> - </details> - - By default traces are sent to a remote server, but you can send to a local APM by setting the <code>serverUrl</code> value in <code>config/apm.dev.js</code> - - TODO: document default server & credentials - 1. Run the code where you added the annotations e.g. make an HTTP request - 1. Go to `/app/apm#/traces` and see your trace - search filter by host, transaction result, etc - <details><summary>example screenshot</summary><img width="2011" alt="Screen Shot 2020-05-19 at 9 06 15 PM" src="https://user-images.githubusercontent.com/57655/97878933-4a0b1800-1ced-11eb-982b-73aa13a2926b.png"></details> diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx index ca8083fb51325..8af6db71106b3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx @@ -27,7 +27,7 @@ import type { FleetConfigType, FleetStartServices } from '../../plugin'; import { PackageInstallProvider } from '../integrations/hooks'; -import { useAuthz, useFlyoutContext } from './hooks'; +import { useAuthz, useFleetStatus, useFlyoutContext } from './hooks'; import { ConfigContext, @@ -304,6 +304,7 @@ const FleetTopNav = memo( export const AppRoutes = memo( ({ setHeaderActionMenu }: { setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'] }) => { const flyoutContext = useFlyoutContext(); + const fleetStatus = useFleetStatus(); return ( <> @@ -361,7 +362,11 @@ export const AppRoutes = memo( {flyoutContext.isEnrollmentFlyoutOpen && ( <EuiPortal> <AgentEnrollmentFlyout - defaultMode="standalone" + defaultMode={ + fleetStatus.isReady && !fleetStatus.missingRequirements?.includes('fleet_server') + ? 'managed' + : 'standalone' + } isIntegrationFlow={true} onClose={() => flyoutContext.closeEnrollmentFlyout()} /> diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx index 50e9b6b72002c..79acb26802499 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/steps/get_started.tsx @@ -22,6 +22,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import { css } from '@emotion/react'; import { useLink } from '../../../hooks'; @@ -97,7 +98,11 @@ const GettingStartedStepContent: React.FunctionComponent<{ <EuiForm onSubmit={quickStartCreateForm.submit}> <EuiFlexGroup> - <EuiFlexItem> + <EuiFlexItem + css={css` + max-width: 100%; + `} + > <FleetServerHostComboBox fleetServerHost={fleetServerHost} fleetServerHostSettings={fleetServerHostSettings} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx index f93646eb120ab..5a60030cdfcf5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx @@ -8,9 +8,16 @@ import { EuiToolTip } from '@elastic/eui'; import { take } from 'lodash'; import React from 'react'; +import styled from 'styled-components'; import { truncateTag, MAX_TAG_DISPLAY_LENGTH } from '../utils'; +const Wrapped = styled.div` + .wrappedText { + white-space: pre-wrap; + } +`; + interface Props { tags: string[]; } @@ -22,13 +29,16 @@ export const Tags: React.FunctionComponent<Props> = ({ tags }) => { return ( <> {tags.length > MAX_TAGS_TO_DISPLAY ? ( - <> - <EuiToolTip content={<span data-test-subj="agentTagsTooltip">{tags.join(', ')}</span>}> + <Wrapped> + <EuiToolTip + anchorClassName={'wrappedText'} + content={<span data-test-subj="agentTagsTooltip">{tags.join(', ')}</span>} + > <span data-test-subj="agentTags"> {take(tags, 3).map(truncateTag).join(', ')} + {tags.length - MAX_TAGS_TO_DISPLAY} more </span> </EuiToolTip> - </> + </Wrapped> ) : ( <span data-test-subj="agentTags"> {tags.map((tag, index) => ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags_add_remove.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags_add_remove.tsx index c52ad66f2e9d0..8e74a72f1698c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags_add_remove.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags_add_remove.tsx @@ -7,6 +7,7 @@ import React, { Fragment, useCallback, useEffect, useState } from 'react'; import { difference } from 'lodash'; +import styled from 'styled-components'; import type { EuiSelectableOption } from '@elastic/eui'; import { EuiButtonEmpty, @@ -26,6 +27,13 @@ import { sanitizeTag } from '../utils'; import { TagOptions } from './tag_options'; +const TruncatedEuiHighlight = styled(EuiHighlight)` + width: 120px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +`; + interface Props { agentId?: string; agents?: string[] | string; @@ -95,11 +103,12 @@ export const TagsAddRemove: React.FC<Props> = ({ const renderOption = (option: EuiSelectableOption<any>, search: string) => { return ( <EuiFlexGroup + gutterSize={'s'} onMouseEnter={() => setIsTagHovered({ ...isTagHovered, [option.label]: true })} onMouseLeave={() => setIsTagHovered({ ...isTagHovered, [option.label]: false })} > <EuiFlexItem> - <EuiHighlight + <TruncatedEuiHighlight search={search} onClick={() => { const tagsToAdd = option.checked === 'on' ? [] : [option.label]; @@ -108,7 +117,7 @@ export const TagsAddRemove: React.FC<Props> = ({ }} > {option.label} - </EuiHighlight> + </TruncatedEuiHighlight> </EuiFlexItem> <EuiFlexItem grow={false}> <TagOptions diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx index b90c08e475bcc..11474f1be508f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx @@ -12,7 +12,7 @@ import { act, fireEvent, waitFor } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../mock'; -import { sendGetAgents } from '../../../hooks'; +import { sendGetAgents, sendGetAgentStatus } from '../../../hooks'; import { AgentListPage } from '.'; @@ -28,17 +28,7 @@ jest.mock('../../../hooks', () => ({ return props.children; }, useFleetStatus: jest.fn().mockReturnValue({}), - sendGetAgentStatus: jest.fn().mockResolvedValue({ - data: { - results: { - online: 6, - error: 0, - offline: 0, - updating: 0, - }, - totalInactive: 0, - }, - }), + sendGetAgentStatus: jest.fn(), useAuthz: jest.fn().mockReturnValue({ fleet: { all: true } }), useStartServices: jest.fn().mockReturnValue({ notifications: { @@ -74,6 +64,7 @@ jest.mock('./components/search_and_filter_bar', () => { }); const mockedSendGetAgents = sendGetAgents as jest.Mock; +const mockedSendGetAgentStatus = sendGetAgentStatus as jest.Mock; function renderAgentList() { const renderer = createFleetTestRendererMock(); @@ -111,96 +102,140 @@ describe('agent_list_page', () => { }, }); jest.useFakeTimers(); + }); - ({ utils } = renderAgentList()); + afterEach(() => { + jest.useRealTimers(); + }); - await waitFor(() => { - expect(utils.getByText('Showing 6 agents')).toBeInTheDocument(); + it('should not send another agents status request if first one takes longer', () => { + mockedSendGetAgentStatus.mockImplementation(async () => { + const sleep = () => { + return new Promise((res) => { + setTimeout(() => res({}), 35000); + }); + }; + await sleep(); + return { + data: { + results: { + online: 6, + error: 0, + offline: 0, + updating: 0, + }, + totalInactive: 0, + }, + }; }); + ({ utils } = renderAgentList()); act(() => { - const selectAll = utils.container.querySelector('[data-test-subj="checkboxSelectAll"]'); - fireEvent.click(selectAll!); - }); - - await waitFor(() => { - utils.getByText('5 agents selected'); + jest.advanceTimersByTime(65000); }); - act(() => { - fireEvent.click(utils.getByText('Select everything on all pages')); - }); - utils.getByText('All agents selected'); + expect(mockedSendGetAgentStatus).toHaveBeenCalledTimes(1); }); - afterEach(() => { - jest.useRealTimers(); - }); + describe('selection change', () => { + beforeEach(async () => { + mockedSendGetAgentStatus.mockResolvedValue({ + data: { + results: { + online: 6, + error: 0, + offline: 0, + updating: 0, + }, + totalInactive: 0, + }, + }); + ({ utils } = renderAgentList()); - it('should not set selection mode when agent selection changed automatically', async () => { - act(() => { - jest.runOnlyPendingTimers(); - }); + await waitFor(() => { + expect(utils.getByText('Showing 6 agents')).toBeInTheDocument(); + }); - await waitFor(() => { - expect(utils.getByText('agent6')).toBeInTheDocument(); + act(() => { + const selectAll = utils.container.querySelector('[data-test-subj="checkboxSelectAll"]'); + fireEvent.click(selectAll!); + }); + + await waitFor(() => { + utils.getByText('5 agents selected'); + }); + + act(() => { + fireEvent.click(utils.getByText('Select everything on all pages')); + }); + utils.getByText('All agents selected'); }); - utils.getByText('All agents selected'); + it('should not set selection mode when agent selection changed automatically', async () => { + act(() => { + jest.runOnlyPendingTimers(); + }); - expect( - utils - .getByText('agent6') - .closest('tr')! - .getAttribute('class')! - .includes('euiTableRow-isSelected') - ).toBeTruthy(); - }); + await waitFor(() => { + expect(utils.getByText('agent6')).toBeInTheDocument(); + }); - it('should set selection mode when agent selection changed manually', async () => { - act(() => { - fireEvent.click(utils.getAllByRole('checkbox')[3]); + utils.getByText('All agents selected'); + + expect( + utils + .getByText('agent6') + .closest('tr')! + .getAttribute('class')! + .includes('euiTableRow-isSelected') + ).toBeTruthy(); }); - utils.getByText('4 agents selected'); - }); + it('should set selection mode when agent selection changed manually', async () => { + act(() => { + fireEvent.click(utils.getAllByRole('checkbox')[3]); + }); - it('should pass sort parameters on table sort', () => { - act(() => { - fireEvent.click(utils.getByTitle('Last activity')); + utils.getByText('4 agents selected'); }); - expect(mockedSendGetAgents).toHaveBeenCalledWith( - expect.objectContaining({ - sortField: 'last_checkin', - sortOrder: 'asc', - }) - ); - }); + it('should pass sort parameters on table sort', () => { + act(() => { + fireEvent.click(utils.getByTitle('Last activity')); + }); - it('should pass keyword field on table sort on version', () => { - act(() => { - fireEvent.click(utils.getByTitle('Version')); + expect(mockedSendGetAgents).toHaveBeenCalledWith( + expect.objectContaining({ + sortField: 'last_checkin', + sortOrder: 'asc', + }) + ); }); - expect(mockedSendGetAgents).toHaveBeenCalledWith( - expect.objectContaining({ - sortField: 'local_metadata.elastic.agent.version.keyword', - sortOrder: 'asc', - }) - ); - }); + it('should pass keyword field on table sort on version', () => { + act(() => { + fireEvent.click(utils.getByTitle('Version')); + }); - it('should pass keyword field on table sort on hostname', () => { - act(() => { - fireEvent.click(utils.getByTitle('Host')); + expect(mockedSendGetAgents).toHaveBeenCalledWith( + expect.objectContaining({ + sortField: 'local_metadata.elastic.agent.version.keyword', + sortOrder: 'asc', + }) + ); }); - expect(mockedSendGetAgents).toHaveBeenCalledWith( - expect.objectContaining({ - sortField: 'local_metadata.host.hostname.keyword', - sortOrder: 'asc', - }) - ); + it('should pass keyword field on table sort on hostname', () => { + act(() => { + fireEvent.click(utils.getByTitle('Host')); + }); + + expect(mockedSendGetAgents).toHaveBeenCalledWith( + expect.objectContaining({ + sortField: 'local_metadata.host.hostname.keyword', + sortOrder: 'asc', + }) + ); + }); }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index 9d95455c9636a..d4fd149f336e4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -220,14 +220,20 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { }, }; + const isLoadingVar = useRef<boolean>(false); + // Request to fetch agents and agent status const currentRequestRef = useRef<number>(0); const fetchData = useCallback( ({ refreshTags = false }: { refreshTags?: boolean } = {}) => { async function fetchDataAsync() { + // skipping refresh if previous request is in progress + if (isLoadingVar.current) { + return; + } currentRequestRef.current++; const currentRequest = currentRequestRef.current; - + isLoadingVar.current = true; try { setIsLoading(true); const [agentsRequest, agentsStatusRequest] = await Promise.all([ @@ -244,7 +250,8 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { kuery: kuery && kuery !== '' ? kuery : undefined, }), ]); - // Return if a newer request as been triggered + isLoadingVar.current = false; + // Return if a newer request has been triggered if (currentRequestRef.current !== currentRequest) { return; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_table/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_table/index.tsx index 87034bf900fda..c4b196bbaf15f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_table/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_table/index.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; -import { EuiBasicTable, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiCheckbox } from '@elastic/eui'; +import { EuiBasicTable, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import type { EuiBasicTableColumn } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -75,13 +75,8 @@ export const DownloadSourceTable: React.FunctionComponent<DownloadSourceTablePro }), }, { - render: (downloadSource: DownloadSource) => ( - <EuiCheckbox - id={`checkbox_${downloadSource.id}`} - checked={downloadSource.is_default} - onChange={(e) => undefined} - /> - ), + render: (downloadSource: DownloadSource) => + downloadSource.is_default ? <EuiIcon type="check" /> : null, width: '200px', name: i18n.translate('xpack.fleet.settings.downloadSourcesTable.defaultColumnTitle', { defaultMessage: 'Default', diff --git a/x-pack/plugins/fleet/public/applications/integrations/app.tsx b/x-pack/plugins/fleet/public/applications/integrations/app.tsx index fb0d7f625488a..ad037652a78a3 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/app.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/app.tsx @@ -20,7 +20,12 @@ import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import type { FleetConfigType, FleetStartServices } from '../../plugin'; -import { ConfigContext, FleetStatusProvider, KibanaVersionContext } from '../../hooks'; +import { + ConfigContext, + FleetStatusProvider, + KibanaVersionContext, + useFleetStatus, +} from '../../hooks'; import { FleetServerFlyout } from '../fleet/components'; @@ -110,6 +115,7 @@ export const IntegrationsAppContext: React.FC<{ export const AppRoutes = memo(() => { const flyoutContext = useFlyoutContext(); + const fleetStatus = useFleetStatus(); return ( <> @@ -142,7 +148,11 @@ export const AppRoutes = memo(() => { {flyoutContext.isEnrollmentFlyoutOpen && ( <EuiPortal> <AgentEnrollmentFlyout - defaultMode="standalone" + defaultMode={ + fleetStatus.isReady && fleetStatus.missingRequirements?.includes('fleet_server') + ? 'managed' + : 'standalone' + } isIntegrationFlow={true} onClose={() => flyoutContext.closeEnrollmentFlyout()} /> diff --git a/x-pack/plugins/fleet/public/hooks/use_flyout_context.tsx b/x-pack/plugins/fleet/public/hooks/use_flyout_context.tsx index 0ddc358ab2fbf..3bec5db51aeb6 100644 --- a/x-pack/plugins/fleet/public/hooks/use_flyout_context.tsx +++ b/x-pack/plugins/fleet/public/hooks/use_flyout_context.tsx @@ -27,7 +27,9 @@ export const FlyoutContextProvider: React.FunctionComponent = ({ children }) => <agentFlyoutContext.Provider value={{ isEnrollmentFlyoutOpen, - openEnrollmentFlyout: () => setIsEnrollmentFlyoutOpen(true), + openEnrollmentFlyout: () => { + setIsEnrollmentFlyoutOpen(true); + }, closeEnrollmentFlyout: () => setIsEnrollmentFlyoutOpen(false), isFleetServerFlyoutOpen, openFleetServerFlyout: () => setIsFleetServerFlyoutOpen(true), diff --git a/x-pack/plugins/fleet/scripts/install_all_packages/install_all_packages.ts b/x-pack/plugins/fleet/scripts/install_all_packages/install_all_packages.ts index d9998d235a46e..e07ff9f5a1808 100644 --- a/x-pack/plugins/fleet/scripts/install_all_packages/install_all_packages.ts +++ b/x-pack/plugins/fleet/scripts/install_all_packages/install_all_packages.ts @@ -6,15 +6,15 @@ */ import fetch from 'node-fetch'; +import { kibanaPackageJson } from '@kbn/utils'; import { ToolingLog } from '@kbn/tooling-log'; -import ReadPackage from 'read-pkg'; const REGISTRY_URL = 'https://epr-snapshot.elastic.co'; const KIBANA_URL = 'http://localhost:5601'; const KIBANA_USERNAME = 'elastic'; const KIBANA_PASSWORD = 'changeme'; -const KIBANA_VERSION = ReadPackage.sync().version; +const KIBANA_VERSION = kibanaPackageJson.version; const SKIP_PACKAGES: string[] = []; diff --git a/x-pack/plugins/fleet/server/integration_tests/helpers/docker_registry_helper.ts b/x-pack/plugins/fleet/server/integration_tests/helpers/docker_registry_helper.ts index f400becfa0085..77bf8e0fbf3e4 100644 --- a/x-pack/plugins/fleet/server/integration_tests/helpers/docker_registry_helper.ts +++ b/x-pack/plugins/fleet/server/integration_tests/helpers/docker_registry_helper.ts @@ -5,17 +5,52 @@ * 2.0. */ -import { spawn } from 'child_process'; import type { ChildProcess } from 'child_process'; +import * as Rx from 'rxjs'; +import { filter, take, map, tap } from 'rxjs/operators'; +import execa from 'execa'; + +import { observeLines } from '@kbn/stdio-dev-helpers'; +import { ToolingLog } from '@kbn/tooling-log'; import pRetry from 'p-retry'; -import fetch from 'node-fetch'; -const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); +const BEFORE_SETUP_TIMEOUT = 30 * 60 * 1000; // 30 minutes; const DOCKER_START_TIMEOUT = 5 * 60 * 1000; // 5 minutes +const DOCKER_IMAGE = `docker.elastic.co/package-registry/distribution:93ffe45d8c4ae11365bc70b1038643121049b9fe`; + +function firstWithTimeout(source$: Rx.Observable<any>, errorMsg: string, ms = 30 * 1000) { + return Rx.race( + source$.pipe(take(1)), + Rx.timer(ms).pipe( + map(() => { + throw new Error(`[docker:${DOCKER_IMAGE}] ${errorMsg} within ${ms / 1000} seconds`); + }) + ) + ); +} + +function childProcessToLogLine(childProcess: ChildProcess, log: ToolingLog) { + const logLine$ = new Rx.Subject<string>(); + + Rx.merge( + observeLines(childProcess.stdout!).pipe( + tap((line) => log.info(`[docker:${DOCKER_IMAGE}] ${line}`)) + ), // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + observeLines(childProcess.stderr!).pipe( + tap((line) => log.error(`[docker:${DOCKER_IMAGE}] ${line}`)) + ) // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null + ).subscribe(logLine$); + + return logLine$.asObservable(); +} export function useDockerRegistry() { + const logger = new ToolingLog({ + level: 'info', + writeTo: process.stdout, + }); const packageRegistryPort = process.env.FLEET_PACKAGE_REGISTRY_PORT || '8081'; if (!packageRegistryPort.match(/^[0-9]{4}/)) { @@ -24,38 +59,42 @@ export function useDockerRegistry() { let dockerProcess: ChildProcess | undefined; async function startDockerRegistryServer() { - const dockerImage = `docker.elastic.co/package-registry/distribution:93ffe45d8c4ae11365bc70b1038643121049b9fe`; + const args = ['run', '--rm', '-p', `${packageRegistryPort}:8080`, DOCKER_IMAGE]; - const args = ['run', '--rm', '-p', `${packageRegistryPort}:8080`, dockerImage]; - - dockerProcess = spawn('docker', args, { stdio: 'inherit' }); + dockerProcess = execa('docker', args, { + stdio: ['ignore', 'pipe', 'pipe'], + }); let isExited = dockerProcess.exitCode !== null; dockerProcess.once('exit', () => { isExited = true; }); - - const startedAt = Date.now(); - - while (!isExited && Date.now() - startedAt <= DOCKER_START_TIMEOUT) { - try { - const res = await fetch(`http://localhost:${packageRegistryPort}/`); - if (res.status === 200) { - return; - } - } catch (err) { - // swallow errors - } - - await delay(3000); + const waitForLogLine = /package manifests loaded/; + + try { + await firstWithTimeout( + childProcessToLogLine(dockerProcess, logger).pipe( + filter((line) => { + process.stdout.write(line); + return waitForLogLine.test(line); + }) + ), + 'no package manifests loaded', + DOCKER_START_TIMEOUT + ).toPromise(); + } catch (err) { + dockerProcess.kill(); + throw err; } if (isExited && dockerProcess.exitCode !== 0) { throw new Error(`Unable to setup docker registry exit code ${dockerProcess.exitCode}`); } + } - dockerProcess.kill(); - throw new pRetry.AbortError('Unable to setup docker registry after timeout'); + async function pullDockerImage() { + logger.info(`[docker:${DOCKER_IMAGE}] pulling docker image "${DOCKER_IMAGE}"`); + await execa('docker', ['pull', DOCKER_IMAGE]); } async function cleanupDockerRegistryServer() { @@ -65,8 +104,11 @@ export function useDockerRegistry() { } beforeAll(async () => { - const testTimeout = 5 * 60 * 1000; // 5 minutes timeout - jest.setTimeout(testTimeout); + jest.setTimeout(BEFORE_SETUP_TIMEOUT); + await pRetry(() => pullDockerImage(), { + retries: 3, + }); + await pRetry(() => startDockerRegistryServer(), { retries: 3, }); diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index 961d318be2c59..188963da09880 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -53,6 +53,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, + DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, } from './constants'; import { registerSavedObjects, registerEncryptedSavedObjects } from './saved_objects'; import { @@ -141,6 +142,7 @@ const allSavedObjectTypes = [ PACKAGES_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, + DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, ]; /** diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index 7a10a50e2fb7b..42c1ec24f4ee2 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -122,12 +122,14 @@ export const bulkUpdateAgentTagsHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; const agentOptions = Array.isArray(request.body.agents) ? { agentIds: request.body.agents } : { kuery: request.body.agents }; try { const results = await AgentService.updateAgentTags( + soClient, esClient, { ...agentOptions, batchSize: request.body.batchSize }, request.body.tagsToAdd ?? [], diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index 6512b1a5b0cb8..0ccac385155b5 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -40,7 +40,11 @@ import { migrateInstallationToV7160, migratePackagePolicyToV7160 } from './migra import { migrateInstallationToV800, migrateOutputToV800 } from './migrations/to_v8_0_0'; import { migratePackagePolicyToV820 } from './migrations/to_v8_2_0'; import { migrateInstallationToV830, migratePackagePolicyToV830 } from './migrations/to_v8_3_0'; -import { migrateInstallationToV840, migrateAgentPolicyToV840 } from './migrations/to_v8_4_0'; +import { + migrateInstallationToV840, + migrateAgentPolicyToV840, + migratePackagePolicyToV840, +} from './migrations/to_v8_4_0'; /* * Saved object types and mappings @@ -216,6 +220,7 @@ const getSavedObjectTypes = ( '7.16.0': migratePackagePolicyToV7160, '8.2.0': migratePackagePolicyToV820, '8.3.0': migratePackagePolicyToV830, + '8.4.0': migratePackagePolicyToV840, }, }, [PACKAGES_SAVED_OBJECT_TYPE]: { diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts index 02456661674a0..aa56e3c7a1bc9 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts @@ -13,3 +13,4 @@ export { migratePackagePolicyToV7150 } from './to_v7_15_0'; export { migratePackagePolicyToV7160 } from './to_v7_16_0'; export { migratePackagePolicyToV820 } from './to_v8_2_0'; export { migratePackagePolicyToV830 } from './to_v8_3_0'; +export { migratePackagePolicyToV840 } from './to_v8_4_0'; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.test.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.test.ts new file mode 100644 index 0000000000000..a5487894205fe --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.test.ts @@ -0,0 +1,147 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectMigrationContext, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; + +import type { PackagePolicy } from '../../../../common'; + +import { migratePackagePolicyToV840 as migration } from './to_v8_4_0'; + +describe('8.4.0 Endpoint Package Policy migration', () => { + const policyDoc = ({ linuxAdvanced = {} }) => { + return { + id: 'mock-saved-object-id', + attributes: { + name: 'Some Policy Name', + package: { + name: 'endpoint', + title: '', + version: '', + }, + id: 'endpoint', + policy_id: '', + enabled: true, + namespace: '', + output_id: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'endpoint', + enabled: true, + streams: [], + config: { + policy: { + value: { + windows: {}, + mac: {}, + linux: { + ...linuxAdvanced, + }, + }, + }, + }, + }, + ], + }, + type: ' nested', + }; + }; + + it('adds advanced file monitoring defaulted to false', () => { + const initialDoc = policyDoc({}); + + const migratedDoc = policyDoc({ + linuxAdvanced: { advanced: { fanotify: { ignore_unknown_filesystems: false } } }, + }); + + expect(migration(initialDoc, {} as SavedObjectMigrationContext)).toEqual(migratedDoc); + }); + + it('adds advanced file monitoring defaulted to false and preserves existing advanced fields', () => { + const initialDoc = policyDoc({ + linuxAdvanced: { advanced: { existingAdvanced: true } }, + }); + + const migratedDoc = policyDoc({ + linuxAdvanced: { + advanced: { fanotify: { ignore_unknown_filesystems: false }, existingAdvanced: true }, + }, + }); + + expect(migration(initialDoc, {} as SavedObjectMigrationContext)).toEqual(migratedDoc); + }); + + it('does not modify non-endpoint package policies', () => { + const doc: SavedObjectUnsanitizedDoc<PackagePolicy> = { + id: 'mock-saved-object-id', + attributes: { + name: 'Some Policy Name', + package: { + name: 'notEndpoint', + title: '', + version: '', + }, + id: 'notEndpoint', + policy_id: '', + enabled: true, + namespace: '', + output_id: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'notEndpoint', + enabled: true, + streams: [], + config: {}, + }, + ], + }, + type: ' nested', + }; + + expect( + migration(doc, {} as SavedObjectMigrationContext) as SavedObjectUnsanitizedDoc<PackagePolicy> + ).toEqual({ + attributes: { + name: 'Some Policy Name', + package: { + name: 'notEndpoint', + title: '', + version: '', + }, + id: 'notEndpoint', + policy_id: '', + enabled: true, + namespace: '', + output_id: '', + revision: 0, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + inputs: [ + { + type: 'notEndpoint', + enabled: true, + streams: [], + config: {}, + }, + ], + }, + type: ' nested', + id: 'mock-saved-object-id', + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.ts new file mode 100644 index 0000000000000..deca4a9e639af --- /dev/null +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_4_0.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectMigrationFn, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import { cloneDeep } from 'lodash'; + +import type { PackagePolicy } from '../../../../common'; + +export const migratePackagePolicyToV840: SavedObjectMigrationFn<PackagePolicy, PackagePolicy> = ( + packagePolicyDoc +) => { + if (packagePolicyDoc.attributes.package?.name !== 'endpoint') { + return packagePolicyDoc; + } + + const updatedPackagePolicyDoc: SavedObjectUnsanitizedDoc<PackagePolicy> = + cloneDeep(packagePolicyDoc); + + const input = updatedPackagePolicyDoc.attributes.inputs[0]; + + if (input && input.config) { + const policy = input.config.policy.value; + + const migratedPolicy = { fanotify: { ignore_unknown_filesystems: false } }; + + policy.linux.advanced = policy.linux.advanced + ? { ...policy.linux.advanced, ...migratedPolicy } + : { ...migratedPolicy }; + } + + return updatedPackagePolicyDoc; +}; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_4_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_4_0.ts index 8cd14a22a81cb..894da67976957 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_4_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_4_0.ts @@ -7,10 +7,13 @@ import type { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { PackagePolicy } from '../../../common'; import type { Installation } from '../../../common'; import type { AgentPolicy } from '../../types'; +import { migratePackagePolicyToV840 as SecSolMigratePackagePolicyToV840 } from './security_solution'; + export const migrateInstallationToV840: SavedObjectMigrationFn<Installation, Installation> = ( installationDoc ) => { @@ -31,3 +34,17 @@ export const migrateAgentPolicyToV840: SavedObjectMigrationFn< return agentPolicyDoc; }; + +export const migratePackagePolicyToV840: SavedObjectMigrationFn<PackagePolicy, PackagePolicy> = ( + packagePolicyDoc, + migrationContext +) => { + let updatedPackagePolicyDoc = packagePolicyDoc; + + // Endpoint specific migrations + if (packagePolicyDoc.attributes.package?.name === 'endpoint') { + updatedPackagePolicyDoc = SecSolMigratePackagePolicyToV840(packagePolicyDoc, migrationContext); + } + + return updatedPackagePolicyDoc; +}; diff --git a/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.test.ts b/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.test.ts new file mode 100644 index 0000000000000..a6ae638c08c70 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.test.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; + +import { HostedAgentPolicyRestrictionRelatedError } from '../../errors'; +import type { Agent } from '../../types'; + +import { filterHostedPolicies } from './filter_hosted_agents'; + +jest.mock('./hosted_agent', () => ({ + ...jest.requireActual('./hosted_agent'), + getHostedPolicies: jest.fn().mockResolvedValue({ hosted: true }), +})); + +describe('filterHostedPolicies', () => { + let soClient: jest.Mocked<SavedObjectsClientContract>; + + beforeEach(() => { + soClient = savedObjectsClientMock.create(); + }); + + it('should filter out agents with hosted policies', async () => { + const outgoingErrors = {}; + const agents = await filterHostedPolicies( + soClient, + [ + { id: 'agent1', policy_id: 'hosted' }, + { id: 'agent2', policy_id: 'other' }, + ] as Agent[], + outgoingErrors, + 'error' + ); + + expect(agents).toEqual([{ id: 'agent2', policy_id: 'other' }]); + expect(outgoingErrors).toEqual({ + agent1: new HostedAgentPolicyRestrictionRelatedError('error'), + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.ts b/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.ts new file mode 100644 index 0000000000000..4f1f37feffb92 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/filter_hosted_agents.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SavedObjectsClientContract } from '@kbn/core/server'; + +import type { Agent } from '../../types'; +import { HostedAgentPolicyRestrictionRelatedError } from '../../errors'; + +import { getHostedPolicies, isHostedAgent } from './hosted_agent'; + +export async function filterHostedPolicies( + soClient: SavedObjectsClientContract, + givenAgents: Agent[], + outgoingErrors: Record<Agent['id'], Error>, + errorMessage: string +): Promise<Agent[]> { + const hostedPolicies = await getHostedPolicies(soClient, givenAgents); + + return givenAgents.reduce<Agent[]>((agents, agent, index) => { + if (isHostedAgent(hostedPolicies, agent)) { + const id = givenAgents[index].id; + outgoingErrors[id] = new HostedAgentPolicyRestrictionRelatedError(errorMessage); + } else { + agents.push(agent); + } + return agents; + }, []); +} diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts index 53bf035903c36..748f85db2843b 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts @@ -4,17 +4,25 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { ElasticsearchClientMock } from '@kbn/core/server/mocks'; -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { updateAgentTags } from './update_agent_tags'; +jest.mock('./filter_hosted_agents', () => ({ + filterHostedPolicies: jest + .fn() + .mockImplementation((soClient, givenAgents) => Promise.resolve(givenAgents)), +})); + describe('update_agent_tags', () => { let esClient: ElasticsearchClientMock; + let soClient: jest.Mocked<SavedObjectsClientContract>; beforeEach(() => { esClient = elasticsearchServiceMock.createInternalClient(); + soClient = savedObjectsClientMock.create(); esClient.mget.mockResolvedValue({ docs: [ { @@ -46,19 +54,19 @@ describe('update_agent_tags', () => { } it('should replace tag in middle place when one add and one remove tag', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['two']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], ['two']); expectTagsInEsBulk(['one', 'newName', 'three']); }); it('should replace tag in first place when one add and one remove tag', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['one']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], ['one']); expectTagsInEsBulk(['newName', 'two', 'three']); }); it('should replace tag in last place when one add and one remove tag', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['three']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], ['three']); expectTagsInEsBulk(['one', 'two', 'newName']); }); @@ -72,31 +80,37 @@ describe('update_agent_tags', () => { } as any, ], }); - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['three']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], ['three']); expectTagsInEsBulk(['newName']); }); it('should remove duplicate tags', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['one'], ['two']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['one'], ['two']); expectTagsInEsBulk(['one', 'three']); }); it('should add tag at the end when no tagsToRemove', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], []); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], []); expectTagsInEsBulk(['one', 'two', 'three', 'newName']); }); it('should add tag at the end when tagsToRemove not in existing tags', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['dummy']); + await updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['newName'], ['dummy']); expectTagsInEsBulk(['one', 'two', 'three', 'newName']); }); it('should add tag at the end when multiple tagsToRemove', async () => { - await updateAgentTags(esClient, { agentIds: ['agent1'] }, ['newName'], ['one', 'two']); + await updateAgentTags( + soClient, + esClient, + { agentIds: ['agent1'] }, + ['newName'], + ['one', 'two'] + ); expectTagsInEsBulk(['three', 'newName']); }); diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts index fed7e5c4e0152..c4893c7769651 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts @@ -7,7 +7,7 @@ import { difference, uniq } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { Agent, BulkActionResult } from '../../types'; import { AgentReassignmentError } from '../../errors'; @@ -20,12 +20,14 @@ import { } from './crud'; import type { GetAgentsOptions } from '.'; import { searchHitToAgent } from './helpers'; +import { filterHostedPolicies } from './filter_hosted_agents'; function isMgetDoc(doc?: estypes.MgetResponseItem<unknown>): doc is estypes.GetGetResult { return Boolean(doc && 'found' in doc); } export async function updateAgentTags( + soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, options: ({ agents: Agent[] } | GetAgentsOptions) & { batchSize?: number }, tagsToAdd: string[], @@ -55,6 +57,7 @@ export async function updateAgentTags( }, async (agents: Agent[], skipSuccess: boolean) => await updateTagsBatch( + soClient, esClient, agents, outgoingErrors, @@ -67,6 +70,7 @@ export async function updateAgentTags( } return await updateTagsBatch( + soClient, esClient, givenAgents, outgoingErrors, @@ -77,6 +81,7 @@ export async function updateAgentTags( } async function updateTagsBatch( + soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, givenAgents: Agent[], outgoingErrors: Record<Agent['id'], Error>, @@ -87,6 +92,13 @@ async function updateTagsBatch( ): Promise<{ items: BulkActionResult[] }> { const errors: Record<Agent['id'], Error> = { ...outgoingErrors }; + const filteredAgents = await filterHostedPolicies( + soClient, + givenAgents, + errors, + `Cannot modify tags on a hosted agent` + ); + const getNewTags = (agent: Agent): string[] => { const existingTags = agent.tags ?? []; @@ -106,7 +118,7 @@ async function updateTagsBatch( await bulkUpdateAgents( esClient, - givenAgents.map((agent) => ({ + filteredAgents.map((agent) => ({ agentId: agent.id, data: { tags: getNewTags(agent), @@ -114,5 +126,5 @@ async function updateTagsBatch( })) ); - return { items: errorsToResults(givenAgents, errors, agentIds, skipSuccess) }; + return { items: errorsToResults(filteredAgents, errors, agentIds, skipSuccess) }; } diff --git a/x-pack/plugins/fleet/server/services/agents/upgrade.ts b/x-pack/plugins/fleet/server/services/agents/upgrade.ts index 5f9e6bc420b9a..9ec85f1fe69fb 100644 --- a/x-pack/plugins/fleet/server/services/agents/upgrade.ts +++ b/x-pack/plugins/fleet/server/services/agents/upgrade.ts @@ -177,15 +177,10 @@ async function upgradeBatch( source_uri: options.sourceUri, }; - const rollingUpgradeOptions = options?.upgradeDurationSeconds - ? { - start_time: options.startTime ?? now, - minimum_execution_duration: MINIMUM_EXECUTION_DURATION_SECONDS, - expiration: moment(options.startTime ?? now) - .add(options?.upgradeDurationSeconds, 'seconds') - .toISOString(), - } - : {}; + const rollingUpgradeOptions = getRollingUpgradeOptions( + options?.startTime, + options.upgradeDurationSeconds + ); await createAgentAction(esClient, { created_at: now, @@ -351,3 +346,30 @@ async function _getUpgradeActions(esClient: ElasticsearchClient, now = new Date( }, {} as { [k: string]: CurrentUpgrade }) ); } + +const getRollingUpgradeOptions = (startTime?: string, upgradeDurationSeconds?: number) => { + const now = new Date().toISOString(); + // Perform a rolling upgrade + if (upgradeDurationSeconds) { + return { + start_time: startTime ?? now, + minimum_execution_duration: MINIMUM_EXECUTION_DURATION_SECONDS, + expiration: moment(startTime ?? now) + .add(upgradeDurationSeconds, 'seconds') + .toISOString(), + }; + } + // Schedule without rolling upgrade (Immediately after start_time) + if (startTime && !upgradeDurationSeconds) { + return { + start_time: startTime ?? now, + minimum_execution_duration: MINIMUM_EXECUTION_DURATION_SECONDS, + expiration: moment(startTime) + .add(MINIMUM_EXECUTION_DURATION_SECONDS, 'seconds') + .toISOString(), + }; + } else { + // Regular bulk upgrade (non scheduled, non rolling) + return {}; + } +}; diff --git a/x-pack/plugins/fleet/server/services/download_source.test.ts b/x-pack/plugins/fleet/server/services/download_source.test.ts index 07f450d2254e4..209a2f0313a0c 100644 --- a/x-pack/plugins/fleet/server/services/download_source.test.ts +++ b/x-pack/plugins/fleet/server/services/download_source.test.ts @@ -33,7 +33,7 @@ function mockDownloadSourceSO(id: string, attributes: any = {}) { }; } -function getMockedSoClient(options: { defaultDownloadSourceId?: string } = {}) { +function getMockedSoClient(options: { defaultDownloadSourceId?: string; sameName?: boolean } = {}) { const soClient = savedObjectsClientMock.create(); soClient.get.mockImplementation(async (type: string, id: string) => { @@ -95,6 +95,25 @@ function getMockedSoClient(options: { defaultDownloadSourceId?: string } = {}) { }; } + if ( + options.sameName && + findOptions.searchFields && + findOptions.searchFields.includes('name') && + findOptions + ) { + return { + page: 1, + per_page: 10, + saved_objects: [ + { + score: 0, + ...(await soClient.get(DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, 'download-source-test')), + }, + ], + total: 1, + }; + } + return { page: 1, per_page: 10, @@ -102,12 +121,13 @@ function getMockedSoClient(options: { defaultDownloadSourceId?: string } = {}) { total: 0, }; }); + mockedAppContextService.getInternalUserSOClient.mockReturnValue(soClient); return soClient; } -describe('Download Service Service', () => { +describe('Download Service', () => { beforeEach(() => { mockedAgentPolicyService.list.mockClear(); mockedAgentPolicyService.hasAPMIntegration.mockClear(); @@ -256,4 +276,24 @@ describe('Download Service Service', () => { expect(defaultId).toEqual('existing-default-download-source'); }); }); + + describe('requireUniqueName', () => { + it('throws an error if the name already exists', () => { + const soClient = getMockedSoClient({ + defaultDownloadSourceId: 'download-source-test', + sameName: true, + }); + expect( + async () => await downloadSourceService.requireUniqueName(soClient, { name: 'Test' }) + ).rejects.toThrow(`Download Source 'download-source-test' already exists with name 'Test'`); + }); + it('does not throw if the name is unique', () => { + const soClient = getMockedSoClient({ + defaultDownloadSourceId: 'download-source-test', + }); + expect( + async () => await downloadSourceService.requireUniqueName(soClient, { name: 'Test' }) + ).not.toThrow(); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/services/download_source.ts b/x-pack/plugins/fleet/server/services/download_source.ts index 7a6df1d67a7f8..b4261008e5c37 100644 --- a/x-pack/plugins/fleet/server/services/download_source.ts +++ b/x-pack/plugins/fleet/server/services/download_source.ts @@ -13,11 +13,12 @@ import { } from '../constants'; import type { DownloadSource, DownloadSourceAttributes, DownloadSourceBase } from '../types'; -import { DownloadSourceError } from '../errors'; +import { DownloadSourceError, IngestManagerError } from '../errors'; import { SO_SEARCH_LIMIT } from '../../common'; import { agentPolicyService } from './agent_policy'; import { appContextService } from './app_context'; +import { escapeSearchQueryPhrase } from './saved_object'; function savedObjectToDownloadSource(so: SavedObject<DownloadSourceAttributes>) { const { source_id: sourceId, ...attributes } = so.attributes; @@ -66,6 +67,11 @@ class DownloadSourceService { ): Promise<DownloadSource> { const data: DownloadSourceAttributes = downloadSource; + await this.requireUniqueName(soClient, { + name: downloadSource.name, + id: options?.id, + }); + // default should be only one if (data.is_default) { const defaultDownloadSourceId = await this.getDefaultDownloadSourceId(soClient); @@ -96,6 +102,13 @@ class DownloadSourceService { ) { const updateData: Partial<DownloadSourceAttributes> = newData; + if (newData.name) { + await this.requireUniqueName(soClient, { + name: newData.name, + id, + }); + } + if (updateData.is_default) { const defaultDownloadSourceId = await this.getDefaultDownloadSourceId(soClient); @@ -164,6 +177,31 @@ class DownloadSourceService { return defaultDS; } + public async requireUniqueName( + soClient: SavedObjectsClientContract, + downloadSource: { name: string; id?: string } + ) { + const results = await soClient.find<DownloadSourceAttributes>({ + type: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, + searchFields: ['name'], + search: escapeSearchQueryPhrase(downloadSource.name), + }); + const idsWithName = results.total && results.saved_objects.map(({ id }) => id); + + if (Array.isArray(idsWithName)) { + const isEditingSelf = downloadSource?.id && idsWithName.includes(downloadSource.id); + if (!downloadSource.id || !isEditingSelf) { + const isSingle = idsWithName.length === 1; + + const existClause = isSingle + ? `Download Source '${idsWithName[0]}' already exists` + : `Download Sources '${idsWithName.join(',')}' already exist`; + + throw new IngestManagerError(`${existClause} with name '${downloadSource.name}'`); + } + } + } + private async _getDefaultDownloadSourceSO(soClient: SavedObjectsClientContract) { return await soClient.find<DownloadSourceAttributes>({ type: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.test.ts index 5e3ba27a5357b..d69fd167ee117 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.test.ts @@ -4,8 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { getArchiveEntry } from '../../archive/cache'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts index 74e49031861c1..3155380b6c365 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts @@ -24,8 +24,7 @@ import { loggerMock } from '@kbn/logging-mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectsClientMock } from '@kbn/core/server/saved_objects/service/saved_objects_client.mock'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getInstallation, getInstallationObject } from '../../packages'; import type { Installation, RegistryPackage } from '../../../../types'; diff --git a/x-pack/plugins/index_management/common/types/component_templates.ts b/x-pack/plugins/index_management/common/types/component_templates.ts index 50d4b37298b4b..d2842b0486303 100644 --- a/x-pack/plugins/index_management/common/types/component_templates.ts +++ b/x-pack/plugins/index_management/common/types/component_templates.ts @@ -40,3 +40,7 @@ export interface ComponentTemplateListItem { hasSettings: boolean; isManaged: boolean; } + +export interface ComponentTemplateDatastreams { + data_streams: string[]; +} diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx index e2ccb0ca70808..94beecf441b07 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx @@ -50,6 +50,9 @@ describe('<ComponentTemplateEdit />', () => { COMPONENT_TEMPLATE_TO_EDIT.name, COMPONENT_TEMPLATE_TO_EDIT ); + httpRequestsMockHelpers.setGetComponentTemplateDatastream(COMPONENT_TEMPLATE_TO_EDIT.name, { + data_streams: [], + }); await act(async () => { testBed = await setup(httpSetup); @@ -86,7 +89,7 @@ describe('<ComponentTemplateEdit />', () => { describe('form payload', () => { it('should send the correct payload with changed values', async () => { - const { actions, component, form } = testBed; + const { actions, component, form, coreStart } = testBed; await act(async () => { form.setInputValue('versionField.input', '1'); @@ -120,6 +123,108 @@ describe('<ComponentTemplateEdit />', () => { }), }) ); + // Mapping rollout modal should not be opened if the component template is not managed by Fleet + expect(coreStart.overlays.openModal).not.toBeCalled(); + }); + }); + + describe('managed by fleet', () => { + const DATASTREAM_NAME = 'logs-test-default'; + beforeEach(async () => { + httpRequestsMockHelpers.setLoadComponentTemplateResponse( + COMPONENT_TEMPLATE_TO_EDIT.name, + Object.assign({}, COMPONENT_TEMPLATE_TO_EDIT, { + _meta: { managed_by: 'fleet' }, + }) + ); + + httpRequestsMockHelpers.setGetComponentTemplateDatastream(COMPONENT_TEMPLATE_TO_EDIT.name, { + data_streams: [DATASTREAM_NAME], + }); + + await act(async () => { + testBed = await setup(httpSetup); + }); + + testBed.component.update(); + }); + + it('should show mappings rollover modal on save if apply mappings call failed', async () => { + httpRequestsMockHelpers.setPostDatastreamMappingsFromTemplate( + DATASTREAM_NAME, + {}, + { message: 'Bad request', statusCode: 400 } + ); + const { actions, component, form, coreStart } = testBed; + + await act(async () => { + form.setInputValue('versionField.input', '1'); + }); + + await act(async () => { + actions.clickNextButton(); + }); + + component.update(); + + await actions.completeStepSettings(); + await actions.completeStepMappings(); + await actions.completeStepAliases(); + + await act(async () => { + actions.clickNextButton(); + }); + + component.update(); + + expect(httpSetup.put).toHaveBeenLastCalledWith( + `${API_BASE_PATH}/component_templates/${COMPONENT_TEMPLATE_TO_EDIT.name}`, + expect.anything() + ); + expect(httpSetup.post).toHaveBeenLastCalledWith( + `${API_BASE_PATH}/data_streams/${DATASTREAM_NAME}/mappings_from_template`, + expect.anything() + ); + + expect(coreStart.overlays.openModal).toBeCalled(); + }); + + it('should not show mappings rollover modal on save if apply mappings call succeed', async () => { + httpRequestsMockHelpers.setPostDatastreamMappingsFromTemplate(DATASTREAM_NAME, { + success: true, + }); + const { actions, component, form, coreStart } = testBed; + + await act(async () => { + form.setInputValue('versionField.input', '1'); + }); + + await act(async () => { + actions.clickNextButton(); + }); + + component.update(); + + await actions.completeStepSettings(); + await actions.completeStepMappings(); + await actions.completeStepAliases(); + + await act(async () => { + actions.clickNextButton(); + }); + + component.update(); + + expect(httpSetup.put).toHaveBeenLastCalledWith( + `${API_BASE_PATH}/component_templates/${COMPONENT_TEMPLATE_TO_EDIT.name}`, + expect.anything() + ); + expect(httpSetup.post).toHaveBeenLastCalledWith( + `${API_BASE_PATH}/data_streams/${DATASTREAM_NAME}/mappings_from_template`, + expect.anything() + ); + + expect(coreStart.overlays.openModal).not.toBeCalled(); }); }); }); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_edit.helpers.ts b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_edit.helpers.ts index f1ec4abaf90a3..6b49171ea5620 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_edit.helpers.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_edit.helpers.ts @@ -6,7 +6,8 @@ */ import { registerTestBed, TestBed, AsyncTestBedConfig } from '@kbn/test-jest-helpers'; -import { HttpSetup } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import type { HttpSetup } from '@kbn/core/public'; import { BASE_PATH } from '../../../../../../../common'; import { ComponentTemplateEdit } from '../../../component_template_wizard'; @@ -18,6 +19,7 @@ import { export type ComponentTemplateEditTestBed = TestBed<ComponentTemplateFormTestSubjects> & { actions: ReturnType<typeof getFormActions>; + coreStart: ReturnType<typeof coreMock['createStart']>; }; export const setup = async ( @@ -32,8 +34,10 @@ export const setup = async ( doMountAsync: true, }; + const coreStart = coreMock.createStart(); + const initTestBed = registerTestBed( - WithAppDependencies(ComponentTemplateEdit, httpSetup), + WithAppDependencies(ComponentTemplateEdit, httpSetup, coreStart), testBedConfig ); const testBed = await initTestBed(); @@ -41,5 +45,6 @@ export const setup = async ( return { ...testBed, actions: getFormActions(testBed), + coreStart, }; }; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/http_requests.ts b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/http_requests.ts index f3019e12eea9c..8ce2a34db397b 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/http_requests.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/http_requests.ts @@ -55,6 +55,18 @@ const registerHttpRequestMockHelpers = ( .set(path, error ? defuse(Promise.reject({ body: error })) : Promise.resolve(response)); }; + const setGetComponentTemplateDatastream = ( + templateId: string, + response?: HttpResponse, + error?: ResponseError + ) => + mockResponse( + 'GET', + `${API_BASE_PATH}/component_templates/${templateId}/datastreams`, + response, + error + ); + const setLoadComponentTemplatesResponse = (response?: HttpResponse, error?: ResponseError) => mockResponse('GET', `${API_BASE_PATH}/component_templates`, response, error); @@ -74,11 +86,25 @@ const registerHttpRequestMockHelpers = ( const setCreateComponentTemplateResponse = (response?: HttpResponse, error?: ResponseError) => mockResponse('POST', `${API_BASE_PATH}/component_templates`, response, error); + const setPostDatastreamMappingsFromTemplate = ( + name: string, + response?: HttpResponse, + error?: ResponseError + ) => + mockResponse( + 'POST', + `${API_BASE_PATH}/data_streams/${name}/mappings_from_template`, + response, + error + ); + return { setLoadComponentTemplatesResponse, setDeleteComponentTemplateResponse, setLoadComponentTemplateResponse, setCreateComponentTemplateResponse, + setGetComponentTemplateDatastream, + setPostDatastreamMappingsFromTemplate, }; }; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx index 0987fc18e657e..25165fe782c99 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx @@ -7,10 +7,10 @@ import React from 'react'; -import { HttpSetup } from '@kbn/core/public'; +import type { CoreStart, HttpSetup } from '@kbn/core/public'; import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks'; -import { notificationServiceMock, applicationServiceMock } from '@kbn/core/public/mocks'; +import { notificationServiceMock, applicationServiceMock, coreMock } from '@kbn/core/public/mocks'; import { GlobalFlyout } from '@kbn/es-ui-shared-plugin/public'; import { AppContextProvider } from '../../../../../app_context'; @@ -27,7 +27,8 @@ const appDependencies = { docLinks: {} as any, } as any; -export const componentTemplatesDependencies = (httpSetup: HttpSetup) => ({ +export const componentTemplatesDependencies = (httpSetup: HttpSetup, coreStart?: CoreStart) => ({ + overlays: coreStart?.overlays ?? coreMock.createStart().overlays, httpClient: httpSetup, apiBasePath: API_BASE_PATH, trackMetric: () => {}, @@ -40,16 +41,17 @@ export const componentTemplatesDependencies = (httpSetup: HttpSetup) => ({ export const setupEnvironment = initHttpRequests; -export const WithAppDependencies = (Comp: any, httpSetup: HttpSetup) => (props: any) => - ( - <AppContextProvider value={appDependencies}> - <MappingsEditorProvider> - <ComponentTemplatesProvider value={componentTemplatesDependencies(httpSetup)}> - <GlobalFlyoutProvider> - <Comp {...props} /> - </GlobalFlyoutProvider> - </ComponentTemplatesProvider> - </MappingsEditorProvider> - / - </AppContextProvider> - ); +export const WithAppDependencies = + (Comp: any, httpSetup: HttpSetup, coreStart?: CoreStart) => (props: any) => + ( + <AppContextProvider value={appDependencies}> + <MappingsEditorProvider> + <ComponentTemplatesProvider value={componentTemplatesDependencies(httpSetup, coreStart)}> + <GlobalFlyoutProvider> + <Comp {...props} /> + </GlobalFlyoutProvider> + </ComponentTemplatesProvider> + </MappingsEditorProvider> + / + </AppContextProvider> + ); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/component_template_edit.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/component_template_edit.tsx index a3b9f0a38354b..99c8464e4a468 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/component_template_edit.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/component_template_edit.tsx @@ -8,6 +8,7 @@ import React, { useState, useEffect, useMemo, useCallback } from 'react'; import { RouteComponentProps } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n-react'; +import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { EuiPageContentBody, EuiPageHeader, EuiSpacer } from '@elastic/eui'; import { History } from 'history'; @@ -22,6 +23,9 @@ import { import { ComponentTemplateForm } from '../component_template_form'; import type { WizardSection } from '../component_template_form'; import { useRedirectPath } from '../../../../hooks/redirect_path'; +import { MANAGED_BY_FLEET } from '../../constants'; + +import { MappingsDatastreamRolloverModal } from './mappings_datastreams_rollover_modal'; interface MatchParams { name: string; @@ -57,7 +61,7 @@ export const ComponentTemplateEdit: React.FunctionComponent<RouteComponentProps< }, history, }) => { - const { api, breadcrumbs } = useComponentTemplatesContext(); + const { api, breadcrumbs, overlays } = useComponentTemplatesContext(); const { activeStep: defaultActiveStep, updateStep } = useStepFromQueryString(history); const redirectTo = useRedirectPath(history); @@ -67,6 +71,8 @@ export const ComponentTemplateEdit: React.FunctionComponent<RouteComponentProps< const decodedName = attemptToURIDecode(name)!; const { error, data: componentTemplate, isLoading } = api.useLoadComponentTemplate(decodedName); + const { data: dataStreamResponse } = api.useLoadComponentTemplatesDatastream(decodedName); + const dataStreams = useMemo(() => dataStreamResponse?.data_streams ?? [], [dataStreamResponse]); useEffect(() => { breadcrumbs.setEditBreadcrumbs(); @@ -85,6 +91,38 @@ export const ComponentTemplateEdit: React.FunctionComponent<RouteComponentProps< return; } + if (updatedComponentTemplate._meta?.managed_by === MANAGED_BY_FLEET && dataStreams.length) { + const dataStreamsToRollover: string[] = []; + for (const dataStream of dataStreams) { + try { + const { error: applyMappingError } = await api.postDataStreamMappingsFromTemplate( + dataStream + ); + if (applyMappingError) { + throw applyMappingError; + } + } catch (err) { + dataStreamsToRollover.push(dataStream); + } + } + + if (dataStreamsToRollover.length) { + const ref = overlays.openModal( + toMountPoint( + <MappingsDatastreamRolloverModal + componentTemplatename={updatedComponentTemplate.name} + dataStreams={dataStreamsToRollover} + api={api} + onClose={() => { + ref.close(); + }} + /> + ) + ); + + await ref.onClose; + } + } redirectTo({ pathname: encodeURI( `/component_templates/${encodeURIComponent(updatedComponentTemplate.name)}` @@ -141,6 +179,7 @@ export const ComponentTemplateEdit: React.FunctionComponent<RouteComponentProps< <ComponentTemplateForm defaultValue={componentTemplate!} + dataStreams={dataStreams} defaultActiveWizardSection={defaultActiveStep} onStepChange={updateStep} onSave={onSave} diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/mappings_datastreams_rollover_modal.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/mappings_datastreams_rollover_modal.tsx new file mode 100644 index 0000000000000..f7feb7eaedbec --- /dev/null +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_edit/mappings_datastreams_rollover_modal.tsx @@ -0,0 +1,125 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useCallback } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { EuiConfirmModal, EuiCode, EuiSpacer, EuiText, EuiCallOut, EuiLink } from '@elastic/eui'; + +import type { useComponentTemplatesContext } from '../../component_templates_context'; +import { documentationService } from '../../../../services/documentation'; +import type { Error } from '../../shared_imports'; + +interface Props { + componentTemplatename: string; + dataStreams: string[]; + onClose: () => void; + api: ReturnType<typeof useComponentTemplatesContext>['api']; +} + +export const MappingsDatastreamRolloverModal: React.FunctionComponent<Props> = ({ + componentTemplatename, + dataStreams, + onClose, + api, +}) => { + const [error, setError] = useState<Error>(); + const [isLoading, setIsLoading] = useState(false); + + const onConfirm = useCallback(() => { + async function confirm() { + try { + setIsLoading(true); + for (const dataStream of dataStreams) { + await api.postDataStreamRollover(dataStream); + } + await onClose(); + } catch (err) { + setError(err); + } finally { + setIsLoading(false); + } + } + + confirm(); + }, [api, onClose, dataStreams]); + + return ( + <EuiConfirmModal + data-test-subj="mappingDatastreamRolloverModal" + isLoading={isLoading} + title={ + <FormattedMessage + id="xpack.idxMgmt.componentTemplateEdit.mappingRolloverModalTitle" + defaultMessage="Apply mappings now and rollover?" + /> + } + onCancel={onClose} + onConfirm={onConfirm} + cancelButtonText={ + <FormattedMessage + id="xpack.idxMgmt.componentTemplateMappingsRollover.cancelButton" + defaultMessage="Apply on next rollover" + /> + } + confirmButtonText={ + <FormattedMessage + id="xpack.idxMgmt.componentTemplateMappingsRollover.confirmButtom" + defaultMessage="Apply now and rollover" + /> + } + > + {error && ( + <> + <EuiCallOut + title={ + <FormattedMessage + id="xpack.idxMgmt.componentTemplateMappingsRollover.saveError" + defaultMessage="Unable to apply rollover" + /> + } + color="danger" + iconType="alert" + data-test-subj="applyMappingsRolloverError" + > + <div>{error.message}</div> + </EuiCallOut> + <EuiSpacer size="m" /> + </> + )} + <EuiText> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateMappingsRollover.modalDescription" + defaultMessage="New mappings for the {templateName} component template require a rollover for the following data streams: {datastreams} You can apply the new mappings to incoming data now and force a rollover, or wait until the next rollover. Rollover timing is defined by your index lifecycle policy. {moreInfoLink}" + values={{ + templateName: <EuiCode>{componentTemplatename}</EuiCode>, + moreInfoLink: ( + <EuiLink external={true} href={documentationService.docLinks.fleet.datastreamsILM}> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateEdit.moreInfoLink" + defaultMessage="See the documentation for more info." + /> + </EuiLink> + ), + datastreams: ( + <> + <EuiSpacer size="m" /> + <ul> + {dataStreams.map((dataStream) => ( + <li> + <EuiCode>{dataStream}</EuiCode> + </li> + ))} + </ul> + <EuiSpacer size="s" /> + </> + ), + }} + /> + </EuiText> + </EuiConfirmModal> + ); +}; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/component_template_form.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/component_template_form.tsx index 0d846d4b41740..ae12800719f96 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/component_template_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/component_template_form.tsx @@ -40,6 +40,7 @@ interface Props { isEditing?: boolean; defaultActiveWizardSection?: WizardSection; onStepChange?: (stepId: string) => void; + dataStreams?: string[]; } const wizardSections: { [id: string]: { id: WizardSection; label: string } } = { @@ -85,6 +86,7 @@ export const ComponentTemplateForm = ({ isManaged: false, }, }, + dataStreams, isEditing, isSaving, saveError, @@ -243,6 +245,7 @@ export const ComponentTemplateForm = ({ <FormWizardStep id={wizardSections.review.id} label={wizardSections.review.label}> <StepReviewContainer getComponentTemplateData={buildComponentTemplateObject(defaultValue)} + dataStreams={dataStreams} /> </FormWizardStep> </FormWizard> diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review.tsx index 3243ef5d865b8..da25af901020a 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review.tsx @@ -18,6 +18,7 @@ import { EuiDescriptionListDescription, EuiText, EuiCodeBlock, + EuiCode, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -26,6 +27,7 @@ import { serializers, serializeComponentTemplate, } from '../../../shared_imports'; +import { MANAGED_BY_FLEET } from '../../../constants'; const { stripEmptyFields } = serializers; @@ -47,164 +49,208 @@ const getDescriptionText = (data: any) => { interface Props { componentTemplate: ComponentTemplateDeserialized; + dataStreams?: string[]; } -export const StepReview: React.FunctionComponent<Props> = React.memo(({ componentTemplate }) => { - const { name } = componentTemplate; +export const StepReview: React.FunctionComponent<Props> = React.memo( + ({ dataStreams, componentTemplate }) => { + const { name } = componentTemplate; - const serializedComponentTemplate = serializeComponentTemplate( - stripEmptyFields(componentTemplate, { - types: ['string'], - }) as ComponentTemplateDeserialized - ); + const serializedComponentTemplate = serializeComponentTemplate( + stripEmptyFields(componentTemplate, { + types: ['string'], + }) as ComponentTemplateDeserialized + ); - const { - template: serializedTemplate, - _meta: serializedMeta, - version: serializedVersion, - } = serializedComponentTemplate; - - const SummaryTab = () => ( - <div data-test-subj="summaryTab"> - <EuiSpacer size="m" /> - - <EuiFlexGroup> - <EuiFlexItem> - <EuiDescriptionList textStyle="reverse"> - {/* Version */} - {typeof serializedVersion !== 'undefined' && ( - <> - <EuiDescriptionListTitle> - <FormattedMessage - id="xpack.idxMgmt.templateForm.stepReview.summaryTab.versionLabel" - defaultMessage="Version" - /> - </EuiDescriptionListTitle> - <EuiDescriptionListDescription>{serializedVersion}</EuiDescriptionListDescription> - </> - )} + const { + template: serializedTemplate, + _meta: serializedMeta, + version: serializedVersion, + } = serializedComponentTemplate; - {/* Index settings */} - <EuiDescriptionListTitle> - <FormattedMessage - id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.settingsLabel" - defaultMessage="Index settings" - /> - </EuiDescriptionListTitle> - <EuiDescriptionListDescription> - {getDescriptionText(serializedTemplate?.settings)} - </EuiDescriptionListDescription> + const isFleetDatastreamsVisible = + dataStreams?.length && componentTemplate._meta?.managed_by === MANAGED_BY_FLEET; - {/* Mappings */} - <EuiDescriptionListTitle> - <FormattedMessage - id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.mappingLabel" - defaultMessage="Mappings" - /> - </EuiDescriptionListTitle> - <EuiDescriptionListDescription> - {getDescriptionText(serializedTemplate?.mappings)} - </EuiDescriptionListDescription> + const SummaryTab = () => ( + <div data-test-subj="summaryTab"> + <EuiSpacer size="m" /> - {/* Aliases */} - <EuiDescriptionListTitle> - <FormattedMessage - id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.aliasesLabel" - defaultMessage="Aliases" - /> - </EuiDescriptionListTitle> - <EuiDescriptionListDescription> - {getDescriptionText(serializedTemplate?.aliases)} - </EuiDescriptionListDescription> - </EuiDescriptionList> - </EuiFlexItem> - - <EuiFlexItem> - {/* Metadata */} - {serializedMeta && ( + <EuiFlexGroup> + <EuiFlexItem> <EuiDescriptionList textStyle="reverse"> + {/* Version */} + {typeof serializedVersion !== 'undefined' && ( + <> + <EuiDescriptionListTitle> + <FormattedMessage + id="xpack.idxMgmt.templateForm.stepReview.summaryTab.versionLabel" + defaultMessage="Version" + /> + </EuiDescriptionListTitle> + <EuiDescriptionListDescription>{serializedVersion}</EuiDescriptionListDescription> + </> + )} + + {/* Index settings */} <EuiDescriptionListTitle> <FormattedMessage - id="xpack.idxMgmt.templateForm.stepReview.summaryTab.metaLabel" - defaultMessage="Metadata" + id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.settingsLabel" + defaultMessage="Index settings" /> </EuiDescriptionListTitle> <EuiDescriptionListDescription> - <EuiCodeBlock language="json"> - {JSON.stringify(serializedMeta, null, 2)} - </EuiCodeBlock> + {getDescriptionText(serializedTemplate?.settings)} + </EuiDescriptionListDescription> + + {/* Mappings */} + <EuiDescriptionListTitle> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.mappingLabel" + defaultMessage="Mappings" + /> + </EuiDescriptionListTitle> + <EuiDescriptionListDescription> + {getDescriptionText(serializedTemplate?.mappings)} + </EuiDescriptionListDescription> + + {/* Aliases */} + <EuiDescriptionListTitle> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateForm.stepReview.summaryTab.aliasesLabel" + defaultMessage="Aliases" + /> + </EuiDescriptionListTitle> + <EuiDescriptionListDescription> + {getDescriptionText(serializedTemplate?.aliases)} </EuiDescriptionListDescription> </EuiDescriptionList> + </EuiFlexItem> + {isFleetDatastreamsVisible && ( + <EuiFlexItem> + {/* Datastream mappings */} + <FormattedMessage + id="xpack.idxMgmt.templateForm.stepReview.summaryTab.datastreamsLabel" + defaultMessage="Mappings will immediately be applied to the following datastreams:" + /> + <EuiSpacer size="s" /> + <EuiText> + <ul> + {dataStreams.map((dataStream) => ( + <li key={dataStream}> + <EuiCode>{dataStream}</EuiCode> + </li> + ))} + </ul> + </EuiText> + </EuiFlexItem> )} - </EuiFlexItem> - </EuiFlexGroup> - </div> - ); + <EuiFlexItem> + {/* Metadata */} + {serializedMeta && ( + <EuiDescriptionList textStyle="reverse"> + <EuiDescriptionListTitle> + <FormattedMessage + id="xpack.idxMgmt.templateForm.stepReview.summaryTab.metaLabel" + defaultMessage="Metadata" + /> + </EuiDescriptionListTitle> + <EuiDescriptionListDescription> + <EuiCodeBlock language="json"> + {JSON.stringify(serializedMeta, null, 2)} + </EuiCodeBlock> + </EuiDescriptionListDescription> + </EuiDescriptionList> + )} + </EuiFlexItem> + </EuiFlexGroup> + </div> + ); - const RequestTab = () => { - const endpoint = `PUT _component_template/${name || '<componentTemplateName>'}`; - const templateString = JSON.stringify(serializedComponentTemplate, null, 2); - const request = `${endpoint}\n${templateString}`; + const RequestTab = () => { + const endpoint = `PUT _component_template/${name || '<componentTemplateName>'}`; + const templateString = JSON.stringify(serializedComponentTemplate, null, 2); + const request = `${endpoint}\n${templateString}`; - // Beyond a certain point, highlighting the syntax will bog down performance to unacceptable - // levels. This way we prevent that happening for very large requests. - const language = request.length < 60000 ? 'json' : undefined; + // Beyond a certain point, highlighting the syntax will bog down performance to unacceptable + // levels. This way we prevent that happening for very large requests. + const language = request.length < 60000 ? 'json' : undefined; - return ( - <div data-test-subj="requestTab"> - <EuiSpacer size="m" /> + return ( + <div data-test-subj="requestTab"> + <EuiSpacer size="m" /> + + <EuiText> + <p> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateForm.stepReview.requestTab.descriptionText" + defaultMessage="This request will create the following component template." + /> + </p> + </EuiText> - <EuiText> - <p> + <EuiSpacer size="m" /> + + <EuiCodeBlock language={language} isCopyable> + {request} + </EuiCodeBlock> + + {isFleetDatastreamsVisible && ( + <> + <EuiSpacer size="m" /> + <EuiText> + <p> + <FormattedMessage + id="xpack.idxMgmt.componentTemplateForm.stepReview.requestTab.datastreamNote" + defaultMessage="Datastreams using that template need to be updated with aditionnal requests." + /> + </p> + </EuiText> + </> + )} + </div> + ); + }; + + return ( + <div data-test-subj="stepReview"> + <EuiTitle> + <h2 data-test-subj="title"> <FormattedMessage - id="xpack.idxMgmt.componentTemplateForm.stepReview.requestTab.descriptionText" - defaultMessage="This request will create the following component template." + id="xpack.idxMgmt.componentTemplateForm.stepReview.stepTitle" + defaultMessage="Review details for '{templateName}'" + values={{ templateName: name }} /> - </p> - </EuiText> + </h2> + </EuiTitle> - <EuiSpacer size="m" /> + <EuiSpacer size="l" /> - <EuiCodeBlock language={language} isCopyable> - {request} - </EuiCodeBlock> + <EuiTabbedContent + data-test-subj="content" + tabs={[ + { + id: 'summary', + name: i18n.translate( + 'xpack.idxMgmt.componentTemplateForm.stepReview.summaryTabTitle', + { + defaultMessage: 'Summary', + } + ), + content: <SummaryTab />, + }, + { + id: 'request', + name: i18n.translate( + 'xpack.idxMgmt.componentTemplateForm.stepReview.requestTabTitle', + { + defaultMessage: 'Request', + } + ), + content: <RequestTab />, + }, + ]} + /> </div> ); - }; - - return ( - <div data-test-subj="stepReview"> - <EuiTitle> - <h2 data-test-subj="title"> - <FormattedMessage - id="xpack.idxMgmt.componentTemplateForm.stepReview.stepTitle" - defaultMessage="Review details for '{templateName}'" - values={{ templateName: name }} - /> - </h2> - </EuiTitle> - - <EuiSpacer size="l" /> - - <EuiTabbedContent - data-test-subj="content" - tabs={[ - { - id: 'summary', - name: i18n.translate('xpack.idxMgmt.componentTemplateForm.stepReview.summaryTabTitle', { - defaultMessage: 'Summary', - }), - content: <SummaryTab />, - }, - { - id: 'request', - name: i18n.translate('xpack.idxMgmt.componentTemplateForm.stepReview.requestTabTitle', { - defaultMessage: 'Request', - }), - content: <RequestTab />, - }, - ]} - /> - </div> - ); -}); + } +); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review_container.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review_container.tsx index aee8b25d64ed1..b2f2fbd0d57fd 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review_container.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_review_container.tsx @@ -13,14 +13,17 @@ import { StepReview } from './step_review'; interface Props { getComponentTemplateData: (wizardContent: WizardContent) => ComponentTemplateDeserialized; + dataStreams?: string[]; } -export const StepReviewContainer = React.memo(({ getComponentTemplateData }: Props) => { - const { getData } = Forms.useMultiContentContext<WizardContent>(); +export const StepReviewContainer = React.memo( + ({ getComponentTemplateData, dataStreams }: Props) => { + const { getData } = Forms.useMultiContentContext<WizardContent>(); - const wizardContent = getData(); - // Build the final template object, providing the wizard content data - const componentTemplate = getComponentTemplateData(wizardContent); + const wizardContent = getData(); + // Build the final template object, providing the wizard content data + const componentTemplate = getComponentTemplateData(wizardContent); - return <StepReview componentTemplate={componentTemplate} />; -}); + return <StepReview dataStreams={dataStreams} componentTemplate={componentTemplate} />; + } +); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx index e67d5fe122a34..3f9380bf8e72d 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx @@ -29,6 +29,7 @@ interface Props { setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; getUrlForApp: CoreStart['application']['getUrlForApp']; executionContext: ExecutionContextStart; + overlays: CoreStart['overlays']; } interface Context { @@ -39,6 +40,7 @@ interface Context { breadcrumbs: ReturnType<typeof getBreadcrumbs>; trackMetric: (type: UiCounterMetricType, eventName: string) => void; toasts: NotificationsSetup['toasts']; + overlays: CoreStart['overlays']; getUrlForApp: CoreStart['application']['getUrlForApp']; executionContext: ExecutionContextStart; } @@ -51,6 +53,7 @@ export const ComponentTemplatesProvider = ({ children: React.ReactNode; }) => { const { + overlays, httpClient, apiBasePath, trackMetric, @@ -71,6 +74,7 @@ export const ComponentTemplatesProvider = ({ return ( <ComponentTemplatesContext.Provider value={{ + overlays, api, documentation, trackMetric, diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/constants.ts b/x-pack/plugins/index_management/public/application/components/component_templates/constants.ts index 054dbf32bb4a6..a6027ea19433b 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/constants.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/constants.ts @@ -15,3 +15,5 @@ export const UIM_COMPONENT_TEMPLATE_UPDATE = 'component_template_update'; // privileges export const APP_CLUSTER_REQUIRED_PRIVILEGES = ['manage_index_templates']; + +export const MANAGED_BY_FLEET = 'fleet'; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/lib/api.ts b/x-pack/plugins/index_management/public/application/components/component_templates/lib/api.ts index 6bf6d204fd9a5..ca6f8f242d288 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/lib/api.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/lib/api.ts @@ -10,6 +10,7 @@ import { ComponentTemplateListItem, ComponentTemplateDeserialized, ComponentTemplateSerialized, + ComponentTemplateDatastreams, } from '../shared_imports'; import { UIM_COMPONENT_TEMPLATE_DELETE_MANY, @@ -18,6 +19,7 @@ import { UIM_COMPONENT_TEMPLATE_UPDATE, } from '../constants'; import { UseRequestHook, SendRequestHook } from './request'; + export const getApi = ( useRequest: UseRequestHook, sendRequest: SendRequestHook, @@ -31,6 +33,13 @@ export const getApi = ( }); } + function useLoadComponentTemplatesDatastream(name: string) { + return useRequest<ComponentTemplateDatastreams>({ + path: `${apiBasePath}/component_templates/${encodeURIComponent(name)}/datastreams`, + method: 'get', + }); + } + function deleteComponentTemplates(names: string[]) { const result = sendRequest({ path: `${apiBasePath}/component_templates/${names @@ -79,11 +88,36 @@ export const getApi = ( return result; } + async function getComponentTemplateDatastreams(name: string) { + return sendRequest<ComponentTemplateDatastreams>({ + path: `${apiBasePath}/component_templates/${encodeURIComponent(name)}/datastreams`, + method: 'get', + }); + } + + async function postDataStreamRollover(name: string) { + return sendRequest<ComponentTemplateDatastreams>({ + path: `${apiBasePath}/data_streams/${encodeURIComponent(name)}/rollover`, + method: 'post', + }); + } + + async function postDataStreamMappingsFromTemplate(name: string) { + return sendRequest<ComponentTemplateDatastreams>({ + path: `${apiBasePath}/data_streams/${encodeURIComponent(name)}/mappings_from_template`, + method: 'post', + }); + } + return { useLoadComponentTemplates, deleteComponentTemplates, useLoadComponentTemplate, createComponentTemplate, updateComponentTemplate, + useLoadComponentTemplatesDatastream, + getComponentTemplateDatastreams, + postDataStreamRollover, + postDataStreamMappingsFromTemplate, }; }; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/lib/request.ts b/x-pack/plugins/index_management/public/application/components/component_templates/lib/request.ts index 7bb4b90da2fed..62809d61e9a24 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/lib/request.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/lib/request.ts @@ -20,7 +20,9 @@ import { export type UseRequestHook = <T = any, E = Error>( config: UseRequestConfig ) => UseRequestResponse<T, E>; -export type SendRequestHook = (config: SendRequestConfig) => Promise<SendRequestResponse>; +export type SendRequestHook = <T = any>( + config: SendRequestConfig +) => Promise<SendRequestResponse<T>>; export const getUseRequest = (httpClient: HttpSetup): UseRequestHook => diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts index 64ee7a16ef2fb..78dd0395b6e34 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts @@ -65,6 +65,7 @@ export type { ComponentTemplateSerialized, ComponentTemplateDeserialized, ComponentTemplateListItem, + ComponentTemplateDatastreams, } from '../../../../common'; export { serializeComponentTemplate } from '../../../../common/lib'; diff --git a/x-pack/plugins/index_management/public/application/index.tsx b/x-pack/plugins/index_management/public/application/index.tsx index ad0779e88c392..d3c97c3fe3d3f 100644 --- a/x-pack/plugins/index_management/public/application/index.tsx +++ b/x-pack/plugins/index_management/public/application/index.tsx @@ -35,7 +35,7 @@ export const renderApp = ( return () => undefined; } - const { i18n, docLinks, notifications, application, executionContext } = core; + const { i18n, docLinks, notifications, application, executionContext, overlays } = core; const { Context: I18nContext } = i18n; const { services, history, setBreadcrumbs, uiSettings, kibanaVersion, theme$ } = dependencies; @@ -51,6 +51,7 @@ export const renderApp = ( const componentTemplateProviderValues = { httpClient: services.httpService.httpClient, + overlays, apiBasePath: API_BASE_PATH, trackMetric: services.uiMetricService.trackMetric.bind(services.uiMetricService), docLinks, diff --git a/x-pack/plugins/index_management/server/routes/api/component_templates/index.ts b/x-pack/plugins/index_management/server/routes/api/component_templates/index.ts index fdc72893c7b7f..9a3e22068a7f3 100644 --- a/x-pack/plugins/index_management/server/routes/api/component_templates/index.ts +++ b/x-pack/plugins/index_management/server/routes/api/component_templates/index.ts @@ -12,11 +12,13 @@ import { registerCreateRoute } from './register_create_route'; import { registerUpdateRoute } from './register_update_route'; import { registerDeleteRoute } from './register_delete_route'; import { registerPrivilegesRoute } from './register_privileges_route'; +import { registerGetDatastreams } from './register_datastream_route'; export function registerComponentTemplateRoutes(dependencies: RouteDependencies) { registerGetAllRoute(dependencies); registerCreateRoute(dependencies); registerUpdateRoute(dependencies); + registerGetDatastreams(dependencies); registerDeleteRoute(dependencies); registerPrivilegesRoute(dependencies); } diff --git a/x-pack/plugins/index_management/server/routes/api/component_templates/register_datastream_route.ts b/x-pack/plugins/index_management/server/routes/api/component_templates/register_datastream_route.ts new file mode 100644 index 0000000000000..b117f7b8f9ba4 --- /dev/null +++ b/x-pack/plugins/index_management/server/routes/api/component_templates/register_datastream_route.ts @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ElasticsearchClient } from '@kbn/core/server'; +import { schema } from '@kbn/config-schema'; +import type { IndicesDataStream } from '@elastic/elasticsearch/lib/api/types'; + +import { RouteDependencies } from '../../../types'; +import { addBasePath } from '..'; + +const paramsSchema = schema.object({ + name: schema.string(), +}); + +async function getDatastreamsForComponentTemplate( + esClient: ElasticsearchClient, + name: string +): Promise<IndicesDataStream[]> { + const { component_templates: componentTemplates } = await esClient.cluster.getComponentTemplate({ + name, + }); + + if (!componentTemplates.find((componentTemplate) => componentTemplate.name === name)) { + return []; + } + + const { index_templates: indexTemplates } = await esClient.indices.getIndexTemplate(); + + const datastreamNames = indexTemplates + .filter((indexTemplate) => indexTemplate.index_template.composed_of.includes(name)) + .map((indexTemplate) => indexTemplate.index_template.index_patterns) + .flat() + .join(','); + + if (datastreamNames.length < 0) { + return []; + } + const { data_streams: dataStreams } = await esClient.indices.getDataStream({ + name: datastreamNames, + }); + + return dataStreams; +} + +export const registerGetDatastreams = ({ + router, + lib: { handleEsError }, +}: RouteDependencies): void => { + router.get( + { + path: addBasePath('/component_templates/{name}/datastreams'), + validate: { + params: paramsSchema, + }, + }, + async (context, request, response) => { + const { client } = (await context.core).elasticsearch; + + const { name } = request.params; + + try { + const dataStreams = await getDatastreamsForComponentTemplate(client.asCurrentUser, name); + + return response.ok({ + body: { + data_streams: dataStreams.map((ds) => ds.name), + }, + }); + } catch (error) { + return handleEsError({ error, response }); + } + } + ); +}; diff --git a/x-pack/plugins/index_management/server/routes/api/data_streams/index.ts b/x-pack/plugins/index_management/server/routes/api/data_streams/index.ts index 8c241cdf4885d..39238c410489d 100644 --- a/x-pack/plugins/index_management/server/routes/api/data_streams/index.ts +++ b/x-pack/plugins/index_management/server/routes/api/data_streams/index.ts @@ -9,9 +9,12 @@ import { RouteDependencies } from '../../../types'; import { registerGetOneRoute, registerGetAllRoute } from './register_get_route'; import { registerDeleteRoute } from './register_delete_route'; +import { registerPostOneApplyLatestMappings, registerPostOneRollover } from './register_post_route'; export function registerDataStreamRoutes(dependencies: RouteDependencies) { registerGetOneRoute(dependencies); + registerPostOneApplyLatestMappings(dependencies); + registerPostOneRollover(dependencies); registerGetAllRoute(dependencies); registerDeleteRoute(dependencies); } diff --git a/x-pack/plugins/index_management/server/routes/api/data_streams/register_post_route.ts b/x-pack/plugins/index_management/server/routes/api/data_streams/register_post_route.ts new file mode 100644 index 0000000000000..8e2a5a3790986 --- /dev/null +++ b/x-pack/plugins/index_management/server/routes/api/data_streams/register_post_route.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema, TypeOf } from '@kbn/config-schema'; + +import { IScopedClusterClient } from '@kbn/core/server'; +import { RouteDependencies } from '../../../types'; +import { addBasePath } from '..'; + +const getDataStreams = (client: IScopedClusterClient, name = '*') => { + return client.asCurrentUser.indices.getDataStream({ + name, + expand_wildcards: 'all', + }); +}; + +export function registerPostOneApplyLatestMappings({ + router, + lib: { handleEsError }, + config, +}: RouteDependencies) { + const paramsSchema = schema.object({ + name: schema.string(), + }); + router.post( + { + path: addBasePath('/data_streams/{name}/mappings_from_template'), + validate: { params: paramsSchema }, + }, + async (context, request, response) => { + const { name } = request.params as TypeOf<typeof paramsSchema>; + const { client } = (await context.core).elasticsearch; + try { + const { data_streams: dataStreams } = await getDataStreams(client, name); + // The API is meant to be used only for applying the mapping to one specific datastream + if (dataStreams[0]) { + const { template } = dataStreams[0]; + const simulateResult = await client.asCurrentUser.indices.simulateTemplate({ + name: template, + }); + + const mappings = simulateResult.template.mappings; + // for now, remove from object so as not to update stream or data stream properties of the index until type and name + // are added in https://github.com/elastic/kibana/issues/66551. namespace value we will continue + // to skip updating and assume the value in the index mapping is correct + if (mappings && mappings.properties) { + delete mappings.properties.stream; + delete mappings.properties.data_stream; + } + await client.asCurrentUser.indices.putMapping({ + index: name, + body: mappings || {}, + write_index_only: true, + }); + + return response.ok({ body: { success: true } }); + } + + return response.notFound(); + } catch (error) { + return handleEsError({ error, response }); + } + } + ); +} + +export function registerPostOneRollover({ + router, + lib: { handleEsError }, + config, +}: RouteDependencies) { + const paramsSchema = schema.object({ + name: schema.string(), + }); + router.post( + { + path: addBasePath('/data_streams/{name}/rollover'), + validate: { params: paramsSchema }, + }, + async (context, request, response) => { + const { name } = request.params as TypeOf<typeof paramsSchema>; + const { client } = (await context.core).elasticsearch; + try { + const { data_streams: dataStreams } = await getDataStreams(client, name); + // That API is mean to be used to rollover one specific datastream + if (dataStreams[0]) { + await client.asCurrentUser.indices.rollover({ + alias: name, + }); + + return response.ok({ body: { success: true } }); + } + + return response.notFound(); + } catch (error) { + return handleEsError({ error, response }); + } + } + ); +} diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx index 56c9f75483abc..260e082796464 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx @@ -60,31 +60,26 @@ export default { const loadedContainers: ContainerNodeMetricsRow[] = [ { name: 'gke-edge-oblt-pool-1-9a60016d-lgg1', - uptime: 23000000, averageCpuUsagePercent: 99, averageMemoryUsageMegabytes: 34, }, { name: 'gke-edge-oblt-pool-1-9a60016d-lgg2', - uptime: 43000000, averageCpuUsagePercent: 72, averageMemoryUsageMegabytes: 68, }, { name: 'gke-edge-oblt-pool-1-9a60016d-lgg3', - uptime: 53000000, averageCpuUsagePercent: 54, averageMemoryUsageMegabytes: 132, }, { name: 'gke-edge-oblt-pool-1-9a60016d-lgg4', - uptime: 63000000, averageCpuUsagePercent: 34, averageMemoryUsageMegabytes: 264, }, { name: 'gke-edge-oblt-pool-1-9a60016d-lgg5', - uptime: 83000000, averageCpuUsagePercent: 13, averageMemoryUsageMegabytes: 512, }, diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx index 2f35fe2b0c90e..92bff357f77db 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx @@ -137,8 +137,8 @@ function createFetchMock(): NodeMetricsTableFetchMock { const mockData: DataResponseMock = { series: [ - createContainer('some-container', 23000000, 76, 3671700000), - createContainer('some-other-container', 32000000, 67, 716300000), + createContainer('some-container', 76, 3671700000), + createContainer('some-other-container', 67, 716300000), ], }; @@ -156,7 +156,6 @@ function createFetchMock(): NodeMetricsTableFetchMock { function createContainer( name: string, - startTime: number, cpuUsagePct: number, memoryUsageBytes: number ): Partial<MetricsExplorerSeries> { @@ -164,7 +163,6 @@ function createContainer( id: name, rows: [ { - [metricByField['kubernetes.container.start_time']]: startTime, [metricByField['kubernetes.container.cpu.usage.limit.pct']]: cpuUsagePct, [metricByField['kubernetes.container.memory.usage.bytes']]: memoryUsageBytes, } as MetricsExplorerSeries['rows'][number], diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx index 6c75bf1e2d16b..74348d00f6f8f 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx @@ -23,7 +23,6 @@ import { NodeMetricsTableData, NumberCell, StepwisePagination, - UptimeCell, } from '../shared'; import type { ContainerNodeMetricsRow } from './use_container_metrics_table'; @@ -133,14 +132,6 @@ function containerNodeColumns( ); }, }, - { - name: i18n.translate('xpack.infra.metricsTable.container.uptimeColumnHeader', { - defaultMessage: 'Uptime', - }), - field: 'uptime', - align: 'right', - render: (uptime: number) => <UptimeCell uptimeMs={uptime} />, - }, { name: i18n.translate( 'xpack.infra.metricsTable.container.averageCpuUsagePercentColumnHeader', diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/use_container_metrics_table.ts b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/use_container_metrics_table.ts index 946aa2dac6c7e..411087113ca59 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/use_container_metrics_table.ts +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/container/use_container_metrics_table.ts @@ -21,7 +21,6 @@ import { } from '../shared'; type ContainerMetricsField = - | 'kubernetes.container.start_time' | 'kubernetes.container.cpu.usage.limit.pct' | 'kubernetes.container.memory.usage.bytes'; @@ -33,10 +32,6 @@ const containerMetricsQueryConfig: MetricsQueryOptions<ContainerMetricsField> = }, groupByField: 'container.id', metricsMap: { - 'kubernetes.container.start_time': { - aggregation: 'max', - field: 'kubernetes.container.start_time', - }, 'kubernetes.container.cpu.usage.limit.pct': { aggregation: 'avg', field: 'kubernetes.container.cpu.usage.limit.pct', @@ -53,7 +48,6 @@ const unpackMetric = makeUnpackMetric(metricByField); export interface ContainerNodeMetricsRow { name: string; - uptime: number | null; averageCpuUsagePercent: number | null; averageMemoryUsageMegabytes: number | null; } @@ -105,22 +99,15 @@ function seriesToContainerNodeMetricsRow(series: MetricsExplorerSeries): Contain function rowWithoutMetrics(name: string) { return { name, - uptime: null, averageCpuUsagePercent: null, averageMemoryUsageMegabytes: null, }; } function calculateMetricAverages(rows: MetricsExplorerRow[]) { - const { startTimeValues, averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues } = + const { averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues } = collectMetricValues(rows); - let uptime = null; - if (startTimeValues.length !== 0) { - const startTime = startTimeValues.at(-1); - uptime = Date.now() - startTime!; - } - let averageCpuUsagePercent = null; if (averageCpuUsagePercentValues.length !== 0) { averageCpuUsagePercent = scaleUpPercentage(averageOfValues(averageCpuUsagePercentValues)); @@ -134,23 +121,17 @@ function calculateMetricAverages(rows: MetricsExplorerRow[]) { } return { - uptime, averageCpuUsagePercent, averageMemoryUsageMegabytes, }; } function collectMetricValues(rows: MetricsExplorerRow[]) { - const startTimeValues: number[] = []; const averageCpuUsagePercentValues: number[] = []; const averageMemoryUsageMegabytesValues: number[] = []; rows.forEach((row) => { - const { startTime, averageCpuUsagePercent, averageMemoryUsageMegabytes } = unpackMetrics(row); - - if (startTime !== null) { - startTimeValues.push(startTime); - } + const { averageCpuUsagePercent, averageMemoryUsageMegabytes } = unpackMetrics(row); if (averageCpuUsagePercent !== null) { averageCpuUsagePercentValues.push(averageCpuUsagePercent); @@ -162,17 +143,13 @@ function collectMetricValues(rows: MetricsExplorerRow[]) { }); return { - startTimeValues, averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues, }; } -function unpackMetrics( - row: MetricsExplorerRow -): Omit<ContainerNodeMetricsRow, 'name' | 'uptime'> & { startTime: number | null } { +function unpackMetrics(row: MetricsExplorerRow): Omit<ContainerNodeMetricsRow, 'name'> { return { - startTime: unpackMetric(row, 'kubernetes.container.start_time'), averageCpuUsagePercent: unpackMetric(row, 'kubernetes.container.cpu.usage.limit.pct'), averageMemoryUsageMegabytes: unpackMetric(row, 'kubernetes.container.memory.usage.bytes'), }; diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx index eb6057d88d04e..fa9a2ef12628d 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx @@ -61,35 +61,30 @@ const loadedPods: PodNodeMetricsRow[] = [ { id: '358d96e3-026f-4440-a487-f6c2301884c0', name: 'gke-edge-oblt-pool-1-9a60016d-lgg1', - uptime: 23000000, averageCpuUsagePercent: 99, averageMemoryUsageMegabytes: 34, }, { id: '358d96e3-026f-4440-a487-f6c2301884c1', name: 'gke-edge-oblt-pool-1-9a60016d-lgg2', - uptime: 43000000, averageCpuUsagePercent: 72, averageMemoryUsageMegabytes: 68, }, { id: '358d96e3-026f-4440-a487-f6c2301884c0', name: 'gke-edge-oblt-pool-1-9a60016d-lgg3', - uptime: 53000000, averageCpuUsagePercent: 54, averageMemoryUsageMegabytes: 132, }, { id: '358d96e3-026f-4440-a487-f6c2301884c0', name: 'gke-edge-oblt-pool-1-9a60016d-lgg4', - uptime: 63000000, averageCpuUsagePercent: 34, averageMemoryUsageMegabytes: 264, }, { id: '358d96e3-026f-4440-a487-f6c2301884c0', name: 'gke-edge-oblt-pool-1-9a60016d-lgg5', - uptime: 83000000, averageCpuUsagePercent: 13, averageMemoryUsageMegabytes: 512, }, diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.test.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.test.tsx index aba60015d2633..10487aa5aae06 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.test.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.test.tsx @@ -137,8 +137,8 @@ function createFetchMock(): NodeMetricsTableFetchMock { const mockData: DataResponseMock = { series: [ - createPod('358d96e3-026f-4440-a487-f6c2301884c0', 'some-pod', 23000000, 76, 3671700000), - createPod('358d96e3-026f-4440-a487-f6c2301884c1', 'some-other-pod', 32000000, 67, 716300000), + createPod('358d96e3-026f-4440-a487-f6c2301884c0', 'some-pod', 76, 3671700000), + createPod('358d96e3-026f-4440-a487-f6c2301884c1', 'some-other-pod', 67, 716300000), ], }; @@ -157,7 +157,6 @@ function createFetchMock(): NodeMetricsTableFetchMock { function createPod( id: string, name: string, - startTime: number, cpuUsagePct: number, memoryUsageBytes: number ): Partial<MetricsExplorerSeries> { @@ -166,7 +165,6 @@ function createPod( keys: [id, name], rows: [ { - [metricByField['kubernetes.pod.start_time']]: startTime, [metricByField['kubernetes.pod.cpu.usage.limit.pct']]: cpuUsagePct, [metricByField['kubernetes.pod.memory.usage.bytes']]: memoryUsageBytes, } as MetricsExplorerSeries['rows'][number], diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx index 7021371b63245..22e6b6a27d214 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx @@ -23,7 +23,6 @@ import { NodeMetricsTableData, NumberCell, StepwisePagination, - UptimeCell, } from '../shared'; import type { PodNodeMetricsRow } from './use_pod_metrics_table'; @@ -126,14 +125,6 @@ function podNodeColumns( ); }, }, - { - name: i18n.translate('xpack.infra.metricsTable.pod.uptimeColumnHeader', { - defaultMessage: 'Uptime', - }), - field: 'uptime', - align: 'right', - render: (uptime: number) => <UptimeCell uptimeMs={uptime} />, - }, { name: i18n.translate('xpack.infra.metricsTable.pod.averageCpuUsagePercentColumnHeader', { defaultMessage: 'CPU usage (avg.)', diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/use_pod_metrics_table.ts b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/use_pod_metrics_table.ts index 755a8c06aa3fa..bec98ebcc6d18 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/use_pod_metrics_table.ts +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/pod/use_pod_metrics_table.ts @@ -20,10 +20,7 @@ import { useInfrastructureNodeMetrics, } from '../shared'; -type PodMetricsField = - | 'kubernetes.pod.start_time' - | 'kubernetes.pod.cpu.usage.limit.pct' - | 'kubernetes.pod.memory.usage.bytes'; +type PodMetricsField = 'kubernetes.pod.cpu.usage.limit.pct' | 'kubernetes.pod.memory.usage.bytes'; const podMetricsQueryConfig: MetricsQueryOptions<PodMetricsField> = { sourceFilter: { @@ -33,10 +30,6 @@ const podMetricsQueryConfig: MetricsQueryOptions<PodMetricsField> = { }, groupByField: ['kubernetes.pod.uid', 'kubernetes.pod.name'], metricsMap: { - 'kubernetes.pod.start_time': { - aggregation: 'max', - field: 'kubernetes.pod.start_time', - }, 'kubernetes.pod.cpu.usage.limit.pct': { aggregation: 'avg', field: 'kubernetes.pod.cpu.usage.limit.pct', @@ -54,7 +47,6 @@ const unpackMetric = makeUnpackMetric(metricByField); export interface PodNodeMetricsRow { id: string; name: string; - uptime: number | null; averageCpuUsagePercent: number | null; averageMemoryUsageMegabytes: number | null; } @@ -107,22 +99,15 @@ function rowWithoutMetrics(id: string, name: string) { return { id, name, - uptime: null, averageCpuUsagePercent: null, averageMemoryUsageMegabytes: null, }; } function calculateMetricAverages(rows: MetricsExplorerRow[]) { - const { startTimeValues, averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues } = + const { averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues } = collectMetricValues(rows); - let uptime = null; - if (startTimeValues.length !== 0) { - const startTime = startTimeValues.at(-1); - uptime = Date.now() - startTime!; - } - let averageCpuUsagePercent = null; if (averageCpuUsagePercentValues.length !== 0) { averageCpuUsagePercent = scaleUpPercentage(averageOfValues(averageCpuUsagePercentValues)); @@ -136,23 +121,17 @@ function calculateMetricAverages(rows: MetricsExplorerRow[]) { } return { - uptime, averageCpuUsagePercent, averageMemoryUsageMegabytes, }; } function collectMetricValues(rows: MetricsExplorerRow[]) { - const startTimeValues: number[] = []; const averageCpuUsagePercentValues: number[] = []; const averageMemoryUsageMegabytesValues: number[] = []; rows.forEach((row) => { - const { startTime, averageCpuUsagePercent, averageMemoryUsageMegabytes } = unpackMetrics(row); - - if (startTime !== null) { - startTimeValues.push(startTime); - } + const { averageCpuUsagePercent, averageMemoryUsageMegabytes } = unpackMetrics(row); if (averageCpuUsagePercent !== null) { averageCpuUsagePercentValues.push(averageCpuUsagePercent); @@ -164,17 +143,13 @@ function collectMetricValues(rows: MetricsExplorerRow[]) { }); return { - startTimeValues, averageCpuUsagePercentValues, averageMemoryUsageMegabytesValues, }; } -function unpackMetrics( - row: MetricsExplorerRow -): Omit<PodNodeMetricsRow, 'id' | 'name' | 'uptime'> & { startTime: number | null } { +function unpackMetrics(row: MetricsExplorerRow): Omit<PodNodeMetricsRow, 'id' | 'name'> { return { - startTime: unpackMetric(row, 'kubernetes.pod.start_time'), averageCpuUsagePercent: unpackMetric(row, 'kubernetes.pod.cpu.usage.limit.pct'), averageMemoryUsageMegabytes: unpackMetric(row, 'kubernetes.pod.memory.usage.bytes'), }; diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/index.ts b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/index.ts index b0319a472930b..58da59b55f6ab 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/index.ts +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/index.ts @@ -14,4 +14,3 @@ export { } from './no_data_content'; export { NumberCell } from './number_cell'; export { StepwisePagination } from './stepwise_pagination'; -export { UptimeCell } from './uptime_cell'; diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/uptime_cell.tsx b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/uptime_cell.tsx deleted file mode 100644 index 38962bae0c84c..0000000000000 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/components/uptime_cell.tsx +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiTextColor } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import React from 'react'; - -interface UptimeCellProps { - uptimeMs?: number; -} - -export function UptimeCell({ uptimeMs }: UptimeCellProps) { - if (uptimeMs === null || uptimeMs === undefined || isNaN(uptimeMs)) { - return ( - <EuiTextColor color="subdued"> - <FormattedMessage - id="xpack.infra.metricsTable.uptimeCell.metricNotAvailableLabel" - defaultMessage="N/A" - description="N/A is short for not available" - /> - </EuiTextColor> - ); - } - - return <span>{formatUptime(uptimeMs)}</span>; -} - -const MS_PER_MINUTE = 1000 * 60; -const MS_PER_HOUR = MS_PER_MINUTE * 60; -const MS_PER_DAY = MS_PER_HOUR * 24; - -function formatUptime(uptimeMs: number): string { - if (uptimeMs < MS_PER_HOUR) { - const minutes = Math.floor(uptimeMs / MS_PER_MINUTE); - - if (minutes > 0) { - i18n.translate('xpack.infra.metricsTable.uptimeCell.minutesLabel', { - defaultMessage: '{minutes}m', - values: { - minutes, - }, - description: 'm is short for minutes', - }); - } - - return i18n.translate('xpack.infra.metricsTable.uptimeCell.lessThanOneMinuteLabel', { - defaultMessage: '< a minute', - }); - } - - if (uptimeMs < MS_PER_DAY) { - const hours = Math.floor(uptimeMs / MS_PER_HOUR); - const remainingUptimeMs = uptimeMs - hours * MS_PER_HOUR; - const minutes = Math.floor(remainingUptimeMs / MS_PER_MINUTE); - - if (minutes > 0) { - return i18n.translate('xpack.infra.metricsTable.uptimeCell.hoursAndMinutesLabel', { - defaultMessage: '{hours}h {minutes}m', - values: { - hours, - minutes, - }, - description: 'h is short for hours, m for minutes', - }); - } - - return i18n.translate('xpack.infra.metricsTable.uptimeCell.hoursLabel', { - defaultMessage: '{hours}h', - values: { - hours, - }, - description: 'h is short for hours', - }); - } - - const days = Math.floor(uptimeMs / MS_PER_DAY); - const remainingUptimeMs = uptimeMs - days * MS_PER_DAY; - const hours = Math.floor(remainingUptimeMs / MS_PER_HOUR); - - if (hours > 0) { - return i18n.translate('xpack.infra.metricsTable.uptimeCell.daysAndHoursLabel', { - defaultMessage: '{days}d {hours}h', - values: { - days, - hours, - }, - description: 'd is short for days, h for hours', - }); - } - - return i18n.translate('xpack.infra.metricsTable.uptimeCell.daysLabel', { - defaultMessage: '{days}d', - values: { - days, - }, - description: 'd is short for days', - }); -} diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts index 33d89f8d3c31f..3c99290518474 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts @@ -35,7 +35,7 @@ the metrics by their field names instead. The returned metricByField object, handles the translation from field name to "index name". For example, in the transform function passed to useInfrastructureNodeMetrics it can be used to find a field metric like this: -row[metricByField['kubernetes.container.start_time']] +row[metricByField['some.field']] If the endpoint where to change its return format to: { 'some.metric.field': 99, 'some.other.metric.field': 88 } diff --git a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/index.ts b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/index.ts index b980f93cd46ef..bb2a0d7a0e8ba 100644 --- a/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/index.ts +++ b/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables/shared/index.ts @@ -13,7 +13,6 @@ export { MetricsTableNoIndicesContent, NumberCell, StepwisePagination, - UptimeCell, } from './components'; export { averageOfValues, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx index 7814b12ec9eea..a13b6b480a900 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx @@ -18,6 +18,8 @@ import { Visualization } from '../../../types'; import { LayerPanels } from './config_panel'; import { LayerPanel } from './layer_panel'; import { coreMock } from '@kbn/core/public/mocks'; +import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { generateId } from '../../../id_generator'; import { mountWithProvider } from '../../../mocks'; import { LayerType, layerTypes } from '../../../../common'; @@ -46,6 +48,13 @@ afterEach(() => { describe('ConfigPanel', () => { const frame = createMockFramePublicAPI(); + + let uiActions: UiActionsStart; + + beforeEach(() => { + uiActions = uiActionsPluginMock.createStartContract(); + }); + function prepareAndMountComponent( props: ReturnType<typeof getDefaultProps>, customStoreProps?: Partial<MountStoreProps> @@ -107,6 +116,7 @@ describe('ConfigPanel', () => { core: coreMock.createStart(), isFullscreen: false, toggleFullscreen: jest.fn(), + uiActions, }; } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx index 163d1b8ce8e61..e00998a507cc2 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx @@ -7,6 +7,11 @@ import React, { useMemo, memo } from 'react'; import { EuiForm } from '@elastic/eui'; +import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; +import { + UPDATE_FILTER_REFERENCES_ACTION, + UPDATE_FILTER_REFERENCES_TRIGGER, +} from '@kbn/unified-search-plugin/public'; import { Visualization } from '../../../types'; import { LayerPanel } from './layer_panel'; import { trackUiEvent } from '../../../lens_ui_telemetry'; @@ -30,6 +35,7 @@ import { getRemoveOperation } from '../../../utils'; export const ConfigPanelWrapper = memo(function ConfigPanelWrapper(props: ConfigPanelWrapperProps) { const visualization = useLensSelector(selectVisualization); + const activeVisualization = visualization.activeId ? props.visualizationMap[visualization.activeId] : null; @@ -45,7 +51,9 @@ export function LayerPanels( } ) { const { activeVisualization, datasourceMap } = props; - const { activeDatasourceId, visualization } = useLensSelector((state) => state.lens); + const { activeDatasourceId, visualization, datasourceStates } = useLensSelector( + (state) => state.lens + ); const dispatchLens = useLensDispatch(); @@ -90,10 +98,12 @@ export function LayerPanels( }, [updateDatasource] ); + const updateAll = useMemo( () => (datasourceId: string, newDatasourceState: unknown, newVisualizationState: unknown) => { // React will synchronously update if this is triggered from a third party component, // which we don't want. The timeout lets user interaction have priority, then React updates. + setTimeout(() => { dispatchLens( updateState({ @@ -102,10 +112,12 @@ export function LayerPanels( typeof newDatasourceState === 'function' ? newDatasourceState(prevState.datasourceStates[datasourceId].state) : newDatasourceState; + const updatedVisualizationState = typeof newVisualizationState === 'function' ? newVisualizationState(prevState.visualization.state) : newVisualizationState; + return { ...prevState, datasourceStates: { @@ -174,6 +186,23 @@ export function LayerPanels( } }} onRemoveLayer={() => { + const datasourcePublicAPI = props.framePublicAPI.datasourceLayers?.[layerId]; + const datasourceId = datasourcePublicAPI?.datasourceId; + const layerDatasource = datasourceMap[datasourceId]; + const layerDatasourceState = datasourceStates?.[datasourceId]?.state; + + const trigger = props.uiActions.getTrigger(UPDATE_FILTER_REFERENCES_TRIGGER); + const action = props.uiActions.getAction(UPDATE_FILTER_REFERENCES_ACTION); + + action?.execute({ + trigger, + fromDataView: layerDatasource.getUsedDataView(layerDatasourceState, layerId), + usedDataViews: layerDatasource + .getLayers(layerDatasourceState) + .map((layer) => layerDatasource.getUsedDataView(layerDatasourceState, layer)), + defaultDataView: layerDatasource.getCurrentIndexPatternId(layerDatasourceState), + } as ActionExecutionContext); + dispatchLens( removeOrClearLayer({ visualizationId: activeVisualization.id, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx index 7f5684ac8c593..43ff541d9c92f 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx @@ -603,6 +603,7 @@ export function LayerPanel( paramEditorCustomProps: activeGroup.paramEditorCustomProps, supportFieldFormat: activeGroup.supportFieldFormat !== false, layerType: activeVisualization.getLayerType(layerId, visualizationState), + activeData: layerVisualizationConfigProps.activeData, }} /> )} diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/types.ts b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/types.ts index 172e0702f56e8..bafa5b73a1d71 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/types.ts +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/types.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; + import { Visualization, FramePublicAPI, @@ -18,6 +20,7 @@ export interface ConfigPanelWrapperProps { datasourceMap: DatasourceMap; visualizationMap: VisualizationMap; core: DatasourceDimensionEditorProps['core']; + uiActions: UiActionsStart; } export interface LayerPanelProps { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx index 16a3a6f96827a..1b91d78f8f6f1 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx @@ -105,6 +105,7 @@ export function EditorFrame(props: EditorFrameProps) { datasourceMap={datasourceMap} visualizationMap={visualizationMap} framePublicAPI={framePublicAPI} + uiActions={props.plugins.uiActions} /> ) } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx index e64cdd9bd33dc..f3f4ed3c39e4e 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx @@ -113,6 +113,7 @@ const PreviewRenderer = ({ <ExpressionRendererComponent className="lnsSuggestionPanel__expressionRenderer" padding="s" + renderMode="preview" expression={expression} debounce={2000} renderError={() => { diff --git a/x-pack/plugins/lens/public/editor_frame_service/service.tsx b/x-pack/plugins/lens/public/editor_frame_service/service.tsx index 3eb0b14ae49fb..dea3f7c43a4a8 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/service.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/service.tsx @@ -11,9 +11,9 @@ import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { ExpressionsSetup, ExpressionsStart } from '@kbn/expressions-plugin/public'; import { EmbeddableSetup, EmbeddableStart } from '@kbn/embeddable-plugin/public'; import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { ChartsPluginSetup } from '@kbn/charts-plugin/public'; import { DashboardStart } from '@kbn/dashboard-plugin/public'; +import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { Document } from '../persistence/saved_object_store'; import { Datasource, @@ -32,11 +32,11 @@ export interface EditorFrameSetupPlugins { } export interface EditorFrameStartPlugins { + uiActions: UiActionsStart; data: DataPublicPluginStart; embeddable?: EmbeddableStart; dashboard?: DashboardStart; expressions: ExpressionsStart; - uiActions: UiActionsStart; charts: ChartsPluginSetup; } diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index 715df94d82ac4..f0dae2ca28409 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -59,6 +59,7 @@ export type { CardinalityIndexPatternColumn, SumIndexPatternColumn, MedianIndexPatternColumn, + StandardDeviationIndexPatternColumn, PercentileIndexPatternColumn, PercentileRanksIndexPatternColumn, CountIndexPatternColumn, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx index 3d1928edf27dc..598bc5f4658b5 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx @@ -5,72 +5,32 @@ * 2.0. */ -import { EuiLink, EuiText, EuiPopover, EuiButtonEmpty, EuiSpacer } from '@elastic/eui'; +import { EuiSpacer, EuiAccordion, EuiText, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { useState } from 'react'; +import React from 'react'; import { AdvancedOption } from '../operations/definitions'; export function AdvancedOptions(props: { options: AdvancedOption[] }) { - const [popoverOpen, setPopoverOpen] = useState(false); - const popoverOptions = props.options.filter((option) => option.showInPopover); - const inlineOptions = props.options.filter((option) => option.inlineElement); - + const { euiTheme } = useEuiTheme(); return ( - <> - {popoverOptions.length > 0 && ( - <EuiText textAlign="right"> - <EuiPopover - ownFocus - button={ - <EuiButtonEmpty - size="xs" - iconType="arrowDown" - iconSide="right" - data-test-subj="indexPattern-advanced-popover" - onClick={() => { - setPopoverOpen(!popoverOpen); - }} - > - {i18n.translate('xpack.lens.indexPattern.advancedSettings', { - defaultMessage: 'Add advanced options', - })} - </EuiButtonEmpty> - } - isOpen={popoverOpen} - closePopover={() => { - setPopoverOpen(false); - }} - > - {popoverOptions.map(({ dataTestSubj, onClick, title, optionElement }, index) => ( - <React.Fragment key={dataTestSubj}> - {optionElement ? ( - optionElement - ) : ( - <EuiText size="s"> - <EuiLink - data-test-subj={dataTestSubj} - color="text" - onClick={() => { - setPopoverOpen(false); - onClick(); - }} - > - {title} - </EuiLink> - </EuiText> - )} - {popoverOptions.length - 1 !== index && <EuiSpacer size="s" />} - </React.Fragment> - ))} - </EuiPopover> + <EuiAccordion + id="advancedOptionsAccordion" + arrowProps={{ color: 'primary' }} + data-test-subj="indexPattern-advanced-accordion" + buttonContent={ + <EuiText size="s" color={euiTheme.colors.primary}> + {i18n.translate('xpack.lens.indexPattern.advancedSettings', { + defaultMessage: 'Advanced', + })} </EuiText> - )} - {inlineOptions.map((option) => ( - <React.Fragment key={option.dataTestSubj}> + } + > + {props.options.map(({ dataTestSubj, inlineElement }) => ( + <div key={dataTestSubj} data-test-subj={dataTestSubj}> <EuiSpacer size="s" /> - {option.inlineElement} - </React.Fragment> + {inlineElement} + </div> ))} - </> + </EuiAccordion> ); } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx index 4e667e2aa30d6..413f40279a3ce 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx @@ -30,7 +30,6 @@ import { resetIncomplete, FieldBasedIndexPatternColumn, canTransition, - DEFAULT_TIME_SCALE, adjustColumnReferencesForChangedColumn, } from '../operations'; import { mergeLayer } from '../state_helpers'; @@ -41,10 +40,10 @@ import type { IndexPattern, IndexPatternField, IndexPatternLayer } from '../type import { trackUiEvent } from '../../lens_ui_telemetry'; import { FormatSelector } from './format_selector'; import { ReferenceEditor } from './reference_editor'; -import { setTimeScaling, TimeScaling } from './time_scaling'; -import { defaultFilter, Filtering, setFilter } from './filtering'; +import { TimeScaling } from './time_scaling'; +import { Filtering } from './filtering'; import { AdvancedOptions } from './advanced_options'; -import { setTimeShift, TimeShift } from './time_shift'; +import { TimeShift } from './time_shift'; import type { LayerType } from '../../../common'; import { quickFunctionsName, @@ -270,8 +269,6 @@ export function DimensionEditor(props: DimensionEditorProps) { .map((def) => def.type); }, [fieldByOperation, operationWithoutField]); - const [filterByOpenInitially, setFilterByOpenInitally] = useState(false); - const [timeShiftedFocused, setTimeShiftFocused] = useState(false); const helpPopoverContainer = useRef<HTMLDivElement | null>(null); useEffect(() => { return () => { @@ -838,23 +835,7 @@ export function DimensionEditor(props: DimensionEditorProps) { <AdvancedOptions options={[ { - title: i18n.translate('xpack.lens.indexPattern.timeScale.enableTimeScale', { - defaultMessage: 'Normalize by unit', - }), dataTestSubj: 'indexPattern-time-scaling-enable', - onClick: () => { - setStateWrapper( - setTimeScaling(columnId, state.layers[layerId], DEFAULT_TIME_SCALE) - ); - }, - showInPopover: Boolean( - selectedOperationDefinition.timeScalingMode && - selectedOperationDefinition.timeScalingMode !== 'disabled' && - Object.values(state.layers[layerId].columns).some( - (col) => col.operationType === 'date_histogram' - ) && - !selectedColumn.timeScale - ), inlineElement: selectedOperationDefinition.timeScalingMode ? ( <TimeScaling selectedColumn={selectedColumn} @@ -865,67 +846,43 @@ export function DimensionEditor(props: DimensionEditorProps) { ) : null, }, { - title: i18n.translate('xpack.lens.indexPattern.filterBy.label', { - defaultMessage: 'Filter by', - }), dataTestSubj: 'indexPattern-filter-by-enable', - onClick: () => { - setFilterByOpenInitally(true); - setStateWrapper(setFilter(columnId, state.layers[layerId], defaultFilter)); - }, - showInPopover: Boolean( - selectedOperationDefinition.filterable && !selectedColumn.filter - ), - inlineElement: - selectedOperationDefinition.filterable && selectedColumn.filter ? ( - <Filtering - indexPattern={currentIndexPattern} - selectedColumn={selectedColumn} - columnId={columnId} - layer={state.layers[layerId]} - updateLayer={setStateWrapper} - isInitiallyOpen={filterByOpenInitially} - helpMessage={ - selectedOperationDefinition.filterable && - typeof selectedOperationDefinition.filterable !== 'boolean' - ? selectedOperationDefinition.filterable.helpMessage - : null - } - /> - ) : null, + inlineElement: selectedOperationDefinition.filterable ? ( + <Filtering + indexPattern={currentIndexPattern} + selectedColumn={selectedColumn} + columnId={columnId} + layer={state.layers[layerId]} + updateLayer={setStateWrapper} + helpMessage={ + selectedOperationDefinition.filterable && + typeof selectedOperationDefinition.filterable !== 'boolean' + ? selectedOperationDefinition.filterable.helpMessage + : null + } + /> + ) : null, }, { - title: i18n.translate('xpack.lens.indexPattern.timeShift.label', { - defaultMessage: 'Time shift', - }), dataTestSubj: 'indexPattern-time-shift-enable', - onClick: () => { - setTimeShiftFocused(true); - setStateWrapper(setTimeShift(columnId, state.layers[layerId], '')); - }, - showInPopover: Boolean( + inlineElement: Boolean( selectedOperationDefinition.shiftable && - selectedColumn.timeShift === undefined && (currentIndexPattern.timeFieldName || Object.values(state.layers[layerId].columns).some( (col) => col.operationType === 'date_histogram' )) - ), - inlineElement: - selectedOperationDefinition.shiftable && - selectedColumn.timeShift !== undefined ? ( - <TimeShift - datatableUtilities={services.data.datatableUtilities} - indexPattern={currentIndexPattern} - selectedColumn={selectedColumn} - columnId={columnId} - layer={state.layers[layerId]} - updateLayer={setStateWrapper} - isFocused={timeShiftedFocused} - activeData={props.activeData} - layerId={layerId} - /> - ) : null, + ) ? ( + <TimeShift + datatableUtilities={services.data.datatableUtilities} + indexPattern={currentIndexPattern} + selectedColumn={selectedColumn} + columnId={columnId} + layer={state.layers[layerId]} + updateLayer={setStateWrapper} + activeData={props.activeData} + layerId={layerId} + /> + ) : null, }, ...(operationDefinitionMap[selectedColumn.operationType].getAdvancedOptions?.( paramEditorProps diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx index 9606cbbf21592..a2d83da5d89e2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx @@ -6,7 +6,7 @@ */ import { ReactWrapper, ShallowWrapper } from 'enzyme'; -import React from 'react'; +import React, { ChangeEvent } from 'react'; import { act } from 'react-dom/test-utils'; import { EuiComboBox, @@ -14,7 +14,6 @@ import { EuiListGroup, EuiRange, EuiSelect, - EuiButtonIcon, } from '@elastic/eui'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; @@ -1117,37 +1116,21 @@ describe('IndexPatternDimensionEditorPanel', () => { }; } - it('should not show custom options if time scaling is not available', () => { - wrapper = mount( - <IndexPatternDimensionEditorComponent - {...getProps({ - operationType: 'average', - sourceField: 'bytes', - })} - /> - ); - wrapper - .find('[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); - expect( - wrapper.find('[data-test-subj="indexPattern-time-scaling-enable"]').hostNodes() - ).toHaveLength(0); - }); - - it('should show custom options if time scaling is available', () => { + it('should default to None if time scaling is not set', () => { wrapper = mount(<IndexPatternDimensionEditorComponent {...getProps({})} />); - wrapper - .find('[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); + expect(wrapper.find('[data-test-subj="indexPattern-time-scaling-enable"]')).toHaveLength(1); expect( - wrapper.find('[data-test-subj="indexPattern-time-scaling-enable"]').hostNodes() - ).toHaveLength(1); + wrapper + .find('[data-test-subj="indexPattern-time-scaling-unit"]') + .find(EuiSelect) + .prop('value') + ).toBe(''); }); it('should show current time scaling if set', () => { wrapper = mount(<IndexPatternDimensionEditorComponent {...getProps({ timeScale: 'd' })} />); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); expect( wrapper .find('[data-test-subj="indexPattern-time-scaling-unit"]') @@ -1159,14 +1142,13 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to set time scaling initially', () => { const props = getProps({}); wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); wrapper - .find('[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); - wrapper - .find('[data-test-subj="indexPattern-time-scaling-enable"]') - .hostNodes() - .simulate('click'); + .find('[data-test-subj="indexPattern-time-scaling-unit"]') + .find(EuiSelect) + .prop('onChange')!({ + target: { value: 's' }, + } as ChangeEvent<HTMLSelectElement>); expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); expect(setState.mock.calls[0][0](props.state)).toEqual({ ...props.state, @@ -1244,10 +1226,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to change time scaling', () => { const props = getProps({ timeScale: 's', label: 'Count of records per second' }); wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); - wrapper - .find('button[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); wrapper.find('[data-test-subj="indexPattern-time-scaling-unit"] select').simulate('change', { target: { value: 'h' }, @@ -1294,28 +1273,6 @@ describe('IndexPatternDimensionEditorPanel', () => { }, }); }); - - it('should allow to remove time scaling', () => { - const props = getProps({ timeScale: 's', label: 'Count of records per second' }); - wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); - wrapper.find('[data-test-subj="indexPattern-time-scaling-remove"] button').simulate('click'); - expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); - expect(setState.mock.calls[0][0](props.state)).toEqual({ - ...props.state, - layers: { - first: { - ...props.state.layers.first, - columns: { - ...props.state.layers.first.columns, - col2: expect.objectContaining({ - timeScale: undefined, - label: 'Count of records', - }), - }, - }, - }, - }); - }); }); describe('time shift', () => { @@ -1347,7 +1304,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }; } - it('should not show custom options if time shift is not available', () => { + it('should not show the TimeShift component if time shift is not available', () => { const props = { ...defaultProps, state: getStateWithColumns({ @@ -1361,7 +1318,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }), columnId: 'col2', }; - wrapper = shallow( + wrapper = mount( <IndexPatternDimensionEditorComponent {...props} state={{ @@ -1375,14 +1332,9 @@ describe('IndexPatternDimensionEditorPanel', () => { }} /> ); - expect( - wrapper - .find(DimensionEditor) - .dive() - .find(AdvancedOptions) - .dive() - .find('[data-test-subj="indexPattern-time-shift-enable"]') - ).toHaveLength(0); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); + expect(wrapper.find('[data-test-subj="indexPattern-time-shift-enable"]')).toHaveLength(1); + expect(wrapper.find(TimeShift)).toHaveLength(0); }); it('should show custom options if time shift is available', () => { @@ -1406,14 +1358,9 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to set time shift initially', () => { const props = getProps({}); - wrapper = shallow(<IndexPatternDimensionEditorComponent {...props} />); - wrapper - .find(DimensionEditor) - .dive() - .find(AdvancedOptions) - .dive() - .find('[data-test-subj="indexPattern-time-shift-enable"]') - .simulate('click'); + wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); + wrapper.find(TimeShift).find(EuiComboBox).prop('onChange')!([{ value: '1h', label: '' }]); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ ...props.state, layers: { @@ -1422,7 +1369,7 @@ describe('IndexPatternDimensionEditorPanel', () => { columns: { ...props.state.layers.first.columns, col2: expect.objectContaining({ - timeShift: '', + timeShift: '1h', }), }, }, @@ -1479,31 +1426,6 @@ describe('IndexPatternDimensionEditorPanel', () => { }); }); - it('should allow to time shift', () => { - const props = getProps({ - timeShift: '1h', - }); - wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); - wrapper - .find('[data-test-subj="indexPattern-time-shift-remove"]') - .find(EuiButtonIcon) - .simulate('click'); - expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ - ...props.state, - layers: { - first: { - ...props.state.layers.first, - columns: { - ...props.state.layers.first.columns, - col2: expect.objectContaining({ - timeShift: undefined, - }), - }, - }, - }, - }); - }); - it('should report a generic error for invalid shift string', () => { const props = getProps({ timeShift: '5 months', @@ -1566,16 +1488,13 @@ describe('IndexPatternDimensionEditorPanel', () => { /> ); expect( - wrapper.find('[data-test-subj="indexPattern-advanced-popover"]').hostNodes() + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').hostNodes() ).toHaveLength(0); }); it('should show custom options if filtering is available', () => { wrapper = mount(<IndexPatternDimensionEditorComponent {...getProps({})} />); - wrapper - .find('[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); + wrapper.find('[data-test-subj="indexPattern-advanced-accordion"]').first().simulate('click'); expect( wrapper.find('[data-test-subj="indexPattern-filter-by-enable"]').hostNodes() ).toHaveLength(1); @@ -1596,37 +1515,6 @@ describe('IndexPatternDimensionEditorPanel', () => { ).toBe(`a: b`); }); - it('should allow to set filter initially', () => { - const props = getProps({}); - wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); - wrapper - .find('[data-test-subj="indexPattern-advanced-popover"]') - .hostNodes() - .simulate('click'); - wrapper - .find('[data-test-subj="indexPattern-filter-by-enable"]') - .hostNodes() - .simulate('click'); - expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); - expect(setState.mock.calls[0][0](props.state)).toEqual({ - ...props.state, - layers: { - first: { - ...props.state.layers.first, - columns: { - ...props.state.layers.first.columns, - col2: expect.objectContaining({ - filter: { - language: 'kuery', - query: '', - }, - }), - }, - }, - }, - }); - }); - it('should carry over filter to other operation if possible', () => { const props = getProps({ filter: { language: 'kuery', query: 'a: b' }, @@ -1684,33 +1572,6 @@ describe('IndexPatternDimensionEditorPanel', () => { }, }); }); - - it('should allow to remove filter', () => { - const props = getProps({ - filter: { language: 'kuery', query: 'a: b' }, - }); - wrapper = mount(<IndexPatternDimensionEditorComponent {...props} />); - wrapper - .find('[data-test-subj="indexPattern-filter-by-remove"]') - .find(EuiButtonIcon) - .simulate('click'); - - expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); - expect(setState.mock.calls[0][0](props.state)).toEqual({ - ...props.state, - layers: { - first: { - ...props.state.layers.first, - columns: { - ...props.state.layers.first.columns, - col2: expect.objectContaining({ - filter: undefined, - }), - }, - }, - }, - }); - }); }); it('should render invalid field if field reference is broken', () => { @@ -1950,8 +1811,10 @@ describe('IndexPatternDimensionEditorPanel', () => { 'Moving average', 'Percentile', 'Percentile rank', + 'Standard deviation', 'Sum', 'Unique count', + ' ', ]); }); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx index d478267092606..80e369526c8e4 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx @@ -8,7 +8,6 @@ import React, { useState, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { isEqual } from 'lodash'; import { - EuiButtonIcon, EuiLink, EuiPanel, EuiPopover, @@ -54,7 +53,6 @@ export function Filtering({ layer, updateLayer, indexPattern, - isInitiallyOpen, helpMessage, }: { selectedColumn: GenericIndexPatternColumn; @@ -62,7 +60,6 @@ export function Filtering({ columnId: string; layer: IndexPatternLayer; updateLayer: (newLayer: IndexPatternLayer) => void; - isInitiallyOpen: boolean; helpMessage: string | null; }) { const inputFilter = selectedColumn.filter; @@ -79,7 +76,7 @@ export function Filtering({ value: inputFilter ?? defaultFilter, onChange, }); - const [filterPopoverOpen, setFilterPopoverOpen] = useState(isInitiallyOpen); + const [filterPopoverOpen, setFilterPopoverOpen] = useState(false); const onClosePopup: EuiPopoverProps['closePopover'] = useCallback(() => { setFilterPopoverOpen(false); @@ -90,7 +87,7 @@ export function Filtering({ const selectedOperation = operationDefinitionMap[selectedColumn.operationType]; - if (!selectedOperation.filterable || !inputFilter) { + if (!selectedOperation.filterable) { return null; } @@ -143,25 +140,12 @@ export function Filtering({ defaultMessage: 'Click to edit', })} > - {inputFilter.query || + {inputFilter?.query || i18n.translate('xpack.lens.indexPattern.filterBy.emptyFilterQuery', { defaultMessage: '(empty)', })} </EuiLink> </EuiFlexItem> - <EuiFlexItem grow={false}> - <EuiButtonIcon - data-test-subj="indexPattern-filter-by-remove" - color="danger" - aria-label={i18n.translate('xpack.lens.filterBy.removeLabel', { - defaultMessage: 'Remove filter', - })} - onClick={() => { - updateLayer(setFilter(columnId, layer, undefined)); - }} - iconType="cross" - /> - </EuiFlexItem> </EuiFlexGroup> </EuiPanel> } @@ -175,6 +159,7 @@ export function Filtering({ > <QueryInput indexPatternTitle={indexPattern.title} + disableAutoFocus={true} value={queryInput} onChange={setQueryInput} isInvalid={!isQueryInputValid} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx index 332f9664973af..0bc9b26dc1a5a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx @@ -12,7 +12,6 @@ import { EuiSelect, EuiFlexItem, EuiFlexGroup, - EuiButtonIcon, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -72,8 +71,7 @@ export function TimeScaling({ if ( !selectedOperation.timeScalingMode || selectedOperation.timeScalingMode === 'disabled' || - !hasDateHistogram || - !selectedColumn.timeScale + !hasDateHistogram ) { return null; } @@ -103,32 +101,26 @@ export function TimeScaling({ <EuiSelect fullWidth compressed - options={Object.entries(unitSuffixesLong).map(([unit, text]) => ({ - value: unit, - text, - }))} + options={[ + { + value: '', + text: i18n.translate('xpack.lens.timeScale.normalizeNone', { + defaultMessage: 'None', + }), + }, + ...Object.entries(unitSuffixesLong).map(([unit, text]) => ({ + value: unit, + text, + })), + ]} data-test-subj="indexPattern-time-scaling-unit" - value={selectedColumn.timeScale} + value={selectedColumn.timeScale ?? ''} onChange={(e) => { - updateLayer(setTimeScaling(columnId, layer, e.target.value as TimeScaleUnit)); + const value = e.target.value || undefined; + updateLayer(setTimeScaling(columnId, layer, value as TimeScaleUnit)); }} /> </EuiFlexItem> - {selectedOperation.timeScalingMode === 'optional' && ( - <EuiFlexItem grow={false}> - <EuiButtonIcon - data-test-subj="indexPattern-time-scaling-remove" - color="danger" - aria-label={i18n.translate('xpack.lens.timeScale.removeLabel', { - defaultMessage: 'Remove normalizing by time unit', - })} - onClick={() => { - updateLayer(setTimeScaling(columnId, layer, undefined)); - }} - iconType="cross" - /> - </EuiFlexItem> - )} </EuiFlexGroup> </EuiFormRow> ); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx index b74e26cb24895..6620a2259f3ac 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import { EuiButtonIcon } from '@elastic/eui'; import { EuiFormRow, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import type { Query } from '@kbn/es-query'; import { DatatableUtilitiesService, parseTimeShift } from '@kbn/data-plugin/common'; @@ -68,7 +67,6 @@ export function TimeShift({ layer, updateLayer, indexPattern, - isFocused, activeData, layerId, }: { @@ -78,17 +76,15 @@ export function TimeShift({ columnId: string; layer: IndexPatternLayer; updateLayer: (newLayer: IndexPatternLayer) => void; - isFocused: boolean; activeData: IndexPatternDimensionEditorProps['activeData']; layerId: string; }) { - const focusSetRef = useRef(false); const [localValue, setLocalValue] = useState(selectedColumn.timeShift); useEffect(() => { setLocalValue(selectedColumn.timeShift); }, [selectedColumn.timeShift]); const selectedOperation = operationDefinitionMap[selectedColumn.operationType]; - if (!selectedOperation.shiftable || selectedColumn.timeShift === undefined) { + if (!selectedOperation.shiftable) { return null; } @@ -124,17 +120,7 @@ export function TimeShift({ } return ( - <div - ref={(r) => { - if (r && isFocused) { - const timeShiftInput = r.querySelector('[data-test-subj="comboBoxSearchInput"]'); - if (!focusSetRef.current && timeShiftInput instanceof HTMLInputElement) { - focusSetRef.current = true; - timeShiftInput.focus(); - } - } - }} - > + <div> <EuiFormRow display="rowCompressed" fullWidth @@ -168,7 +154,7 @@ export function TimeShift({ <EuiComboBox fullWidth compressed - isClearable={false} + isClearable={true} data-test-subj="indexPattern-dimension-time-shift" placeholder={i18n.translate('xpack.lens.indexPattern.timeShiftPlaceholder', { defaultMessage: 'Type custom values (e.g. 8w)', @@ -210,19 +196,6 @@ export function TimeShift({ }} /> </EuiFlexItem> - <EuiFlexItem grow={false}> - <EuiButtonIcon - data-test-subj="indexPattern-time-shift-remove" - color="danger" - aria-label={i18n.translate('xpack.lens.timeShift.removeLabel', { - defaultMessage: 'Remove time shift', - })} - onClick={() => { - updateLayer(setTimeShift(columnId, layer, undefined)); - }} - iconType="cross" - /> - </EuiFlexItem> </EuiFlexGroup> </EuiFormRow> </div> diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx index 27c774ed2963e..a0c2a182bee62 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx @@ -432,7 +432,7 @@ function FieldItemPopoverContents(props: State & FieldItemProps) { let formatter: { convert: (data: unknown) => string }; if (indexPattern.fieldFormatMap && indexPattern.fieldFormatMap[field.name]) { - const FormatType = fieldFormats.getType(indexPattern.fieldFormatMap[field.name].id); + const FormatType = fieldFormats.getType(indexPattern.fieldFormatMap[field.name].id as string); if (FormatType) { formatter = new FormatType( indexPattern.fieldFormatMap[field.name].params, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx index fe6d6adef39f4..03c7804462027 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx @@ -409,6 +409,7 @@ export function getIndexPatternDatasource({ replaceIfPossible: true, storage, indexPatternsService, + uiActions, }); }} {...props} @@ -663,6 +664,9 @@ export function getIndexPatternDatasource({ injectReferences(persistableState1, references1), injectReferences(persistableState2, references2) ), + getUsedDataView: (state: IndexPatternPrivateState, layerId: string) => { + return state.layers[layerId].indexPatternId; + }, }; return indexPatternDatasource; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts b/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts index 4abfd85b91da7..b3806e5c55b15 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts @@ -17,6 +17,7 @@ import { injectReferences, } from './loader'; import { DataViewsContract } from '@kbn/data-views-plugin/public'; +import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { createHttpFetchError } from '@kbn/core-http-browser-mocks'; import { IndexPatternPersistedState, @@ -27,6 +28,7 @@ import { import { createMockedRestrictedIndexPattern, createMockedIndexPattern } from './mocks'; import { documentField } from './document_field'; import { DateHistogramIndexPatternColumn } from './operations'; +import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; const createMockStorage = (lastData?: Record<string, string>) => { return { @@ -887,6 +889,12 @@ describe('loader', () => { }); describe('changeLayerIndexPattern', () => { + let uiActions: UiActionsStart; + + beforeEach(() => { + uiActions = uiActionsPluginMock.createStartContract(); + }); + it('loads the index pattern and then changes the specified layer', async () => { const setState = jest.fn(); const state: IndexPatternPrivateState = { @@ -932,6 +940,7 @@ describe('loader', () => { indexPatternsService: mockIndexPatternsService(), onError: jest.fn(), storage, + uiActions, }); expect(setState).toHaveBeenCalledTimes(1); @@ -1006,6 +1015,7 @@ describe('loader', () => { }, onError, storage, + uiActions, }); expect(setState).not.toHaveBeenCalled(); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts b/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts index d6acf5958bd2b..8ca21272a555e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts @@ -10,7 +10,15 @@ import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { HttpSetup, SavedObjectReference } from '@kbn/core/public'; import type { DataViewsContract, DataView } from '@kbn/data-views-plugin/public'; import { isNestedField } from '@kbn/data-views-plugin/common'; -import { VisualizeFieldContext } from '@kbn/ui-actions-plugin/public'; +import { + UPDATE_FILTER_REFERENCES_ACTION, + UPDATE_FILTER_REFERENCES_TRIGGER, +} from '@kbn/unified-search-plugin/public'; +import { + ActionExecutionContext, + UiActionsStart, + VisualizeFieldContext, +} from '@kbn/ui-actions-plugin/public'; import type { DatasourceDataPanelProps, InitializationOptions, @@ -92,6 +100,7 @@ export function convertDataViewIntoLensIndexPattern(dataView: DataView): IndexPa Object.fromEntries( Object.entries(fieldFormatMap).map(([id, format]) => [ id, + // @ts-expect-error FIXME Property 'toJSON' does not exist on type 'SerializedFieldFormat' 'toJSON' in format ? format.toJSON() : format, ]) ), @@ -338,6 +347,7 @@ export async function changeLayerIndexPattern({ replaceIfPossible, storage, indexPatternsService, + uiActions, }: { indexPatternId: string; layerId: string; @@ -347,7 +357,22 @@ export async function changeLayerIndexPattern({ replaceIfPossible?: boolean; storage: IStorageWrapper; indexPatternsService: IndexPatternsService; + uiActions: UiActionsStart; }) { + const fromDataView = state.layers[layerId].indexPatternId; + const toDataView = indexPatternId; + + const trigger = uiActions.getTrigger(UPDATE_FILTER_REFERENCES_TRIGGER); + const action = uiActions.getAction(UPDATE_FILTER_REFERENCES_ACTION); + + action?.execute({ + trigger, + fromDataView, + toDataView, + defaultDataView: toDataView, + usedDataViews: Object.values(Object.values(state.layers).map((layer) => layer.indexPatternId)), + } as ActionExecutionContext); + const indexPatterns = await loadIndexPatterns({ indexPatternsService, cache: state.indexPatterns, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx index 7b3ccf8da067b..017a3580824f8 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx @@ -134,36 +134,30 @@ export const cardinalityOperation: OperationDefinition< return [ { dataTestSubj: 'hide-zero-values', - optionElement: ( - <> - <EuiSwitch - label={i18n.translate('xpack.lens.indexPattern.hideZero', { - defaultMessage: 'Hide zero values', - })} - labelProps={{ - style: { - fontWeight: euiThemeVars.euiFontWeightMedium, - }, - }} - checked={Boolean(currentColumn.params?.emptyAsNull)} - onChange={() => { - paramEditorUpdater( - updateColumnParam({ - layer, - columnId, - paramName: 'emptyAsNull', - value: !currentColumn.params?.emptyAsNull, - }) - ); - }} - compressed - /> - </> + inlineElement: ( + <EuiSwitch + label={i18n.translate('xpack.lens.indexPattern.hideZero', { + defaultMessage: 'Hide zero values', + })} + labelProps={{ + style: { + fontWeight: euiThemeVars.euiFontWeightMedium, + }, + }} + checked={Boolean(currentColumn.params?.emptyAsNull)} + onChange={() => { + paramEditorUpdater( + updateColumnParam({ + layer, + columnId, + paramName: 'emptyAsNull', + value: !currentColumn.params?.emptyAsNull, + }) + ); + }} + compressed + /> ), - title: '', - showInPopover: true, - inlineElement: null, - onClick: () => {}, }, ]; }, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx index 014ff0f726cc7..888c992031430 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx @@ -118,36 +118,30 @@ export const countOperation: OperationDefinition<CountIndexPatternColumn, 'field return [ { dataTestSubj: 'hide-zero-values', - optionElement: ( - <> - <EuiSwitch - label={i18n.translate('xpack.lens.indexPattern.hideZero', { - defaultMessage: 'Hide zero values', - })} - labelProps={{ - style: { - fontWeight: euiThemeVars.euiFontWeightMedium, - }, - }} - checked={Boolean(currentColumn.params?.emptyAsNull)} - onChange={() => { - paramEditorUpdater( - updateColumnParam({ - layer, - columnId, - paramName: 'emptyAsNull', - value: !currentColumn.params?.emptyAsNull, - }) - ); - }} - compressed - /> - </> + inlineElement: ( + <EuiSwitch + label={i18n.translate('xpack.lens.indexPattern.hideZero', { + defaultMessage: 'Hide zero values', + })} + labelProps={{ + style: { + fontWeight: euiThemeVars.euiFontWeightMedium, + }, + }} + checked={Boolean(currentColumn.params?.emptyAsNull)} + onChange={() => { + paramEditorUpdater( + updateColumnParam({ + layer, + columnId, + paramName: 'emptyAsNull', + value: !currentColumn.params?.emptyAsNull, + }) + ); + }} + compressed + /> ), - title: '', - showInPopover: true, - inlineElement: null, - onClick: () => {}, }, ]; }, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx index 68798bd11aee5..5f3409602d93e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx @@ -54,15 +54,17 @@ const defaultFilter: Filter = { label: '', }; -export const validateQuery = (input: Query, indexPattern: IndexPattern) => { +export const validateQuery = (input: Query | undefined, indexPattern: IndexPattern) => { let isValid = true; let error: string | undefined; try { - if (input.language === 'kuery') { - toElasticsearchQuery(fromKueryExpression(input.query), indexPattern); - } else { - luceneStringToDsl(input.query); + if (input) { + if (input.language === 'kuery') { + toElasticsearchQuery(fromKueryExpression(input.query), indexPattern); + } else { + luceneStringToDsl(input.query); + } } } catch (e) { isValid = false; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts index 91a83d22f4a29..8f3be3a59a836 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts @@ -30,6 +30,7 @@ import { sumOperation, maxOperation, medianOperation, + standardDeviationOperation, } from './metrics'; import { dateHistogramOperation } from './date_histogram'; import { @@ -84,6 +85,7 @@ export type { SumIndexPatternColumn, MaxIndexPatternColumn, MedianIndexPatternColumn, + StandardDeviationIndexPatternColumn, } from './metrics'; export type { DateHistogramIndexPatternColumn } from './date_histogram'; export type { @@ -115,6 +117,7 @@ const internalOperationDefinitions = [ averageOperation, cardinalityOperation, sumOperation, + standardDeviationOperation, medianOperation, percentileOperation, percentileRanksOperation, @@ -139,7 +142,13 @@ export { termsOperation } from './terms'; export { rangeOperation } from './ranges'; export { filtersOperation } from './filters'; export { dateHistogramOperation } from './date_histogram'; -export { minOperation, averageOperation, sumOperation, maxOperation } from './metrics'; +export { + minOperation, + averageOperation, + sumOperation, + maxOperation, + standardDeviationOperation, +} from './metrics'; export { percentileOperation } from './percentile'; export { percentileRanksOperation } from './percentile_ranks'; export { countOperation } from './count'; @@ -223,11 +232,7 @@ export interface HelpProps<C> { export type TimeScalingMode = 'disabled' | 'mandatory' | 'optional'; export interface AdvancedOption { - title: string; - optionElement?: React.ReactElement; dataTestSubj: string; - onClick: () => void; - showInPopover: boolean; inlineElement: React.ReactElement | null; helpPopup?: string | null; } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx index b58ffdf8c8a1d..5f3973b84e8fd 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx @@ -45,6 +45,7 @@ const typeToFn: Record<string, string> = { average: 'aggAvg', sum: 'aggSum', median: 'aggMedian', + standard_deviation: 'aggStdDeviation', }; const supportedTypes = ['number', 'histogram']; @@ -58,6 +59,8 @@ function buildMetricOperation<T extends MetricColumn<string>>({ optionalTimeScaling, supportsDate, hideZeroOption, + aggConfigParams, + documentationDescription, }: { type: T['operationType']; displayName: string; @@ -67,6 +70,8 @@ function buildMetricOperation<T extends MetricColumn<string>>({ description?: string; supportsDate?: boolean; hideZeroOption?: boolean; + aggConfigParams?: Record<string, string | number | boolean>; + documentationDescription?: string; }) { const labelLookup = (name: string, column?: BaseIndexPatternColumn) => { const label = ofName(name); @@ -153,36 +158,30 @@ function buildMetricOperation<T extends MetricColumn<string>>({ return [ { dataTestSubj: 'hide-zero-values', - optionElement: ( - <> - <EuiSwitch - label={i18n.translate('xpack.lens.indexPattern.hideZero', { - defaultMessage: 'Hide zero values', - })} - labelProps={{ - style: { - fontWeight: euiThemeVars.euiFontWeightMedium, - }, - }} - checked={Boolean(currentColumn.params?.emptyAsNull)} - onChange={() => { - paramEditorUpdater( - updateColumnParam({ - layer, - columnId, - paramName: 'emptyAsNull', - value: !currentColumn.params?.emptyAsNull, - }) - ); - }} - compressed - /> - </> + inlineElement: ( + <EuiSwitch + label={i18n.translate('xpack.lens.indexPattern.hideZero', { + defaultMessage: 'Hide zero values', + })} + labelProps={{ + style: { + fontWeight: euiThemeVars.euiFontWeightMedium, + }, + }} + checked={Boolean(currentColumn.params?.emptyAsNull)} + onChange={() => { + paramEditorUpdater( + updateColumnParam({ + layer, + columnId, + paramName: 'emptyAsNull', + value: !currentColumn.params?.emptyAsNull, + }) + ); + }} + compressed + /> ), - title: '', - showInPopover: true, - inlineElement: null, - onClick: () => {}, }, ]; }, @@ -195,6 +194,7 @@ function buildMetricOperation<T extends MetricColumn<string>>({ // time shift is added to wrapping aggFilteredMetric if filter is set timeShift: column.filter ? undefined : column.timeShift, emptyAsNull: hideZeroOption ? column.params?.emptyAsNull : undefined, + ...aggConfigParams, }).toAst(); }, getErrorMessage: (layer, columnId, indexPattern) => @@ -211,8 +211,10 @@ function buildMetricOperation<T extends MetricColumn<string>>({ signature: i18n.translate('xpack.lens.indexPattern.metric.signature', { defaultMessage: 'field: string', }), - description: i18n.translate('xpack.lens.indexPattern.metric.documentation.markdown', { - defaultMessage: ` + description: + documentationDescription || + i18n.translate('xpack.lens.indexPattern.metric.documentation.markdown', { + defaultMessage: ` Returns the {metric} of a field. This function only works for number fields. Example: Get the {metric} of price: @@ -221,10 +223,10 @@ Example: Get the {metric} of price: Example: Get the {metric} of price for orders from the UK: \`{metric}(price, kql='location:UK')\` `, - values: { - metric: type, - }, - }), + values: { + metric: type, + }, + }), }, shiftable: true, } as OperationDefinition<T, 'field', {}, true>; @@ -232,6 +234,7 @@ Example: Get the {metric} of price for orders from the UK: export type SumIndexPatternColumn = MetricColumn<'sum'>; export type AvgIndexPatternColumn = MetricColumn<'average'>; +export type StandardDeviationIndexPatternColumn = MetricColumn<'standard_deviation'>; export type MinIndexPatternColumn = MetricColumn<'min'>; export type MaxIndexPatternColumn = MetricColumn<'max'>; export type MedianIndexPatternColumn = MetricColumn<'median'>; @@ -287,6 +290,41 @@ export const averageOperation = buildMetricOperation<AvgIndexPatternColumn>({ }), }); +export const standardDeviationOperation = buildMetricOperation<StandardDeviationIndexPatternColumn>( + { + type: 'standard_deviation', + displayName: i18n.translate('xpack.lens.indexPattern.standardDeviation', { + defaultMessage: 'Standard deviation', + }), + ofName: (name) => + i18n.translate('xpack.lens.indexPattern.standardDeviationOf', { + defaultMessage: 'Standard deviation of {name}', + values: { name }, + }), + description: i18n.translate('xpack.lens.indexPattern.standardDeviation.description', { + defaultMessage: + 'A single-value metric aggregation that computes the standard deviation of numeric values that are extracted from the aggregated documents', + }), + aggConfigParams: { + showBounds: false, + }, + documentationDescription: i18n.translate( + 'xpack.lens.indexPattern.standardDeviation.documentation.markdown', + { + defaultMessage: ` +Returns the amount of variation or dispersion of the field. The function works only for number fields. + +#### Examples + +To get the standard deviation of price, use \`standard_deviation(price)\`. + +To get the variance of price for orders from the UK, use \`square(standard_deviation(price, kql='location:UK'))\`. + `, + } + ), + } +); + export const sumOperation = buildMetricOperation<SumIndexPatternColumn>({ type: 'sum', priority: 1, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.test.tsx new file mode 100644 index 0000000000000..17d5f5b573b19 --- /dev/null +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.test.tsx @@ -0,0 +1,213 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { act } from 'react-dom/test-utils'; +import { shallow, mount } from 'enzyme'; +import { EuiComboBox, EuiSwitchEvent, EuiSwitch, EuiFieldText } from '@elastic/eui'; +import { IncludeExcludeRow } from './include_exclude_options'; + +const tableRows = [ + { + '1': 'ABC', + '2': 'test', + }, + { + '1': 'FEF', + '2': 'test', + }, +]; + +describe('IncludeExcludeComponent', () => { + it('should render 2 EuiComboBox component correctly', () => { + const instance = shallow( + <IncludeExcludeRow + include={[]} + exclude={[]} + updateParams={jest.fn()} + columnId="1" + isNumberField={false} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + + expect(instance.find(EuiComboBox).length).toEqual(2); + }); + + it('should run updateParams function on update', () => { + const onUpdateSpy = jest.fn(); + const instance = shallow( + <IncludeExcludeRow + include={undefined} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + act(() => { + instance.find(EuiComboBox).first().prop('onChange')!([{ label: 'ABC' }]); + }); + expect( + instance.find('[data-test-subj="lens-include-terms-combobox"]').prop('selectedOptions') + ).toEqual([{ label: 'ABC' }]); + expect(onUpdateSpy.mock.calls.length).toBe(1); + }); + + it('should run updateParams function onCreateOption', () => { + const onUpdateSpy = jest.fn(); + const instance = shallow( + <IncludeExcludeRow + include={undefined} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + act(() => { + instance.find(EuiComboBox).first().prop('onCreateOption')!('test.*', [{ label: 'ABC' }]); + }); + expect( + instance.find('[data-test-subj="lens-include-terms-combobox"]').prop('selectedOptions') + ).toEqual([{ label: 'test.*' }]); + expect(onUpdateSpy.mock.calls.length).toBe(1); + }); + + it('should initialize the selected options correctly if include prop is given', () => { + const onUpdateSpy = jest.fn(); + const instance = shallow( + <IncludeExcludeRow + include={['FEF']} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + expect( + instance.find('[data-test-subj="lens-include-terms-combobox"]').prop('selectedOptions') + ).toEqual([{ label: 'FEF' }]); + }); + + it('should initialize the selected options correctly if exclude prop is given', () => { + const onUpdateSpy = jest.fn(); + const instance = shallow( + <IncludeExcludeRow + include={['FEF']} + exclude={['ABC']} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + expect( + instance.find('[data-test-subj="lens-exclude-terms-combobox"]').prop('selectedOptions') + ).toEqual([{ label: 'ABC' }]); + }); + + it('should initialize the options correctly', () => { + const onUpdateSpy = jest.fn(); + const instance = mount( + <IncludeExcludeRow + include={undefined} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + expect( + instance.find('[data-test-subj="lens-include-terms-combobox"]').first().prop('options') + ).toEqual([{ label: 'ABC' }, { label: 'FEF' }]); + }); + + it('should display an input text if pattern is selected', () => { + const onUpdateSpy = jest.fn(); + const instance = mount( + <IncludeExcludeRow + include={['test.*']} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={true} + excludeIsRegex={false} + /> + ); + act(() => { + instance.find(EuiSwitch).first().prop('onChange')({ + target: { checked: true }, + } as EuiSwitchEvent); + }); + expect(instance.find(EuiFieldText).length).toBe(1); + }); + + it('should run updateParams on the input text if pattern is selected', () => { + const onUpdateSpy = jest.fn(); + const instance = mount( + <IncludeExcludeRow + include={['test.*']} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={true} + excludeIsRegex={false} + /> + ); + act(() => { + instance.find(EuiSwitch).first().prop('onChange')({ + target: { checked: true }, + } as EuiSwitchEvent); + }); + expect( + instance.find('[data-test-subj="lens-include-terms-regex-input"]').first().prop('value') + ).toEqual('test.*'); + expect(onUpdateSpy.mock.calls.length).toBe(1); + }); + + it('should run as multi selection if normal string is given', () => { + const onUpdateSpy = jest.fn(); + const instance = shallow( + <IncludeExcludeRow + include={undefined} + exclude={undefined} + updateParams={onUpdateSpy} + isNumberField={false} + columnId="1" + tableRows={tableRows} + includeIsRegex={false} + excludeIsRegex={false} + /> + ); + act(() => { + instance.find(EuiComboBox).first().prop('onCreateOption')!('test', [{ label: 'ABC' }]); + }); + expect( + instance.find('[data-test-subj="lens-include-terms-combobox"]').prop('singleSelection') + ).toBe(false); + }); +}); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.tsx new file mode 100644 index 0000000000000..70d4bcf1bb4f0 --- /dev/null +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/include_exclude_options.tsx @@ -0,0 +1,334 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useEffect, useCallback } from 'react'; +import { i18n } from '@kbn/i18n'; +import { uniq } from 'lodash'; +import { EuiComboBox, EuiFormRow, EuiSpacer, EuiSwitch, EuiFieldText, EuiText } from '@elastic/eui'; +import type { DatatableRow } from '@kbn/expressions-plugin'; +import { useDebouncedValue } from '../../../../shared_components'; + +export interface IncludeExcludeOptions { + label: string; +} + +const getTermsIncludeExcludeOptions = ( + include?: string[] | number[], + exclude?: string[] | number[] +) => { + const includeOptions = include?.map((term) => ({ + label: String(term), + })); + const excludeOptions = exclude?.map((term) => ({ + label: String(term), + })); + return { + ...(includeOptions?.length && { include: includeOptions }), + ...(excludeOptions?.length && { exclude: excludeOptions }), + }; +}; + +export const IncludeExcludeRow = ({ + include, + exclude, + tableRows, + columnId, + isNumberField, + includeIsRegex, + excludeIsRegex, + updateParams, +}: { + include?: string[] | number[]; + exclude?: string[] | number[]; + tableRows?: DatatableRow[]; + columnId: string; + isNumberField: boolean; + includeIsRegex: boolean; + excludeIsRegex: boolean; + updateParams: ( + operation: string, + operationValue: Array<string | number>, + regexParam: string, + regexValue: boolean + ) => void; +}) => { + const [includeExcludeSelectedOptions, setIncludeExcludeSelectedOptions] = useState( + getTermsIncludeExcludeOptions(include, exclude) + ); + const [termsOptions, setTermsOptions] = useState<IncludeExcludeOptions[] | undefined>(undefined); + const [isRegexUsed, setIsRegexUsed] = useState({ + include: includeIsRegex, + exclude: excludeIsRegex, + }); + const [regex, setRegex] = useState({ + include: includeIsRegex ? include?.[0] : '', + exclude: excludeIsRegex ? exclude?.[0] : '', + }); + + useEffect(() => { + if (isNumberField) { + setIsRegexUsed({ + include: false, + exclude: false, + }); + } + }, [isNumberField]); + + useEffect(() => { + if (includeExcludeSelectedOptions?.include?.length) return; + + const uniqueTerms = uniq(tableRows?.map((row) => row[columnId])).filter( + (row) => row !== '__other__' + ); + const options = uniqueTerms?.map((row) => { + return { + label: String(row), + }; + }); + setTermsOptions(options); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [tableRows]); + + const onChangeIncludeExcludeOptions = ( + selectedOptions: IncludeExcludeOptions[], + operation: 'include' | 'exclude' + ) => { + const options = { + ...includeExcludeSelectedOptions, + [operation]: selectedOptions, + }; + setIncludeExcludeSelectedOptions(options); + const terms = selectedOptions.map((option) => { + if (!Number.isNaN(Number(option.label))) { + return Number(option.label); + } + return option.label; + }); + const param = `${operation}IsRegex`; + updateParams(operation, terms, param, false); + }; + + const onCreateOption = ( + searchValue: string, + flattenedOptions: IncludeExcludeOptions[] = [], + operation: 'include' | 'exclude' + ) => { + const newOption = { + label: searchValue, + }; + + let includeExcludeOptions = []; + + const includeORExcludeSelectedOptions = includeExcludeSelectedOptions[operation] ?? []; + includeExcludeOptions = [...includeORExcludeSelectedOptions, newOption]; + const options = { + ...includeExcludeSelectedOptions, + [operation]: includeExcludeOptions, + }; + setIncludeExcludeSelectedOptions(options); + + const terms = includeExcludeOptions.map((option) => { + if (!Number.isNaN(Number(option.label))) { + return Number(option.label); + } + return option.label; + }); + const param = `${operation}IsRegex`; + updateParams(operation, terms, param, false); + }; + + const onIncludeRegexChangeToDebounce = useCallback( + (newIncludeValue: string | number | undefined) => { + setRegex({ + ...regex, + include: newIncludeValue, + }); + updateParams('include', [newIncludeValue ?? ''], 'includeIsRegex', true); + }, + [regex, updateParams] + ); + + const onExcludeRegexChangeToDebounce = useCallback( + (newExcludeValue: string | number | undefined) => { + setRegex({ + ...regex, + exclude: newExcludeValue, + }); + updateParams('exclude', [newExcludeValue ?? ''], 'excludeIsRegex', true); + }, + [regex, updateParams] + ); + + const { inputValue: includeRegexValue, handleInputChange: onIncludeRegexValueChange } = + useDebouncedValue<string | number | undefined>({ + onChange: onIncludeRegexChangeToDebounce, + value: regex.include, + }); + + const { inputValue: excludeRegexValue, handleInputChange: onExcludeRegexValueChange } = + useDebouncedValue<string | number | undefined>({ + onChange: onExcludeRegexChangeToDebounce, + value: regex.exclude, + }); + + return ( + <> + <EuiSpacer size="m" /> + <EuiFormRow + label={i18n.translate('xpack.lens.indexPattern.terms.include', { + defaultMessage: 'Include values', + })} + display="rowCompressed" + fullWidth + labelAppend={ + !isNumberField ? ( + <EuiSwitch + label={ + <EuiText size="xs"> + {i18n.translate('xpack.lens.indexPattern.terms.addRegex', { + defaultMessage: 'Use regular expression', + })} + </EuiText> + } + data-test-subj="lens-include-terms-regex-switch" + compressed + checked={isRegexUsed.include} + onChange={(e) => { + const value = e.target.checked; + setIsRegexUsed({ + ...isRegexUsed, + include: value, + }); + setRegex({ + ...regex, + include: '', + }); + setIncludeExcludeSelectedOptions(getTermsIncludeExcludeOptions([], exclude)); + updateParams('include', [], 'includeIsRegex', value); + }} + /> + ) : null + } + > + {isRegexUsed.include ? ( + <EuiFieldText + placeholder={i18n.translate( + 'xpack.lens.indexPattern.terms.includeExcludePatternPlaceholder', + { + defaultMessage: 'Enter a regex to filter values', + } + )} + data-test-subj="lens-include-terms-regex-input" + value={includeRegexValue} + onChange={(e) => { + onIncludeRegexValueChange(e.target.value); + }} + aria-label={i18n.translate( + 'xpack.lens.indexPattern.terms.includeExcludePatternPlaceholder', + { + defaultMessage: 'Enter a regex to filter values', + } + )} + /> + ) : ( + <EuiComboBox + aria-label={i18n.translate('xpack.lens.indexPattern.terms.include', { + defaultMessage: 'Include values', + })} + placeholder={i18n.translate('xpack.lens.indexPattern.terms.includeExcludePlaceholder', { + defaultMessage: 'Select values or create a new one', + })} + options={termsOptions} + selectedOptions={includeExcludeSelectedOptions.include} + onChange={(options) => onChangeIncludeExcludeOptions(options, 'include')} + onCreateOption={(searchValue, options) => + onCreateOption(searchValue, options, 'include') + } + isClearable={true} + data-test-subj="lens-include-terms-combobox" + autoFocus + /> + )} + </EuiFormRow> + <EuiSpacer size="m" /> + <EuiFormRow + label={i18n.translate('xpack.lens.indexPattern.terms.exclude', { + defaultMessage: 'Exclude values', + })} + display="rowCompressed" + fullWidth + labelAppend={ + !isNumberField ? ( + <EuiSwitch + label={ + <EuiText size="xs"> + {i18n.translate('xpack.lens.indexPattern.terms.addRegex', { + defaultMessage: 'Use regular expression', + })} + </EuiText> + } + compressed + checked={isRegexUsed.exclude} + onChange={(e) => { + const value = e.target.checked; + setIsRegexUsed({ + ...isRegexUsed, + exclude: value, + }); + setRegex({ + ...regex, + exclude: '', + }); + setIncludeExcludeSelectedOptions(getTermsIncludeExcludeOptions(include, [])); + updateParams('exclude', [], 'excludeIsRegex', value); + }} + /> + ) : null + } + > + {isRegexUsed.exclude ? ( + <EuiFieldText + placeholder={i18n.translate( + 'xpack.lens.indexPattern.terms.includeExcludePatternPlaceholder', + { + defaultMessage: 'Enter a regex to filter values', + } + )} + value={excludeRegexValue} + onChange={(e) => { + onExcludeRegexValueChange(e.target.value); + }} + aria-label={i18n.translate( + 'xpack.lens.indexPattern.terms.includeExcludePatternPlaceholder', + { + defaultMessage: 'Enter a regex to filter values', + } + )} + /> + ) : ( + <EuiComboBox + aria-label={i18n.translate('xpack.lens.indexPattern.terms.exclude', { + defaultMessage: 'Exclude values', + })} + placeholder={i18n.translate('xpack.lens.indexPattern.terms.includeExcludePlaceholder', { + defaultMessage: 'Select values or create a new one', + })} + options={termsOptions} + selectedOptions={includeExcludeSelectedOptions.exclude} + onChange={(options) => onChangeIncludeExcludeOptions(options, 'exclude')} + onCreateOption={(searchValue, options) => + onCreateOption(searchValue, options, 'exclude') + } + isClearable={true} + data-test-subj="lens-exclude-terms-combobox" + autoFocus + /> + )} + </EuiFormRow> + </> + ); +}; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx index 31effec454efd..9038b32bf15ee 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx @@ -17,6 +17,8 @@ import { EuiIconTip, htmlIdGenerator, EuiButtonGroup, + EuiText, + useEuiTheme, } from '@elastic/eui'; import { uniq } from 'lodash'; import { AggFunctionsMapping } from '@kbn/data-plugin/public'; @@ -52,6 +54,7 @@ import { MAXIMUM_MAX_DOC_COUNT, supportedTypes, } from './constants'; +import { IncludeExcludeRow } from './include_exclude_options'; export function supportsRarityRanking(field?: IndexPatternField) { // these es field types can't be sorted by rarity @@ -59,7 +62,6 @@ export function supportsRarityRanking(field?: IndexPatternField) { ['double', 'float', 'half_float', 'scaled_float'].includes(esType) ); } - export type { TermsIndexPatternColumn } from './types'; const missingFieldLabel = i18n.translate('xpack.lens.indexPattern.missingFieldLabel', { @@ -318,6 +320,10 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field orderAgg, size: column.params.size, shardSize, + ...(column.params.include?.length && { include: column.params.include }), + ...(column.params.exclude?.length && { exclude: column.params.exclude }), + includeIsRegex: Boolean(column.params.includeIsRegex), + excludeIsRegex: Boolean(column.params.excludeIsRegex), otherBucket: Boolean(column.params.otherBucket), otherBucketLabel: i18n.translate('xpack.lens.indexPattern.terms.otherLabel', { defaultMessage: 'Other', @@ -547,6 +553,7 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field operationDefinitionMap, ReferenceEditor, paramEditorCustomProps, + activeData, ...rest }) { const [incompleteColumn, setIncompleteColumn] = useState<IncompleteColumn | undefined>( @@ -616,6 +623,8 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field ? currentColumn.params.secondaryFields.length : 0; + const { euiTheme } = useEuiTheme(); + return ( <> <ValuesInput @@ -910,9 +919,14 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field <EuiSpacer size="s" /> <EuiAccordion id="lnsTermsAdvanced" - buttonContent={i18n.translate('xpack.lens.indexPattern.terms.advancedSettings', { - defaultMessage: 'Advanced', - })} + arrowProps={{ color: 'primary' }} + buttonContent={ + <EuiText size="s" color={euiTheme.colors.primary}> + {i18n.translate('xpack.lens.indexPattern.terms.advancedSettings', { + defaultMessage: 'Advanced', + })} + </EuiText> + } data-test-subj="indexPattern-terms-advanced" > <EuiSpacer size="m" /> @@ -997,6 +1011,36 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field ) } /> + {(currentColumn.dataType === 'number' || currentColumn.dataType === 'string') && + !currentColumn.params.secondaryFields?.length && ( + <> + <IncludeExcludeRow + include={currentColumn.params.include} + exclude={currentColumn.params.exclude} + includeIsRegex={Boolean(currentColumn.params.includeIsRegex)} + excludeIsRegex={Boolean(currentColumn.params.excludeIsRegex)} + tableRows={activeData?.[rest.layerId]?.rows} + columnId={columnId} + isNumberField={Boolean(currentColumn.dataType === 'number')} + updateParams={(operation, operationValue, regex, regexValue) => + paramEditorUpdater({ + ...layer, + columns: { + ...layer.columns, + [columnId]: { + ...currentColumn, + params: { + ...currentColumn.params, + [operation]: operationValue, + [regex]: regexValue, + }, + }, + } as Record<string, TermsIndexPatternColumn>, + }) + } + /> + </> + )} </EuiAccordion> </> )} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx index 33c8fcd1af665..335677b279132 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx @@ -34,6 +34,7 @@ import { DateHistogramIndexPatternColumn } from '../date_histogram'; import { getOperationSupportMatrix } from '../../../dimension_panel/operation_support'; import { FieldSelect } from '../../../dimension_panel/field_select'; import { ReferenceEditor } from '../../../dimension_panel/reference_editor'; +import { IncludeExcludeRow } from './include_exclude_options'; // mocking random id generator function jest.mock('@elastic/eui', () => { @@ -2028,6 +2029,53 @@ describe('terms', () => { }); }); + describe('include/exclude', () => { + const renderWithIncludeExclude = (dataType: string, hasSecondaryFields: boolean) => + shallow( + <InlineOptions + {...defaultProps} + layer={layer} + paramEditorUpdater={() => {}} + columnId="col1" + currentColumn={ + { + ...layer.columns.col1, + dataType, + params: { + ...(layer.columns.col1 as TermsIndexPatternColumn).params, + include: ['test'], + exclude: ['pattern.*'], + ...(hasSecondaryFields && { secondaryFields: ['field1'] }), + }, + } as TermsIndexPatternColumn + } + /> + ); + + const getComboboxes = (dataType: string, hasSecondaryFields: boolean) => + renderWithIncludeExclude(dataType, hasSecondaryFields).find(IncludeExcludeRow); + + it('should be present for a string dataType and not multifields', () => { + const combobox = getComboboxes('string', false); + expect(combobox.length).toBe(1); + }); + + it('should be present for a number dataType and not multifields', () => { + const combobox = getComboboxes('number', false); + expect(combobox.length).toBe(1); + }); + + it('should not be present for a boolean dataType and not multifields', () => { + const combobox = getComboboxes('boolean', false); + expect(combobox.length).toBe(0); + }); + + it('should not be present for multifields', () => { + const combobox = getComboboxes('string', true); + expect(combobox.length).toBe(0); + }); + }); + it('should disable size input and show max doc count input', () => { const updateLayerSpy = jest.fn(); const instance = shallow( diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts index 35a9c7e02147c..2363b83506e32 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts @@ -13,6 +13,10 @@ export interface TermsIndexPatternColumn extends FieldBasedIndexPatternColumn { size: number; // accuracy mode is accomplished by increasing shard_size accuracyMode?: boolean; + include?: string[] | number[]; + exclude?: string[] | number[]; + includeIsRegex?: boolean; + excludeIsRegex?: boolean; // if order is alphabetical, the `fallback` flag indicates whether it became alphabetical because there wasn't // another option or whether the user explicitly chose to make it alphabetical. orderBy: diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts index 5fec40f5e6175..b97873fab72a0 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts @@ -27,6 +27,7 @@ export type { CardinalityIndexPatternColumn, SumIndexPatternColumn, MedianIndexPatternColumn, + StandardDeviationIndexPatternColumn, PercentileIndexPatternColumn, PercentileRanksIndexPatternColumn, CountIndexPatternColumn, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts index 8fb89d46cee2c..0f626cef850f9 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts @@ -92,6 +92,7 @@ describe('getOperationTypesForField', () => { 'min', 'max', 'unique_count', + 'standard_deviation', 'percentile', 'percentile_rank', 'last_value', @@ -117,6 +118,7 @@ describe('getOperationTypesForField', () => { 'min', 'max', 'unique_count', + 'standard_deviation', 'percentile', 'percentile_rank', 'last_value', @@ -366,6 +368,11 @@ describe('getOperationTypesForField', () => { "operationType": "unique_count", "type": "field", }, + Object { + "field": "bytes", + "operationType": "standard_deviation", + "type": "field", + }, Object { "field": "bytes", "operationType": "percentile", diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/types.ts b/x-pack/plugins/lens/public/indexpattern_datasource/types.ts index cbf02bddb8814..31aa7e3214d73 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/types.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/types.ts @@ -7,7 +7,7 @@ import type { IndexPatternAggRestrictions } from '@kbn/data-plugin/public'; import type { FieldSpec } from '@kbn/data-plugin/common'; -import type { FieldFormatParams } from '@kbn/field-formats-plugin/common'; +import type { FieldFormatMap } from '@kbn/data-views-plugin/common'; import type { DragDropIdentifier } from '../drag_drop/providers'; import type { IncompleteColumn, GenericIndexPatternColumn } from './operations'; import { DragDropOperation } from '../types'; @@ -27,6 +27,7 @@ export type { CardinalityIndexPatternColumn, SumIndexPatternColumn, MedianIndexPatternColumn, + StandardDeviationIndexPatternColumn, PercentileIndexPatternColumn, PercentileRanksIndexPatternColumn, CountIndexPatternColumn, @@ -56,13 +57,7 @@ export interface IndexPattern { title: string; name?: string; timeFieldName?: string; - fieldFormatMap?: Record< - string, - { - id: string; - params: FieldFormatParams; - } - >; + fieldFormatMap?: FieldFormatMap; hasRestrictions: boolean; } diff --git a/x-pack/plugins/lens/public/mocks/datasource_mock.ts b/x-pack/plugins/lens/public/mocks/datasource_mock.ts index cf25828d3322c..c6319a3ec7fec 100644 --- a/x-pack/plugins/lens/public/mocks/datasource_mock.ts +++ b/x-pack/plugins/lens/public/mocks/datasource_mock.ts @@ -56,6 +56,7 @@ export function createMockDatasource(id: string): DatasourceMock { isTimeBased: jest.fn(), isValidColumn: jest.fn(), isEqual: jest.fn(), + getUsedDataView: jest.fn(), }; } diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index 2305e7215ccfc..ecd27d7a3387d 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -353,6 +353,10 @@ export interface Datasource<T = unknown, P = unknown> { persistableState2: P, references2: SavedObjectReference[] ) => boolean; + /** + * Get the used DataView value from state + */ + getUsedDataView: (state: T, layerId: string) => string; } export interface DatasourceFixAction<T> { diff --git a/x-pack/plugins/license_management/public/application/store/actions/start_basic.js b/x-pack/plugins/license_management/public/application/store/actions/start_basic.js index c103fff81c822..562dcf48584a4 100644 --- a/x-pack/plugins/license_management/public/application/store/actions/start_basic.js +++ b/x-pack/plugins/license_management/public/application/store/actions/start_basic.js @@ -43,8 +43,7 @@ export const startBasicLicense = const first = i18n.translate( 'xpack.licenseMgmt.replacingCurrentLicenseWithBasicLicenseWarningMessage', { - //eslint-disable-next-line - defaultMessage: + defaultMessage: 'Some functionality will be lost if you replace your {currentLicenseType} license with a BASIC license. Review the list of features below.', values: { currentLicenseType: currentLicenseType.toUpperCase(), diff --git a/x-pack/plugins/lists/common/exceptions/build_exceptions_filter.test.ts b/x-pack/plugins/lists/common/exceptions/build_exceptions_filter.test.ts index 31d5715512d7b..16bd8a9431b82 100644 --- a/x-pack/plugins/lists/common/exceptions/build_exceptions_filter.test.ts +++ b/x-pack/plugins/lists/common/exceptions/build_exceptions_filter.test.ts @@ -16,6 +16,7 @@ import { buildExistsClause, buildMatchAnyClause, buildMatchClause, + buildMatchWildcardClause, buildNestedClause, createOrClauses, } from '@kbn/securitysolution-list-utils'; @@ -32,6 +33,10 @@ import { getEntryNestedMock, } from '../schemas/types/entry_nested.mock'; import { getExceptionListItemSchemaMock } from '../schemas/response/exception_list_item_schema.mock'; +import { + getEntryMatchWildcardExcludeMock, + getEntryMatchWildcardMock, +} from '../schemas/types/entry_match_wildcard.mock'; // TODO: Port the test over to packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.test.ts once the mocks are ported to kbn @@ -1040,4 +1045,38 @@ describe('build_exceptions_filter', () => { }); }); }); + + describe('buildWildcardClause', () => { + test('it should build wildcard filter when operator is "included"', () => { + const booleanFilter = buildMatchWildcardClause(getEntryMatchWildcardMock()); + + expect(booleanFilter).toEqual({ + bool: { + filter: { + wildcard: { + 'host.name': 'some host name', + }, + }, + }, + }); + }); + + test('it should build boolean filter when operator is "excluded"', () => { + const booleanFilter = buildMatchWildcardClause(getEntryMatchWildcardExcludeMock()); + + expect(booleanFilter).toEqual({ + bool: { + must_not: { + bool: { + filter: { + wildcard: { + 'host.name': 'some host name', + }, + }, + }, + }, + }, + }); + }); + }); }); diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx index d0d931387f0e4..8a30e1aac2510 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx +++ b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx @@ -10,6 +10,7 @@ import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; import { coreMock } from '@kbn/core/public/mocks'; import { doesNotExistOperator, + doesNotMatchOperator, existsOperator, isInListOperator, isNotInListOperator, @@ -383,6 +384,80 @@ describe('BuilderEntryItem', () => { ).toBeTruthy(); }); + test('it renders field values correctly when operator is "matchesOperator"', () => { + wrapper = mount( + <BuilderEntryItem + autocompleteService={autocompleteStartMock} + entry={{ + correspondingKeywordField: undefined, + entryIndex: 0, + field: getField('ip'), + id: '123', + nested: undefined, + operator: matchesOperator, + parent: undefined, + value: '1234*', + }} + httpService={mockKibanaHttpService} + indexPattern={{ + fields, + id: '1234', + title: 'logstash-*', + }} + listType="detection" + onChange={jest.fn()} + setErrorsExist={jest.fn()} + setWarningsExist={jest.fn()} + showLabel={false} + /> + ); + + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryField"]').text()).toEqual('ip'); + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryOperator"]').text()).toEqual( + 'matches' + ); + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryFieldWildcard"]').text()).toEqual( + '1234*' + ); + }); + + test('it renders field values correctly when operator is "doesNotMatchOperator"', () => { + wrapper = mount( + <BuilderEntryItem + autocompleteService={autocompleteStartMock} + entry={{ + correspondingKeywordField: undefined, + entryIndex: 0, + field: getField('ip'), + id: '123', + nested: undefined, + operator: doesNotMatchOperator, + parent: undefined, + value: '1234*', + }} + httpService={mockKibanaHttpService} + indexPattern={{ + fields, + id: '1234', + title: 'logstash-*', + }} + listType="detection" + onChange={jest.fn()} + setErrorsExist={jest.fn()} + setWarningsExist={jest.fn()} + showLabel={false} + /> + ); + + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryField"]').text()).toEqual('ip'); + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryOperator"]').text()).toEqual( + 'does not match' + ); + expect(wrapper.find('[data-test-subj="exceptionBuilderEntryFieldWildcard"]').text()).toEqual( + '1234*' + ); + }); + test('it uses "correspondingKeywordField" if it exists', () => { const correspondingKeywordField: FieldSpec = { aggregatable: true, @@ -656,6 +731,47 @@ describe('BuilderEntryItem', () => { ); }); + test('it invokes "onChange" when new value field is entered for wildcard operator', () => { + const mockOnChange = jest.fn(); + wrapper = mount( + <BuilderEntryItem + autocompleteService={autocompleteStartMock} + entry={{ + correspondingKeywordField: undefined, + entryIndex: 0, + field: getField('ip'), + id: '123', + nested: undefined, + operator: matchesOperator, + parent: undefined, + value: '1234*', + }} + httpService={mockKibanaHttpService} + indexPattern={{ + fields, + id: '1234', + title: 'logstash-*', + }} + listType="detection" + onChange={mockOnChange} + setErrorsExist={jest.fn()} + setWarningsExist={jest.fn()} + showLabel={false} + /> + ); + + ( + wrapper.find(EuiComboBox).at(2).props() as unknown as { + onCreateOption: (a: string) => void; + } + ).onCreateOption('5678*'); + + expect(mockOnChange).toHaveBeenCalledWith( + { field: 'ip', id: '123', operator: 'included', type: 'wildcard', value: '5678*' }, + 0 + ); + }); + test('it invokes "setErrorsExist" when user touches value input and leaves empty', async () => { const mockSetErrorExists = jest.fn(); wrapper = mount( diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx index febade31fa4aa..0c57c14380c18 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx +++ b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx @@ -292,6 +292,7 @@ export const BuilderEntryItem: React.FC<EntryItemProps> = ({ ); }; + // eslint-disable-next-line complexity const getFieldValueComboBox = (type: OperatorTypeEnum, isFirst: boolean): JSX.Element => { switch (type) { case OperatorTypeEnum.MATCH: @@ -338,13 +339,16 @@ export const BuilderEntryItem: React.FC<EntryItemProps> = ({ ); case OperatorTypeEnum.WILDCARD: const wildcardValue = typeof entry.value === 'string' ? entry.value : undefined; - let os: OperatingSystem = OperatingSystem.WINDOWS; - if (osTypes) { - [os] = osTypes as OperatingSystem[]; + let actualWarning: React.ReactNode | string | undefined; + if (listType !== 'detection') { + let os: OperatingSystem = OperatingSystem.WINDOWS; + if (osTypes) { + [os] = osTypes as OperatingSystem[]; + } + const warning = validateFilePathInput({ os, value: wildcardValue }); + actualWarning = + warning === FILENAME_WILDCARD_WARNING ? getWildcardWarning(warning) : warning; } - const warning = validateFilePathInput({ os, value: wildcardValue }); - const actualWarning = - warning === FILENAME_WILDCARD_WARNING ? getWildcardWarning(warning) : warning; return ( <AutocompleteFieldWildcardComponent diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts b/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts index 8e1c7e444ab4e..0e890d4939d85 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts +++ b/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts @@ -18,8 +18,9 @@ import { ListOperatorTypeEnum as OperatorTypeEnum, } from '@kbn/securitysolution-io-ts-list-types'; import { + ALL_OPERATORS, BuilderEntry, - EXCEPTION_OPERATORS, + DETECTION_ENGINE_EXCEPTION_OPERATORS, EXCEPTION_OPERATORS_SANS_LISTS, EmptyEntry, ExceptionsBuilderExceptionItem, @@ -596,13 +597,6 @@ describe('Exception builder helpers', () => { expect(output).toEqual(expected); }); - test('it returns all operator options if "listType" is "detection"', () => { - const payloadItem: FormattedBuilderEntry = getMockBuilderEntry(); - const output = getOperatorOptions(payloadItem, 'detection', false); - const expected: OperatorOption[] = EXCEPTION_OPERATORS; - expect(output).toEqual(expected); - }); - test('it returns "isOperator", "isNotOperator", "doesNotExistOperator" and "existsOperator" if field type is boolean', () => { const payloadItem: FormattedBuilderEntry = getMockBuilderEntry(); const output = getOperatorOptions(payloadItem, 'detection', true); @@ -618,7 +612,8 @@ describe('Exception builder helpers', () => { test('it returns list operators if specified to', () => { const payloadItem: FormattedBuilderEntry = getMockBuilderEntry(); const output = getOperatorOptions(payloadItem, 'detection', false, true); - expect(output).toEqual(EXCEPTION_OPERATORS); + expect(output.some((operator) => operator.value === 'is_not_in_list')).toBeTruthy(); + expect(output.some((operator) => operator.value === 'is_in_list')).toBeTruthy(); }); test('it does not return list operators if specified not to', () => { @@ -626,6 +621,18 @@ describe('Exception builder helpers', () => { const output = getOperatorOptions(payloadItem, 'detection', false, false); expect(output).toEqual(EXCEPTION_OPERATORS_SANS_LISTS); }); + + test('it returns all possible operators if list type is not "detection"', () => { + const payloadItem: FormattedBuilderEntry = getMockBuilderEntry(); + const output = getOperatorOptions(payloadItem, 'endpoint_events', false, true); + expect(output).toEqual(ALL_OPERATORS); + }); + + test('it returns all operators supported by detection engine if list type is "detection"', () => { + const payloadItem: FormattedBuilderEntry = getMockBuilderEntry(); + const output = getOperatorOptions(payloadItem, 'detection', false, true); + expect(output).toEqual(DETECTION_ENGINE_EXCEPTION_OPERATORS); + }); }); describe('#getEntryOnFieldChange', () => { diff --git a/x-pack/plugins/lists/scripts/storybook.js b/x-pack/plugins/lists/scripts/storybook.js index 9a15d01b66af1..bce1f390ef4b6 100644 --- a/x-pack/plugins/lists/scripts/storybook.js +++ b/x-pack/plugins/lists/scripts/storybook.js @@ -7,7 +7,6 @@ import { join } from 'path'; -// eslint-disable-next-line require('@kbn/storybook').runStorybookCli({ name: 'lists', storyGlobs: [join(__dirname, '..', 'public', '**', '*.stories.tsx')], diff --git a/x-pack/plugins/lists/server/services/items/create_list_item.mock.ts b/x-pack/plugins/lists/server/services/items/create_list_item.mock.ts index 302b5919fbbdf..ad0cb15ccfa03 100644 --- a/x-pack/plugins/lists/server/services/items/create_list_item.mock.ts +++ b/x-pack/plugins/lists/server/services/items/create_list_item.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/items/create_list_item.test.ts b/x-pack/plugins/lists/server/services/items/create_list_item.test.ts index ccbfac5819c91..ec8ba2876126c 100644 --- a/x-pack/plugins/lists/server/services/items/create_list_item.test.ts +++ b/x-pack/plugins/lists/server/services/items/create_list_item.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getListItemResponseMock } from '../../../common/schemas/response/list_item_schema.mock'; import { LIST_ITEM_ID, LIST_ITEM_INDEX } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts b/x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts index 68c01610df988..95ed50235ea32 100644 --- a/x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts +++ b/x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts b/x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts index 4b2807fdb5d7f..b9928c4bd27b9 100644 --- a/x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts +++ b/x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ITEM_ID, LIST_ITEM_INDEX } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts b/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts index 74d7016653c15..fe0438c07c554 100644 --- a/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts +++ b/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX, TYPE, VALUE } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/find_list_item.mock.ts b/x-pack/plugins/lists/server/services/items/find_list_item.mock.ts index 7e0c18ebbe487..87428a2773b16 100644 --- a/x-pack/plugins/lists/server/services/items/find_list_item.mock.ts +++ b/x-pack/plugins/lists/server/services/items/find_list_item.mock.ts @@ -6,8 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_INDEX, LIST_ITEM_INDEX } from '../../../common/constants.mock'; import { getShardMock } from '../../schemas/common/get_shard.mock'; diff --git a/x-pack/plugins/lists/server/services/items/find_list_item.test.ts b/x-pack/plugins/lists/server/services/items/find_list_item.test.ts index 7eee57887f227..8b1457f0ce53d 100644 --- a/x-pack/plugins/lists/server/services/items/find_list_item.test.ts +++ b/x-pack/plugins/lists/server/services/items/find_list_item.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getFoundListItemSchemaMock } from '../../../common/schemas/response/found_list_item_schema.mock'; import { getShardMock } from '../../schemas/common/get_shard.mock'; diff --git a/x-pack/plugins/lists/server/services/items/get_list_item.test.ts b/x-pack/plugins/lists/server/services/items/get_list_item.test.ts index 361b8a8b36327..2c2b703246a5d 100644 --- a/x-pack/plugins/lists/server/services/items/get_list_item.test.ts +++ b/x-pack/plugins/lists/server/services/items/get_list_item.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getListItemResponseMock } from '../../../common/schemas/response/list_item_schema.mock'; import { diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts b/x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts index 7847b39c9b6bd..60fbdc4d2ab17 100644 --- a/x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts +++ b/x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX, TYPE, VALUE } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts b/x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts index 4efa627b90cdf..d248481b9e6a0 100644 --- a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts +++ b/x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX, TYPE, VALUE, VALUE_2 } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts b/x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts index 5d6bef3db9fe7..9f0b183b97b5c 100644 --- a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts +++ b/x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts b/x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts index 4b085a990627d..5fb965dec5585 100644 --- a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts +++ b/x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX, TYPE, VALUE, VALUE_2 } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts b/x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts index 5b75860297ae6..7673347d488dd 100644 --- a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts +++ b/x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { SearchListItemArraySchema } from '@kbn/securitysolution-io-ts-list-types'; import { LIST_ID, LIST_ITEM_INDEX, TYPE, VALUE, VALUE_2 } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/items/update_list_item.mock.ts b/x-pack/plugins/lists/server/services/items/update_list_item.mock.ts index c68b278e6b735..307e4e190be91 100644 --- a/x-pack/plugins/lists/server/services/items/update_list_item.mock.ts +++ b/x-pack/plugins/lists/server/services/items/update_list_item.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/items/update_list_item.test.ts b/x-pack/plugins/lists/server/services/items/update_list_item.test.ts index c3ff32d4e5074..14fe97638e710 100644 --- a/x-pack/plugins/lists/server/services/items/update_list_item.test.ts +++ b/x-pack/plugins/lists/server/services/items/update_list_item.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { ListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { getListItemResponseMock } from '../../../common/schemas/response/list_item_schema.mock'; diff --git a/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts b/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts index ff0baba16576d..9a2d1f6a500bf 100644 --- a/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts +++ b/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, diff --git a/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts b/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts index 0a5395d022b63..0c12d38fb9746 100644 --- a/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts +++ b/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX } from '../../../common/constants.mock'; import { getSearchListItemMock } from '../../schemas/elastic_response/search_es_list_item_schema.mock'; diff --git a/x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts b/x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts index b725ed7856e91..9520397444075 100644 --- a/x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts +++ b/x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts @@ -7,8 +7,7 @@ import { Stream } from 'stream'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_ITEM_INDEX } from '../../../common/constants.mock'; import { getSearchListItemMock } from '../../schemas/elastic_response/search_es_list_item_schema.mock'; diff --git a/x-pack/plugins/lists/server/services/lists/create_list.mock.ts b/x-pack/plugins/lists/server/services/lists/create_list.mock.ts index 3b5522ea4f5a8..19ff08a15c506 100644 --- a/x-pack/plugins/lists/server/services/lists/create_list.mock.ts +++ b/x-pack/plugins/lists/server/services/lists/create_list.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/lists/create_list.test.ts b/x-pack/plugins/lists/server/services/lists/create_list.test.ts index 1a9a6977ac907..96744d9f55bae 100644 --- a/x-pack/plugins/lists/server/services/lists/create_list.test.ts +++ b/x-pack/plugins/lists/server/services/lists/create_list.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { getListResponseMock } from '../../../common/schemas/response/list_schema.mock'; diff --git a/x-pack/plugins/lists/server/services/lists/delete_list.mock.ts b/x-pack/plugins/lists/server/services/lists/delete_list.mock.ts index fc8bdc797465c..172488a9d741d 100644 --- a/x-pack/plugins/lists/server/services/lists/delete_list.mock.ts +++ b/x-pack/plugins/lists/server/services/lists/delete_list.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { LIST_ID, LIST_INDEX, LIST_ITEM_INDEX } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/lists/get_list.test.ts b/x-pack/plugins/lists/server/services/lists/get_list.test.ts index aa04539c687c9..b027d3e693349 100644 --- a/x-pack/plugins/lists/server/services/lists/get_list.test.ts +++ b/x-pack/plugins/lists/server/services/lists/get_list.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getListResponseMock } from '../../../common/schemas/response/list_schema.mock'; import { LIST_ID, LIST_INDEX } from '../../../common/constants.mock'; diff --git a/x-pack/plugins/lists/server/services/lists/list_client.mock.ts b/x-pack/plugins/lists/server/services/lists/list_client.mock.ts index 6ad3985ccddbf..5489722f40121 100644 --- a/x-pack/plugins/lists/server/services/lists/list_client.mock.ts +++ b/x-pack/plugins/lists/server/services/lists/list_client.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getFoundListItemSchemaMock } from '../../../common/schemas/response/found_list_item_schema.mock'; import { getFoundListSchemaMock } from '../../../common/schemas/response/found_list_schema.mock'; diff --git a/x-pack/plugins/lists/server/services/lists/update_list.mock.ts b/x-pack/plugins/lists/server/services/lists/update_list.mock.ts index 5b8742b8bf5b3..f0f57a52f65ff 100644 --- a/x-pack/plugins/lists/server/services/lists/update_list.mock.ts +++ b/x-pack/plugins/lists/server/services/lists/update_list.mock.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { DATE_NOW, diff --git a/x-pack/plugins/lists/server/services/lists/update_list.test.ts b/x-pack/plugins/lists/server/services/lists/update_list.test.ts index 9d0f9a9d775a3..8e68acd358861 100644 --- a/x-pack/plugins/lists/server/services/lists/update_list.test.ts +++ b/x-pack/plugins/lists/server/services/lists/update_list.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { getListResponseMock } from '../../../common/schemas/response/list_schema.mock'; diff --git a/x-pack/plugins/maps/common/constants.ts b/x-pack/plugins/maps/common/constants.ts index d2c69e89078af..387d91d75b7eb 100644 --- a/x-pack/plugins/maps/common/constants.ts +++ b/x-pack/plugins/maps/common/constants.ts @@ -63,6 +63,7 @@ export enum SOURCE_TYPES { ES_SEARCH = 'ES_SEARCH', ES_PEW_PEW = 'ES_PEW_PEW', ES_TERM_SOURCE = 'ES_TERM_SOURCE', + ES_ML_ANOMALIES = 'ML_ANOMALIES', EMS_XYZ = 'EMS_XYZ', // identifies a custom TMS source. EMS-prefix in the name is a little unfortunate :( WMS = 'WMS', KIBANA_TILEMAP = 'KIBANA_TILEMAP', diff --git a/x-pack/plugins/maps/common/telemetry/layer_stats_collector.ts b/x-pack/plugins/maps/common/telemetry/layer_stats_collector.ts index 634d11ca350a6..0978b3ace87ec 100644 --- a/x-pack/plugins/maps/common/telemetry/layer_stats_collector.ts +++ b/x-pack/plugins/maps/common/telemetry/layer_stats_collector.ts @@ -195,6 +195,10 @@ function getLayerKey(layerDescriptor: LayerDescriptor): LAYER_KEYS | null { return LAYER_KEYS.ES_POINT_TO_POINT; } + if (layerDescriptor.sourceDescriptor.type === SOURCE_TYPES.ES_ML_ANOMALIES) { + return LAYER_KEYS.ES_ML_ANOMALIES; + } + if (layerDescriptor.sourceDescriptor.type === SOURCE_TYPES.ES_SEARCH) { const sourceDescriptor = layerDescriptor.sourceDescriptor as ESSearchSourceDescriptor; diff --git a/x-pack/plugins/maps/common/telemetry/types.ts b/x-pack/plugins/maps/common/telemetry/types.ts index c48be2de13c49..7b0dfc4eae3bb 100644 --- a/x-pack/plugins/maps/common/telemetry/types.ts +++ b/x-pack/plugins/maps/common/telemetry/types.ts @@ -25,6 +25,7 @@ export enum LAYER_KEYS { ES_AGG_GRIDS = 'es_agg_grids', ES_AGG_HEXAGONS = 'es_agg_hexagons', ES_AGG_HEATMAP = 'es_agg_heatmap', + ES_ML_ANOMALIES = 'es_ml_anomalies', EMS_REGION = 'ems_region', EMS_BASEMAP = 'ems_basemap', KBN_TMS_RASTER = 'kbn_tms_raster', diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx index 078369ea3c32e..62c05c1e5c563 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx @@ -640,7 +640,7 @@ export class ESSearchSource extends AbstractESSource implements IMvtVectorSource ); } - const properties = indexPattern.flattenHit(hit); + const properties = indexPattern.flattenHit(hit) as Record<string, string>; indexPattern.metaFields.forEach((metaField: string) => { if (!this._getTooltipPropertyNames().includes(metaField)) { delete properties[metaField]; diff --git a/x-pack/plugins/maps/server/maps_telemetry/collectors/register.ts b/x-pack/plugins/maps/server/maps_telemetry/collectors/register.ts index d044264237b5b..2a8a07578109f 100644 --- a/x-pack/plugins/maps/server/maps_telemetry/collectors/register.ts +++ b/x-pack/plugins/maps/server/maps_telemetry/collectors/register.ts @@ -106,6 +106,24 @@ export function registerMapsUsageCollector(usageCollection?: UsageCollectionSetu _meta: { description: 'total number of es document layers in cluster' }, }, }, + es_ml_anomalies: { + min: { + type: 'long', + _meta: { description: 'min number of es machine learning anomaly layers per map' }, + }, + max: { + type: 'long', + _meta: { description: 'max number of es machine learning anomaly layers per map' }, + }, + avg: { + type: 'float', + _meta: { description: 'avg number of es machine learning anomaly layers per map' }, + }, + total: { + type: 'long', + _meta: { description: 'total number of es machine learning anomaly layers in cluster' }, + }, + }, es_point_to_point: { min: { type: 'long', diff --git a/x-pack/plugins/ml/common/types/fields.ts b/x-pack/plugins/ml/common/types/fields.ts index b63efd4a6a891..3134d470f889f 100644 --- a/x-pack/plugins/ml/common/types/fields.ts +++ b/x-pack/plugins/ml/common/types/fields.ts @@ -97,19 +97,6 @@ export const mlCategory: Field = { aggregatable: false, }; -export interface FieldAggCardinality { - field: string; - percent?: any; -} - -export interface ScriptAggCardinality { - script: any; -} - -export interface AggCardinality { - cardinality: FieldAggCardinality | ScriptAggCardinality; -} - export type RollupFields = Record<FieldId, [Record<'agg', ES_AGGREGATION>]>; export type RuntimeMappings = estypes.MappingRuntimeFields; diff --git a/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js b/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js index d52d22f6b4aa7..9062836bc32d2 100644 --- a/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js +++ b/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js @@ -71,17 +71,17 @@ export function CustomSelectionTable({ lastItemIndex: 1, }); const [query, setQuery] = useState(EuiSearchBar.Query.MATCH_ALL); - const [error, setError] = useState(null); // eslint-disable-line + const [error, setError] = useState(null); useEffect(() => { setCurrentItems(items); handleQueryChange({ query: query }); - }, [items]); // eslint-disable-line + }, [items]); // When changes to selected ids made via badge removal - update selection in the table accordingly useEffect(() => { setItemIdToSelectedMap(getCurrentlySelectedItemIdsMap()); - }, [selectedIds]); // eslint-disable-line + }, [selectedIds]); useEffect(() => { const tablePager = new Pager(currentItems.length, itemsPerPage, currentPage); diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx index 5670ce79feb8d..630bbe7e32ede 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx +++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_flyout.tsx @@ -171,7 +171,7 @@ export const JobSelectorFlyoutContent: FC<JobSelectorFlyoutProps> = ({ onJobsFetched({ groupsMap, jobsMap: resp.jobsMap }); } } catch (e) { - console.error('Error fetching jobs with time range', e); // eslint-disable-line + console.error('Error fetching jobs with time range', e); // eslint-disable-line no-console const { toasts } = notifications; toasts.addDanger({ title: i18n.translate('xpack.ml.jobSelector.jobFetchErrorMessage', { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/page.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/page.tsx index c35ad5bacf371..633afaa0c7b4a 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/page.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/page.tsx @@ -51,7 +51,7 @@ export const Page: FC<{ setJobsExist(count > 0); } catch (e) { // Swallow the error and just show the empty table in the analytics id selector - console.error('Error checking analytics jobs exist', e); // eslint-disable-line + console.error('Error checking analytics jobs exist', e); // eslint-disable-line no-console } }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_action_flyout.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_action_flyout.tsx index 3b8d3ed5460ff..7e7b8193cf5c4 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_action_flyout.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_action_flyout.tsx @@ -112,7 +112,7 @@ export const EditActionFlyout: FC<Required<EditAction>> = ({ closeFlyout, item } refresh(); closeFlyout(); } catch (e) { - // eslint-disable-next-line + // eslint-disable-next-line no-console console.error(e); toastNotificationService.displayErrorToast( diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx index 355aa2887d6f5..544815ee7e4c5 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx @@ -140,7 +140,7 @@ export function AnalyticsIdSelector({ await getDataFrameAnalytics(); setAnalyticsJobs(dataFrameAnalytics); } catch (e) { - console.error('Error fetching analytics', e); // eslint-disable-line + console.error('Error fetching analytics', e); // eslint-disable-line no-console displayErrorToast( e, i18n.translate('xpack.ml.analyticsSelector.analyticsFetchErrorMessage', { @@ -157,7 +157,7 @@ export function AnalyticsIdSelector({ const response = await trainedModelsApiService.getTrainedModels(); setTrainedModels(response); } catch (e) { - console.error('Error fetching trained models', e); // eslint-disable-line + console.error('Error fetching trained models', e); // eslint-disable-line no-console displayErrorToast( e, i18n.translate('xpack.ml.analyticsSelector.trainedModelsFetchErrorMessage', { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/job_map/page.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/job_map/page.tsx index cae309ebcb761..c2db3e5958151 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/job_map/page.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/job_map/page.tsx @@ -63,7 +63,7 @@ export const Page: FC = () => { setJobsExist(count > 0); } catch (e) { // Swallow the error and just show the empty table in the analytics id selector - console.error('Error checking analytics jobs exist', e); // eslint-disable-line + console.error('Error checking analytics jobs exist', e); // eslint-disable-line no-console } }; diff --git a/x-pack/plugins/ml/public/application/license/check_license.tsx b/x-pack/plugins/ml/public/application/license/check_license.tsx index 5427db87cfc65..569746a1dab27 100644 --- a/x-pack/plugins/ml/public/application/license/check_license.tsx +++ b/x-pack/plugins/ml/public/application/license/check_license.tsx @@ -37,7 +37,7 @@ export function setLicenseCache( export async function checkFullLicense() { if (mlLicense === null) { // this should never happen - console.error('ML Licensing not initialized'); // eslint-disable-line + console.error('ML Licensing not initialized'); // eslint-disable-line no-console return Promise.reject(); } @@ -54,7 +54,7 @@ export async function checkFullLicense() { export async function checkBasicLicense() { if (mlLicense === null) { // this should never happen - console.error('ML Licensing not initialized'); // eslint-disable-line + console.error('ML Licensing not initialized'); // eslint-disable-line no-console return Promise.reject(); } diff --git a/x-pack/plugins/ml/public/maps/anomaly_source.tsx b/x-pack/plugins/ml/public/maps/anomaly_source.tsx index 46b6a033c6390..41bf7fedfabad 100644 --- a/x-pack/plugins/ml/public/maps/anomaly_source.tsx +++ b/x-pack/plugins/ml/public/maps/anomaly_source.tsx @@ -11,6 +11,7 @@ import { FieldFormatter, MAX_ZOOM, MIN_ZOOM, + SOURCE_TYPES, TooltipFeatureAction, VECTOR_SHAPE_TYPE, VectorSourceRequestMeta, @@ -29,7 +30,6 @@ import { AnomalySourceTooltipProperty, ANOMALY_SOURCE_FIELDS, } from './anomaly_source_field'; -import { ML_ANOMALY } from './anomaly_source_factory'; import { getResultsForJobId, ML_ANOMALY_LAYERS, MlAnomalyLayersType } from './util'; import { UpdateAnomalySourceEditor } from './update_anomaly_source_editor'; import type { MlApiServices } from '../application/services/ml_api_service'; @@ -51,7 +51,7 @@ export class AnomalySource implements IVectorSource { } return { - type: ML_ANOMALY, + type: SOURCE_TYPES.ES_ML_ANOMALIES, jobId: descriptor.jobId, typicalActual: descriptor.typicalActual || ML_ANOMALY_LAYERS.ACTUAL, }; diff --git a/x-pack/plugins/ml/public/maps/anomaly_source_factory.ts b/x-pack/plugins/ml/public/maps/anomaly_source_factory.ts index 81646d98d0c13..0556d703cdd96 100644 --- a/x-pack/plugins/ml/public/maps/anomaly_source_factory.ts +++ b/x-pack/plugins/ml/public/maps/anomaly_source_factory.ts @@ -6,14 +6,13 @@ */ import type { StartServicesAccessor } from '@kbn/core/public'; +import { SOURCE_TYPES } from '@kbn/maps-plugin/common'; import { HttpService } from '../application/services/http_service'; import type { MlPluginStart, MlStartDependencies } from '../plugin'; import type { MlApiServices } from '../application/services/ml_api_service'; -export const ML_ANOMALY = 'ML_ANOMALIES'; - export class AnomalySourceFactory { - public readonly type = ML_ANOMALY; + public readonly type = SOURCE_TYPES.ES_ML_ANOMALIES; constructor( private getStartServices: StartServicesAccessor<MlStartDependencies, MlPluginStart>, diff --git a/x-pack/plugins/ml/server/index.ts b/x-pack/plugins/ml/server/index.ts index 8a1cfb9590402..fa455e38f5166 100644 --- a/x-pack/plugins/ml/server/index.ts +++ b/x-pack/plugins/ml/server/index.ts @@ -21,7 +21,6 @@ export { UnknownMLCapabilitiesError, InsufficientMLCapabilities, MLPrivilegesUninitialized, - getHistogramsForFields, } from './shared'; export const plugin = (ctx: PluginInitializerContext) => new MlServerPlugin(ctx); diff --git a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts index 6946a2fbda90f..6bb6da5b09069 100644 --- a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts +++ b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts @@ -8,18 +8,17 @@ import { get, each, last, find } from 'lodash'; import { IScopedClusterClient } from '@kbn/core/server'; -import { KBN_FIELD_TYPES } from '@kbn/data-plugin/server'; import { buildSamplerAggregation, - getAggIntervals, + fetchHistogramsForFields, getSamplerAggregationsResponsePath, } from '@kbn/ml-agg-utils'; -import { stringHash } from '@kbn/ml-string-hash'; +import type { AggCardinality, FieldsForHistograms } from '@kbn/ml-agg-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types'; import { getSafeAggregationName } from '../../../common/util/job_utils'; import { buildBaseFilterCriteria } from '../../lib/query_utils'; -import { AggCardinality, RuntimeMappings } from '../../../common/types/fields'; +import { RuntimeMappings } from '../../../common/types/fields'; import { getDatafeedAggregations } from '../../../common/util/datafeed_utils'; import { Datafeed } from '../../../common/types/anomaly_detection_jobs'; @@ -28,8 +27,6 @@ const SAMPLER_TOP_TERMS_SHARD_SIZE = 5000; const AGGREGATABLE_EXISTS_REQUEST_BATCH_SIZE = 200; const FIELDS_REQUEST_BATCH_SIZE = 10; -const MAX_CHART_COLUMNS = 20; - interface FieldData { fieldName: string; existsInDocs: boolean; @@ -46,11 +43,6 @@ export interface Field { cardinality: number; } -export interface HistogramField { - fieldName: string; - type: string; -} - interface Distribution { percentiles: any[]; minPercentile: number; @@ -114,57 +106,6 @@ interface FieldExamples { examples: any[]; } -interface AggHistogram { - histogram: { - field: string; - interval: number; - }; -} - -interface AggTerms { - terms: { - field: string; - size: number; - }; -} - -interface NumericDataItem { - key: number; - key_as_string?: string; - doc_count: number; -} - -interface NumericChartData { - data: NumericDataItem[]; - id: string; - interval: number; - stats: [number, number]; - type: 'numeric'; -} - -interface OrdinalDataItem { - key: string; - key_as_string?: string; - doc_count: number; -} - -interface OrdinalChartData { - type: 'ordinal' | 'boolean'; - cardinality: number; - data: OrdinalDataItem[]; - id: string; -} - -interface UnsupportedChartData { - id: string; - type: 'unsupported'; -} - -type ChartRequestAgg = AggHistogram | AggCardinality | AggTerms; - -// type ChartDataItem = NumericDataItem | OrdinalDataItem; -type ChartData = NumericChartData | OrdinalChartData | UnsupportedChartData; - type BatchStats = | NumericFieldStats | StringFieldStats @@ -173,126 +114,11 @@ type BatchStats = | DocumentCountStats | FieldExamples; -// export for re-use by transforms plugin -export const getHistogramsForFields = async ( - client: IScopedClusterClient, - indexPattern: string, - query: any, - fields: HistogramField[], - samplerShardSize: number, - runtimeMappings?: RuntimeMappings -) => { - const { asCurrentUser } = client; - const aggIntervals = await getAggIntervals( - client.asCurrentUser, - indexPattern, - query, - fields, - samplerShardSize, - runtimeMappings - ); - - const chartDataAggs = fields.reduce((aggs, field) => { - const fieldName = field.fieldName; - const fieldType = field.type; - const id = stringHash(fieldName); - if (fieldType === KBN_FIELD_TYPES.NUMBER || fieldType === KBN_FIELD_TYPES.DATE) { - if (aggIntervals[id] !== undefined) { - aggs[`${id}_histogram`] = { - histogram: { - field: fieldName, - interval: aggIntervals[id].interval !== 0 ? aggIntervals[id].interval : 1, - }, - }; - } - } else if (fieldType === KBN_FIELD_TYPES.STRING || fieldType === KBN_FIELD_TYPES.BOOLEAN) { - if (fieldType === KBN_FIELD_TYPES.STRING) { - aggs[`${id}_cardinality`] = { - cardinality: { - field: fieldName, - }, - }; - } - aggs[`${id}_terms`] = { - terms: { - field: fieldName, - size: MAX_CHART_COLUMNS, - }, - }; - } - return aggs; - }, {} as Record<string, ChartRequestAgg>); - - if (Object.keys(chartDataAggs).length === 0) { - return []; - } - - const body = await asCurrentUser.search( - { - index: indexPattern, - size: 0, - body: { - query, - aggs: buildSamplerAggregation(chartDataAggs, samplerShardSize), - size: 0, - ...(isPopulatedObject(runtimeMappings) ? { runtime_mappings: runtimeMappings } : {}), - }, - }, - { maxRetries: 0 } - ); - - const aggsPath = getSamplerAggregationsResponsePath(samplerShardSize); - const aggregations = aggsPath.length > 0 ? get(body.aggregations, aggsPath) : body.aggregations; - - const chartsData: ChartData[] = fields.map((field): ChartData => { - const fieldName = field.fieldName; - const fieldType = field.type; - const id = stringHash(field.fieldName); - - if (fieldType === KBN_FIELD_TYPES.NUMBER || fieldType === KBN_FIELD_TYPES.DATE) { - if (aggIntervals[id] === undefined) { - return { - type: 'numeric', - data: [], - interval: 0, - stats: [0, 0], - id: fieldName, - }; - } - - return { - data: aggregations[`${id}_histogram`].buckets, - interval: aggIntervals[id].interval, - stats: [aggIntervals[id].min, aggIntervals[id].max], - type: 'numeric', - id: fieldName, - }; - } else if (fieldType === KBN_FIELD_TYPES.STRING || fieldType === KBN_FIELD_TYPES.BOOLEAN) { - return { - type: fieldType === KBN_FIELD_TYPES.STRING ? 'ordinal' : 'boolean', - cardinality: - fieldType === KBN_FIELD_TYPES.STRING ? aggregations[`${id}_cardinality`].value : 2, - data: aggregations[`${id}_terms`].buckets, - id: fieldName, - }; - } - - return { - type: 'unsupported', - id: fieldName, - }; - }); - - return chartsData; -}; - export class DataVisualizer { - private _client: IScopedClusterClient; private _asCurrentUser: IScopedClusterClient['asCurrentUser']; constructor(client: IScopedClusterClient) { this._asCurrentUser = client.asCurrentUser; - this._client = client; } // Obtains overall stats on the fields in the supplied index pattern, returning an object @@ -388,12 +214,12 @@ export class DataVisualizer { async getHistogramsForFields( indexPattern: string, query: any, - fields: HistogramField[], + fields: FieldsForHistograms, samplerShardSize: number, runtimeMappings?: RuntimeMappings ): Promise<any> { - return await getHistogramsForFields( - this._client, + return await fetchHistogramsForFields( + this._asCurrentUser, indexPattern, query, fields, diff --git a/x-pack/plugins/ml/server/models/data_visualizer/index.ts b/x-pack/plugins/ml/server/models/data_visualizer/index.ts index 55ddc76cde500..b2df993bac302 100644 --- a/x-pack/plugins/ml/server/models/data_visualizer/index.ts +++ b/x-pack/plugins/ml/server/models/data_visualizer/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { getHistogramsForFields, DataVisualizer } from './data_visualizer'; +export { DataVisualizer } from './data_visualizer'; diff --git a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts index e1485ed0d2e9b..4eaa1165d398a 100644 --- a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts +++ b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts @@ -9,10 +9,10 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import Boom from '@hapi/boom'; import { IScopedClusterClient } from '@kbn/core/server'; import { duration } from 'moment'; +import type { AggCardinality } from '@kbn/ml-agg-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { parseInterval } from '../../../common/util/parse_interval'; import { initCardinalityFieldsCache } from './fields_aggs_cache'; -import { AggCardinality } from '../../../common/types/fields'; import { isValidAggregationField } from '../../../common/util/validation_utils'; import { getDatafeedAggregations } from '../../../common/util/datafeed_utils'; import { Datafeed, IndicesOptions } from '../../../common/types/anomaly_detection_jobs'; diff --git a/x-pack/plugins/ml/server/routes/data_visualizer.ts b/x-pack/plugins/ml/server/routes/data_visualizer.ts index 88131afd20c08..5a71c76bd49ef 100644 --- a/x-pack/plugins/ml/server/routes/data_visualizer.ts +++ b/x-pack/plugins/ml/server/routes/data_visualizer.ts @@ -6,9 +6,9 @@ */ import { IScopedClusterClient } from '@kbn/core/server'; +import { FieldsForHistograms } from '@kbn/ml-agg-utils'; import { wrapError } from '../client/error_wrapper'; import { DataVisualizer } from '../models/data_visualizer'; -import { HistogramField } from '../models/data_visualizer/data_visualizer'; import { dataVisualizerFieldHistogramsSchema, indexPatternSchema, @@ -20,7 +20,7 @@ function getHistogramsForFields( client: IScopedClusterClient, indexPattern: string, query: any, - fields: HistogramField[], + fields: FieldsForHistograms, samplerShardSize: number, runtimeMappings: RuntimeMappings ) { diff --git a/x-pack/plugins/ml/server/shared.ts b/x-pack/plugins/ml/server/shared.ts index 8760dfb991ab5..170edc97cc383 100644 --- a/x-pack/plugins/ml/server/shared.ts +++ b/x-pack/plugins/ml/server/shared.ts @@ -9,4 +9,3 @@ export * from '../common/types/anomalies'; export * from '../common/types/anomaly_detection_jobs'; export * from './lib/capabilities/errors'; export type { ModuleSetupPayload } from './shared_services/providers/modules'; -export { getHistogramsForFields } from './models/data_visualizer'; diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts index c6f63b0a8a63c..23de6bd101673 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchCCRReadExceptions } from './fetch_ccr_read_exceptions'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts index 1c369c159595a..d87792f347eb0 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts @@ -6,8 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchClusterHealth } from './fetch_cluster_health'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts index af90f99eb8288..5d7505c492da4 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts @@ -6,8 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchCpuUsageNodeStats } from './fetch_cpu_usage_node_stats'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts index d717edf9feb43..06227c53b25fa 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchMemoryUsageNodeStats } from './fetch_memory_usage_node_stats'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts index 90cfbc96617cb..a0c5e1b247243 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchMissingMonitoringData } from './fetch_missing_monitoring_data'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts index 12c49f89aa487..fe03ffec6d137 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { fetchNodesFromClusterStats } from './fetch_nodes_from_cluster_stats'; jest.mock('../../static_globals', () => ({ diff --git a/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts b/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts index 1e60b49181dec..8b28221947a2d 100644 --- a/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts +++ b/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; + +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getESClusterUuid } from '.'; describe('getESClusterUuid', () => { diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts b/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts index edc6c6cef7c8e..92ff711006a25 100644 --- a/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts +++ b/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts @@ -8,8 +8,7 @@ import { registerDynamicRoute } from '.'; import { KibanaRequest, KibanaResponseFactory, ServiceStatusLevels } from '@kbn/core/server'; import { httpServerMock, httpServiceMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; beforeEach(() => { jest.resetAllMocks(); diff --git a/x-pack/plugins/observability/common/index.ts b/x-pack/plugins/observability/common/index.ts index 88134d04586d6..11bb6e685a289 100644 --- a/x-pack/plugins/observability/common/index.ts +++ b/x-pack/plugins/observability/common/index.ts @@ -17,6 +17,7 @@ export { defaultApmServiceEnvironment, apmServiceInventoryOptimizedSorting, apmProgressiveLoading, + apmServiceGroupMaxNumberOfServices, apmTraceExplorerTab, apmOperationsTab, } from './ui_settings_keys'; diff --git a/x-pack/plugins/observability/common/ui_settings_keys.ts b/x-pack/plugins/observability/common/ui_settings_keys.ts index 17a5be74c4b87..60328a189b696 100644 --- a/x-pack/plugins/observability/common/ui_settings_keys.ts +++ b/x-pack/plugins/observability/common/ui_settings_keys.ts @@ -15,5 +15,7 @@ export const apmProgressiveLoading = 'observability:apmProgressiveLoading'; export const enableServiceGroups = 'observability:enableServiceGroups'; export const apmServiceInventoryOptimizedSorting = 'observability:apmServiceInventoryOptimizedSorting'; +export const apmServiceGroupMaxNumberOfServices = + 'observability:apmServiceGroupMaxNumberOfServices'; export const apmTraceExplorerTab = 'observability:apmTraceExplorerTab'; export const apmOperationsTab = 'observability:apmOperationsTab'; diff --git a/x-pack/plugins/observability/public/components/app/section/index.tsx b/x-pack/plugins/observability/public/components/app/section/index.tsx index 83c105fb3fb8a..dae85d07685ae 100644 --- a/x-pack/plugins/observability/public/components/app/section/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/index.tsx @@ -29,6 +29,7 @@ interface Props { title: string; hasError: boolean; children: React.ReactNode; + initialIsOpen?: boolean; appLink?: AppLink; showExperimentalBadge?: boolean; } @@ -38,13 +39,14 @@ export function SectionContainer({ appLink, children, hasError, + initialIsOpen = true, showExperimentalBadge = false, }: Props) { const { http } = useKibana<ObservabilityAppServices>().services; return ( <EuiPanel color="subdued"> <EuiAccordion - initialIsOpen + initialIsOpen={initialIsOpen} id={title} buttonContentClassName="accordion-button" buttonContent={ diff --git a/x-pack/plugins/observability/public/components/app/section/ux/index.tsx b/x-pack/plugins/observability/public/components/app/section/ux/index.tsx index bcec087b52ab8..bdc783938211f 100644 --- a/x-pack/plugins/observability/public/components/app/section/ux/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/ux/index.tsx @@ -8,6 +8,8 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { CoreStart } from '@kbn/core/public'; +import { ObservabilityPublicPluginsStart } from '../../../..'; import type { AppDataType } from '../../../shared/exploratory_view/types'; import { SectionContainer } from '..'; import { getDataHandler } from '../../../../data_handler'; @@ -22,7 +24,6 @@ import { SERVICE_NAME, TRANSACTION_DURATION, } from '../../../shared/exploratory_view/configurations/constants/elasticsearch_fieldnames'; -import { ObservabilityAppServices } from '../../../../application/types'; interface Props { bucketSize: BucketSize; @@ -30,16 +31,14 @@ interface Props { export function UXSection({ bucketSize }: Props) { const { forceUpdate, hasDataMap } = useHasData(); - const { services } = useKibana<ObservabilityAppServices>(); + const { services } = useKibana<ObservabilityPublicPluginsStart>(); const { relativeStart, relativeEnd, absoluteStart, absoluteEnd, lastUpdated } = useDatePickerContext(); const uxHasDataResponse = hasDataMap.ux; const serviceName = uxHasDataResponse?.serviceName as string; const ExploratoryViewEmbeddable = getExploratoryViewEmbeddable( - services.uiSettings, - services.dataViews, - services.lens + services as ObservabilityPublicPluginsStart & CoreStart ); const seriesList: AllSeries = [ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx index 0c2063ba8b1b0..566c271381125 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx @@ -12,6 +12,7 @@ import { sampleAttribute } from '../../configurations/test_data/sample_attribute import * as pluginHook from '../../../../../hooks/use_plugin_context'; import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; import { ExpViewActionMenuContent } from './action_menu'; +import { noCasesPermissions as mockUseGetCasesPermissions } from '../../../../../utils/cases_permissions'; jest.spyOn(pluginHook, 'usePluginContext').mockReturnValue({ appMountParameters: { @@ -19,7 +20,15 @@ jest.spyOn(pluginHook, 'usePluginContext').mockReturnValue({ }, } as any); +jest.mock('../../../../../hooks/use_get_user_cases_permissions', () => ({ + useGetUserCasesPermissions: jest.fn(() => mockUseGetCasesPermissions()), +})); + describe('Action Menu', function () { + afterAll(() => { + jest.clearAllMocks(); + }); + it('should be able to click open in lens', async function () { const { findByText, core } = render( <ExpViewActionMenuContent diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx index e8c9387570a58..dad9d5cef3f70 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx @@ -8,10 +8,10 @@ import React, { useCallback, useEffect, useState } from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; -import type { IUiSettingsClient } from '@kbn/core/public'; -import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import { LensPublicStart } from '@kbn/lens-plugin/public'; -import { useFetcher } from '../../../..'; +import type { CoreStart } from '@kbn/core/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { EuiErrorBoundary } from '@elastic/eui'; +import { ObservabilityPublicPluginsStart, useFetcher } from '../../../..'; import type { ExploratoryEmbeddableProps, ExploratoryEmbeddableComponentProps } from './embeddable'; import { ObservabilityDataViews } from '../../../../utils/observability_data_views'; import type { DataViewState } from '../hooks/use_app_data_view'; @@ -28,10 +28,10 @@ function ExploratoryViewEmbeddable(props: ExploratoryEmbeddableComponentProps) { } export function getExploratoryViewEmbeddable( - uiSettings?: IUiSettingsClient, - dataViews?: DataViewsPublicPluginStart, - lens?: LensPublicStart + services: CoreStart & ObservabilityPublicPluginsStart ) { + const { lens, dataViews, uiSettings } = services; + return (props: ExploratoryEmbeddableProps) => { if (!dataViews || !lens) { return null; @@ -80,14 +80,18 @@ export function getExploratoryViewEmbeddable( } return ( - <EuiThemeProvider darkMode={isDarkMode}> - <ExploratoryViewEmbeddable - {...props} - indexPatterns={indexPatterns} - lens={lens} - lensFormulaHelper={lensHelper.formula} - /> - </EuiThemeProvider> + <EuiErrorBoundary> + <EuiThemeProvider darkMode={isDarkMode}> + <KibanaContextProvider services={services}> + <ExploratoryViewEmbeddable + {...props} + indexPatterns={indexPatterns} + lens={lens} + lensFormulaHelper={lensHelper.formula} + /> + </KibanaContextProvider> + </EuiThemeProvider> + </EuiErrorBoundary> ); }; } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx index 2bd79116dc45b..9f50b22dc9f76 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx @@ -12,12 +12,18 @@ import { ExploratoryView } from './exploratory_view'; import * as obsvDataViews from '../../../utils/observability_data_views/observability_data_views'; import * as pluginHook from '../../../hooks/use_plugin_context'; import { createStubIndexPattern } from '@kbn/data-plugin/common/stubs'; +import { noCasesPermissions as mockUseGetCasesPermissions } from '../../../utils/cases_permissions'; jest.spyOn(pluginHook, 'usePluginContext').mockReturnValue({ appMountParameters: { setHeaderActionMenu: jest.fn(), }, } as any); + +jest.mock('../../../hooks/use_get_user_cases_permissions', () => ({ + useGetUserCasesPermissions: jest.fn(() => mockUseGetCasesPermissions()), +})); + describe('ExploratoryView', () => { mockAppDataView(); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx index b394b085a7c75..e6f432f4f30cb 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx @@ -11,8 +11,12 @@ import { fireEvent } from '@testing-library/dom'; import { AddToCaseAction } from './add_to_case_action'; import * as useCaseHook from '../hooks/use_add_to_case'; import * as datePicker from '../components/date_range_picker'; -import * as useGetUserCasesPermissionsModule from '../../../../hooks/use_get_user_cases_permissions'; import moment from 'moment'; +import { noCasesPermissions as mockUseGetCasesPermissions } from '../../../../utils/cases_permissions'; + +jest.mock('../../../../hooks/use_get_user_cases_permissions', () => ({ + useGetUserCasesPermissions: jest.fn(() => mockUseGetCasesPermissions()), +})); describe('AddToCaseAction', function () { beforeEach(() => { @@ -82,10 +86,6 @@ describe('AddToCaseAction', function () { }); it('should be able to click add to case button', async function () { - const mockUseGetUserCasesPermissions = jest - .spyOn(useGetUserCasesPermissionsModule, 'useGetUserCasesPermissions') - .mockImplementation(() => ({ crud: false, read: false })); - const initSeries = { data: [ { @@ -113,11 +113,13 @@ describe('AddToCaseAction', function () { owner: ['observability'], permissions: { all: false, + create: false, read: false, + update: false, + delete: false, + push: false, }, }) ); - - mockUseGetUserCasesPermissions.mockRestore(); }); }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.tsx index 118451b302948..dd2124e6b1982 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/header/add_to_case_action.tsx @@ -39,8 +39,7 @@ export function AddToCaseAction({ timeRange, }: AddToCaseProps) { const kServices = useKibana<ObservabilityAppServices>().services; - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); const { cases, @@ -77,7 +76,7 @@ export function AddToCaseAction({ }); const getAllCasesSelectorModalProps: GetAllCasesSelectorModalProps = { - permissions: casesPermissions, + permissions: userCasesPermissions, onRowClick: onCaseClicked, owner: [owner], onClose: () => { diff --git a/x-pack/plugins/observability/public/hooks/use_alert_bulk_case_actions.ts b/x-pack/plugins/observability/public/hooks/use_alert_bulk_case_actions.ts index 2aa4c40575143..0ca4f5a7187ba 100644 --- a/x-pack/plugins/observability/public/hooks/use_alert_bulk_case_actions.ts +++ b/x-pack/plugins/observability/public/hooks/use_alert_bulk_case_actions.ts @@ -25,8 +25,7 @@ export interface UseAddToCaseActions { export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActions = {}) => { const { cases: casesUi } = useKibana<ObservabilityAppServices>().services; - const casePermissions = useGetUserCasesPermissions(); - const hasWritePermissions = casePermissions?.crud ?? false; + const userCasesPermissions = useGetUserCasesPermissions(); const createCaseFlyout = casesUi.hooks.getUseCasesAddToNewCaseFlyout({ onClose, @@ -38,7 +37,7 @@ export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActi }); return useMemo(() => { - return hasWritePermissions + return userCasesPermissions.create && userCasesPermissions.read ? [ { label: ADD_TO_NEW_CASE, @@ -68,5 +67,11 @@ export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActi }, ] : []; - }, [casesUi.helpers, createCaseFlyout, hasWritePermissions, selectCaseModal]); + }, [ + casesUi.helpers, + createCaseFlyout, + userCasesPermissions.create, + userCasesPermissions.read, + selectCaseModal, + ]); }; diff --git a/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.test.ts b/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.test.ts deleted file mode 100644 index 3f23aec4a6058..0000000000000 --- a/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.test.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { renderHook } from '@testing-library/react-hooks'; -import { applicationServiceMock } from '@kbn/core/public/mocks'; -import { casesFeatureId } from '../../common'; -import { useGetUserCasesPermissions } from './use_get_user_cases_permissions'; -import { kibanaStartMock } from '../utils/kibana_react.mock'; - -let mockUseKibanaReturnValue = kibanaStartMock.startContract(); - -jest.mock('../utils/kibana_react', () => ({ - __esModule: true, - useKibana: jest.fn(() => mockUseKibanaReturnValue), -})); - -describe('useGetUserCasesPermissions', function () { - it('returns expected permissions when capabilities entry exists', () => { - mockUseKibanaReturnValue = { - ...mockUseKibanaReturnValue, - services: { - ...mockUseKibanaReturnValue.services, - application: { - ...mockUseKibanaReturnValue.services.application, - capabilities: { - ...applicationServiceMock.createStartContract().capabilities, - [casesFeatureId]: { crud_cases: false, read_cases: true }, - }, - }, - }, - }; - const { result } = renderHook(() => useGetUserCasesPermissions(), {}); - expect(result.current?.read).toBe(true); - expect(result.current?.crud).toBe(false); - }); - - it('returns false when capabilities entry permissions are missing', () => { - mockUseKibanaReturnValue = { - ...mockUseKibanaReturnValue, - services: { - ...mockUseKibanaReturnValue.services, - application: { - ...mockUseKibanaReturnValue.services.application, - capabilities: { - ...applicationServiceMock.createStartContract().capabilities, - [casesFeatureId]: { - /* intentionally empty */ - }, - }, - }, - }, - }; - const { result } = renderHook(() => useGetUserCasesPermissions(), {}); - expect(result.current?.read).toBe(false); - expect(result.current?.crud).toBe(false); - }); - - it('returns false when capabilities entry is missing entirely', () => { - mockUseKibanaReturnValue = { - ...mockUseKibanaReturnValue, - services: { - ...mockUseKibanaReturnValue.services, - application: { - ...mockUseKibanaReturnValue.services.application, - capabilities: { - ...applicationServiceMock.createStartContract().capabilities, - }, - }, - }, - }; - const { result } = renderHook(() => useGetUserCasesPermissions(), {}); - expect(result.current?.read).toBe(false); - expect(result.current?.crud).toBe(false); - }); -}); diff --git a/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.tsx b/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.tsx index 83481c6d1f2f4..d2c47da425a01 100644 --- a/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.tsx +++ b/x-pack/plugins/observability/public/hooks/use_get_user_cases_permissions.tsx @@ -6,35 +6,42 @@ */ import { useEffect, useState } from 'react'; +import { CasesPermissions } from '@kbn/cases-plugin/common'; import { useKibana } from '../utils/kibana_react'; import { casesFeatureId } from '../../common'; -export interface UseGetUserCasesPermissions { - crud: boolean; - read: boolean; -} - export function useGetUserCasesPermissions() { - const [casesPermissions, setCasesPermissions] = useState<UseGetUserCasesPermissions>({ - crud: false, + const [casesPermissions, setCasesPermissions] = useState<CasesPermissions>({ + all: false, read: false, + create: false, + update: false, + delete: false, + push: false, }); const uiCapabilities = useKibana().services.application.capabilities; + const casesCapabilities = useKibana().services.cases.helpers.getUICapabilities( + uiCapabilities[casesFeatureId] + ); + useEffect(() => { - const capabilitiesCanUserCRUD: boolean = - typeof uiCapabilities[casesFeatureId]?.crud_cases === 'boolean' - ? (uiCapabilities[casesFeatureId].crud_cases as boolean) - : false; - const capabilitiesCanUserRead: boolean = - typeof uiCapabilities[casesFeatureId]?.read_cases === 'boolean' - ? (uiCapabilities[casesFeatureId].read_cases as boolean) - : false; setCasesPermissions({ - crud: capabilitiesCanUserCRUD, - read: capabilitiesCanUserRead, + all: casesCapabilities.all, + create: casesCapabilities.create, + read: casesCapabilities.read, + update: casesCapabilities.update, + delete: casesCapabilities.delete, + push: casesCapabilities.push, }); - }, [uiCapabilities]); + }, [ + casesCapabilities.all, + casesCapabilities.create, + casesCapabilities.read, + casesCapabilities.update, + casesCapabilities.delete, + casesCapabilities.push, + ]); return casesPermissions; } diff --git a/x-pack/plugins/observability/public/index.ts b/x-pack/plugins/observability/public/index.ts index be47f8043283f..96989d2fd114f 100644 --- a/x-pack/plugins/observability/public/index.ts +++ b/x-pack/plugins/observability/public/index.ts @@ -30,6 +30,7 @@ export { enableInfrastructureView, enableServiceGroups, enableNewSyntheticsView, + apmServiceGroupMaxNumberOfServices, } from '../common/ui_settings_keys'; export { uptimeOverviewLocatorID } from '../common'; diff --git a/x-pack/plugins/observability/public/observability_public_plugins_start.mock.ts b/x-pack/plugins/observability/public/observability_public_plugins_start.mock.ts index 80a207a846d33..5d87ff009040c 100644 --- a/x-pack/plugins/observability/public/observability_public_plugins_start.mock.ts +++ b/x-pack/plugins/observability/public/observability_public_plugins_start.mock.ts @@ -5,16 +5,7 @@ * 2.0. */ -const casesUiStartMock = { - createStart() { - return { - getCases: jest.fn(), - getAllCasesSelectorModal: jest.fn(), - getCreateCaseFlyout: jest.fn(), - getRecentCases: jest.fn(), - }; - }, -}; +import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; const embeddableStartMock = { createStart() { @@ -60,7 +51,7 @@ const triggersActionsUiStartMock = { export const observabilityPublicPluginsStartMock = { createStart() { return { - cases: casesUiStartMock.createStart(), + cases: mockCasesContract(), embeddable: embeddableStartMock.createStart(), triggersActionsUi: triggersActionsUiStartMock.createStart(), data: null, diff --git a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx index d903876c79f86..b33a7ecd03c10 100644 --- a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx @@ -219,8 +219,7 @@ function AlertsPage() { const hasData = hasAnyData === true || (isAllRequestsComplete === false ? undefined : false); const CasesContext = cases.ui.getCasesContext(); - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); if (!hasAnyData && !isAllRequestsComplete) { return <LoadingObservability />; @@ -266,7 +265,7 @@ function AlertsPage() { <EuiFlexItem> <CasesContext owner={[observabilityFeatureId]} - permissions={casesPermissions} + permissions={userCasesPermissions} features={{ alerts: { sync: false } }} > <AlertsTableTGrid diff --git a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_table_t_grid/alerts_table_t_grid.tsx b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_table_t_grid/alerts_table_t_grid.tsx index 1b6f0b1860045..9afe75f2ae310 100644 --- a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_table_t_grid/alerts_table_t_grid.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_table_t_grid/alerts_table_t_grid.tsx @@ -168,7 +168,7 @@ function ObservabilityActions({ setActionsPopover((current) => (current ? null : id)); }, []); - const casePermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const ruleId = alert.fields['kibana.alert.rule.uuid'] ?? null; const linkToRule = ruleId ? http.basePath.prepend(paths.observability.ruleDetails(ruleId)) : null; const caseAttachments: CaseAttachments = useMemo(() => { @@ -201,7 +201,7 @@ function ObservabilityActions({ const actionsMenuItems = useMemo(() => { return [ - ...(casePermissions.crud + ...(userCasesPermissions.create && userCasesPermissions.read ? [ <EuiContextMenuItem data-test-subj="add-to-existing-case-action" @@ -246,7 +246,8 @@ function ObservabilityActions({ ], ]; }, [ - casePermissions.crud, + userCasesPermissions.create, + userCasesPermissions.read, handleAddToExistingCaseClick, handleAddToNewCaseClick, linkToRule, @@ -332,7 +333,7 @@ export function AlertsTableTGrid(props: AlertsTableTGridProps) { storage.get(stateStorageKey) ); - const casePermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const hasAlertsCrudPermissions = useCallback( ({ ruleConsumer, ruleProducer }: { ruleConsumer: string; ruleProducer?: string }) => { @@ -415,7 +416,7 @@ export function AlertsTableTGrid(props: AlertsTableTGridProps) { return { appId: observabilityAppId, casesOwner: observabilityFeatureId, - casePermissions, + casePermissions: userCasesPermissions, type, columns: (tGridState?.columns ?? columns).map(addDisplayNames), deletedEventIds, @@ -464,7 +465,7 @@ export function AlertsTableTGrid(props: AlertsTableTGridProps) { unit: (totalAlerts: number) => translations.alertsTable.showingAlertsTitle(totalAlerts), }; }, [ - casePermissions, + userCasesPermissions, tGridState?.columns, tGridState?.sort, deletedEventIds, diff --git a/x-pack/plugins/observability/public/pages/cases/cases.tsx b/x-pack/plugins/observability/public/pages/cases/cases.tsx index ee7af69937881..28a9f90251f64 100644 --- a/x-pack/plugins/observability/public/pages/cases/cases.tsx +++ b/x-pack/plugins/observability/public/pages/cases/cases.tsx @@ -7,18 +7,18 @@ import React, { Suspense, useCallback, useState } from 'react'; +import { CasesPermissions } from '@kbn/cases-plugin/common'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { CASES_OWNER, CASES_PATH } from './constants'; import { usePluginContext } from '../../hooks/use_plugin_context'; import { LazyAlertsFlyout } from '../..'; import { useFetchAlertDetail } from './use_fetch_alert_detail'; import { useFetchAlertData } from './use_fetch_alert_data'; -import { UseGetUserCasesPermissions } from '../../hooks/use_get_user_cases_permissions'; import { paths } from '../../config'; import { ObservabilityAppServices } from '../../application/types'; interface CasesProps { - permissions: UseGetUserCasesPermissions; + permissions: CasesPermissions; } export const Cases = React.memo<CasesProps>(({ permissions }) => { const { @@ -30,7 +30,6 @@ export const Cases = React.memo<CasesProps>(({ permissions }) => { } = useKibana<ObservabilityAppServices>().services; const { observabilityRuleTypeRegistry } = usePluginContext(); const [selectedAlertId, setSelectedAlertId] = useState<string>(''); - const casesPermissions = { all: permissions.crud, read: permissions.read }; const handleFlyoutClose = useCallback(() => { setSelectedAlertId(''); @@ -51,7 +50,7 @@ export const Cases = React.memo<CasesProps>(({ permissions }) => { )} {cases.ui.getCases({ basePath: CASES_PATH, - permissions: casesPermissions, + permissions, owner: [CASES_OWNER], features: { alerts: { sync: false } }, useFetchAlertData, diff --git a/x-pack/plugins/observability/public/pages/cases/index.tsx b/x-pack/plugins/observability/public/pages/cases/index.tsx index a3d1505d8f488..08a5b7c7cf6bc 100644 --- a/x-pack/plugins/observability/public/pages/cases/index.tsx +++ b/x-pack/plugins/observability/public/pages/cases/index.tsx @@ -19,7 +19,7 @@ import { getNoDataConfig } from '../../utils/no_data_config'; import { ObservabilityAppServices } from '../../application/types'; export const CasesPage = React.memo(() => { - const userPermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const { docLinks, http } = useKibana<ObservabilityAppServices>().services; const { ObservabilityPageTemplate } = usePluginContext(); @@ -38,13 +38,13 @@ export const CasesPage = React.memo(() => { docsLink: docLinks.links.observability.guide, }); - return userPermissions.read ? ( + return userCasesPermissions.read ? ( <ObservabilityPageTemplate isPageDataLoaded={Boolean(hasAnyData || isAllRequestsComplete)} data-test-subj={noDataConfig ? 'noDataPage' : undefined} noDataConfig={noDataConfig} > - <Cases permissions={userPermissions} /> + <Cases permissions={userCasesPermissions} /> </ObservabilityPageTemplate> ) : ( <CaseFeatureNoPermissions /> diff --git a/x-pack/plugins/observability/public/pages/home/index.test.tsx b/x-pack/plugins/observability/public/pages/home/index.test.tsx deleted file mode 100644 index acd8ad7faa97b..0000000000000 --- a/x-pack/plugins/observability/public/pages/home/index.test.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { HasDataContextValue } from '../../context/has_data_context'; -import * as hasData from '../../hooks/use_has_data'; -import { render } from '../../utils/test_helper'; -import { HomePage } from '.'; - -const mockHistoryPush = jest.fn(); -jest.mock('react-router-dom', () => ({ - useHistory: () => ({ - replace: mockHistoryPush, - }), -})); - -describe('Home page', () => { - beforeAll(() => { - jest.restoreAllMocks(); - }); - - it('renders loading component while requests are not returned', () => { - jest.spyOn(hasData, 'useHasData').mockImplementation( - () => - ({ - hasDataMap: {}, - hasAnyData: false, - isAllRequestsComplete: false, - } as HasDataContextValue) - ); - const { getByText } = render(<HomePage />); - expect(getByText('Loading Observability')).toBeInTheDocument(); - }); - it('renders landing page', () => { - jest.spyOn(hasData, 'useHasData').mockImplementation( - () => - ({ - hasDataMap: {}, - hasAnyData: false, - isAllRequestsComplete: true, - } as HasDataContextValue) - ); - render(<HomePage />); - expect(mockHistoryPush).toHaveBeenCalledWith({ pathname: '/landing' }); - }); - it('renders overview page', () => { - jest.spyOn(hasData, 'useHasData').mockImplementation( - () => - ({ - hasDataMap: {}, - hasAnyData: true, - isAllRequestsComplete: false, - } as HasDataContextValue) - ); - render(<HomePage />); - expect(mockHistoryPush).toHaveBeenCalledWith({ pathname: '/overview' }); - }); -}); diff --git a/x-pack/plugins/observability/public/pages/home/index.tsx b/x-pack/plugins/observability/public/pages/home/index.tsx deleted file mode 100644 index 9e7fe99e3f780..0000000000000 --- a/x-pack/plugins/observability/public/pages/home/index.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useEffect } from 'react'; -import { useHistory } from 'react-router-dom'; -import { useHasData } from '../../hooks/use_has_data'; -import { LoadingObservability } from '../overview/loading_observability'; - -export function HomePage() { - const history = useHistory(); - const { hasAnyData, isAllRequestsComplete } = useHasData(); - - useEffect(() => { - if (hasAnyData === true) { - history.replace({ pathname: '/overview' }); - } else if (hasAnyData === false && isAllRequestsComplete === true) { - history.replace({ pathname: '/landing' }); - } - }, [hasAnyData, isAllRequestsComplete, history]); - - return <LoadingObservability />; -} diff --git a/x-pack/plugins/observability/public/pages/home/section.ts b/x-pack/plugins/observability/public/pages/home/section.ts deleted file mode 100644 index 31c70823127e0..0000000000000 --- a/x-pack/plugins/observability/public/pages/home/section.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { ISection } from '../../typings/section'; - -export const appsSection: ISection[] = [ - { - id: 'infra_logs', - title: i18n.translate('xpack.observability.section.apps.logs.title', { - defaultMessage: 'Logs', - }), - icon: 'logoLogging', - description: i18n.translate('xpack.observability.section.apps.logs.description', { - defaultMessage: - 'Centralize logs from any source. Search, tail, automate anomaly detection, and visualize trends so you can take action quicker.', - }), - href: 'https://www.elastic.co', - }, - { - id: 'apm', - title: i18n.translate('xpack.observability.section.apps.apm.title', { - defaultMessage: 'APM', - }), - icon: 'logoObservability', - description: i18n.translate('xpack.observability.section.apps.apm.description', { - defaultMessage: - 'Trace transactions through a distributed architecture and map your services’ interactions to easily spot performance bottlenecks.', - }), - href: 'https://www.elastic.co', - }, - { - id: 'infra_metrics', - title: i18n.translate('xpack.observability.section.apps.metrics.title', { - defaultMessage: 'Metrics', - }), - icon: 'logoMetrics', - description: i18n.translate('xpack.observability.section.apps.metrics.description', { - defaultMessage: - 'Analyze metrics from your infrastructure, apps, and services. Discover trends, forecast behavior, get alerts on anomalies, and more.', - }), - href: 'https://www.elastic.co', - }, - { - id: 'synthetics', - title: i18n.translate('xpack.observability.section.apps.uptime.title', { - defaultMessage: 'Uptime', - }), - icon: 'logoUptime', - description: i18n.translate('xpack.observability.section.apps.uptime.description', { - defaultMessage: - 'Proactively monitor the availability of your sites and services. Receive alerts and resolve issues faster to optimize your users’ experience.', - }), - href: 'https://www.elastic.co', - }, -]; diff --git a/x-pack/plugins/observability/public/pages/landing/index.tsx b/x-pack/plugins/observability/public/pages/landing/index.tsx deleted file mode 100644 index 2deb22010e7f9..0000000000000 --- a/x-pack/plugins/observability/public/pages/landing/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import React from 'react'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ObservabilityAppServices } from '../../application/types'; -import { useBreadcrumbs } from '../../hooks/use_breadcrumbs'; -import { usePluginContext } from '../../hooks/use_plugin_context'; -import { useTrackPageview } from '../../hooks/use_track_metric'; -import { getNoDataConfig } from '../../utils/no_data_config'; -import './styles.scss'; - -export function LandingPage() { - useTrackPageview({ app: 'observability-overview', path: 'landing' }); - useTrackPageview({ app: 'observability-overview', path: 'landing', delay: 15000 }); - useBreadcrumbs([ - { - text: i18n.translate('xpack.observability.breadcrumbs.landingLinkText', { - defaultMessage: 'Getting started', - }), - }, - ]); - - const { http, docLinks } = useKibana<ObservabilityAppServices>().services; - const { ObservabilityPageTemplate } = usePluginContext(); - - const noDataConfig = getNoDataConfig({ - // Set it to false because the landing page is only visible when there's no data - hasData: false, - basePath: http.basePath, - docsLink: docLinks.links.observability.guide, - }); - - return ( - <ObservabilityPageTemplate - noDataConfig={noDataConfig} - restrictWidth - // No side nav since nothing is setup - showSolutionNav={false} - /> - ); -} diff --git a/x-pack/plugins/observability/public/pages/landing/landing.stories.tsx b/x-pack/plugins/observability/public/pages/landing/landing.stories.tsx deleted file mode 100644 index 57a6310601190..0000000000000 --- a/x-pack/plugins/observability/public/pages/landing/landing.stories.tsx +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiPageTemplate } from '@elastic/eui'; -import React, { ComponentType } from 'react'; -import { MemoryRouter } from 'react-router-dom'; -import { CoreStart } from '@kbn/core/public'; -import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { PluginContext, PluginContextValue } from '../../context/plugin_context'; -import { LandingPage } from '.'; - -export default { - title: 'app/Landing', - component: LandingPage, - decorators: [ - (Story: ComponentType) => { - const KibanaReactContext = createKibanaReactContext({ - application: { getUrlForApp: () => '', navigateToUrl: () => {} }, - chrome: { docTitle: { change: () => {} }, setBreadcrumbs: () => {} }, - uiSettings: { get: () => true }, - observability: { ObservabilityPageTemplate: EuiPageTemplate }, - http: { - basePath: { - prepend: () => '', - }, - }, - docLinks: { - links: { - observability: { - guide: 'alink', - }, - }, - }, - } as unknown as Partial<CoreStart>); - - const pluginContextValue = { - appMountParameters: { setHeaderActionMenu: () => {} }, - ObservabilityPageTemplate: EuiPageTemplate, - } as unknown as PluginContextValue; - - return ( - <MemoryRouter> - <KibanaReactContext.Provider> - <PluginContext.Provider value={pluginContextValue}> - <Story /> - </PluginContext.Provider> - </KibanaReactContext.Provider> - </MemoryRouter> - ); - }, - ], -}; - -export function Example() { - return <LandingPage />; -} diff --git a/x-pack/plugins/observability/public/pages/landing/styles.scss b/x-pack/plugins/observability/public/pages/landing/styles.scss deleted file mode 100644 index 5364bf8d10b62..0000000000000 --- a/x-pack/plugins/observability/public/pages/landing/styles.scss +++ /dev/null @@ -1,12 +0,0 @@ -.obsLanding__appSection .euiFlexItem { - @include euiBreakpoint('xs', 's', 'm', 'l') { - // overrides .euiFlexItem flex basis - flex-basis: 100% !important; - } -} - -.obsLanding__title { - @include euiBreakpoint('m', 'l', 'xl') { - max-width: 50%; - } -} diff --git a/x-pack/plugins/observability/public/pages/overview/index.tsx b/x-pack/plugins/observability/public/pages/overview/index.tsx index dc0a6c9667400..3902a779d740f 100644 --- a/x-pack/plugins/observability/public/pages/overview/index.tsx +++ b/x-pack/plugins/observability/public/pages/overview/index.tsx @@ -35,10 +35,8 @@ import { useFetcher } from '../../hooks/use_fetcher'; import { useHasData } from '../../hooks/use_has_data'; import { usePluginContext } from '../../hooks/use_plugin_context'; import { useAlertIndexNames } from '../../hooks/use_alert_index_names'; -import { RouteParams } from '../../routes'; import { getNewsFeed } from '../../services/get_news_feed'; import { getBucketSize } from '../../utils/get_bucket_size'; -import { getNoDataConfig } from '../../utils/no_data_config'; import { DataSections } from './data_sections'; import { LoadingObservability } from './loading_observability'; import { AlertsTableTGrid } from '../alerts/containers/alerts_table_t_grid/alerts_table_t_grid'; @@ -53,10 +51,6 @@ import { useGuidedSetupProgress } from '../../hooks/use_guided_setup_progress'; export type BucketSize = ReturnType<typeof calculateBucketSize>; -interface Props { - routeParams: RouteParams<'/overview'>; -} - const CAPABILITIES_KEYS = ['logs', 'infrastructure', 'apm', 'uptime']; function calculateBucketSize({ start, end }: { start?: number; end?: number }) { @@ -68,7 +62,7 @@ function calculateBucketSize({ start, end }: { start?: number; end?: number }) { const ALERT_TABLE_STATE_STORAGE_KEY = 'xpack.observability.overview.alert.tableState'; const ALERTS_PER_PAGE = 10; -export function OverviewPage({ routeParams }: Props) { +export function OverviewPage() { const trackMetric = useUiTracker({ app: 'observability-overview' }); useTrackPageview({ app: 'observability-overview', path: 'overview' }); useTrackPageview({ app: 'observability-overview', path: 'overview', delay: 15000 }); @@ -84,7 +78,6 @@ export function OverviewPage({ routeParams }: Props) { const indexNames = useAlertIndexNames(); const { cases, - docLinks, http, application: { capabilities }, } = useKibana<ObservabilityAppServices>().services; @@ -94,7 +87,7 @@ export function OverviewPage({ routeParams }: Props) { const { data: newsFeed } = useFetcher(() => getNewsFeed({ http }), [http]); - const { hasAnyData, isAllRequestsComplete } = useHasData(); + const { hasAnyData } = useHasData(); const refetch = useRef<() => void>(); const [isGuidedSetupTourVisible, setGuidedSetupTourVisible] = useState(false); @@ -127,8 +120,7 @@ export function OverviewPage({ routeParams }: Props) { }, []); const CasesContext = cases.ui.getCasesContext(); - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); useEffect(() => { if (hasAnyData !== true) { @@ -148,96 +140,85 @@ export function OverviewPage({ routeParams }: Props) { return <LoadingObservability />; } - const hasData = hasAnyData === true || (isAllRequestsComplete === false ? undefined : false); - - const noDataConfig = getNoDataConfig({ - hasData, - basePath: http.basePath, - docsLink: docLinks.links.observability.guide, - }); - const alertsLink = paths.observability.alerts; return ( <ObservabilityPageTemplate - noDataConfig={noDataConfig} - isPageDataLoaded={Boolean(hasAnyData)} - pageHeader={ - hasData - ? { - children: ( - <PageHeader - showTour={isGuidedSetupTourVisible} - onTourDismiss={hideGuidedSetupTour} - handleGuidedSetupClick={handleGuidedSetupClick} - onTimeRangeRefresh={onTimeRangeRefresh} - /> - ), - } - : undefined - } - > - {hasData && ( - <> - <ObservabilityHeaderMenu /> - <ObservabilityStatusProgress - onViewDetailsClick={() => setIsFlyoutVisible(true)} - onDismissClick={() => setGuidedSetupTourVisible(true)} + // we force this to be true because we always want this page to load -- + // it has its own Guided Setup UX for users with no data + // see: https://github.com/elastic/observability-product/issues/199 + isPageDataLoaded={true} + pageHeader={{ + children: ( + <PageHeader + showTour={isGuidedSetupTourVisible} + onTourDismiss={hideGuidedSetupTour} + handleGuidedSetupClick={handleGuidedSetupClick} + onTimeRangeRefresh={onTimeRangeRefresh} /> - <EuiFlexGroup direction="column" gutterSize="s"> - <EuiFlexItem> - <SectionContainer - title={i18n.translate('xpack.observability.overview.alerts.title', { - defaultMessage: 'Alerts', - })} - hasError={false} - appLink={{ - href: alertsLink, - label: i18n.translate('xpack.observability.overview.alerts.appLink', { - defaultMessage: 'Show alerts', - }), - }} + ), + }} + > + <> + <ObservabilityHeaderMenu /> + <ObservabilityStatusProgress + onViewDetailsClick={() => setIsFlyoutVisible(true)} + onDismissClick={() => setGuidedSetupTourVisible(true)} + /> + <EuiFlexGroup direction="column" gutterSize="s"> + <EuiFlexItem> + <SectionContainer + initialIsOpen={hasAnyData} + title={i18n.translate('xpack.observability.overview.alerts.title', { + defaultMessage: 'Alerts', + })} + hasError={false} + appLink={{ + href: alertsLink, + label: i18n.translate('xpack.observability.overview.alerts.appLink', { + defaultMessage: 'Show alerts', + }), + }} + > + <CasesContext + owner={[observabilityFeatureId]} + permissions={userCasesPermissions} + features={{ alerts: { sync: false } }} > - <CasesContext - owner={[observabilityFeatureId]} - permissions={casesPermissions} - features={{ alerts: { sync: false } }} - > - <AlertsTableTGrid - setRefetch={setRefetch} - rangeFrom={relativeStart} - rangeTo={relativeEnd} - indexNames={indexNames} - itemsPerPage={ALERTS_PER_PAGE} - stateStorageKey={ALERT_TABLE_STATE_STORAGE_KEY} - storage={new Storage(window.localStorage)} - /> - </CasesContext> - </SectionContainer> - </EuiFlexItem> - <EuiFlexItem> - {/* Data sections */} - {hasAnyData && <DataSections bucketSize={bucketSize} />} - <EmptySections /> - </EuiFlexItem> - <EuiSpacer size="s" /> - </EuiFlexGroup> - <EuiHorizontalRule /> - <EuiFlexGroup> - <EuiFlexItem> - {/* Resources / What's New sections */} - <EuiFlexGroup> - <EuiFlexItem grow={4}> - {!!newsFeed?.items?.length && <NewsFeed items={newsFeed.items.slice(0, 3)} />} - </EuiFlexItem> - <EuiFlexItem grow={2}> - <Resources /> - </EuiFlexItem> - </EuiFlexGroup> - </EuiFlexItem> - </EuiFlexGroup> - </> - )} + <AlertsTableTGrid + setRefetch={setRefetch} + rangeFrom={relativeStart} + rangeTo={relativeEnd} + indexNames={indexNames} + itemsPerPage={ALERTS_PER_PAGE} + stateStorageKey={ALERT_TABLE_STATE_STORAGE_KEY} + storage={new Storage(window.localStorage)} + /> + </CasesContext> + </SectionContainer> + </EuiFlexItem> + <EuiFlexItem> + {/* Data sections */} + {<DataSections bucketSize={bucketSize} />} + <EmptySections /> + </EuiFlexItem> + <EuiSpacer size="s" /> + </EuiFlexGroup> + <EuiHorizontalRule /> + <EuiFlexGroup> + <EuiFlexItem> + {/* Resources / What's New sections */} + <EuiFlexGroup> + <EuiFlexItem grow={4}> + {!!newsFeed?.items?.length && <NewsFeed items={newsFeed.items.slice(0, 3)} />} + </EuiFlexItem> + <EuiFlexItem grow={2}> + <Resources /> + </EuiFlexItem> + </EuiFlexGroup> + </EuiFlexItem> + </EuiFlexGroup> + </> {isFlyoutVisible && ( <EuiFlyout size="s" diff --git a/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx b/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx index 92e19a28e3803..aab1663482636 100644 --- a/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx +++ b/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx @@ -228,7 +228,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: false, indices: 'heartbeat-*,synthetics-*' }), }); - return <OverviewPage routeParams={{ query: {} }} />; + return <OverviewPage />; }) .add('Single Panel', () => { registerDataHandler({ @@ -237,13 +237,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'test-index' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }) .add('Logs and Metrics', () => { registerDataHandler({ @@ -257,13 +251,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'metric-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }) .add( 'Logs, Metrics, and Alerts', @@ -279,13 +267,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'metric-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreWithAlerts } ) @@ -308,13 +290,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: sampleAPMIndices }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreWithAlerts } ) @@ -340,13 +316,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'heartbeat-*,synthetics-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }) .add( 'Logs, Metrics, APM, Uptime, and Alerts', @@ -372,13 +342,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'heartbeat-*,synthetics-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreWithAlerts } ) @@ -405,13 +369,7 @@ storiesOf('app/Overview', module) fetchData: fetchUptimeData, hasData: async () => ({ hasData: true, indices: 'heartbeat-*,synthetics-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreWithNewsFeed } ) @@ -437,13 +395,7 @@ storiesOf('app/Overview', module) hasData: async () => ({ hasData: true, indices: 'heartbeat-*,synthetics-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }) .add( 'Fetch Data with Error', @@ -476,13 +428,7 @@ storiesOf('app/Overview', module) }, hasData: async () => ({ hasData: true, indices: 'heartbeat-*,synthetics-*' }), }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreAlertsThrowsError } ) @@ -521,13 +467,7 @@ storiesOf('app/Overview', module) throw new Error('Error has data'); }, }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }, { core: coreWithAlerts } ) @@ -565,11 +505,5 @@ storiesOf('app/Overview', module) }, }); - return ( - <OverviewPage - routeParams={{ - query: { rangeFrom: '2020-06-27T22:00:00.000Z', rangeTo: '2020-06-30T21:59:59.999Z' }, - }} - /> - ); + return <OverviewPage />; }); diff --git a/x-pack/plugins/observability/public/pages/rule_details/index.tsx b/x-pack/plugins/observability/public/pages/rule_details/index.tsx index fe6439f718ab0..b99a20b8db07a 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/index.tsx +++ b/x-pack/plugins/observability/public/pages/rule_details/index.tsx @@ -15,20 +15,15 @@ import { EuiFlexGroup, EuiFlexItem, EuiFlyoutSize, - EuiButtonIcon, EuiPanel, - EuiTitle, EuiPopover, EuiTabbedContent, EuiEmptyPrompt, EuiSuperSelectOption, + EuiButton, } from '@elastic/eui'; import { - enableRule, - disableRule, - snoozeRule, - unsnoozeRule, deleteRules, useLoadRuleTypes, RuleType, @@ -60,7 +55,6 @@ export function RuleDetailsPage() { triggersActionsUi: { alertsTableConfigurationRegistry, ruleTypeRegistry, - getRuleStatusDropdown, getEditAlertFlyout, getRuleEventLogList, getAlertsStateTable, @@ -98,9 +92,10 @@ export function RuleDetailsPage() { loadNotifyWhenOption(); }, []); - const handleClosePopover = useCallback(() => setIsRuleEditPopoverOpen(false), []); + const togglePopover = () => + setIsRuleEditPopoverOpen((pervIsRuleEditPopoverOpen) => !pervIsRuleEditPopoverOpen); - const handleOpenPopover = useCallback(() => setIsRuleEditPopoverOpen(true), []); + const handleClosePopover = () => setIsRuleEditPopoverOpen(false); const handleRemoveRule = useCallback(() => { setIsRuleEditPopoverOpen(false); @@ -233,20 +228,6 @@ export function RuleDetailsPage() { ? ALERT_STATUS_LICENSE_ERROR : rulesStatusesTranslationsMapping[rule.executionStatus.status]; - const getRuleStatusComponent = () => - getRuleStatusDropdown({ - rule, - enableRule: async () => await enableRule({ http, id: rule.id }), - disableRule: async () => await disableRule({ http, id: rule.id }), - onRuleChanged: () => reloadRule(), - hideSnoozeOption: true, - isEditable: hasEditButton, - snoozeRule: async (snoozeSchedule) => { - await snoozeRule({ http, id: rule.id, snoozeSchedule }); - }, - unsnoozeRule: async (scheduleIds) => await unsnoozeRule({ http, id: rule.id, scheduleIds }), - }); - return ( <ObservabilityPageTemplate data-test-subj="ruleDetails" @@ -262,14 +243,17 @@ export function RuleDetailsPage() { isOpen={isRuleEditPopoverOpen} closePopover={handleClosePopover} button={ - <EuiButtonIcon - display="base" - size="m" - iconType="boxesHorizontal" - aria-label="More" - onClick={handleOpenPopover} - data-test-subj="moreButton" - /> + <EuiButton + fill + iconSide="right" + onClick={togglePopover} + iconType="arrowDown" + data-test-subj="actions" + > + {i18n.translate('xpack.observability.ruleDetails.actionsButtonLabel', { + defaultMessage: 'Actions', + })} + </EuiButton> } > <EuiFlexGroup direction="column" alignItems="flexStart"> @@ -305,17 +289,6 @@ export function RuleDetailsPage() { </EuiPopover> </EuiFlexItem> <EuiSpacer size="s" /> - <EuiFlexItem> - <EuiTitle size="xxs"> - <EuiFlexItem> - {i18n.translate('xpack.observability.ruleDetails.triggreAction.status', { - defaultMessage: 'Status', - })} - </EuiFlexItem> - </EuiTitle> - - {getRuleStatusComponent()} - </EuiFlexItem> </EuiFlexGroup>, ] : [], diff --git a/x-pack/plugins/observability/public/plugin.ts b/x-pack/plugins/observability/public/plugin.ts index 12821c8acb8fd..15cc0463feef3 100644 --- a/x-pack/plugins/observability/public/plugin.ts +++ b/x-pack/plugins/observability/public/plugin.ts @@ -300,11 +300,7 @@ export class Plugin }, createExploratoryViewUrl, getAppDataView: getAppDataView(pluginsStart.dataViews), - ExploratoryViewEmbeddable: getExploratoryViewEmbeddable( - coreStart.uiSettings, - pluginsStart.dataViews, - pluginsStart.lens - ), + ExploratoryViewEmbeddable: getExploratoryViewEmbeddable({ ...coreStart, ...pluginsStart }), useRulesLink: createUseRulesLink(), }; } diff --git a/x-pack/plugins/observability/public/routes/index.tsx b/x-pack/plugins/observability/public/routes/index.tsx index 867e44613e07c..bb442a59f1e23 100644 --- a/x-pack/plugins/observability/public/routes/index.tsx +++ b/x-pack/plugins/observability/public/routes/index.tsx @@ -7,12 +7,11 @@ import * as t from 'io-ts'; import React from 'react'; +import { useHistory } from 'react-router-dom'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { casesPath } from '../../common'; import { CasesPage } from '../pages/cases'; import { AlertsPage } from '../pages/alerts/containers/alerts_page'; -import { HomePage } from '../pages/home'; -import { LandingPage } from '../pages/landing'; import { OverviewPage } from '../pages/overview'; import { jsonRt } from './json_rt'; import { ObservabilityExploratoryView } from '../components/shared/exploratory_view/obsv_exploratory_view'; @@ -31,34 +30,34 @@ export interface Params { path?: t.HasProps; } +// Note: React Router DOM <Redirect> component was not working here +// so I've recreated this simple version for this purpose. +function SimpleRedirect({ to }: { to: string }) { + const history = useHistory(); + history.replace(to); + return null; +} + export const routes = { '/': { handler: () => { - return <HomePage />; + return <SimpleRedirect to="/overview" />; }, params: {}, exact: true, }, '/landing': { handler: () => { - return <LandingPage />; + return <SimpleRedirect to="/overview" />; }, params: {}, exact: true, }, '/overview': { handler: ({ query }: any) => { - return <OverviewPage routeParams={{ query }} />; - }, - params: { - query: t.partial({ - rangeFrom: t.string, - rangeTo: t.string, - refreshPaused: jsonRt.pipe(t.boolean), - refreshInterval: jsonRt.pipe(t.number), - alpha: jsonRt.pipe(t.boolean), - }), + return <OverviewPage />; }, + params: {}, exact: true, }, [casesPath]: { diff --git a/x-pack/plugins/observability/public/utils/cases_permissions.ts b/x-pack/plugins/observability/public/utils/cases_permissions.ts new file mode 100644 index 0000000000000..2b3ff9cfbaf54 --- /dev/null +++ b/x-pack/plugins/observability/public/utils/cases_permissions.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const noCasesPermissions = () => ({ + all: false, + create: false, + read: false, + update: false, + delete: false, + push: false, +}); diff --git a/x-pack/plugins/observability/scripts/storybook.js b/x-pack/plugins/observability/scripts/storybook.js index caa727596f2bd..c559e387cf090 100644 --- a/x-pack/plugins/observability/scripts/storybook.js +++ b/x-pack/plugins/observability/scripts/storybook.js @@ -7,7 +7,6 @@ import { join } from 'path'; -// eslint-disable-next-line require('@kbn/storybook').runStorybookCli({ name: 'observability', storyGlobs: [ diff --git a/x-pack/plugins/observability/server/plugin.ts b/x-pack/plugins/observability/server/plugin.ts index f1f58bd55b8f4..a5e530f6d6fbe 100644 --- a/x-pack/plugins/observability/server/plugin.ts +++ b/x-pack/plugins/observability/server/plugin.ts @@ -14,6 +14,7 @@ import { } from '@kbn/core/server'; import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; import { PluginSetupContract as FeaturesSetup } from '@kbn/features-plugin/server'; +import { createUICapabilities } from '@kbn/cases-plugin/common'; import { ObservabilityConfig } from '.'; import { bootstrapAnnotations, @@ -40,6 +41,8 @@ export class ObservabilityPlugin implements Plugin<ObservabilityPluginSetup> { public setup(core: CoreSetup, plugins: PluginSetup) { const config = this.initContext.config.get<ObservabilityConfig>(); + const casesCapabilities = createUICapabilities(); + plugins.features.registerKibanaFeature({ id: casesFeatureId, name: i18n.translate('xpack.observability.featureRegistry.linkObservabilityTitle', { @@ -55,14 +58,17 @@ export class ObservabilityPlugin implements Plugin<ObservabilityPluginSetup> { app: [casesFeatureId, 'kibana'], catalogue: [observabilityFeatureId], cases: { - all: [observabilityFeatureId], + create: [observabilityFeatureId], + read: [observabilityFeatureId], + update: [observabilityFeatureId], + push: [observabilityFeatureId], }, api: [], savedObject: { all: [], read: [], }, - ui: ['crud_cases', 'read_cases'], // uiCapabilities[casesFeatureId].crud_cases or read_cases + ui: casesCapabilities.all, }, read: { app: [casesFeatureId, 'kibana'], @@ -75,9 +81,42 @@ export class ObservabilityPlugin implements Plugin<ObservabilityPluginSetup> { all: [], read: [], }, - ui: ['read_cases'], // uiCapabilities[uiCapabilities[casesFeatureId]].read_cases + ui: casesCapabilities.read, }, }, + subFeatures: [ + { + name: i18n.translate('xpack.observability.featureRegistry.deleteSubFeatureName', { + defaultMessage: 'Delete', + }), + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + api: [], + id: 'cases_delete', + name: i18n.translate( + 'xpack.observability.featureRegistry.deleteSubFeatureDetails', + { + defaultMessage: 'Delete cases and comments', + } + ), + includeIn: 'all', + savedObject: { + all: [], + read: [], + }, + cases: { + delete: [observabilityFeatureId], + }, + ui: casesCapabilities.delete, + }, + ], + }, + ], + }, + ], }); let annotationsApiPromise: Promise<AnnotationsAPI> | undefined; diff --git a/x-pack/plugins/observability/server/ui_settings.ts b/x-pack/plugins/observability/server/ui_settings.ts index 827a0205512e0..90258d850e965 100644 --- a/x-pack/plugins/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability/server/ui_settings.ts @@ -19,6 +19,7 @@ import { enableServiceGroups, apmServiceInventoryOptimizedSorting, enableNewSyntheticsView, + apmServiceGroupMaxNumberOfServices, apmTraceExplorerTab, apmOperationsTab, } from '../common/ui_settings_keys'; @@ -189,6 +190,17 @@ export const uiSettings: Record<string, UiSettingsParams<boolean | number | stri requiresPageReload: false, type: 'boolean', }, + [apmServiceGroupMaxNumberOfServices]: { + category: [observabilityFeatureId], + name: i18n.translate('xpack.observability.serviceGroupMaxServicesUiSettingName', { + defaultMessage: 'Maximum services in a service group', + }), + value: 500, + description: i18n.translate('xpack.observability.serviceGroupMaxServicesUiSettingDescription', { + defaultMessage: 'Limit the number of services in a given service group', + }), + schema: schema.number({ min: 1 }), + }, [apmTraceExplorerTab]: { category: [observabilityFeatureId], name: i18n.translate('xpack.observability.apmTraceExplorerTab', { diff --git a/x-pack/plugins/osquery/cypress/support/coverage.ts b/x-pack/plugins/osquery/cypress/support/coverage.ts index 35f4381430183..65975f65af24f 100644 --- a/x-pack/plugins/osquery/cypress/support/coverage.ts +++ b/x-pack/plugins/osquery/cypress/support/coverage.ts @@ -5,7 +5,7 @@ * 2.0. */ -/* eslint-disable */ +/* eslint-disable prettier/prettier,no-console,@typescript-eslint/ban-ts-comment,@typescript-eslint/no-var-requires,import/no-extraneous-dependencies,padding-line-between-statements */ // / <reference types="cypress" /> // @ts-check diff --git a/x-pack/plugins/remote_clusters/__jest__/client_integration/list/remote_clusters_list.helpers.js b/x-pack/plugins/remote_clusters/__jest__/client_integration/list/remote_clusters_list.helpers.js index f3f25afee3bd7..898426846cd3e 100644 --- a/x-pack/plugins/remote_clusters/__jest__/client_integration/list/remote_clusters_list.helpers.js +++ b/x-pack/plugins/remote_clusters/__jest__/client_integration/list/remote_clusters_list.helpers.js @@ -24,7 +24,7 @@ const testBedConfig = { export const setup = async (httpSetup, overrides) => { const initTestBed = registerTestBed( // ESlint cannot figure out that the hoc should start with a capital leter. - // eslint-disable-next-line + // eslint-disable-next-line new-cap WithAppDependencies(RemoteClusterList, httpSetup, overrides), testBedConfig ); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts index 3f9143ac7922b..bf3e1e9d91994 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts @@ -14,8 +14,7 @@ import { } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts index 00c034b980109..bdb278cb2a3ba 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts @@ -13,8 +13,7 @@ import { } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts index a9bfe02443f73..58a9e2cec235f 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts @@ -14,8 +14,7 @@ import { } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts index 785926656b825..ef2cc30c891e7 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts @@ -13,8 +13,7 @@ import { } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; diff --git a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/__jest__/fixtures/normalize_indices.ts b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/__jest__/fixtures/normalize_indices.ts index bd8e44d82379b..747a544dc7821 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/__jest__/fixtures/normalize_indices.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/__jest__/fixtures/normalize_indices.ts @@ -1,4 +1,10 @@ -/*eslint-disable */ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + export const inputIndices = JSON.parse( '{"test":{"shards":[{"id":["F-R7QxH4S42fMnPfmFUKMQ","test","0"],"searches":[{"query":null,"rewrite_time":2656,"collector":[{"name":"MultiCollector","reason":"search_multi","time":"0.1815780000ms","children":[{"name":"SimpleTopScoreDocCollector","reason":"search_top_hits","time":"0.02393700000ms"},{"name":"ProfilingAggregator: [org.elasticsearch.search.profile.aggregation.ProfilingAggregator@43c8a536]","reason":"aggregation","time":"0.1140000000ms"}]}],"flat":[{"id":"af697413-f76b-458e-b265-f4930dbdee2a","childrenIds":[],"lucene":"name:george","time":0.219343,"selfTime":0.219343,"timePercentage":"100.00","query_type":"TermQuery","absoluteColor":"#ffafaf","depth":0,"breakdown":[{"key":"create_weight","time":160673,"relative":"73.3","color":"#fcc2c2","tip":"The time taken to create the Weight object, which holds temporary information during scoring."},{"key":"build_scorer","time":50157,"relative":"22.9","color":"#f7e5e5","tip":"The time taken to create the Scoring object, which is later used to execute the actual scoring of each doc."},{"key":"score","time":5783,"relative":"2.6","color":"#f5f3f3","tip":"The time taken in actually scoring the document against the query."},{"key":"next_doc","time":2718,"relative":"1.2","color":"#f5f4f4","tip":"The time taken to advance the iterator to the next matching document."},{"key":"build_scorer_count","time":5,"relative":0,"color":"#f5f5f5","tip":""},{"key":"next_doc_count","time":4,"relative":0,"color":"#f5f5f5","tip":""},{"key":"score_count","time":2,"relative":0,"color":"#f5f5f5","tip":""},{"key":"create_weight_count","time":1,"relative":0,"color":"#f5f5f5","tip":""},{"key":"match","time":0,"relative":"0.0","color":"#f5f5f5","tip":"The time taken to execute a secondary, more precise scoring phase (used by phrase queries)."},{"key":"match_count","time":0,"relative":0,"color":"#f5f5f5","tip":""},{"key":"advance","time":0,"relative":"0.0","color":"#f5f5f5","tip":"The time taken to advance the iterator to the next document."},{"key":"advance_count","time":0,"relative":0,"color":"#f5f5f5","tip":""}]}]}],"aggregations":[{"type":"org.elasticsearch.search.aggregations.metrics.stats.StatsAggregator","description":"stats","time":"0.03053500000ms","breakdown":{"reduce":0,"build_aggregation":9447,"build_aggregation_count":1,"initialize":5589,"initialize_count":1,"reduce_count":0,"collect":15495,"collect_count":2}}],"time":0.219343,"color":0,"relative":0,"rewrite_time":2656}],"time":0.219343,"name":"test"}}' ); diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 86793045ad0cd..07731d26f7d18 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -443,3 +443,12 @@ export const RULES_MANAGEMENT_FEATURE_TOUR_STORAGE_KEY = export const RULE_DETAILS_EXECUTION_LOG_TABLE_SHOW_METRIC_COLUMNS_STORAGE_KEY = 'securitySolution.ruleDetails.ruleExecutionLog.showMetrics.v8.2'; + +/** + * Error codes that can be thrown during _bulk_action API dry_run call and be processed and displayed to end user + */ +export enum BulkActionsDryRunErrCode { + IMMUTABLE = 'IMMUTABLE', + MACHINE_LEARNING_AUTH = 'MACHINE_LEARNING_AUTH', + MACHINE_LEARNING_INDEX_PATTERN = 'MACHINE_LEARNING_INDEX_PATTERN', +} diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.ts index 641c4858df472..fa33e75e236fd 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.ts @@ -37,4 +37,10 @@ export const performBulkActionSchema = t.intersection([ ]), ]); +export const performBulkActionQuerySchema = t.exact( + t.partial({ + dry_run: t.union([t.literal('true'), t.literal('false')]), + }) +); + export type PerformBulkActionSchema = t.TypeOf<typeof performBulkActionSchema>; diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index d1a6348204a5d..b9bcdb3f27927 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -37,7 +37,7 @@ export const allowedExperimentalValues = Object.freeze({ /** * Enables the Endpoint response actions console in various areas of the app */ - responseActionsConsoleEnabled: false, + responseActionsConsoleEnabled: true, /** * Enables the cloud security posture navigation inside the security solution */ diff --git a/x-pack/plugins/security_solution/common/field_maps/field_names.ts b/x-pack/plugins/security_solution/common/field_maps/field_names.ts index 29ed0f5985ec5..ce2a78dc31e60 100644 --- a/x-pack/plugins/security_solution/common/field_maps/field_names.ts +++ b/x-pack/plugins/security_solution/common/field_maps/field_names.ts @@ -14,6 +14,10 @@ export const ALERT_GROUP_ID = `${ALERT_NAMESPACE}.group.id` as const; export const ALERT_GROUP_INDEX = `${ALERT_NAMESPACE}.group.index` as const; export const ALERT_ORIGINAL_TIME = `${ALERT_NAMESPACE}.original_time` as const; export const ALERT_THRESHOLD_RESULT = `${ALERT_NAMESPACE}.threshold_result` as const; +export const ALERT_THRESHOLD_RESULT_CARDINALITY = `${ALERT_THRESHOLD_RESULT}.cardinality` as const; +export const ALERT_THRESHOLD_RESULT_COUNT = `${ALERT_THRESHOLD_RESULT}.count` as const; +export const ALERT_THRESHOLD_RESULT_FROM = `${ALERT_THRESHOLD_RESULT}.from` as const; +export const ALERT_THRESHOLD_RESULT_TERMS = `${ALERT_THRESHOLD_RESULT}.terms` as const; export const ALERT_ORIGINAL_EVENT = `${ALERT_NAMESPACE}.original_event` as const; export const ALERT_ORIGINAL_EVENT_ACTION = `${ALERT_ORIGINAL_EVENT}.action` as const; diff --git a/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts index a33e7f9bd295c..b19a4eb6b4501 100644 --- a/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts @@ -6,7 +6,7 @@ */ import type { TestCaseWithoutTimeline } from '../../objects/case'; -import { ALL_CASES_NAME } from '../../screens/all_cases'; +import { ALL_CASES_CREATE_NEW_CASE_BTN, ALL_CASES_NAME } from '../../screens/all_cases'; import { goToCreateNewCase } from '../../tasks/all_cases'; import { cleanKibana, deleteCases } from '../../tasks/common'; @@ -31,12 +31,21 @@ import { secAllUser, secReadCasesAllUser, secReadCasesAll, + secAllCasesNoDelete, + secAllCasesNoDeleteUser, + secAllCasesOnlyReadDeleteUser, + secAllCasesOnlyReadDelete, } from '../../tasks/privileges'; import { CASES_URL } from '../../urls/navigation'; import { openSourcerer } from '../../tasks/sourcerer'; -const usersToCreate = [secAllUser, secReadCasesAllUser]; -const rolesToCreate = [secAll, secReadCasesAll]; +const usersToCreate = [ + secAllUser, + secReadCasesAllUser, + secAllCasesNoDeleteUser, + secAllCasesOnlyReadDeleteUser, +]; +const rolesToCreate = [secAll, secReadCasesAll, secAllCasesNoDelete, secAllCasesOnlyReadDelete]; // needed to generate index pattern const visitSecuritySolution = () => { visitHostDetailsPage(); @@ -51,6 +60,7 @@ const testCase: TestCaseWithoutTimeline = { reporter: 'elastic', owner: 'securitySolution', }; + describe('Cases privileges', () => { before(() => { cleanKibana(); @@ -67,7 +77,7 @@ describe('Cases privileges', () => { deleteCases(); }); - for (const user of [secAllUser, secReadCasesAllUser]) { + for (const user of [secAllUser, secReadCasesAllUser, secAllCasesNoDeleteUser]) { it(`User ${user.username} with role(s) ${user.roles.join()} can create a case`, () => { loginWithUser(user); visitWithUser(CASES_URL, user); @@ -80,4 +90,12 @@ describe('Cases privileges', () => { cy.get(ALL_CASES_NAME).should('have.text', testCase.name); }); } + + for (const user of [secAllCasesOnlyReadDeleteUser]) { + it(`User ${user.username} with role(s) ${user.roles.join()} cannot create a case`, () => { + loginWithUser(user); + visitWithUser(CASES_URL, user); + cy.get(ALL_CASES_CREATE_NEW_CASE_BTN).should('not.exist'); + }); + } }); diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/bulk_edit_rules.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/bulk_edit_rules.spec.ts index d9dddd3d54549..d5368f2bc665c 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/bulk_edit_rules.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/bulk_edit_rules.spec.ts @@ -43,7 +43,8 @@ import { waitForBulkEditActionToFinish, confirmBulkEditForm, clickAddIndexPatternsMenuItem, - waitForElasticRulesBulkEditModal, + checkElasticRulesCannotBeModified, + checkMachineLearningRulesCannotBeModified, waitForMixedRulesBulkEditModal, openBulkEditAddTagsForm, openBulkEditDeleteTagsForm, @@ -54,7 +55,7 @@ import { hasIndexPatterns } from '../../tasks/rule_details'; import { login, visitWithoutDateRange } from '../../tasks/login'; import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; -import { createCustomRule } from '../../tasks/api_calls/rules'; +import { createCustomRule, createMachineLearningRule } from '../../tasks/api_calls/rules'; import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; import { getExistingRule, @@ -62,6 +63,7 @@ import { getNewRule, getNewThresholdRule, totalNumberOfPrebuiltRules, + getMachineLearningRule, } from '../../objects/rule'; import { esArchiverResetKibana } from '../../tasks/es_archiver'; @@ -78,6 +80,10 @@ const customRule = { name: RULE_NAME, }; +const expectedNumberOfCustomRulesToBeEdited = 6; +const expectedNumberOfMachineLearningRulesToBeEdited = 1; +const numberOfRulesPerPage = 5; + describe('Detection rules, bulk edit', () => { before(() => { cleanKibana(); @@ -96,7 +102,9 @@ describe('Detection rules, bulk edit', () => { waitForRulesTableToBeLoaded(); }); - it('should show modal windows when Elastic rules selected and edit only custom rules', () => { + it('should show warning modal windows when some of the selected rules cannot be edited', () => { + createMachineLearningRule(getMachineLearningRule(), '7'); + cy.get(LOAD_PREBUILT_RULES_ON_PAGE_HEADER_BTN) .pipe(($el) => $el.trigger('click')) .should('not.exist'); @@ -107,17 +115,25 @@ describe('Detection rules, bulk edit', () => { waitForRulesTableToBeRefreshed(); // check modal window for few selected rules - selectNumberOfRules(5); + selectNumberOfRules(numberOfRulesPerPage); clickAddIndexPatternsMenuItem(); - waitForElasticRulesBulkEditModal(5); + checkElasticRulesCannotBeModified(numberOfRulesPerPage); cy.get(MODAL_CONFIRMATION_BTN).click(); - // Select Elastic rules and custom rules, check mixed rules warning modal window, proceed with editing custom rules + // Select all rules(Elastic rules and custom) cy.get(ELASTIC_RULES_BTN).click(); selectAllRules(); clickAddIndexPatternsMenuItem(); - waitForMixedRulesBulkEditModal(totalNumberOfPrebuiltRules, 6); - cy.get(MODAL_CONFIRMATION_BTN).should('have.text', 'Edit custom rules').click(); + waitForMixedRulesBulkEditModal(expectedNumberOfCustomRulesToBeEdited); + + // check rules that cannot be edited for index patterns: immutable and ML + checkElasticRulesCannotBeModified(totalNumberOfPrebuiltRules); + checkMachineLearningRulesCannotBeModified(expectedNumberOfMachineLearningRulesToBeEdited); + + // proceed with custom rule editing + cy.get(MODAL_CONFIRMATION_BTN) + .should('have.text', `Edit ${expectedNumberOfCustomRulesToBeEdited} Custom rules`) + .click(); typeIndexPatterns([CUSTOM_INDEX_PATTERN_1]); confirmBulkEditForm(); @@ -132,15 +148,15 @@ describe('Detection rules, bulk edit', () => { it('should add/delete/overwrite index patterns in rules', () => { cy.log('Adds index patterns'); - // Switch to 5 rules per page, so we can edit all existing rules, not only ones on a page + // Switch to 5(numberOfRulesPerPage) rules per page, so we can edit all existing rules, not only ones on a page // this way we will use underlying bulk edit API with query parameter, which update all rules based on query search results - changeRowsPerPageTo(5); + changeRowsPerPageTo(numberOfRulesPerPage); selectAllRules(); openBulkEditAddIndexPatternsForm(); typeIndexPatterns([CUSTOM_INDEX_PATTERN_1]); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); // check if rule has been updated changeRowsPerPageTo(20); @@ -155,7 +171,7 @@ describe('Detection rules, bulk edit', () => { openBulkEditDeleteIndexPatternsForm(); typeIndexPatterns([CUSTOM_INDEX_PATTERN_1]); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); // check if rule has been updated goToTheRuleDetailsOf(RULE_NAME); @@ -170,11 +186,11 @@ describe('Detection rules, bulk edit', () => { .click(); cy.get(RULES_BULK_EDIT_INDEX_PATTERNS_WARNING).should( 'have.text', - 'You’re about to overwrite index patterns for 6 selected rules, press Save to apply changes.' + `You’re about to overwrite index patterns for ${expectedNumberOfCustomRulesToBeEdited} selected rules, press Save to apply changes.` ); typeIndexPatterns(OVERWRITE_INDEX_PATTERNS); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); // check if rule has been updated goToTheRuleDetailsOf(RULE_NAME); @@ -183,16 +199,16 @@ describe('Detection rules, bulk edit', () => { it('should add/delete/overwrite tags in rules', () => { cy.log('Add tags to all rules'); - // Switch to 5 rules per page, so we can edit all existing rules, not only ones on a page + // Switch to 5(numberOfRulesPerPage) rules per page, so we can edit all existing rules, not only ones on a page // this way we will use underlying bulk edit API with query parameter, which update all rules based on query search results - changeRowsPerPageTo(5); + changeRowsPerPageTo(numberOfRulesPerPage); selectAllRules(); // open add tags form and add 2 new tags openBulkEditAddTagsForm(); typeTags(TAGS); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); // check if all rules have been updated with new tags changeRowsPerPageTo(20); @@ -208,7 +224,7 @@ describe('Detection rules, bulk edit', () => { openBulkEditDeleteTagsForm(); typeTags([TAGS[0]]); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); testAllTagsBadges(TAGS.slice(1)); cy.get(RULES_TAGS_FILTER_BTN).contains(/Tags1/); @@ -220,11 +236,11 @@ describe('Detection rules, bulk edit', () => { .click(); cy.get(RULES_BULK_EDIT_TAGS_WARNING).should( 'have.text', - 'You’re about to overwrite tags for 6 selected rules, press Save to apply changes.' + `You’re about to overwrite tags for ${expectedNumberOfCustomRulesToBeEdited} selected rules, press Save to apply changes.` ); typeTags(['overwrite-tag']); confirmBulkEditForm(); - waitForBulkEditActionToFinish({ rulesCount: 6 }); + waitForBulkEditActionToFinish({ rulesCount: expectedNumberOfCustomRulesToBeEdited }); testAllTagsBadges(['overwrite-tag']); }); @@ -232,7 +248,7 @@ describe('Detection rules, bulk edit', () => { it('should not lose rules selection after edit action', () => { const rulesCount = 4; // Switch to 5 rules per page, to have few pages in pagination(ideal way to test auto refresh and selection of few items) - changeRowsPerPageTo(5); + changeRowsPerPageTo(numberOfRulesPerPage); selectNumberOfRules(rulesCount); // open add tags form and add 2 new tags diff --git a/x-pack/plugins/security_solution/cypress/objects/rule.ts b/x-pack/plugins/security_solution/cypress/objects/rule.ts index 2e33c8d1c94bd..4ed06d9b25151 100644 --- a/x-pack/plugins/security_solution/cypress/objects/rule.ts +++ b/x-pack/plugins/security_solution/cypress/objects/rule.ts @@ -89,7 +89,7 @@ export interface ThreatIndicatorRule extends CustomRule { export interface MachineLearningRule { machineLearningJobs: string[]; - anomalyScoreThreshold: string; + anomalyScoreThreshold: number; name: string; description: string; severity: string; @@ -102,6 +102,7 @@ export interface MachineLearningRule { note: string; runsEvery: Interval; lookBack: Interval; + interval?: string; } export const getIndexPatterns = (): string[] => [ @@ -326,7 +327,7 @@ export const getMachineLearningRule = (): MachineLearningRule => ({ 'v3_linux_anomalous_process_all_hosts', 'v3_linux_anomalous_network_activity', ], - anomalyScoreThreshold: '20', + anomalyScoreThreshold: 20, name: 'New ML Rule Test', description: 'The new ML rule description.', severity: 'Critical', diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts index 829870fd35f5b..88616063c6c36 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts @@ -5,7 +5,28 @@ * 2.0. */ -import type { CustomRule, ThreatIndicatorRule } from '../../objects/rule'; +import type { CustomRule, ThreatIndicatorRule, MachineLearningRule } from '../../objects/rule'; + +export const createMachineLearningRule = (rule: MachineLearningRule, ruleId = 'ml_rule_testing') => + cy.request({ + method: 'POST', + url: 'api/detection_engine/rules', + body: { + rule_id: ruleId, + risk_score: parseInt(rule.riskScore, 10), + description: rule.description, + interval: rule.interval, + name: rule.name, + severity: rule.severity.toLocaleLowerCase(), + type: 'machine_learning', + from: 'now-50000h', + enabled: false, + machine_learning_job_id: rule.machineLearningJobs, + anomaly_threshold: rule.anomalyScoreThreshold, + }, + headers: { 'kbn-xsrf': 'cypress-creds' }, + failOnStatusCode: false, + }); export const createCustomRule = (rule: CustomRule, ruleId = 'rule_testing', interval = '100m') => cy.request({ diff --git a/x-pack/plugins/security_solution/cypress/tasks/privileges.ts b/x-pack/plugins/security_solution/cypress/tasks/privileges.ts index bd6bb80d2edb6..bd55745200b4f 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/privileges.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/privileges.ts @@ -110,6 +110,68 @@ export const secReadCasesAllUser: User = { roles: [secReadCasesAll.name], }; +export const secAllCasesOnlyReadDelete: Role = { + name: 'sec_all_cases_only_read_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['cases_read', 'cases_delete'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAllCasesOnlyReadDeleteUser: User = { + username: 'sec_all_cases_only_read_delete_user', + password: 'password', + roles: [secAllCasesOnlyReadDelete.name], +}; + +export const secAllCasesNoDelete: Role = { + name: 'sec_all_cases_no_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['minimal_all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAllCasesNoDeleteUser: User = { + username: 'sec_all_cases_no_delete_user', + password: 'password', + roles: [secAllCasesNoDelete.name], +}; + const getUserInfo = (user: User): UserInfo => ({ username: user.username, full_name: user.username.replace('_', ' '), diff --git a/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts b/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts index 387fe63cad9cb..0b38036a4fb9d 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts @@ -78,27 +78,24 @@ export const waitForBulkEditActionToFinish = ({ rulesCount }: { rulesCount: numb }; export const waitForElasticRulesBulkEditModal = (rulesCount: number) => { - cy.get(MODAL_CONFIRMATION_TITLE).should( - 'have.text', - `${rulesCount} Elastic rules cannot be edited` - ); - cy.get(MODAL_CONFIRMATION_BODY).should( - 'have.text', - 'Elastic rules are not modifiable. The update action will only be applied to Custom rules.' + cy.get(MODAL_CONFIRMATION_TITLE).should('have.text', `${rulesCount} rules cannot be edited`); +}; + +export const checkElasticRulesCannotBeModified = (rulesCount: number) => { + cy.get(MODAL_CONFIRMATION_BODY).contains( + `${rulesCount} prebuilt Elastic rules (editing prebuilt rules is not supported)` ); }; -export const waitForMixedRulesBulkEditModal = ( - elasticRulesCount: number, - customRulesCount: number -) => { - cy.get(MODAL_CONFIRMATION_TITLE).should( - 'have.text', - `${elasticRulesCount} Elastic rules cannot be edited` +export const checkMachineLearningRulesCannotBeModified = (rulesCount: number) => { + cy.get(MODAL_CONFIRMATION_BODY).contains( + `${rulesCount} custom Machine Learning rule (these rules don't have index patterns)` ); +}; - cy.get(MODAL_CONFIRMATION_BODY).should( +export const waitForMixedRulesBulkEditModal = (customRulesCount: number) => { + cy.get(MODAL_CONFIRMATION_TITLE).should( 'have.text', - `The update action will only be applied to ${customRulesCount} Custom rules you've selected.` + `The action will only be applied to ${customRulesCount} Custom rules you've selected` ); }; diff --git a/x-pack/plugins/security_solution/public/app/app.tsx b/x-pack/plugins/security_solution/public/app/app.tsx index 74aaa25f615fa..990c089a35fc1 100644 --- a/x-pack/plugins/security_solution/public/app/app.tsx +++ b/x-pack/plugins/security_solution/public/app/app.tsx @@ -57,8 +57,7 @@ const StartAppComponent: FC<StartAppComponent> = ({ cases, } = useKibana().services; const [darkMode] = useUiSetting$<boolean>(DEFAULT_DARK_MODE); - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); const CasesContext = cases.ui.getCasesContext(); return ( <EuiErrorBoundary> @@ -71,7 +70,7 @@ const StartAppComponent: FC<StartAppComponent> = ({ <UserPrivilegesProvider kibanaCapabilities={capabilities}> <ManageUserInfo> <ReactQueryClientProvider> - <CasesContext owner={[APP_ID]} permissions={casesPermissions}> + <CasesContext owner={[APP_ID]} permissions={userCasesPermissions}> <PageRouter history={history} onAppLeave={onAppLeave} diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts index 2e829e87c1490..8b6db14e78986 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { getDeepLinks } from '.'; +import { getDeepLinks, hasFeaturesCapability } from '.'; import type { AppDeepLink, Capabilities } from '@kbn/core/public'; import { SecurityPageName } from '../types'; import { mockGlobalState } from '../../common/mock'; import { CASES_FEATURE_ID, SERVER_APP_ID } from '../../../common/constants'; +import { createCapabilities } from '../../common/links/test_utils'; const findDeepLink = (id: string, deepLinks: AppDeepLink[]): AppDeepLink | null => deepLinks.reduce((deepLinkFound: AppDeepLink | null, deepLink) => { @@ -28,6 +29,14 @@ const basicLicense = 'basic'; const platinumLicense = 'platinum'; describe('deepLinks', () => { + describe('hasFeaturesCapability', () => { + it('returns true when features is undefined', () => { + expect( + hasFeaturesCapability(undefined, createCapabilities({ siem: { show: true } })) + ).toBeTruthy(); + }); + }); + it('should return a all basic license deep links in the premium deep links', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, basicLicense); const platinumLinks = getDeepLinks(mockGlobalState.app.enableExperimental, platinumLicense); @@ -68,7 +77,7 @@ describe('deepLinks', () => { it('should return case links for basic license with only read_cases capabilities', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, basicLicense, { - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: { read_cases: true }, [SERVER_APP_ID]: { show: true }, } as unknown as Capabilities); expect(findDeepLink(SecurityPageName.case, basicLinks)).toBeTruthy(); @@ -76,15 +85,21 @@ describe('deepLinks', () => { it('should return case links with NO deepLinks for basic license with only read_cases capabilities', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, basicLicense, { - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: { read_cases: true }, [SERVER_APP_ID]: { show: true }, } as unknown as Capabilities); expect(findDeepLink(SecurityPageName.case, basicLinks)?.deepLinks?.length === 0).toBeTruthy(); }); - it('should return case links with deepLinks for basic license with crud_cases capabilities', () => { + it('should return case links with deepLinks for basic license with permissive capabilities', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, basicLicense, { - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: { + create_cases: true, + read_cases: true, + update_cases: true, + delete_cases: true, + push_cases: true, + }, [SERVER_APP_ID]: { show: true }, } as unknown as Capabilities); @@ -93,17 +108,29 @@ describe('deepLinks', () => { ).toBeTruthy(); }); - it('should return case links with deepLinks for basic license with crud_cases capabilities and security disabled', () => { + it('should return case links with deepLinks for basic license with permissive capabilities and security disabled', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, platinumLicense, { - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: { + create_cases: true, + read_cases: true, + update_cases: true, + delete_cases: true, + push_cases: true, + }, [SERVER_APP_ID]: { show: false }, } as unknown as Capabilities); expect(findDeepLink(SecurityPageName.case, basicLinks)).toBeTruthy(); }); - it('should return NO case links for basic license with NO read_cases capabilities', () => { + it('should return NO case links for basic license with NO cases capabilities', () => { const basicLinks = getDeepLinks(mockGlobalState.app.enableExperimental, basicLicense, { - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: { + create_cases: false, + read_cases: false, + update_cases: false, + delete_cases: false, + push_cases: false, + }, [SERVER_APP_ID]: { show: true }, } as unknown as Capabilities); expect(findDeepLink(SecurityPageName.case, basicLinks)).toBeFalsy(); diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.ts index c6745b4f9b614..2060d21baaf9c 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.ts @@ -7,9 +7,15 @@ import { i18n } from '@kbn/i18n'; -import { get } from 'lodash'; import type { LicenseType } from '@kbn/licensing-plugin/common/types'; import { getCasesDeepLinks } from '@kbn/cases-plugin/public'; +import { + CREATE_CASES_CAPABILITY, + DELETE_CASES_CAPABILITY, + PUSH_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from '@kbn/cases-plugin/common'; import type { AppDeepLink, AppUpdater, Capabilities } from '@kbn/core/public'; import { AppNavLinkStatus } from '@kbn/core/public'; import type { Subject, Subscription } from 'rxjs'; @@ -65,20 +71,36 @@ import { RESPONSE_ACTIONS_PATH, } from '../../../common/constants'; import type { ExperimentalFeatures } from '../../../common/experimental_features'; -import { subscribeAppLinks } from '../../common/links'; +import { hasCapabilities, subscribeAppLinks } from '../../common/links'; import type { AppLinkItems } from '../../common/links/types'; -const FEATURE = { +export const FEATURE = { general: `${SERVER_APP_ID}.show`, - casesRead: `${CASES_FEATURE_ID}.read_cases`, - casesCrud: `${CASES_FEATURE_ID}.crud_cases`, + casesCreate: `${CASES_FEATURE_ID}.${CREATE_CASES_CAPABILITY}`, + casesRead: `${CASES_FEATURE_ID}.${READ_CASES_CAPABILITY}`, + casesUpdate: `${CASES_FEATURE_ID}.${UPDATE_CASES_CAPABILITY}`, + casesDelete: `${CASES_FEATURE_ID}.${DELETE_CASES_CAPABILITY}`, + casesPush: `${CASES_FEATURE_ID}.${PUSH_CASES_CAPABILITY}`, } as const; -type Feature = typeof FEATURE[keyof typeof FEATURE]; +type FeatureKey = typeof FEATURE[keyof typeof FEATURE]; + +/** + * The format of defining features supports OR and AND mechanism. To specify features in an OR fashion + * they can be defined in a single level array like: [requiredFeature1, requiredFeature2]. If either of these features + * is satisfied the deeplinks would be included. To require that the features be AND'd together a second level array + * can be specified: [feature1, [feature2, feature3]] this would result in feature1 || (feature2 && feature3). To specify + * features that all must be and'd together an example would be: [[feature1, feature2]], this would result in the boolean + * operation feature1 && feature2. + * + * The final format is to specify a single feature, this would be like: features: feature1, which is the same as + * features: [feature1] + */ +type Features = FeatureKey | Array<FeatureKey | FeatureKey[]>; type SecuritySolutionDeepLink = AppDeepLink & { isPremium?: boolean; - features?: Feature[]; + features?: Features; /** * Displays deep link when feature flag is enabled. */ @@ -417,11 +439,11 @@ export const securitySolutionsDeepLinks: SecuritySolutionDeepLink[] = [ features: [FEATURE.casesRead], }, [SecurityPageName.caseConfigure]: { - features: [FEATURE.casesCrud], + features: [FEATURE.casesUpdate], isPremium: true, }, [SecurityPageName.caseCreate]: { - features: [FEATURE.casesCrud], + features: [FEATURE.casesCreate], }, }, }), @@ -525,14 +547,15 @@ export function getDeepLinks( return filterDeepLinks(securitySolutionsDeepLinks); } -function hasFeaturesCapability( - features: Feature[] | undefined, +export function hasFeaturesCapability( + features: Features | undefined, capabilities: Capabilities ): boolean { if (!features) { return true; } - return features.some((featureKey) => get(capabilities, featureKey, false)); + + return hasCapabilities(features, capabilities); } export function isPremiumLicense(licenseType?: LicenseType): boolean { diff --git a/x-pack/plugins/security_solution/public/cases/links.ts b/x-pack/plugins/security_solution/public/cases/links.ts index 4beb1c625cda1..e74ed3ca103f3 100644 --- a/x-pack/plugins/security_solution/public/cases/links.ts +++ b/x-pack/plugins/security_solution/public/cases/links.ts @@ -5,6 +5,11 @@ * 2.0. */ +import { + CREATE_CASES_CAPABILITY, + READ_CASES_CAPABILITY, + UPDATE_CASES_CAPABILITY, +} from '@kbn/cases-plugin/common'; import { getCasesDeepLinks } from '@kbn/cases-plugin/public'; import { CASES_FEATURE_ID, CASES_PATH, SecurityPageName } from '../../common/constants'; import type { LinkItem } from '../common/links/types'; @@ -16,16 +21,16 @@ export const getCasesLinkItems = (): LinkItem => { [SecurityPageName.case]: { globalNavEnabled: true, globalNavOrder: 5, - capabilities: [`${CASES_FEATURE_ID}.read_cases`], + capabilities: [`${CASES_FEATURE_ID}.${READ_CASES_CAPABILITY}`], }, [SecurityPageName.caseConfigure]: { - capabilities: [`${CASES_FEATURE_ID}.crud_cases`], + capabilities: [`${CASES_FEATURE_ID}.${UPDATE_CASES_CAPABILITY}`], licenseType: 'gold', sideNavDisabled: true, hideTimeline: true, }, [SecurityPageName.caseCreate]: { - capabilities: [`${CASES_FEATURE_ID}.crud_cases`], + capabilities: [`${CASES_FEATURE_ID}.${CREATE_CASES_CAPABILITY}`], sideNavDisabled: true, hideTimeline: true, }, diff --git a/x-pack/plugins/security_solution/public/cases/pages/index.tsx b/x-pack/plugins/security_solution/public/cases/pages/index.tsx index fc4a990c45082..155873beeee2d 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/pages/index.tsx @@ -42,8 +42,7 @@ const TimelineDetailsPanel = () => { const CaseContainerComponent: React.FC = () => { const { cases } = useKibana().services; const { getAppUrl, navigateTo } = useNavigation(); - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); const dispatch = useDispatch(); const { formatUrl: detectionsFormatUrl, search: detectionsUrlSearch } = useFormatUrl( SecurityPageName.rules @@ -145,7 +144,7 @@ const CaseContainerComponent: React.FC = () => { }, }, useFetchAlertData, - permissions: casesPermissions, + permissions: userCasesPermissions, })} </CaseDetailsRefreshContext.Provider> <SpyRoute pageName={SecurityPageName.case} /> diff --git a/x-pack/plugins/security_solution/public/cases_test_utils.ts b/x-pack/plugins/security_solution/public/cases_test_utils.ts new file mode 100644 index 0000000000000..8dd64424e41e5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases_test_utils.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const noCasesCapabilities = () => ({ + create_cases: false, + read_cases: false, + update_cases: false, + delete_cases: false, + push_cases: false, +}); + +export const readCasesCapabilities = () => ({ + create_cases: false, + read_cases: true, + update_cases: false, + delete_cases: false, + push_cases: false, +}); + +export const allCasesCapabilities = () => ({ + create_cases: true, + read_cases: true, + update_cases: true, + delete_cases: true, + push_cases: true, +}); + +export const noCasesPermissions = () => ({ + all: false, + create: false, + read: false, + update: false, + delete: false, + push: false, +}); + +export const readCasesPermissions = () => ({ + all: false, + create: false, + read: true, + update: false, + delete: false, + push: false, +}); + +export const writeCasesPermissions = () => ({ + all: false, + create: true, + read: false, + update: true, + delete: true, + push: true, +}); + +export const allCasesPermissions = () => ({ + all: true, + create: true, + read: true, + update: true, + delete: true, + push: true, +}); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.test.tsx index 11ffa44a17a3b..7f3703ebf349b 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.test.tsx @@ -15,6 +15,13 @@ jest.mock('../../utils', () => ({ useThrottledResizeObserver: () => ({ width: 400 }), // force row-chunking })); +jest.mock( + '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges', + () => ({ + useAlertsPrivileges: jest.fn().mockReturnValue({ hasIndexWrite: true, hasKibanaCRUD: true }), + }) +); + describe('Event Details Overview Cards', () => { it('renders all cards', () => { const { getByText } = render( diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.test.tsx index 593cf44aa92f3..cc4f3e07c01b1 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { StatusPopoverButton } from './status_popover_button'; import { TestProviders } from '../../../mock'; - +import { useAlertsPrivileges } from '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; const props = { eventId: 'testid', contextId: 'detections-page', @@ -49,15 +49,25 @@ const props = { handleOnEventClosed: jest.fn(), }; -jest.mock( - '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges', - () => ({ - useAlertsPrivileges: jest.fn().mockReturnValue({ hasIndexWrite: true, hasKibanaCRUD: true }), - }) -); +type AlertsPriveleges = Partial<ReturnType<typeof useAlertsPrivileges>>; + +const writePriveleges: AlertsPriveleges = { hasIndexWrite: true, hasKibanaCRUD: true }; +const readPriveleges: AlertsPriveleges = { + hasIndexWrite: false, + hasKibanaCRUD: false, + hasKibanaREAD: true, + hasIndexRead: true, +}; + +jest.mock('../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'); describe('StatusPopoverButton', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); test('it renders the correct status', () => { + (useAlertsPrivileges as jest.Mock<AlertsPriveleges>).mockReturnValue(writePriveleges); + const { getByText } = render( <TestProviders> <StatusPopoverButton {...props} /> @@ -67,8 +77,9 @@ describe('StatusPopoverButton', () => { getByText('open'); }); - test('it shows the correct options when clicked', () => { - const { getByText } = render( + test('it shows the correct options when clicked', async () => { + (useAlertsPrivileges as jest.Mock<AlertsPriveleges>).mockReturnValue(writePriveleges); + const { getByText, container } = render( <TestProviders> <StatusPopoverButton {...props} /> </TestProviders> @@ -76,7 +87,25 @@ describe('StatusPopoverButton', () => { getByText('open').click(); + expect(container.querySelector('.euiBadge__icon')).not.toBeNull(); getByText('Mark as acknowledged'); getByText('Mark as closed'); }); + + test('Status should be text when user does not have write priveleges', () => { + (useAlertsPrivileges as jest.Mock<AlertsPriveleges>).mockReturnValue(readPriveleges); + const { getByText, queryByRole, container } = render( + <TestProviders> + <StatusPopoverButton {...props} /> + </TestProviders> + ); + + getByText('open').click(); + + // Check the popover downward arrow should not be visible + expect(container.querySelector('.euiBadge__icon')).toBeNull(); + + // popover should not open when hence checking that popover is not open + expect(queryByRole('dialog')).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx index 70b3b0f16463e..62b3b97f07c3a 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx @@ -44,6 +44,10 @@ export const StatusPopoverButton = React.memo<StatusPopoverButtonProps>( alertStatus: enrichedFieldInfo.values[0] as Status, }); + // statusPopoverVisible includes the logic for the visibility of the popover in + // case actionItems is an empty array ( ex, when user has read access ). + const statusPopoverVisible = useMemo(() => actionItems.length > 0, [actionItems]); + const button = useMemo( () => ( <FormattedFieldValue @@ -56,14 +60,19 @@ export const StatusPopoverButton = React.memo<StatusPopoverButtonProps>( fieldFormat={enrichedFieldInfo.data.format} isDraggable={false} truncate={false} - isButton={true} - onClick={togglePopover} + isButton={statusPopoverVisible} + onClick={statusPopoverVisible ? togglePopover : undefined} onClickAriaLabel={CLICK_TO_CHANGE_ALERT_STATUS} /> ), - [contextId, eventId, enrichedFieldInfo, togglePopover] + [contextId, eventId, enrichedFieldInfo, togglePopover, statusPopoverVisible] ); + // EuiPopover is not needed if statusPopoverVisible is false + if (!statusPopoverVisible) { + return button; + } + return ( <EuiPopover button={button} diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.test.tsx index c76f6f42a9e11..bea14a70a8385 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.test.tsx @@ -12,6 +12,7 @@ import { TestProviders } from '../../mock'; import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__'; import { useGetUserCasesPermissions } from '../../lib/kibana'; import { RelatedCases } from './related_cases'; +import { noCasesPermissions, readCasesPermissions } from '../../../cases_test_utils'; const mockedUseKibana = mockUseKibana(); const mockGetRelatedCases = jest.fn(); @@ -42,9 +43,7 @@ const eventId = '1c84d9bff4884dabe6aa1bb15f08433463b848d9269e587078dc56669550d27 describe('Related Cases', () => { describe('When user does not have cases read permissions', () => { test('should not show related cases when user does not have permissions', () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - read: false, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(noCasesPermissions()); render( <TestProviders> <RelatedCases eventId={eventId} /> @@ -56,9 +55,7 @@ describe('Related Cases', () => { }); describe('When user does have case read permissions', () => { beforeEach(() => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); }); describe('When related cases are unable to be retrieved', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.tsx index d90688d80a86e..3d8943af1e57c 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/related_cases.tsx @@ -25,11 +25,11 @@ export const RelatedCases: React.FC<Props> = React.memo(({ eventId, isReadOnly } services: { cases }, } = useKibana(); const toasts = useToasts(); - const casePermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const [relatedCases, setRelatedCases] = useState<RelatedCaseList>([]); const [areCasesLoading, setAreCasesLoading] = useState(true); const [hasError, setHasError] = useState<boolean>(false); - const hasCasesReadPermissions = casePermissions.read; + const hasCasesReadPermissions = userCasesPermissions.read; const getRelatedCases = useCallback(async () => { let relatedCaseList: RelatedCaseList = []; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx index b64dc2f81bd07..1bcc3080a548c 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx @@ -35,6 +35,7 @@ const OPERATOR_TYPE_LABELS_INCLUDED = Object.freeze({ const OPERATOR_TYPE_LABELS_EXCLUDED = Object.freeze({ [ListOperatorTypeEnum.MATCH_ANY]: i18n.CONDITION_OPERATOR_TYPE_NOT_MATCH_ANY, [ListOperatorTypeEnum.MATCH]: i18n.CONDITION_OPERATOR_TYPE_NOT_MATCH, + [ListOperatorTypeEnum.WILDCARD]: i18n.CONDITION_OPERATOR_TYPE_WILDCARD_DOES_NOT_MATCH, }); const EuiFlexGroupNested = styled(EuiFlexGroup)` diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/translations.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/translations.ts index 8d345c23fbf09..39435467c0473 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/translations.ts @@ -69,6 +69,13 @@ export const CONDITION_OPERATOR_TYPE_WILDCARD_MATCHES = i18n.translate( } ); +export const CONDITION_OPERATOR_TYPE_WILDCARD_DOES_NOT_MATCH = i18n.translate( + 'xpack.securitySolution.exceptions.exceptionItem.conditions.wildcardDoesNotMatchOperator', + { + defaultMessage: 'DOES NOT MATCH', + } +); + export const CONDITION_OPERATOR_TYPE_NESTED = i18n.translate( 'xpack.securitySolution.exceptions.exceptionItem.conditions.nestedOperator', { diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx index 0c545ec83a6ef..86ada5a89fc20 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx @@ -20,6 +20,12 @@ import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental import { TestProviders } from '../../../mock'; import { CASES_FEATURE_ID } from '../../../../../common/constants'; import { useCanSeeHostIsolationExceptionsMenu } from '../../../../management/pages/host_isolation_exceptions/view/hooks'; +import { + noCasesPermissions, + readCasesCapabilities, + readCasesPermissions, +} from '../../../../cases_test_utils'; +import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; jest.mock('../../../lib/kibana/kibana_react'); jest.mock('../../../lib/kibana'); @@ -85,8 +91,12 @@ describe('useSecuritySolutionNavigation', () => { (useRouteSpy as jest.Mock).mockReturnValue(mockRouteSpy); (useCanSeeHostIsolationExceptionsMenu as jest.Mock).mockReturnValue(true); + const cases = mockCasesContract(); + cases.helpers.getUICapabilities.mockReturnValue(readCasesPermissions()); + (useKibana as jest.Mock).mockReturnValue({ services: { + cases, application: { navigateToApp: jest.fn(), getUrlForApp: (appId: string, options?: { path?: string; deepLinkId?: boolean }) => @@ -96,7 +106,7 @@ describe('useSecuritySolutionNavigation', () => { show: true, crud: true, }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: readCasesCapabilities(), }, }, chrome: { @@ -154,10 +164,7 @@ describe('useSecuritySolutionNavigation', () => { describe('Permission gated routes', () => { describe('cases', () => { it('should display the cases navigation item when the user has read permissions', () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: true, - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); const { result } = renderHook<{}, KibanaPageTemplateProps['solutionNav']>( () => useSecuritySolutionNavigation(), @@ -182,10 +189,7 @@ describe('useSecuritySolutionNavigation', () => { }); it('should not display the cases navigation item when the user does not have read permissions', () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: false, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(noCasesPermissions()); const { result } = renderHook<{}, KibanaPageTemplateProps['solutionNav']>( () => useSecuritySolutionNavigation(), diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx index 7a42615a0d771..5338856a8db42 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx @@ -23,6 +23,7 @@ import { cloneDeep } from 'lodash'; import { useKibana } from '../../lib/kibana/kibana_react'; import { CASES_FEATURE_ID } from '../../../../common/constants'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; +import { allCasesCapabilities, allCasesPermissions } from '../../../cases_test_utils'; jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); return { @@ -70,6 +71,9 @@ describe('VisualizationActions', () => { beforeEach(() => { jest.clearAllMocks(); + const cases = mockCasesContract(); + cases.helpers.getUICapabilities.mockReturnValue(allCasesPermissions()); + (useKibana as jest.Mock).mockReturnValue({ services: { lens: { @@ -88,7 +92,7 @@ describe('VisualizationActions', () => { }, }, application: { - capabilities: { [CASES_FEATURE_ID]: { crud_cases: true, read_cases: true } }, + capabilities: { [CASES_FEATURE_ID]: allCasesCapabilities() }, getUrlForApp: jest.fn(), navigateToApp: jest.fn(), }, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.test.tsx index 83f1290ab54e3..6204f77909f65 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.test.tsx @@ -9,6 +9,11 @@ import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__'; import { kpiHostMetricLensAttributes } from './lens_attributes/hosts/kpi_host_metric'; import { useAddToExistingCase } from './use_add_to_existing_case'; import { useGetUserCasesPermissions } from '../../lib/kibana'; +import { + allCasesPermissions, + readCasesPermissions, + writeCasesPermissions, +} from '../../../cases_test_utils'; const mockedUseKibana = mockUseKibana(); const mockGetUseCasesAddToExistingCaseModal = jest.fn(); @@ -41,10 +46,7 @@ describe('useAddToExistingCase', () => { }; beforeEach(() => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: true, - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(allCasesPermissions()); }); it('getUseCasesAddToExistingCaseModal with attachments', () => { @@ -62,11 +64,21 @@ describe('useAddToExistingCase', () => { expect(result.current.disabled).toEqual(false); }); - it("button disabled if user Can't Crud", () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: true, - }); + it("disables the button if the user can't create but can read", () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); + + const { result } = renderHook(() => + useAddToExistingCase({ + lensAttributes: kpiHostMetricLensAttributes, + timeRange, + onAddToCaseClicked: mockOnAddToCaseClicked, + }) + ); + expect(result.current.disabled).toEqual(true); + }); + + it("disables the button if the user can't read but can create", () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(writeCasesPermissions()); const { result } = renderHook(() => useAddToExistingCase({ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx index 30626215cfd45..9aa85975a1b46 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx @@ -24,7 +24,7 @@ export const useAddToExistingCase = ({ lensAttributes: LensAttributes | null; timeRange: { from: string; to: string } | null; }) => { - const userPermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const { cases } = useKibana().services; const attachments = useMemo(() => { return [ @@ -53,6 +53,10 @@ export const useAddToExistingCase = ({ return { onAddToExistingCaseClicked, - disabled: lensAttributes == null || timeRange == null || !userPermissions.crud, + disabled: + lensAttributes == null || + timeRange == null || + !userCasesPermissions.create || + !userCasesPermissions.read, }; }; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.test.tsx index 49fbde71386a5..6491a8ce911b1 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.test.tsx @@ -9,6 +9,11 @@ import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__'; import { kpiHostMetricLensAttributes } from './lens_attributes/hosts/kpi_host_metric'; import { useAddToNewCase } from './use_add_to_new_case'; import { useGetUserCasesPermissions } from '../../lib/kibana'; +import { + allCasesPermissions, + readCasesPermissions, + writeCasesPermissions, +} from '../../../cases_test_utils'; jest.mock('../../lib/kibana/kibana_react'); @@ -41,10 +46,7 @@ describe('useAddToNewCase', () => { to: '2022-03-07T15:59:59.999Z', }; beforeEach(() => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: true, - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(allCasesPermissions()); }); it('getUseCasesAddToNewCaseFlyout with attachments', () => { @@ -60,11 +62,20 @@ describe('useAddToNewCase', () => { expect(result.current.disabled).toEqual(false); }); - it("button disabled if user Can't Crud", () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: true, - }); + it("disables the button if the user can't create but can read", () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); + + const { result } = renderHook(() => + useAddToNewCase({ + lensAttributes: kpiHostMetricLensAttributes, + timeRange, + }) + ); + expect(result.current.disabled).toEqual(true); + }); + + it("disables the button if the user can't read but can create", () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(writeCasesPermissions()); const { result } = renderHook(() => useAddToNewCase({ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx index ac090bfde168c..a0b367738ad9b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx @@ -23,7 +23,7 @@ export interface UseAddToNewCaseProps { const owner = APP_ID; export const useAddToNewCase = ({ onClick, timeRange, lensAttributes }: UseAddToNewCaseProps) => { - const userPermissions = useGetUserCasesPermissions(); + const userCasesPermissions = useGetUserCasesPermissions(); const { cases } = useKibana().services; const attachments = useMemo(() => { return [ @@ -52,6 +52,10 @@ export const useAddToNewCase = ({ onClick, timeRange, lensAttributes }: UseAddTo return { onAddToNewCaseClicked, - disabled: lensAttributes == null || timeRange == null || !userPermissions.crud, + disabled: + lensAttributes == null || + timeRange == null || + !userCasesPermissions.create || + !userCasesPermissions.read, }; }; diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx index 7c61c56f3c3b2..d1c19f86e4d9f 100644 --- a/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx @@ -6,29 +6,77 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; +import { useAuthentications } from '.'; import { AuthStackByField } from '../../../../common/search_strategy'; import { TestProviders } from '../../mock'; -import { HostsType } from '../../../hosts/store/model'; -import { useAuthentications } from '.'; +import { useSearchStrategy } from '../use_search_strategy'; + +jest.mock('../use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const props = { + activePage: 0, + endDate: '2020-07-08T08:20:18.966Z', + indexNames: ['auditbeat-*'], + limit: 5, + skip: false, + stackByField: AuthStackByField.userName, + startDate: '2020-07-07T08:20:18.966Z', +}; + +describe('useAuthentications', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useAuthentications(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const localProps = { + ...props, + skip: true, + }; + renderHook(() => useAuthentications(localProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); -describe('authentications', () => { it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); const localProps = { - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - indexNames: ['cool'], - type: HostsType.page, - skip: false, - stackByField: AuthStackByField.hostName, - activePage: 0, - limit: 10, + ...props, }; const { rerender } = renderHook(() => useAuthentications(localProps), { wrapper: TestProviders, }); localProps.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(3); + expect(mockUseSearchStrategy.mock.calls[2][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx b/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx index 80621b65c99c7..3a038b6d2ac30 100644 --- a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx @@ -5,17 +5,13 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import type { AuthenticationsEdges, AuthStackByField, UserAuthenticationsRequestOptions, - UserAuthenticationsStrategyResponse, } from '../../../../common/search_strategy/security_solution'; import { UsersQueries } from '../../../../common/search_strategy/security_solution'; import type { PageInfoPaginated, SortField } from '../../../../common/search_strategy'; @@ -24,18 +20,16 @@ import type { ESTermQuery } from '../../../../common/typed_json'; import type { inputsModel } from '../../store'; import { createFilter } from '../helpers'; import { generateTablePaginationOptions } from '../../components/paginated_table/helpers'; -import { useKibana } from '../../lib/kibana'; -import { getInspectResponse } from '../../../helpers'; + import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; -import { useAppToasts } from '../../hooks/use_app_toasts'; +import { useSearchStrategy } from '../use_search_strategy'; export interface AuthenticationArgs { authentications: AuthenticationsEdges[]; inspect: InspectResponse; isInspected: boolean; - loading: boolean; loadPage: (newActivePage: number) => void; pageInfo: PageInfoPaginated; refetch: inputsModel.Refetch; @@ -43,34 +37,28 @@ export interface AuthenticationArgs { } interface UseAuthentications { - filterQuery?: ESTermQuery | string; + activePage: number; endDate: string; + filterQuery?: ESTermQuery | string; indexNames: string[]; - startDate: string; + limit: number; skip: boolean; stackByField: AuthStackByField; - activePage: number; - limit: number; + startDate: string; } export const useAuthentications = ({ - filterQuery, + activePage, endDate, + filterQuery, indexNames, - startDate, - activePage, limit, skip, stackByField, + startDate, }: UseAuthentications): [boolean, AuthenticationArgs] => { - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); const [authenticationsRequest, setAuthenticationsRequest] = useState<UserAuthenticationsRequestOptions | null>(null); - const { addError, addWarning } = useAppToasts(); const wrappedLoadMore = useCallback( (newActivePage: number) => { @@ -88,72 +76,49 @@ export const useAuthentications = ({ [limit] ); - const [authenticationsResponse, setAuthenticationsResponse] = useState<AuthenticationArgs>({ - authentications: [], - inspect: { - dsl: [], - response: [], - }, - isInspected: false, - loading: true, - loadPage: wrappedLoadMore, - pageInfo: { - activePage: 0, - fakeTotalCount: 0, - showMorePagesIndicator: false, + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<UsersQueries.authentications>({ + factoryQueryType: UsersQueries.authentications, + initialResult: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, }, - refetch: refetch.current, - totalCount: -1, + errorMessage: i18n.FAIL_AUTHENTICATIONS, + abort: skip, }); - const authenticationsSearch = useCallback( - (request: UserAuthenticationsRequestOptions | null) => { - if (request == null || skip) { - return; - } - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - - searchSubscription$.current = data.search - .search<UserAuthenticationsRequestOptions, UserAuthenticationsStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setAuthenticationsResponse((prevResponse) => ({ - ...prevResponse, - authentications: response.edges, - inspect: getInspectResponse(response, prevResponse.inspect), - pageInfo: response.pageInfo, - refetch: refetch.current, - totalCount: response.totalCount, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_AUTHENTICATIONS); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_AUTHENTICATIONS, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const authenticationsResponse = useMemo( + () => ({ + endDate, + authentications: response.edges, + inspect, + isInspected: false, + loadPage: wrappedLoadMore, + pageInfo: response.pageInfo, + refetch, + startDate, + totalCount: response.totalCount, + }), + [ + endDate, + inspect, + refetch, + response.edges, + response.pageInfo, + response.totalCount, + startDate, + wrappedLoadMore, + ] ); useEffect(() => { @@ -180,20 +145,10 @@ export const useAuthentications = ({ }, [activePage, endDate, filterQuery, indexNames, stackByField, limit, startDate]); useEffect(() => { - authenticationsSearch(authenticationsRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [authenticationsRequest, authenticationsSearch]); - - useEffect(() => { - if (skip) { - setLoading(false); - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip && authenticationsRequest) { + search(authenticationsRequest); } - }, [skip]); + }, [authenticationsRequest, search, skip]); return [loading, authenticationsResponse]; }; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts index 98f53b004c0f6..ba86bfa940294 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts @@ -14,6 +14,7 @@ import { camelCase, isArray, isObject } from 'lodash'; import { set } from '@elastic/safer-lodash-set'; import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; import type { NavigateToAppOptions } from '@kbn/core/public'; +import type { CasesPermissions } from '@kbn/cases-plugin/common/ui'; import { APP_UI_ID, CASES_FEATURE_ID, @@ -146,24 +147,37 @@ export const useCurrentUser = (): AuthenticatedElasticUser | null => { return user; }; -export interface UseGetUserCasesPermissions { - crud: boolean; - read: boolean; -} - export const useGetUserCasesPermissions = () => { - const [casesPermissions, setCasesPermissions] = useState<UseGetUserCasesPermissions>({ - crud: false, + const [casesPermissions, setCasesPermissions] = useState<CasesPermissions>({ + all: false, + create: false, read: false, + update: false, + delete: false, + push: false, }); const uiCapabilities = useKibana().services.application.capabilities; + const casesCapabilities = useKibana().services.cases.helpers.getUICapabilities( + uiCapabilities[CASES_FEATURE_ID] + ); useEffect(() => { setCasesPermissions({ - crud: !!uiCapabilities[CASES_FEATURE_ID]?.crud_cases, - read: !!uiCapabilities[CASES_FEATURE_ID]?.read_cases, + all: casesCapabilities.all, + create: casesCapabilities.create, + read: casesCapabilities.read, + update: casesCapabilities.update, + delete: casesCapabilities.delete, + push: casesCapabilities.push, }); - }, [uiCapabilities]); + }, [ + casesCapabilities.all, + casesCapabilities.create, + casesCapabilities.read, + casesCapabilities.update, + casesCapabilities.delete, + casesCapabilities.push, + ]); return casesPermissions; }; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts index 349889899c1a0..5629f65570f06 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts @@ -40,6 +40,8 @@ import { MlLocatorDefinition } from '@kbn/ml-plugin/public'; import type { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { MockUrlService } from '@kbn/share-plugin/common/mocks'; import { fleetMock } from '@kbn/fleet-plugin/public/mocks'; +import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; +import { noCasesPermissions } from '../../../cases_test_utils'; import { triggersActionsUiMock } from '@kbn/triggers-actions-ui-plugin/public/mocks'; const mockUiSettings: Record<string, unknown> = { @@ -98,17 +100,13 @@ export const createStartServicesMock = ( const locator = urlService.locators.create(new MlLocatorDefinition()); const fleet = fleetMock.createStartMock(); const unifiedSearch = unifiedSearchPluginMock.createStartContract(); + const cases = mockCasesContract(); + cases.helpers.getUICapabilities.mockReturnValue(noCasesPermissions()); const triggersActionsUi = triggersActionsUiMock.createStart(); return { ...core, - cases: { - getAllCases: jest.fn(), - getCaseView: jest.fn(), - getConfigureCases: jest.fn(), - getCreateCase: jest.fn(), - getRecentCases: jest.fn(), - }, + cases, unifiedSearch, data: { ...data, diff --git a/x-pack/plugins/security_solution/public/common/links/links.test.ts b/x-pack/plugins/security_solution/public/common/links/links.test.ts index 408078dc12d78..1fe3f11b213fd 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.test.ts +++ b/x-pack/plugins/security_solution/public/common/links/links.test.ts @@ -18,7 +18,9 @@ import { needsUrlState, updateAppLinks, useLinkExists, + hasCapabilities, } from './links'; +import { createCapabilities } from './test_utils'; const defaultAppLinks: AppLinkItems = [ { @@ -288,4 +290,118 @@ describe('Security app links', () => { }); }); }); + + describe('hasCapabilities', () => { + const siemShow = 'siem.show'; + const createCases = 'securitySolutionCases.create_cases'; + const readCases = 'securitySolutionCases.read_cases'; + const pushCases = 'securitySolutionCases.push_cases'; + + it('returns false when capabilities is an empty array', () => { + expect(hasCapabilities([], createCapabilities())).toBeFalsy(); + }); + + it('returns true when the capability requested is specified as a single value', () => { + expect(hasCapabilities(siemShow, createCapabilities({ siem: { show: true } }))).toBeTruthy(); + }); + + it('returns true when the capability requested is a single entry in an array', () => { + expect( + hasCapabilities([siemShow], createCapabilities({ siem: { show: true } })) + ).toBeTruthy(); + }); + + it("returns true when the capability requested is a single entry in an AND'd array format", () => { + expect( + hasCapabilities([[siemShow]], createCapabilities({ siem: { show: true } })) + ).toBeTruthy(); + }); + + it('returns true when only one requested capability is found in an OR situation', () => { + expect( + hasCapabilities( + [siemShow, createCases], + createCapabilities({ + siem: { show: true }, + securitySolutionCases: { create_cases: false }, + }) + ) + ).toBeTruthy(); + }); + + it('returns true when only the create_cases requested capability is found in an OR situation', () => { + expect( + hasCapabilities( + [siemShow, createCases], + createCapabilities({ + siem: { show: false }, + securitySolutionCases: { create_cases: true }, + }) + ) + ).toBeTruthy(); + }); + + it('returns false when none of the requested capabilities are found in an OR situation', () => { + expect( + hasCapabilities( + [readCases, createCases], + createCapabilities({ + siem: { show: true }, + securitySolutionCases: { create_cases: false }, + }) + ) + ).toBeFalsy(); + }); + + it('returns true when all of the requested capabilities are found in an AND situation', () => { + expect( + hasCapabilities( + [[readCases, createCases]], + createCapabilities({ + siem: { show: true }, + securitySolutionCases: { read_cases: true, create_cases: true }, + }) + ) + ).toBeTruthy(); + }); + + it('returns false when neither the single OR capability is found nor all of the AND capabilities', () => { + expect( + hasCapabilities( + [siemShow, [readCases, createCases]], + createCapabilities({ + siem: { show: false }, + securitySolutionCases: { read_cases: false, create_cases: true }, + }) + ) + ).toBeFalsy(); + }); + + it('returns true when the single OR capability is found when using an OR with an AND format', () => { + expect( + hasCapabilities( + [siemShow, [readCases, createCases]], + createCapabilities({ + siem: { show: true }, + securitySolutionCases: { read_cases: false, create_cases: true }, + }) + ) + ).toBeTruthy(); + }); + + it("returns false when the AND'd expressions are not satisfied", () => { + expect( + hasCapabilities( + [ + [siemShow, pushCases], + [readCases, createCases], + ], + createCapabilities({ + siem: { show: true }, + securitySolutionCases: { read_cases: false, create_cases: true, push_cases: false }, + }) + ) + ).toBeFalsy(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/common/links/links.ts b/x-pack/plugins/security_solution/public/common/links/links.ts index 2aa2a672fc54a..de30840d02d9d 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.ts +++ b/x-pack/plugins/security_solution/public/common/links/links.ts @@ -6,7 +6,7 @@ */ import type { Capabilities } from '@kbn/core/public'; -import { get } from 'lodash'; +import { get, isArray } from 'lodash'; import { useEffect, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; import type { SecurityPageName } from '../../../common/constants'; @@ -173,9 +173,35 @@ const getFilteredAppLinks = ( return acc; }, []); +/** + * The format of defining features supports OR and AND mechanism. To specify features in an OR fashion + * they can be defined in a single level array like: [requiredFeature1, requiredFeature2]. If either of these features + * is satisfied the links would be included. To require that the features be AND'd together a second level array + * can be specified: [feature1, [feature2, feature3]] this would result in feature1 || (feature2 && feature3). + * + * The final format is to specify a single feature, this would be like: features: feature1, which is the same as + * features: [feature1] + */ +type LinkCapabilities = string | Array<string | string[]>; + // It checks if the user has at least one of the link capabilities needed -const hasCapabilities = (linkCapabilities: string[], userCapabilities: Capabilities): boolean => - linkCapabilities.some((linkCapability) => get(userCapabilities, linkCapability, false)); +export const hasCapabilities = <T>( + linkCapabilities: LinkCapabilities, + userCapabilities: Capabilities +): boolean => { + if (!isArray(linkCapabilities)) { + return !!get(userCapabilities, linkCapabilities, false); + } else { + return linkCapabilities.some((linkCapabilityKeyOr) => { + if (isArray(linkCapabilityKeyOr)) { + return linkCapabilityKeyOr.every((linkCapabilityKeyAnd) => + get(userCapabilities, linkCapabilityKeyAnd, false) + ); + } + return get(userCapabilities, linkCapabilityKeyOr, false); + }); + } +}; const isLinkAllowed = ( link: LinkItem, diff --git a/x-pack/plugins/security_solution/public/common/links/test_utils.ts b/x-pack/plugins/security_solution/public/common/links/test_utils.ts new file mode 100644 index 0000000000000..2643ebbb861b9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/links/test_utils.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Capabilities } from '@kbn/core/public'; + +interface FeatureCap { + [key: string]: Record<string, boolean | Record<string, boolean>>; +} + +export const createCapabilities = (capabilities?: FeatureCap): Capabilities => { + return { + navLinks: {}, + management: {}, + catalogue: {}, + ...capabilities, + }; +}; diff --git a/x-pack/plugins/security_solution/public/common/links/types.ts b/x-pack/plugins/security_solution/public/common/links/types.ts index eae1c700721bc..f5432b16e9f78 100644 --- a/x-pack/plugins/security_solution/public/common/links/types.ts +++ b/x-pack/plugins/security_solution/public/common/links/types.ts @@ -38,9 +38,18 @@ export interface LinkItem { experimentalKey?: keyof ExperimentalFeatures; /** * Capabilities strings (using object dot notation) to enable the link. - * Uses "or" conditional, only one enabled capability is needed to activate the link - */ - capabilities?: string[]; + * + * The format of defining features supports OR and AND mechanism. To specify features in an OR fashion + * they can be defined in a single level array like: [requiredFeature1, requiredFeature2]. If either of these features + * is satisfied the deeplinks would be included. To require that the features be AND'd together a second level array + * can be specified: [feature1, [feature2, feature3]] this would result in feature1 || (feature2 && feature3). To specify + * features that all must be and'd together an example would be: [[feature1, feature2]], this would result in the boolean + * operation feature1 && feature2. + * + * The final format is to specify a single feature, this would be like: features: feature1, which is the same as + * features: [feature1] + */ + capabilities?: string | Array<string | string[]>; /** * Categories to display in the navigation */ diff --git a/x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts b/x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts index e63a2b20a5ad5..6acc21b5e4763 100644 --- a/x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts +++ b/x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts @@ -8,7 +8,8 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { mount } from 'enzyme'; -type WrapperOf<F extends (...args: any) => any> = (...args: Parameters<F>) => ReturnType<F>; // eslint-disable-line +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type WrapperOf<F extends (...args: any) => any> = (...args: Parameters<F>) => ReturnType<F>; export type MountAppended = WrapperOf<typeof mount>; export const useMountAppended = () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx index 919c9a3a58892..8d0ace8a3dcf5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx @@ -63,8 +63,12 @@ jest.mock('../../../../common/lib/kibana', () => ({ }, }), useGetUserCasesPermissions: jest.fn().mockReturnValue({ - crud: true, + all: true, + create: true, read: true, + update: true, + delete: true, + push: true, }), })); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx index f1e337ac592c0..c8ac06cee92a0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx @@ -34,8 +34,7 @@ export const useAddToCaseActions = ({ timelineId, }: UseAddToCaseActions) => { const { cases: casesUi } = useKibana().services; - const casePermissions = useGetUserCasesPermissions(); - const hasWritePermissions = casePermissions.crud; + const userCasesPermissions = useGetUserCasesPermissions(); const isAlert = useMemo(() => { return ecsData?.event?.kind?.includes('signal'); @@ -84,7 +83,8 @@ export const useAddToCaseActions = ({ TimelineId.detectionsRulesDetailsPage, TimelineId.active, ].includes(timelineId as TimelineId) && - hasWritePermissions && + userCasesPermissions.create && + userCasesPermissions.read && isAlert ) { return [ @@ -113,7 +113,8 @@ export const useAddToCaseActions = ({ ariaLabel, handleAddToExistingCaseClick, handleAddToNewCaseClick, - hasWritePermissions, + userCasesPermissions.create, + userCasesPermissions.read, timelineId, isAlert, ]); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_bulk_add_to_case_actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_bulk_add_to_case_actions.tsx index c19f48163123e..0251c130981f6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_bulk_add_to_case_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_bulk_add_to_case_actions.tsx @@ -19,8 +19,7 @@ export interface UseAddToCaseActions { export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActions = {}) => { const { cases: casesUi } = useKibana().services; - const casePermissions = useGetUserCasesPermissions(); - const hasWritePermissions = casePermissions.crud; + const userCasesPermissions = useGetUserCasesPermissions(); const createCaseFlyout = casesUi.hooks.getUseCasesAddToNewCaseFlyout({ onClose, @@ -32,7 +31,7 @@ export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActi }); return useMemo(() => { - return hasWritePermissions + return userCasesPermissions.create && userCasesPermissions.read ? [ { label: ADD_TO_NEW_CASE, @@ -58,5 +57,11 @@ export const useBulkAddToCaseActions = ({ onClose, onSuccess }: UseAddToCaseActi }, ] : []; - }, [casesUi.helpers, createCaseFlyout, hasWritePermissions, selectCaseModal]); + }, [ + casesUi.helpers, + createCaseFlyout, + userCasesPermissions.create, + userCasesPermissions.read, + selectCaseModal, + ]); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx index 93e268947462e..d47b9f0187e8d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx @@ -35,6 +35,7 @@ import { } from '../../../common/utils/endpoint_alert_check'; import { HostStatus } from '../../../../common/endpoint/types'; import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; +import { allCasesPermissions } from '../../../cases_test_utils'; jest.mock('../../../common/components/user_privileges'); @@ -43,7 +44,7 @@ jest.mock('../user_info', () => ({ })); jest.mock('../../../common/lib/kibana'); -(useGetUserCasesPermissions as jest.Mock).mockReturnValue({ crud: true }); +(useGetUserCasesPermissions as jest.Mock).mockReturnValue(allCasesPermissions()); jest.mock('../../containers/detection_engine/alerts/use_alerts_privileges', () => ({ useAlertsPrivileges: jest.fn().mockReturnValue({ hasIndexWrite: true, hasKibanaCRUD: true }), diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts index 055cc07aadcc1..217810e343970 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts @@ -207,6 +207,7 @@ export const pureFetchRuleById = async ({ * @param ids string[] rule ids to select rules to perform bulk action with * @param edit BulkEditActionPayload edit action payload * @param action bulk action to perform + * @param isDryRun enables dry run mode for bulk actions * * @throws An error if response is not OK */ @@ -215,6 +216,7 @@ export const performBulkAction = async <Action extends BulkAction>({ query, edit, ids, + isDryRun, }: BulkActionProps<Action>): Promise<BulkActionResponseMap<Action>> => KibanaServices.get().http.fetch<BulkActionResponseMap<Action>>( DETECTION_ENGINE_RULES_BULK_ACTION, @@ -226,6 +228,9 @@ export const performBulkAction = async <Action extends BulkAction>({ ...(ids ? { ids } : {}), ...(query !== undefined ? { query } : {}), }), + query: { + ...(isDryRun ? { dry_run: isDryRun } : {}), + }, } ); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts index a0e8585579402..1cadf793091a6 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts @@ -8,6 +8,7 @@ import * as t from 'io-ts'; import { listArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { risk_score_mapping, threat_query, @@ -52,6 +53,8 @@ import type { UpdateRulesSchema, } from '../../../../../common/detection_engine/schemas/request'; +import type { BulkActionsDryRunErrCode } from '../../../../../common/constants'; + /** * Params is an "record", since it is a type of RuleActionParams which is action templates. * @see x-pack/plugins/alerting/common/rule.ts @@ -223,6 +226,7 @@ export interface FilterOptions { showCustomRules: boolean; showElasticRules: boolean; tags: string[]; + excludeRuleTypes?: Type[]; } export interface FetchRulesResponse { @@ -242,6 +246,7 @@ export interface BulkActionProps<Action extends BulkAction> { query?: string; ids?: string[]; edit?: BulkActionEditPayload[]; + isDryRun?: boolean; } export interface BulkActionSummary { @@ -259,6 +264,7 @@ export interface BulkActionResult { export interface BulkActionAggregatedError { message: string; status_code: number; + err_code?: BulkActionsDryRunErrCode; rules: Array<{ id: string; name?: string }>; } diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts index 6e773e3307e4b..1533e0c02fa62 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts @@ -78,4 +78,13 @@ describe('convertRulesFilterToKQL', () => { `alert.attributes.params.immutable: true AND alert.attributes.tags:("tag1" AND "tag2") AND (alert.attributes.name: "foo" OR alert.attributes.params.index: "foo" OR alert.attributes.params.threat.tactic.id: "foo" OR alert.attributes.params.threat.tactic.name: "foo" OR alert.attributes.params.threat.technique.id: "foo" OR alert.attributes.params.threat.technique.name: "foo" OR alert.attributes.params.threat.technique.subtechnique.id: "foo" OR alert.attributes.params.threat.technique.subtechnique.name: "foo")` ); }); + + it('handles presence of "excludeRuleTypes" properly', () => { + const kql = convertRulesFilterToKQL({ + ...filterOptions, + excludeRuleTypes: ['machine_learning', 'saved_query'], + }); + + expect(kql).toBe('NOT alert.attributes.params.type: ("machine_learning" OR "saved_query")'); + }); }); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts index 07c2210a329bb..083b75a33c70b 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts @@ -31,6 +31,7 @@ export const convertRulesFilterToKQL = ({ showElasticRules, filter, tags, + excludeRuleTypes = [], }: FilterOptions): string => { const filters: string[] = []; @@ -56,5 +57,13 @@ export const convertRulesFilterToKQL = ({ filters.push(`(${searchQuery})`); } + if (excludeRuleTypes.length) { + filters.push( + `NOT alert.attributes.params.type: (${excludeRuleTypes + .map((ruleType) => `"${escapeKuery(ruleType)}"`) + .join(' OR ')})` + ); + } + return filters.join(' AND '); }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_confirmation.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_confirmation.tsx deleted file mode 100644 index f4c8e7f9bf2a0..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_confirmation.tsx +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useEffect } from 'react'; -import { EuiConfirmModal } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; - -import * as i18n from '../../translations'; - -interface BulkEditConfirmationProps { - customRulesCount: number; - elasticRulesCount: number; - onCancel: () => void; - onConfirm: () => void; -} -const BulkEditConfirmationComponent = ({ - onCancel, - onConfirm, - customRulesCount, - elasticRulesCount, -}: BulkEditConfirmationProps) => { - useEffect(() => { - if (elasticRulesCount === 0) { - setTimeout(onConfirm, 0); - } - }, [elasticRulesCount, onConfirm]); - - // proceed straight to edit flyout if there is no Elastic rules - if (elasticRulesCount === 0) { - return null; - } - - if (customRulesCount === 0) { - return ( - <EuiConfirmModal - title={i18n.BULK_EDIT_CONFIRMATION_TITLE(elasticRulesCount)} - onCancel={onCancel} - onConfirm={onCancel} - confirmButtonText={i18n.BULK_EDIT_CONFIRMATION_CANCEL} - defaultFocusedButton="confirm" - data-test-subj="bulkEditRejectModal" - > - <FormattedMessage - id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditRejectionDescription" - defaultMessage="Elastic rules are not modifiable. The update action will only be applied to Custom rules." - /> - </EuiConfirmModal> - ); - } - - return ( - <EuiConfirmModal - title={i18n.BULK_EDIT_CONFIRMATION_TITLE(elasticRulesCount)} - onCancel={onCancel} - onConfirm={onConfirm} - confirmButtonText={i18n.BULK_EDIT_CONFIRMATION_CONFIRM} - cancelButtonText={i18n.BULK_EDIT_CONFIRMATION_CANCEL} - defaultFocusedButton="confirm" - data-test-subj="bulkEditConfirmationModal" - > - <FormattedMessage - id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDescription" - defaultMessage="The update action will only be applied to {customRulesCount, plural, =1 {# Custom rule} other {# Custom rules}} you've selected." - values={{ customRulesCount }} - /> - </EuiConfirmModal> - ); -}; - -export const BulkEditConfirmation = React.memo(BulkEditConfirmationComponent); - -BulkEditConfirmation.displayName = 'BulkEditConfirmation'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_dry_run_confirmation.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_dry_run_confirmation.tsx new file mode 100644 index 0000000000000..85393b679b39a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_dry_run_confirmation.tsx @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiConfirmModal } from '@elastic/eui'; + +import * as i18n from '../../translations'; +import type { DryRunResult } from './use_bulk_actions_dry_run'; +import { BulkEditRuleErrorsList } from './bulk_edit_rule_errors_list'; + +interface BulkEditDryRunConfirmationProps { + result?: DryRunResult; + onCancel: () => void; + onConfirm: () => void; +} + +const BulkEditDryRunConfirmationComponent = ({ + onCancel, + onConfirm, + result, +}: BulkEditDryRunConfirmationProps) => { + const { failedRulesCount = 0, succeededRulesCount = 0, ruleErrors = [] } = result ?? {}; + + // if no rule can be edited, modal window that denies bulk edit action will be displayed + if (succeededRulesCount === 0) { + return ( + <EuiConfirmModal + title={i18n.BULK_EDIT_CONFIRMATION_DENIED_TITLE(failedRulesCount)} + onCancel={onCancel} + onConfirm={onCancel} + confirmButtonText={i18n.BULK_EDIT_CONFIRMATION_CLOSE} + defaultFocusedButton="confirm" + data-test-subj="bulkEditRejectModal" + > + <BulkEditRuleErrorsList ruleErrors={ruleErrors} /> + </EuiConfirmModal> + ); + } + + // if there are rules that can and cannot be edited, modal window that propose edit of some the rules will be displayed + return ( + <EuiConfirmModal + title={i18n.BULK_EDIT_CONFIRMATION_PARTLY_TITLE(succeededRulesCount)} + onCancel={onCancel} + onConfirm={onConfirm} + confirmButtonText={i18n.BULK_EDIT_CONFIRMATION_CONFIRM(succeededRulesCount)} + cancelButtonText={i18n.BULK_EDIT_CONFIRMATION_CANCEL} + defaultFocusedButton="confirm" + data-test-subj="bulkEditConfirmationModal" + > + <BulkEditRuleErrorsList ruleErrors={ruleErrors} /> + </EuiConfirmModal> + ); +}; + +export const BulkEditDryRunConfirmation = React.memo(BulkEditDryRunConfirmationComponent); + +BulkEditDryRunConfirmation.displayName = 'BulkEditDryRunConfirmation'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.test.tsx new file mode 100644 index 0000000000000..9d2fc6e8dd37c --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.test.tsx @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { FC } from 'react'; +import React from 'react'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; +import { render, screen } from '@testing-library/react'; + +import type { DryRunResult } from './use_bulk_actions_dry_run'; +import { BulkEditRuleErrorsList } from './bulk_edit_rule_errors_list'; +import { BulkActionsDryRunErrCode } from '../../../../../../../common/constants'; + +const Wrapper: FC = ({ children }) => { + return ( + <IntlProvider locale="en"> + <>{children}</> + </IntlProvider> + ); +}; + +describe('Component BulkEditRuleErrorsList', () => { + test('should not render component if no errors present', () => { + const { container } = render(<BulkEditRuleErrorsList ruleErrors={[]} />, { wrapper: Wrapper }); + + expect(container.childElementCount).toEqual(0); + }); + + test('should render multiple error messages', () => { + const ruleErrors: DryRunResult['ruleErrors'] = [ + { + message: 'test failure', + ruleIds: ['rule:1', 'rule:2'], + }, + { + message: 'another failure', + ruleIds: ['rule:1'], + }, + ]; + render(<BulkEditRuleErrorsList ruleErrors={ruleErrors} />, { wrapper: Wrapper }); + + expect(screen.getByText("2 rules can't be edited (test failure)")).toBeInTheDocument(); + expect(screen.getByText("1 rule can't be edited (another failure)")).toBeInTheDocument(); + }); + + test.each([ + [ + BulkActionsDryRunErrCode.IMMUTABLE, + '2 prebuilt Elastic rules (editing prebuilt rules is not supported)', + ], + [ + BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN, + "2 custom Machine Learning rules (these rules don't have index patterns)", + ], + [ + BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH, + "2 Machine Learning rules can't be edited (test failure)", + ], + [undefined, "2 rules can't be edited (test failure)"], + ])('should render correct message for "%s" errorCode', (errorCode, value) => { + const ruleErrors: DryRunResult['ruleErrors'] = [ + { + message: 'test failure', + errorCode, + ruleIds: ['rule:1', 'rule:2'], + }, + ]; + render(<BulkEditRuleErrorsList ruleErrors={ruleErrors} />, { wrapper: Wrapper }); + + expect(screen.getByText(value)).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.tsx new file mode 100644 index 0000000000000..1a95332ac61d5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_rule_errors_list.tsx @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiSpacer } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import type { DryRunResult } from './use_bulk_actions_dry_run'; +import { BulkActionsDryRunErrCode } from '../../../../../../../common/constants'; + +interface BulkEditRuleErrorsListProps { + ruleErrors: DryRunResult['ruleErrors']; +} + +const BulkEditRuleErrorsListComponent = ({ ruleErrors = [] }: BulkEditRuleErrorsListProps) => { + if (ruleErrors.length === 0) { + return null; + } + + return ( + <> + <FormattedMessage + id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.actionRejectionDescription" + defaultMessage="This action can't be applied to the following rules:" + /> + <EuiSpacer /> + <ul> + {ruleErrors.map(({ message, errorCode, ruleIds }) => { + const rulesCount = ruleIds.length; + switch (errorCode) { + case BulkActionsDryRunErrCode.IMMUTABLE: + return ( + <li key={message}> + <FormattedMessage + id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.elasticRulesEditDescription" + defaultMessage="{rulesCount, plural, =1 {# prebuilt Elastic rule} other {# prebuilt Elastic rules}} (editing prebuilt rules is not supported)" + values={{ rulesCount }} + /> + </li> + ); + case BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN: + return ( + <li key={message}> + <FormattedMessage + id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.machineLearningRulesIndexEditDescription" + defaultMessage="{rulesCount, plural, =1 {# custom Machine Learning rule} other {# custom Machine Learning rules}} (these rules don't have index patterns)" + values={{ rulesCount }} + /> + </li> + ); + case BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH: + return ( + <li key={message}> + <FormattedMessage + id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.machineLearningRulesAuthDescription" + defaultMessage="{rulesCount, plural, =1 {# Machine Learning rule} other {# Machine Learning rules}} can't be edited ({message})" + values={{ rulesCount, message }} + /> + </li> + ); + default: + return ( + <li key={message}> + <FormattedMessage + id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.defaultRulesEditFailureDescription" + defaultMessage="{rulesCount, plural, =1 {# rule} other {# rules}} can't be edited ({message})" + values={{ rulesCount, message }} + /> + </li> + ); + } + })} + </ul> + </> + ); +}; + +export const BulkEditRuleErrorsList = React.memo(BulkEditRuleErrorsListComponent); + +BulkEditRuleErrorsList.displayName = 'BulkEditRuleErrorsList'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx index a72807352627f..003e40471c8ba 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx @@ -7,7 +7,6 @@ /* eslint-disable complexity */ import React, { useCallback } from 'react'; -import { useQueryClient } from 'react-query'; import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiTextColor, EuiFlexGroup, EuiButton, EuiFlexItem } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; @@ -28,10 +27,10 @@ import * as i18n from '../../translations'; import { executeRulesBulkAction } from '../actions'; import { useHasActionsPrivileges } from '../use_has_actions_privileges'; import { useHasMlPermissions } from '../use_has_ml_permissions'; -import { getCustomRulesCountFromCache } from './use_custom_rules_count'; +import type { ExecuteBulkActionsDryRun } from './use_bulk_actions_dry_run'; import { useAppToasts } from '../../../../../../common/hooks/use_app_toasts'; import { convertRulesFilterToKQL } from '../../../../../containers/detection_engine/rules/utils'; - +import { prepareSearchParams } from './utils/prepare_search_params'; import type { FilterOptions } from '../../../../../containers/detection_engine/rules/types'; import { useInvalidateRules, @@ -49,6 +48,7 @@ interface UseBulkActionsArgs { bulkActionEditType: BulkActionEditType ) => Promise<BulkActionEditPayload | null>; reFetchTags: () => void; + executeBulkActionsDryRun: ExecuteBulkActionsDryRun; } export const useBulkActions = ({ @@ -57,8 +57,8 @@ export const useBulkActions = ({ confirmBulkEdit, completeBulkEditForm, reFetchTags, + executeBulkActionsDryRun, }: UseBulkActionsArgs) => { - const queryClient = useQueryClient(); const hasMlPermissions = useHasMlPermissions(); const rulesTableContext = useRulesTableContext(); const invalidateRules = useInvalidateRules(); @@ -89,7 +89,7 @@ export const useBulkActions = ({ actions: { setLoadingRules, clearRulesSelection }, } = rulesTableContext; - return useCallback( + const getBulkItemsPopoverContent = useCallback( (closePopover: () => void): EuiContextMenuPanelDescriptor[] => { const selectedRules = rules.filter(({ id }) => selectedRuleIds.includes(id)); @@ -174,6 +174,7 @@ export const useBulkActions = ({ } startTransaction({ name: BULK_RULE_ACTIONS.DELETE }); + await executeRulesBulkAction({ visibleRuleIds: selectedRuleIds, action: BulkAction.delete, @@ -190,8 +191,8 @@ export const useBulkActions = ({ const handleExportAction = async () => { closePopover(); - startTransaction({ name: BULK_RULE_ACTIONS.EXPORT }); + await executeRulesBulkAction({ visibleRuleIds: selectedRuleIds, action: BulkAction.export, @@ -208,12 +209,19 @@ export const useBulkActions = ({ // disabling auto-refresh so user's selected rules won't disappear after table refresh closePopover(); - const customSelectedRuleIds = selectedRules - .filter((rule) => rule.immutable === false) - .map((rule) => rule.id); + const dryRunResult = await executeBulkActionsDryRun({ + action: BulkAction.edit, + editAction: bulkEditActionType, + searchParams: isAllSelected + ? { query: convertRulesFilterToKQL(filterOptions) } + : { ids: selectedRuleIds }, + }); + + // show bulk edit confirmation window only if there is at least one failed rule + const hasFailedRules = (dryRunResult?.failedRulesCount ?? 0) > 0; - // User has cancelled edit action or there are no custom rules to proceed - if ((await confirmBulkEdit()) === false) { + if (hasFailedRules && (await confirmBulkEdit()) === false) { + // User has cancelled edit action or there are no custom rules to proceed return; } @@ -230,10 +238,6 @@ export const useBulkActions = ({ } }; - const customRulesCount = isAllSelected - ? getCustomRulesCountFromCache(queryClient) - : customSelectedRuleIds.length; - // show warning toast only if bulk edit action exceeds 5s // if bulkAction already finished, we won't show toast at all (hence flag "isBulkEditFinished") setTimeout(() => { @@ -245,7 +249,11 @@ export const useBulkActions = ({ title: i18n.BULK_EDIT_WARNING_TOAST_TITLE, text: mountReactNode( <> - <p>{i18n.BULK_EDIT_WARNING_TOAST_DESCRIPTION(customRulesCount)}</p> + <p> + {i18n.BULK_EDIT_WARNING_TOAST_DESCRIPTION( + dryRunResult?.succeededRulesCount ?? 0 + )} + </p> <EuiFlexGroup justifyContent="flexEnd" gutterSize="s"> <EuiFlexItem grow={false}> <EuiButton color="warning" size="s" onClick={hideWarningToast}> @@ -268,14 +276,10 @@ export const useBulkActions = ({ toasts, payload: { edit: [editPayload] }, onFinish: () => hideWarningToast(), - search: isAllSelected - ? { - query: convertRulesFilterToKQL({ - ...filterOptions, - showCustomRules: true, // only edit custom rules, as elastic rule are immutable - }), - } - : { ids: customSelectedRuleIds }, + search: prepareSearchParams({ + ...(isAllSelected ? { filterOptions } : { selectedRuleIds }), + dryRunResult, + }), }); isBulkEditFinished = true; @@ -447,12 +451,14 @@ export const useBulkActions = ({ confirmDeletion, confirmBulkEdit, completeBulkEditForm, - queryClient, filterOptions, getIsMounted, resolveTagsRefetch, updateRulesCache, clearRulesSelection, + executeBulkActionsDryRun, ] ); + + return getBulkItemsPopoverContent; }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions_dry_run.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions_dry_run.ts new file mode 100644 index 0000000000000..cd0caf63b94d4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions_dry_run.ts @@ -0,0 +1,114 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { UseMutateAsyncFunction } from 'react-query'; +import { useMutation } from 'react-query'; + +import type { BulkActionsDryRunErrCode } from '../../../../../../../common/constants'; + +import type { + BulkAction, + BulkActionEditType, +} from '../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionResponse } from '../../../../../containers/detection_engine/rules'; +import { performBulkAction } from '../../../../../containers/detection_engine/rules'; +import { computeDryRunPayload } from './utils/compute_dry_run_payload'; + +const BULK_ACTIONS_DRY_RUN_QUERY_KEY = 'bulkActionsDryRun'; + +export interface DryRunResult { + /** + * total number of rules that succeeded validation in dry run + */ + succeededRulesCount?: number; + /** + * total number of rules that failed validation in dry run + */ + failedRulesCount?: number; + /** + * rule failures errors(message and error code) and ids of rules, that failed + */ + ruleErrors: Array<{ + message: string; + errorCode?: BulkActionsDryRunErrCode; + ruleIds: string[]; + }>; +} + +/** + * helper utility that transforms raw BulkActionResponse response to DryRunResult format + * @param response - raw bulk_actions API response ({@link BulkActionResponse}) + * @returns dry run result ({@link DryRunResult}) + */ +const processDryRunResult = (response: BulkActionResponse | undefined): DryRunResult => { + const processed = { + succeededRulesCount: response?.attributes.summary.succeeded, + failedRulesCount: response?.attributes.summary.failed, + ruleErrors: + response?.attributes.errors?.map(({ message, err_code: errorCode, rules }) => ({ + message, + errorCode, + ruleIds: rules.map(({ id }) => id), + })) ?? [], + }; + + return processed; +}; + +export type ExecuteBulkActionsDryRun = UseMutateAsyncFunction< + DryRunResult | undefined, + unknown, + BulkActionsDryRunVariables +>; + +export type UseBulkActionsDryRun = () => { + bulkActionsDryRunResult?: DryRunResult; + isBulkActionsDryRunLoading: boolean; + executeBulkActionsDryRun: ExecuteBulkActionsDryRun; +}; + +interface BulkActionsDryRunVariables { + action?: Exclude<BulkAction, BulkAction.export>; + editAction?: BulkActionEditType; + searchParams: { query?: string } | { ids?: string[] }; +} + +export const useBulkActionsDryRun: UseBulkActionsDryRun = () => { + const { data, mutateAsync, isLoading } = useMutation< + DryRunResult | undefined, + unknown, + BulkActionsDryRunVariables + >([BULK_ACTIONS_DRY_RUN_QUERY_KEY], async ({ searchParams, action, editAction }) => { + if (!action) { + return undefined; + } + + let result: BulkActionResponse; + try { + result = await performBulkAction({ + ...searchParams, + action, + edit: computeDryRunPayload(action, editAction), + isDryRun: true, + }); + } catch (err) { + // if body doesn't have summary data, action failed altogether and no data available for dry run + if ((err.body as BulkActionResponse)?.attributes?.summary?.total === undefined) { + return; + } + result = err.body; + } + + return processDryRunResult(result); + }); + + return { + bulkActionsDryRunResult: data, + isBulkActionsDryRunLoading: isLoading, + executeBulkActionsDryRun: mutateAsync, + }; +}; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts deleted file mode 100644 index 11218a6a9bd1f..0000000000000 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { QueryClient } from 'react-query'; -import { useQuery } from 'react-query'; - -import { fetchRules } from '../../../../../containers/detection_engine/rules/api'; -import type { FilterOptions } from '../../../../../containers/detection_engine/rules/types'; - -const CUSTOM_RULES_COUNT_QUERY_KEY = 'customRulesCount'; -interface CustomRulesCountData { - customRulesCount: number; -} - -export const getCustomRulesCountFromCache = (queryClient: QueryClient) => - queryClient.getQueryData<CustomRulesCountData>(CUSTOM_RULES_COUNT_QUERY_KEY)?.customRulesCount ?? - 0; - -type UseCustomRulesCount = (arg: { filterOptions: FilterOptions; enabled: boolean }) => { - customRulesCount: number; - isCustomRulesCountLoading: boolean; -}; - -export const useCustomRulesCount: UseCustomRulesCount = ({ filterOptions, enabled }) => { - const { data, isFetching } = useQuery<CustomRulesCountData>( - [CUSTOM_RULES_COUNT_QUERY_KEY], - async ({ signal }) => { - const res = await fetchRules({ - pagination: { perPage: 1, page: 1 }, - filterOptions: { ...filterOptions, showCustomRules: true }, - signal, - }); - - return { - customRulesCount: res.total, - }; - }, - { - enabled, - } - ); - - return { - customRulesCount: data?.customRulesCount ?? 0, - isCustomRulesCountLoading: isFetching, - }; -}; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.test.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.test.ts new file mode 100644 index 0000000000000..cbdb34654a99b --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.test.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + BulkAction, + BulkActionEditType, +} from '../../../../../../../../common/detection_engine/schemas/common/schemas'; + +import { computeDryRunPayload } from './compute_dry_run_payload'; + +describe('computeDryRunPayload', () => { + test.each([ + [BulkAction.export], + [BulkAction.duplicate], + [BulkAction.delete], + [BulkAction.enable], + [BulkAction.disable], + ])('should return payload undefined if action is %s', (action) => { + expect(computeDryRunPayload(action)).toBeUndefined(); + }); + + test('should return payload undefined if bulkEdit action is not defined', () => { + expect(computeDryRunPayload(BulkAction.edit)).toBeUndefined(); + }); + + test.each([ + [BulkActionEditType.set_index_patterns, []], + [BulkActionEditType.delete_index_patterns, []], + [BulkActionEditType.add_index_patterns, []], + [BulkActionEditType.add_tags, []], + [BulkActionEditType.delete_index_patterns, []], + [BulkActionEditType.set_tags, []], + [BulkActionEditType.set_timeline, { timeline_id: '', timeline_title: '' }], + ])('should return correct payload for bulk edit action %s', (editAction, value) => { + const payload = computeDryRunPayload(BulkAction.edit, editAction); + expect(payload).toHaveLength(1); + expect(payload?.[0].type).toEqual(editAction); + expect(payload?.[0].value).toEqual(value); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.ts new file mode 100644 index 0000000000000..d50d6840e899a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/compute_dry_run_payload.ts @@ -0,0 +1,57 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { BulkActionEditPayload } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import { + BulkAction, + BulkActionEditType, +} from '../../../../../../../../common/detection_engine/schemas/common/schemas'; + +/** + * helper utility that creates payload for _bulk_action API in dry mode + * @param {BulkAction} action + * @param {BulkActionEditType | undefined} editAction + * @returns {BulkActionEditPayload[] | undefined} + */ +export const computeDryRunPayload = ( + action: BulkAction, + editAction?: BulkActionEditType +): BulkActionEditPayload[] | undefined => { + if (action !== BulkAction.edit || !editAction) { + return undefined; + } + + switch (editAction) { + case BulkActionEditType.add_index_patterns: + case BulkActionEditType.delete_index_patterns: + case BulkActionEditType.set_index_patterns: + return [ + { + type: editAction, + value: [], + }, + ]; + + case BulkActionEditType.add_tags: + case BulkActionEditType.delete_tags: + case BulkActionEditType.set_tags: + return [ + { + type: editAction, + value: [], + }, + ]; + + case BulkActionEditType.set_timeline: + return [ + { + type: editAction, + value: { timeline_id: '', timeline_title: '' }, + }, + ]; + } +}; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.test.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.test.ts new file mode 100644 index 0000000000000..f86d98670f117 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.test.ts @@ -0,0 +1,111 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { DryRunResult } from '../use_bulk_actions_dry_run'; +import type { FilterOptions } from '../../../../../../containers/detection_engine/rules/types'; + +import { convertRulesFilterToKQL } from '../../../../../../containers/detection_engine/rules/utils'; +import { BulkActionsDryRunErrCode } from '../../../../../../../../common/constants'; + +import { prepareSearchParams } from './prepare_search_params'; + +jest.mock('../../../../../../containers/detection_engine/rules/utils', () => ({ + convertRulesFilterToKQL: jest.fn().mockReturnValue('str'), +})); + +const mockConvertRulesFilterToKQL = convertRulesFilterToKQL as jest.Mock; + +describe('prepareSearchParams', () => { + test('should remove ids from selectedRuleIds if dryRunResult has failed ids', () => { + const selectedRuleIds = ['rule:1', 'rule:2', 'rule:3']; + const dryRunResult: DryRunResult = { + ruleErrors: [ + { + message: 'test failure', + ruleIds: ['rule:2'], + }, + { + message: 'test failure N2', + ruleIds: ['rule:3'], + }, + ], + }; + const result = prepareSearchParams({ + selectedRuleIds, + dryRunResult, + }); + + expect(result.ids).toEqual(['rule:1']); + }); + + test.each([ + [ + BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN, + { + filter: '', + tags: [], + showCustomRules: false, + showElasticRules: false, + excludeRuleTypes: ['machine_learning'], + }, + ], + [ + BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH, + { + filter: '', + tags: [], + showCustomRules: false, + showElasticRules: false, + excludeRuleTypes: ['machine_learning'], + }, + ], + [ + BulkActionsDryRunErrCode.IMMUTABLE, + { + filter: '', + tags: [], + showCustomRules: true, + showElasticRules: false, + }, + ], + [ + undefined, + { + filter: '', + tags: [], + showCustomRules: false, + showElasticRules: false, + }, + ], + ])( + 'should call convertRulesFilterToKQL with correct filter if "%s" errorCode present in dryRunResult', + (errorCode, value) => { + const filterOptions: FilterOptions = { + filter: '', + tags: [], + showCustomRules: false, + showElasticRules: false, + }; + const dryRunResult: DryRunResult = { + ruleErrors: [ + { + message: 'test failure', + errorCode, + ruleIds: ['rule:2'], + }, + ], + }; + const result = prepareSearchParams({ + filterOptions, + dryRunResult, + }); + + expect(mockConvertRulesFilterToKQL).toHaveBeenCalledWith(value); + expect(result.query).toEqual(expect.any(String)); + } + ); +}); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.ts new file mode 100644 index 0000000000000..c7dfdfc129969 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/utils/prepare_search_params.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { DryRunResult } from '../use_bulk_actions_dry_run'; +import type { FilterOptions } from '../../../../../../containers/detection_engine/rules/types'; + +import { convertRulesFilterToKQL } from '../../../../../../containers/detection_engine/rules/utils'; +import { BulkActionsDryRunErrCode } from '../../../../../../../../common/constants'; + +type PrepareSearchFilterProps = + | { selectedRuleIds: string[]; dryRunResult?: DryRunResult } + | { filterOptions: FilterOptions; dryRunResult?: DryRunResult }; + +/** + * helper methods to prepare search params for bulk actions based on results of previous dry run + * It excludes failed rules from search and perform bulk action on possible successfully edited rules + * @param dryRunResult {@link DryRunResult} result of API _bulk_action dry_run + * @param {string[]} selectedRuleIds - list of selected rule ids + * @param filterOptions {@link FilterOptions} find filter + * @returns either list of ids or KQL search query + */ +export const prepareSearchParams = ({ dryRunResult, ...props }: PrepareSearchFilterProps) => { + // if selectedRuleIds present, filter out rules that failed during dry run + if ('selectedRuleIds' in props) { + const failedRuleIdsSet = new Set(dryRunResult?.ruleErrors.flatMap(({ ruleIds }) => ruleIds)); + + return { ids: props.selectedRuleIds.filter((id) => !failedRuleIdsSet.has(id)) }; + } + + // otherwise create filter that excludes failed results based on dry run errors + let modifiedFilterOptions = { ...props.filterOptions }; + dryRunResult?.ruleErrors.forEach(({ errorCode }) => { + switch (errorCode) { + case BulkActionsDryRunErrCode.IMMUTABLE: + modifiedFilterOptions = { ...modifiedFilterOptions, showCustomRules: true }; + break; + case BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN: + case BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH: + modifiedFilterOptions = { + ...modifiedFilterOptions, + excludeRuleTypes: [...(modifiedFilterOptions.excludeRuleTypes ?? []), 'machine_learning'], + }; + break; + } + }); + + return { query: convertRulesFilterToKQL(modifiedFilterOptions) }; +}; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx index 70dc23e3dd237..9dd6ca7529b27 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx @@ -5,8 +5,6 @@ * 2.0. */ -/* eslint-disable complexity */ - import { EuiBasicTable, EuiConfirmModal, @@ -14,8 +12,8 @@ import { EuiLoadingContent, EuiProgress, } from '@elastic/eui'; -import { partition } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; +import { AllRulesTabs } from './rules_table_toolbar'; import { RULES_TABLE_PAGE_SIZE_OPTIONS } from '../../../../../../common/constants'; import { Loader } from '../../../../../common/components/loader'; import { useBoolState } from '../../../../../common/hooks/use_bool_state'; @@ -28,18 +26,17 @@ import { useTags } from '../../../../containers/detection_engine/rules/use_tags' import { getPrePackagedRuleStatus } from '../helpers'; import * as i18n from '../translations'; import type { EuiBasicTableOnChange } from '../types'; -import { BulkEditConfirmation } from './bulk_actions/bulk_edit_confirmation'; -import { BulkEditFlyout } from './bulk_actions/bulk_edit_flyout'; -import { useBulkActions } from './bulk_actions/use_bulk_actions'; -import { useBulkEditFormFlyout } from './bulk_actions/use_bulk_edit_form_flyout'; -import { useCustomRulesCount } from './bulk_actions/use_custom_rules_count'; +import { useMonitoringColumns, useRulesColumns } from './use_columns'; import { showRulesTable } from './helpers'; import { useRulesTableContext } from './rules_table/rules_table_context'; import { useAsyncConfirmation } from './rules_table/use_async_confirmation'; import { RulesTableFilters } from './rules_table_filters/rules_table_filters'; -import { AllRulesTabs } from './rules_table_toolbar'; -import { useMonitoringColumns, useRulesColumns } from './use_columns'; import { AllRulesUtilityBar } from './utility_bar'; +import { useBulkActionsDryRun } from './bulk_actions/use_bulk_actions_dry_run'; +import { useBulkEditFormFlyout } from './bulk_actions/use_bulk_edit_form_flyout'; +import { BulkEditDryRunConfirmation } from './bulk_actions/bulk_edit_dry_run_confirmation'; +import { BulkEditFlyout } from './bulk_actions/bulk_edit_flyout'; +import { useBulkActions } from './bulk_actions/use_bulk_actions'; const INITIAL_SORT_FIELD = 'enabled'; @@ -137,11 +134,6 @@ export const RulesTables = React.memo<RulesTableProps>( onFinish: hideBulkEditConfirmation, }); - const { customRulesCount, isCustomRulesCountLoading } = useCustomRulesCount({ - enabled: isBulkEditConfirmationVisible && isAllSelected, - filterOptions, - }); - const { bulkEditActionType, isBulkEditFlyoutVisible, @@ -153,11 +145,8 @@ export const RulesTables = React.memo<RulesTableProps>( const selectedItemsCount = isAllSelected ? pagination.total : selectedRuleIds.length; const hasPagination = pagination.total > pagination.perPage; - const [selectedElasticRuleIds, selectedCustomRuleIds] = useMemo(() => { - const ruleImmutabilityMap = new Map(rules.map((rule) => [rule.id, rule.immutable])); - const predicate = (id: string) => ruleImmutabilityMap.get(id); - return partition(predicate, selectedRuleIds); - }, [rules, selectedRuleIds]); + const { bulkActionsDryRunResult, isBulkActionsDryRunLoading, executeBulkActionsDryRun } = + useBulkActionsDryRun(); const getBulkItemsPopoverContent = useBulkActions({ filterOptions, @@ -165,6 +154,7 @@ export const RulesTables = React.memo<RulesTableProps>( confirmBulkEdit, completeBulkEditForm, reFetchTags, + executeBulkActionsDryRun, }); const paginationMemo = useMemo( @@ -322,21 +312,16 @@ export const RulesTables = React.memo<RulesTableProps>( <p>{i18n.DELETE_CONFIRMATION_BODY}</p> </EuiConfirmModal> )} - {isBulkEditConfirmationVisible && !isCustomRulesCountLoading && ( - <BulkEditConfirmation - customRulesCount={isAllSelected ? customRulesCount : selectedCustomRuleIds.length} - elasticRulesCount={ - isAllSelected - ? Math.max((pagination.total ?? 0) - customRulesCount, 0) - : selectedElasticRuleIds.length - } + {isBulkEditConfirmationVisible && ( + <BulkEditDryRunConfirmation + result={bulkActionsDryRunResult} onCancel={handleBulkEditCancel} onConfirm={handleBulkEditConfirm} /> )} {isBulkEditFlyoutVisible && bulkEditActionType !== undefined && ( <BulkEditFlyout - rulesCount={isAllSelected ? customRulesCount : selectedCustomRuleIds.length} + rulesCount={bulkActionsDryRunResult?.succeededRulesCount ?? 0} editAction={bulkEditActionType} onClose={handleBulkEditFormCancel} onConfirm={handleBulkEditFormConfirm} @@ -356,7 +341,7 @@ export const RulesTables = React.memo<RulesTableProps>( onRefreshSwitch={handleAutoRefreshSwitch} isAllSelected={isAllSelected} onToggleSelectAll={toggleSelectAll} - isBulkActionInProgress={isCustomRulesCountLoading || loadingRulesAction != null} + isBulkActionInProgress={isBulkActionsDryRunLoading || loadingRulesAction != null} hasDisabledActions={loadingRulesAction != null} hasBulkActions /> diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index cb6345517134b..703e5feb836ca 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -230,13 +230,22 @@ export const BULK_EDIT_WARNING_TOAST_NOTIFY = i18n.translate( } ); -export const BULK_EDIT_CONFIRMATION_TITLE = (elasticRulesCount: number) => +export const BULK_EDIT_CONFIRMATION_DENIED_TITLE = (rulesCount: number) => i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationTitle', + 'xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle', { - values: { elasticRulesCount }, + values: { rulesCount }, + defaultMessage: '{rulesCount, plural, =1 {# rule} other {# rules}} cannot be edited', + } + ); + +export const BULK_EDIT_CONFIRMATION_PARTLY_TITLE = (customRulesCount: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationPartlyTitle', + { + values: { customRulesCount }, defaultMessage: - '{elasticRulesCount, plural, =1 {# Elastic rule} other {# Elastic rules}} cannot be edited', + "The action will only be applied to {customRulesCount, plural, =1 {# Custom rule} other {# Custom rules}} you've selected", } ); @@ -247,13 +256,22 @@ export const BULK_EDIT_CONFIRMATION_CANCEL = i18n.translate( } ); -export const BULK_EDIT_CONFIRMATION_CONFIRM = i18n.translate( - 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel', +export const BULK_EDIT_CONFIRMATION_CLOSE = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCloseButtonLabel', { - defaultMessage: 'Edit custom rules', + defaultMessage: 'Close', } ); +export const BULK_EDIT_CONFIRMATION_CONFIRM = (customRulesCount: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel', + { + values: { customRulesCount }, + defaultMessage: 'Edit {customRulesCount, plural, =1 {# Custom rule} other {# Custom rules}}', + } + ); + export const BULK_EDIT_FLYOUT_FORM_SAVE = i18n.translate( 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.saveButtonLabel', { diff --git a/x-pack/plugins/security_solution/public/helpers.test.tsx b/x-pack/plugins/security_solution/public/helpers.test.tsx index c9895da6753d9..fa244184b454e 100644 --- a/x-pack/plugins/security_solution/public/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/helpers.test.tsx @@ -18,6 +18,11 @@ import { getField, } from './helpers'; import type { StartedSubPlugins } from './types'; +import { + allCasesCapabilities, + noCasesCapabilities, + readCasesCapabilities, +} from './cases_test_utils'; describe('public helpers parseRoute', () => { it('should properly parse hash route', () => { @@ -76,7 +81,7 @@ describe('#getSubPluginRoutesByCapabilities', () => { it('cases routes should return NoPrivilegesPage component when cases plugin is NOT available ', () => { const routes = getSubPluginRoutesByCapabilities(mockSubPlugins, { [SERVER_APP_ID]: { show: true, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities); const casesRoute = routes.find((r) => r.path === 'cases'); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -91,7 +96,7 @@ describe('#getSubPluginRoutesByCapabilities', () => { it('alerts should return NoPrivilegesPage component when siem plugin is NOT available ', () => { const routes = getSubPluginRoutesByCapabilities(mockSubPlugins, { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: readCasesCapabilities(), } as unknown as Capabilities); const alertsRoute = routes.find((r) => r.path === 'alerts'); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -106,7 +111,7 @@ describe('#getSubPluginRoutesByCapabilities', () => { it('should return NoPrivilegesPage for each route when both plugins are NOT available ', () => { const routes = getSubPluginRoutesByCapabilities(mockSubPlugins, { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities); const casesRoute = routes.find((r) => r.path === 'cases'); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -134,7 +139,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('pluginKey', { [SERVER_APP_ID]: { show: true, crud: true }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities) ).toBeTruthy(); }); @@ -143,7 +148,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('pluginKey', { [SERVER_APP_ID]: { show: true, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities) ).toBeTruthy(); }); @@ -152,7 +157,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('pluginKey', { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities) ).toBeFalsy(); }); @@ -161,7 +166,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('cases', { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: allCasesCapabilities(), } as unknown as Capabilities) ).toBeTruthy(); }); @@ -170,7 +175,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('cases', { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: readCasesCapabilities(), } as unknown as Capabilities) ).toBeTruthy(); }); @@ -179,7 +184,7 @@ describe('#isSubPluginAvailable', () => { expect( isSubPluginAvailable('pluginKey', { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities) ).toBeFalsy(); }); @@ -189,7 +194,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to overview page when siem and case privileges are all', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: true, crud: true }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: allCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -201,7 +206,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to overview page when siem and case privileges are read', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: true, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: readCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -213,7 +218,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to overview page when siem and case privileges are off', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: false, crud_cases: false }, + [CASES_FEATURE_ID]: noCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -225,7 +230,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to overview page when siem privilege is read and case privilege is all', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: true, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: allCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -237,7 +242,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to overview page when siem privilege is read and case privilege is read', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: true, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: allCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -249,7 +254,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to cases page when siem privilege is none and case privilege is read', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: false }, + [CASES_FEATURE_ID]: readCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect @@ -261,7 +266,7 @@ describe('RedirectRoute', () => { it('RedirectRoute should redirect to cases page when siem privilege is none and case privilege is all', () => { const mockCapabilitities = { [SERVER_APP_ID]: { show: false, crud: false }, - [CASES_FEATURE_ID]: { read_cases: true, crud_cases: true }, + [CASES_FEATURE_ID]: allCasesCapabilities(), } as unknown as Capabilities; expect(shallow(<RedirectRoute capabilities={mockCapabilitities} />)).toMatchInlineSnapshot(` <Redirect diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.tsx index d8134769db4c3..4ebf075004b89 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.tsx @@ -28,7 +28,7 @@ export interface CommandExecutionOutputProps { item: CommandHistoryItem; } export const CommandExecutionOutput = memo<CommandExecutionOutputProps>( - ({ item: { command, state, id, enteredAt } }) => { + ({ item: { command, state, id, enteredAt, isValid } }) => { const dispatch = useConsoleStateDispatch(); const RenderComponent = command.commandDefinition.RenderComponent; const [isLongRunningCommand, setIsLongRunningCommand] = useState(false); @@ -92,10 +92,12 @@ export const CommandExecutionOutput = memo<CommandExecutionOutputProps>( return ( <CommandOutputContainer> <div> - <UserCommandInput input={command.input} /> + <UserCommandInput input={command.input} isValid={isValid} /> </div> <div> + {/* UX desire for 12px (current theme): achieved with EuiSpace sizes - s (8px) + xs (4px) */} <EuiSpacer size="s" /> + <EuiSpacer size="xs" /> <RenderComponent command={command} diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx index 90172fdd29c32..563c20e4317fd 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx @@ -17,15 +17,15 @@ import { ConsoleText } from './console_text'; const COMMAND_EXECUTION_RESULT_SUCCESS_TITLE = i18n.translate( 'xpack.securitySolution.commandExecutionResult.successTitle', - { defaultMessage: 'Success. Action was complete.' } + { defaultMessage: 'Action completed.' } ); const COMMAND_EXECUTION_RESULT_FAILURE_TITLE = i18n.translate( 'xpack.securitySolution.commandExecutionResult.failureTitle', - { defaultMessage: 'Error. Action failed.' } + { defaultMessage: 'Action failed.' } ); const COMMAND_EXECUTION_RESULT_PENDING = i18n.translate( 'xpack.securitySolution.commandExecutionResult.pending', - { defaultMessage: 'Action pending' } + { defaultMessage: 'Action pending.' } ); export type CommandExecutionResultProps = PropsWithChildren<{ diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx index 2701ebdb136b5..04a57ad6ec9f6 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx @@ -90,6 +90,9 @@ describe('When entering data into the Console input', () => { enterCommand('abc ', { inputOnly: true }); expect(getFooterText()).toEqual('Unknown command abc'); + expect(renderResult.getByTestId('test-cmdInput-container').classList.contains('error')).toBe( + true + ); }); it('should show the arrow button as not disabled if input has text entered', () => { @@ -260,7 +263,7 @@ describe('When entering data into the Console input', () => { expect(getUserInputText()).toEqual('c'); expect(getRightOfCursorText()).toEqual('md1 '); - expect(getFooterText()).toEqual('cmd1 '); + expect(getFooterText()).toEqual('Hit enter to execute'); }); // FIXME:PT uncomment once task OLM task #4384 is implemented diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx index a4ff5b03b45e8..92f5c9ff33b0e 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx @@ -11,6 +11,7 @@ import type { CommonProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, useResizeObserver, EuiButtonIcon } from '@elastic/eui'; import styled from 'styled-components'; import classNames from 'classnames'; +import { useWithInputVisibleState } from '../../hooks/state_selectors/use_with_input_visible_state'; import type { ConsoleDataState } from '../console_state/types'; import { useInputHints } from './hooks/use_input_hints'; import { InputPlaceholder } from './components/input_placeholder'; @@ -33,8 +34,12 @@ const CommandInputContainer = styled.div` } &.active { - border-bottom: solid ${({ theme: { eui } }) => eui.euiBorderWidthThin} - ${({ theme: { eui } }) => eui.euiColorPrimary}; + border-bottom: ${({ theme: { eui } }) => eui.euiBorderThick}; + border-bottom-color: ${({ theme: { eui } }) => eui.euiColorPrimary}; + } + + &.error { + border-bottom-color: ${({ theme: { eui } }) => eui.euiColorDanger}; } .textEntered { @@ -78,6 +83,7 @@ export const CommandInput = memo<CommandInputProps>(({ prompt = '', focusRef, .. useInputHints(); const dispatch = useConsoleStateDispatch(); const { rightOfCursor, textEntered } = useWithInputTextEntered(); + const visibleState = useWithInputVisibleState(); const [isKeyInputBeingCaptured, setIsKeyInputBeingCaptured] = useState(false); const getTestId = useTestIdGenerator(useDataTestSubj()); const [commandToExecute, setCommandToExecute] = useState(''); @@ -103,12 +109,13 @@ export const CommandInput = memo<CommandInputProps>(({ prompt = '', focusRef, .. }); }, [isKeyInputBeingCaptured]); - const focusClassName = useMemo(() => { + const inputContainerClassname = useMemo(() => { return classNames({ cmdInput: true, active: isKeyInputBeingCaptured, + error: visibleState === 'error', }); - }, [isKeyInputBeingCaptured]); + }, [isKeyInputBeingCaptured, visibleState]); const disableArrowButton = useMemo( () => textEntered.length === 0 && rightOfCursor.text.length === 0, @@ -256,6 +263,12 @@ export const CommandInput = memo<CommandInputProps>(({ prompt = '', focusRef, .. [dispatch, rightOfCursor.text] ); + const handleOnFocus = useCallback(() => { + if (!isKeyInputBeingCaptured) { + dispatch({ type: 'addFocusToKeyCapture' }); + } + }, [dispatch, isKeyInputBeingCaptured]); + // Execute the command if one was ENTER'd. useEffect(() => { if (commandToExecute) { @@ -268,9 +281,12 @@ export const CommandInput = memo<CommandInputProps>(({ prompt = '', focusRef, .. <InputAreaPopover width={popoverWidth}> <CommandInputContainer {...commonProps} - className={focusClassName} + className={inputContainerClassname} onClick={handleTypingAreaClick} ref={containerRef} + tabIndex={0} + onFocus={handleOnFocus} + data-test-subj={getTestId('cmdInput-container')} > <EuiFlexGroup wrap={true} diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts index 63238a49f48bd..621f9b573b3d7 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts @@ -20,13 +20,9 @@ const UNKNOWN_COMMAND_HINT = (commandName: string) => values: { commandName }, }); -const COMMAND_USAGE_HINT = (usage: string) => - i18n.translate('xpack.securitySolution.useInputHints.commandUsage', { - defaultMessage: '{usage}', - values: { - usage, - }, - }); +const NO_ARGUMENTS_HINT = i18n.translate('xpack.securitySolution.useInputHints.noArguments', { + defaultMessage: 'Hit enter to execute', +}); /** * Auto-generates console footer "hints" while user is interacting with the input area @@ -48,18 +44,43 @@ export const useInputHints = () => { if (commandEntered && !isInputPopoverOpen) { // Is valid command name? ==> show usage if (commandEnteredDefinition) { + const exampleInstruction = commandEnteredDefinition?.exampleInstruction ?? ''; + const exampleUsage = commandEnteredDefinition?.exampleUsage ?? ''; + + let hint = exampleInstruction ?? ''; + + if (exampleUsage) { + if (exampleInstruction) { + // leading space below is intentional + hint += ` ${i18n.translate('xpack.securitySolution.useInputHints.exampleInstructions', { + defaultMessage: 'Ex: [ {exampleUsage} ]', + values: { + exampleUsage, + }, + })}`; + } else { + hint += exampleUsage; + } + } + + // If the command did not define any hint, then generate the command useage from the definition. + // If the command did define `exampleInstruction` but not `exampleUsage`, then generate the + // usage from the command definition and then append it. + // + // Generated usage is only created if the command has arguments. + if (!hint || !exampleUsage) { + const commandArguments = getArgumentsForCommand(commandEnteredDefinition); + + if (commandArguments.length > 0) { + hint += `${commandEnteredDefinition.name} ${commandArguments}`; + } else { + hint += NO_ARGUMENTS_HINT; + } + } + dispatch({ type: 'updateFooterContent', - payload: { - value: - commandEnteredDefinition.exampleUsage && commandEnteredDefinition.exampleInstruction - ? `${commandEnteredDefinition.exampleInstruction} Ex: [${commandEnteredDefinition.exampleUsage}]` - : COMMAND_USAGE_HINT( - `${commandEnteredDefinition.name} ${getArgumentsForCommand( - commandEnteredDefinition - )}` - ), - }, + payload: { value: hint }, }); } else { dispatch({ @@ -68,9 +89,12 @@ export const useInputHints = () => { value: UNKNOWN_COMMAND_HINT(commandEntered), }, }); + + dispatch({ type: 'setInputState', payload: { value: 'error' } }); } } else { dispatch({ type: 'updateFooterContent', payload: { value: '' } }); + dispatch({ type: 'setInputState', payload: { value: undefined } }); } }, [commandEntered, commandEnteredDefinition, dispatch, isInputPopoverOpen]); }; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx index 13e0d06d7a41c..bdccd319235ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx @@ -93,6 +93,8 @@ export const CommandList = memo<CommandListProps>(({ commands, display = 'defaul }; }, }); + + dispatch({ type: 'addFocusToKeyCapture' }); }, [dispatch] ); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_footer.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_footer.tsx index dfe015d2f50bd..98db00ec73e4a 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_footer.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_footer.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { memo } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { EuiTextProps } from '@elastic/eui'; import { EuiPanel, EuiText } from '@elastic/eui'; +import { useWithInputVisibleState } from '../hooks/state_selectors/use_with_input_visible_state'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; import { useWithFooterContent } from '../hooks/state_selectors/use_with_footer_content'; @@ -14,6 +16,11 @@ import { useWithFooterContent } from '../hooks/state_selectors/use_with_footer_c export const ConsoleFooter = memo(() => { const footerContent = useWithFooterContent(); const getTestId = useTestIdGenerator(useDataTestSubj()); + const inputVisibleState = useWithInputVisibleState(); + + const textColor: EuiTextProps['color'] = useMemo(() => { + return inputVisibleState === 'error' ? 'danger' : 'subdued'; + }, [inputVisibleState]); return ( <EuiPanel @@ -22,7 +29,7 @@ export const ConsoleFooter = memo(() => { color="transparent" data-test-subj={getTestId('footer')} > - <EuiText size="xs" color="subdued" className="font-style-italic"> + <EuiText size="xs" color={textColor} className="font-style-italic"> {footerContent || <> </>} </EuiText> </EuiPanel> diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_exit_modal.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_exit_modal.tsx new file mode 100644 index 0000000000000..ba823fc50b922 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_exit_modal.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo } from 'react'; +import { EuiConfirmModal, EuiText } from '@elastic/eui'; +import { CONSOLE_EXIT_MODAL_INFO } from '../translations'; + +export const ConsoleExitModal = memo( + ({ + 'data-test-subj': dataTestSubj, + message, + onClose, + onCancel, + }: { + 'data-test-subj'?: string; + message?: React.ReactNode; + onClose: () => void; + onCancel: () => void; + }) => { + return ( + <EuiConfirmModal + confirmButtonText={CONSOLE_EXIT_MODAL_INFO.confirmButtonText} + cancelButtonText={CONSOLE_EXIT_MODAL_INFO.cancelButtonText} + data-test-subj={dataTestSubj} + onCancel={onCancel} + onConfirm={onClose} + title={CONSOLE_EXIT_MODAL_INFO.title} + maxWidth={500} + > + {message ? message : <EuiText size="s">{CONSOLE_EXIT_MODAL_INFO.genericMessage}</EuiText>} + </EuiConfirmModal> + ); + } +); +ConsoleExitModal.displayName = 'ConsoleExitModal'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx index d6140265a9205..d9fbc2941ddb6 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx @@ -6,7 +6,7 @@ */ import type { ReactNode, MouseEventHandler } from 'react'; -import React, { memo, useCallback, useMemo } from 'react'; +import React, { memo, useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -14,31 +14,50 @@ import type { PageLayoutProps } from './page_layout'; import { PageLayout } from './page_layout'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; import { PageOverlay } from '../../../../page_overlay/page_overlay'; +import { ConsoleExitModal } from './console_exit_modal'; const BACK_LABEL = i18n.translate('xpack.securitySolution.consolePageOverlay.backButtonLabel', { - defaultMessage: 'Return to page content', + defaultMessage: 'Back', }); export interface ConsolePageOverlayProps { console: ReactNode; + hasPendingActions: boolean; isHidden: boolean; onHide: () => void; pageTitle?: ReactNode; + pendingExitMessage?: ReactNode; body?: ReactNode; actions?: ReactNode[]; } export const ConsolePageOverlay = memo<ConsolePageOverlayProps>( - ({ console, onHide, isHidden, body, actions, pageTitle = '' }) => { + ({ + console, + hasPendingActions, + onHide, + pendingExitMessage, + isHidden, + body, + actions, + pageTitle = '', + }) => { const getTestId = useTestIdGenerator('consolePageOverlay'); + const [showExitModal, setShowExitModal] = useState(false); + const handleCloseOverlayOnClick: MouseEventHandler = useCallback( (ev) => { ev.preventDefault(); - onHide(); + setShowExitModal(hasPendingActions); + if (!hasPendingActions) { + onHide(); + } }, - [onHide] + [onHide, hasPendingActions] ); + const onCancelModal = useCallback(() => setShowExitModal(false), [setShowExitModal]); + const layoutProps = useMemo<PageLayoutProps>(() => { // If in `hidden` mode, then we don't render the html for the layout header section // of the layout @@ -85,7 +104,17 @@ export const ConsolePageOverlay = memo<ConsolePageOverlayProps>( paddingSize="l" enableScrolling={false} > - <PageLayout {...layoutProps}>{console}</PageLayout> + <PageLayout {...layoutProps}> + {showExitModal && ( + <ConsoleExitModal + message={pendingExitMessage} + onClose={onHide} + onCancel={onCancelModal} + data-test-subj={getTestId('console-exit-modal')} + /> + )} + {console} + </PageLayout> </PageOverlay> ); } diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx index f79ae7938d625..c6d33988d2648 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx @@ -73,7 +73,7 @@ export const PageLayout = memo<PageLayoutProps>( const headerRightSideGroupProps = useMemo<EuiPageHeaderProps['rightSideGroupProps']>(() => { return { - gutterSize: 'm', + gutterSize: 's', }; }, []); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx index 932ffb1e4b477..4ee1d1445633c 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx @@ -7,6 +7,7 @@ import type { PropsWithChildren } from 'react'; import React, { memo, useCallback, useContext, useMemo, useRef, useState } from 'react'; + import type { ConsoleDataState } from '../console_state/types'; import { ConsolePageOverlay } from './components/console_page_overlay'; import type { @@ -19,7 +20,11 @@ import { Console } from '../../console'; interface ManagedConsole extends Pick< ConsoleRegistrationInterface, - 'consoleProps' | 'PageTitleComponent' | 'PageBodyComponent' | 'ActionComponents' + | 'consoleProps' + | 'ExitPendingActionComponent' + | 'PageTitleComponent' + | 'PageBodyComponent' + | 'ActionComponents' > { client: RegisteredConsoleClient; console: JSX.Element; // actual console component @@ -64,6 +69,8 @@ export const ConsoleManager = memo<ConsoleManagerProps>(({ storage = {}, childre const [consoleStorage, setConsoleStorage] = useState<RunningConsoleStorage>(storage); const [consoleStateStorage] = useState(new Map<ManagedConsole['key'], ConsoleDataState>()); + const [hasPendingActions, setHasPendingActions] = useState(false); + // `consoleStorageRef` keeps a copy (reference) to the latest copy of the `consoleStorage` so that // some exposed methods (ex. `RegisteredConsoleClient`) are guaranteed to be immutable and function // as expected between state updates without having to re-update every record stored in the `ConsoleStorage` @@ -241,6 +248,11 @@ export const ConsoleManager = memo<ConsoleManagerProps>(({ storage = {}, childre storeManagedConsoleState(key: ManagedConsole['key'], state: ConsoleDataState) { consoleStateStorage.set(key, state); + setHasPendingActions( + !!consoleStateStorage + .get(key) + ?.commandHistory.some((historyItem) => historyItem.state.status === 'pending') + ); }, }, }; @@ -263,9 +275,14 @@ export const ConsoleManager = memo<ConsoleManagerProps>(({ storage = {}, childre return ( <ConsoleManagerContext.Provider value={consoleManageContextClients}> {children} - {visibleConsole && ( <ConsolePageOverlay + hasPendingActions={hasPendingActions} + pendingExitMessage={ + visibleConsole.ExitPendingActionComponent && ( + <visibleConsole.ExitPendingActionComponent meta={visibleConsoleMeta} /> + ) + } onHide={handleOnHide} console={ <Console diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx index 1a33514bb47c2..e336ab48dfeea 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx @@ -75,7 +75,12 @@ export const getConsoleManagerMockRenderResultQueriesAndActions = ( hideOpenedConsole: async () => { userEvent.click(renderResult.getByTestId('consolePageOverlay-doneButton')); - + const exitModalConfirmButton = renderResult.queryByTestId('confirmModalConfirmButton'); + if (exitModalConfirmButton) { + const exitModal = renderResult.getByTestId('consolePageOverlay-console-exit-modal'); + expect(exitModal).toBeTruthy(); + userEvent.click(exitModalConfirmButton); + } await waitFor(() => { expect(renderResult.queryByTestId('consolePageOverlay')).toBeNull(); }); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/translations.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/translations.ts new file mode 100644 index 0000000000000..8bdcb9bd957e2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/translations.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; + +export const CONSOLE_EXIT_MODAL_INFO = Object.freeze({ + cancelButtonText: i18n.translate( + 'xpack.securitySolution.consolePageOverlay.exitModal.cancelButtonText', + { + defaultMessage: 'Cancel', + } + ), + confirmButtonText: i18n.translate( + 'xpack.securitySolution.consolePageOverlay.exitModal.confirmButtonText', + { + defaultMessage: 'Okay, exit responder', + } + ), + genericMessage: i18n.translate( + 'xpack.securitySolution.consolePageOverlay.exitModal.genericMessage', + { + defaultMessage: 'Pending response actions will resume.', + } + ), + title: i18n.translate('xpack.securitySolution.consolePageOverlay.exitModal.title', { + defaultMessage: 'Action is in progress', + }), +}); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts index 5fa4fee704036..60c9b98c988fb 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts @@ -19,6 +19,9 @@ export interface ConsoleRegistrationInterface<TMeta extends object = any> { */ meta?: TMeta; + /** An optional component used to render the modal body on console exit when actions are pending */ + ExitPendingActionComponent?: ComponentType<ManagedConsoleExtensionComponentProps<TMeta>>; + /** An optional component used to render the Overlay page title where the console will be displayed */ PageTitleComponent?: ComponentType<ManagedConsoleExtensionComponentProps<TMeta>>; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_reducer.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_reducer.ts index 33b1b6af06b1c..6436d619e9619 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_reducer.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_reducer.ts @@ -38,6 +38,7 @@ export const initiateState = ( placeholder: INPUT_DEFAULT_PLACEHOLDER_TEXT, showPopover: undefined, history: [], + visibleState: undefined, }, }; @@ -93,6 +94,7 @@ export const stateDataReducer: ConsoleStoreReducer = (state, action) => { case 'updateInputHistoryState': case 'updateInputTextEnteredState': case 'updateInputPlaceholderState': + case 'setInputState': newState = handleInputAreaState(state, action); break; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx index 2bb52f04109c9..b1f50e941fdea 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx @@ -111,7 +111,7 @@ describe('When a Console command is entered by the user', () => { await waitFor(() => { expect(renderResult.getByTestId('test-unknownCommandError').textContent).toEqual( - 'Unsupported text/commandThe text you entered foo-foo is unsupported! Click or type help for assistance.' + 'Unsupported text/commandThe text you entered foo-foo is unsupported! Click Help or type help for assistance.' ); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx index c569cb104cbdc..92248513446ea 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx @@ -115,10 +115,12 @@ const cloneCommandDefinitionWithNewRenderComponent = ( const createCommandHistoryEntry = ( command: CommandHistoryItem['command'], - state: CommandHistoryItem['state'] = createCommandExecutionState() + state: CommandHistoryItem['state'] = createCommandExecutionState(), + isValid: CommandHistoryItem['isValid'] = true ): CommandHistoryItem => { return { id: uuidV4(), + isValid, enteredAt: new Date().toISOString(), command, state, @@ -143,14 +145,18 @@ export const handleExecuteCommand: ConsoleStoreReducer< if (!commandDefinition) { return updateStateWithNewCommandHistoryItem( state, - createCommandHistoryEntry({ - input: parsedInput.input, - args: parsedInput, - commandDefinition: { - ...UnknownCommandDefinition, - RenderComponent: UnknownCommand, + createCommandHistoryEntry( + { + input: parsedInput.input, + args: parsedInput, + commandDefinition: { + ...UnknownCommandDefinition, + RenderComponent: UnknownCommand, + }, }, - }) + undefined, + false + ) ); } @@ -185,7 +191,9 @@ export const handleExecuteCommand: ConsoleStoreReducer< return updateStateWithNewCommandHistoryItem( state, createCommandHistoryEntry( - cloneCommandDefinitionWithNewRenderComponent(command, HelpCommandArgument) + cloneCommandDefinitionWithNewRenderComponent(command, HelpCommandArgument), + undefined, + false ) ); } @@ -203,7 +211,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< defaultMessage: 'Command does not support any arguments', } ), - }) + }), + false ) ); } @@ -238,7 +247,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< /> </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -265,7 +275,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< )} </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -280,7 +291,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< cloneCommandDefinitionWithNewRenderComponent(command, BadArgument), createCommandExecutionState({ errorMessage: exclusiveOrErrorMessage, - }) + }), + false ) ); } @@ -309,7 +321,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< )} </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -332,7 +345,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< )} </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -357,7 +371,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< )} </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -381,7 +396,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< })} </ConsoleCodeBlock> ), - }) + }), + false ) ); } else if (exclusiveOrArgs.length > 0) { @@ -391,7 +407,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< cloneCommandDefinitionWithNewRenderComponent(command, BadArgument), createCommandExecutionState({ errorMessage: exclusiveOrErrorMessage, - }) + }), + false ) ); } else if (commandDefinition.mustHaveArgs) { @@ -407,7 +424,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< })} </ConsoleCodeBlock> ), - }) + }), + false ) ); } @@ -423,7 +441,8 @@ export const handleExecuteCommand: ConsoleStoreReducer< cloneCommandDefinitionWithNewRenderComponent(command, BadArgument), createCommandExecutionState({ errorMessage: validationResult, - }) + }), + false ) ); } diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts index 763ee487438de..869a09963fd71 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts @@ -13,8 +13,7 @@ import type { ConsoleDataAction, ConsoleStoreReducer } from '../types'; export const INPUT_DEFAULT_PLACEHOLDER_TEXT = i18n.translate( 'xpack.securitySolution.handleInputAreaState.inputPlaceholderText', { - defaultMessage: - 'Click here to type and submit an action. For assistance, use the "help" action', + defaultMessage: 'Submit response action', } ); @@ -23,7 +22,8 @@ type InputAreaStateAction = ConsoleDataAction & { | 'updateInputPopoverState' | 'updateInputHistoryState' | 'updateInputTextEnteredState' - | 'updateInputPlaceholderState'; + | 'updateInputPlaceholderState' + | 'setInputState'; }; export const handleInputAreaState: ConsoleStoreReducer<InputAreaStateAction> = ( @@ -96,6 +96,19 @@ export const handleInputAreaState: ConsoleStoreReducer<InputAreaStateAction> = ( }, }; } + break; + + case 'setInputState': + if (state.input.visibleState !== payload.value) { + return { + ...state, + input: { + ...state.input, + visibleState: payload.value, + }, + }; + } + break; } // No updates needed. Just return original state diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts index 62782da7156ba..00681edf62488 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts @@ -65,6 +65,9 @@ export interface ConsoleDataState { /** Show the input area popover */ showPopover: 'input-history' | undefined; // Other values will exist in the future + + /** The state of the input area. Set to `error` if wanting to show it as being in error state */ + visibleState: 'error' | undefined; }; } @@ -76,6 +79,7 @@ export interface InputHistoryItem { export interface CommandHistoryItem { id: string; enteredAt: string; + isValid: boolean; command: Command; state: CommandExecutionState; } @@ -130,6 +134,12 @@ export type ConsoleDataAction = placeholder: ConsoleDataState['input']['placeholder']; }; } + | { + type: 'setInputState'; + payload: { + value: ConsoleDataState['input']['visibleState']; + }; + } | { type: 'updateInputHistoryState'; payload: { diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx index 1ca6bf3f64053..a988afe635458 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx @@ -22,7 +22,7 @@ export const UnknownCommand = memo<CommandExecutionComponentProps>(({ command, s <ConsoleCodeBlock> <FormattedMessage id="xpack.securitySolution.console.unknownCommand.helpMessage" - defaultMessage="The text you entered {userInput} is unsupported! Click {helpIcon} or type {helpCmd} for assistance." + defaultMessage="The text you entered {userInput} is unsupported! Click {helpIcon} Help or type {helpCmd} for assistance." values={{ userInput: ( <ConsoleCodeBlock bold inline> diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/user_command_input.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/user_command_input.tsx index 7a87a048d2b92..f5139d79fc8b4 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/user_command_input.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/user_command_input.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import React, { memo } from 'react'; -import { EuiCode } from '@elastic/eui'; +import React, { memo, useMemo } from 'react'; +import { EuiCode, EuiTextColor } from '@elastic/eui'; import styled from 'styled-components'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; @@ -17,18 +17,19 @@ const StyledEuiCode = styled(EuiCode)` export interface UserCommandInputProps { input: string; + isValid?: boolean; } -export const UserCommandInput = memo<UserCommandInputProps>(({ input }) => { +export const UserCommandInput = memo<UserCommandInputProps>(({ input, isValid = true }) => { const getTestId = useTestIdGenerator(useDataTestSubj()); + const displayInputValue = useMemo(() => { + return isValid ? input : <EuiTextColor>{input}</EuiTextColor>; + }, [input, isValid]); + return ( - <StyledEuiCode - language="shell" - transparentBackground={true} - data-test-subj={getTestId('userCommandText')} - > - {input} + <StyledEuiCode transparentBackground={true} data-test-subj={getTestId('userCommandText')}> + {displayInputValue} </StyledEuiCode> ); }); diff --git a/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx index 5510c180feb4c..54d2202d25524 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx @@ -34,7 +34,7 @@ describe('When using Console component', () => { it('should focus on input area when it gains focus', () => { render(); - userEvent.click(renderResult.getByTestId('test-mainPanel')); + userEvent.click(renderResult.getByTestId('test-mainPanel-inputArea')); expect(document.activeElement!.classList.contains('invisible-input')).toBe(true); }); diff --git a/x-pack/plugins/security_solution/public/management/components/console/console.tsx b/x-pack/plugins/security_solution/public/management/components/console/console.tsx index 37850e888b126..a0996432273aa 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/console.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/console.tsx @@ -40,19 +40,28 @@ const ConsoleWindow = styled.div` &-container { padding: ${({ theme: { eui } }) => eui.euiSizeL} ${({ theme: { eui } }) => eui.euiSizeL} - ${({ theme: { eui } }) => eui.euiSizeS} ${({ theme: { eui } }) => eui.euiSizeM}; + ${({ theme: { eui } }) => eui.euiSizeL} ${({ theme: { eui } }) => eui.euiSizeL}; } &-header { + background-color: ${({ theme: { eui } }) => eui.euiColorEmptyShade}; border-bottom: 1px solid ${({ theme: { eui } }) => eui.euiColorLightShade}; + border-top-left-radius: ${({ theme: { eui } }) => eui.euiBorderRadiusSmall}; + border-top-right-radius: ${({ theme: { eui } }) => eui.euiBorderRadiusSmall}; + padding: ${({ theme: { eui } }) => eui.euiSize} ${({ theme: { eui } }) => eui.euiSize} + ${({ theme: { eui } }) => eui.euiSize} ${({ theme: { eui } }) => eui.euiSize}; } - &-footer, &-commandInput { padding-top: ${({ theme: { eui } }) => eui.euiSizeXS}; padding-bottom: ${({ theme: { eui } }) => eui.euiSizeXS}; } + &-footer { + padding-top: 0; + padding-bottom: ${({ theme: { eui } }) => eui.euiSizeXS}; + } + &-rightPanel { width: 35%; background-color: ${({ theme: { eui } }) => eui.euiFormBackgroundColor}; @@ -138,7 +147,7 @@ export const Console = memo<ConsoleProps>( HelpComponent={HelpComponent} dataTestSubj={commonProps['data-test-subj']} > - <ConsoleWindow onClick={setFocusOnInput} {...commonProps}> + <ConsoleWindow {...commonProps}> <EuiFlexGroup className="layout" gutterSize="none" responsive={false}> <EuiFlexItem> <EuiFlexGroup @@ -148,7 +157,7 @@ export const Console = memo<ConsoleProps>( responsive={false} data-test-subj={getTestId('mainPanel')} > - <EuiFlexItem grow={false} className="layout-container layout-header"> + <EuiFlexItem grow={false} className="layout-header"> <ConsoleHeader TitleComponent={TitleComponent} /> </EuiFlexItem> @@ -173,7 +182,12 @@ export const Console = memo<ConsoleProps>( <HistoryOutput /> </div> </EuiFlexItem> - <EuiFlexItem grow={false} className="layout-container layout-commandInput"> + <EuiFlexItem + onClick={setFocusOnInput} + grow={false} + className="layout-container layout-commandInput" + data-test-subj={getTestId('mainPanel-inputArea')} + > <CommandInput prompt={prompt} focusRef={inputFocusRef} /> </EuiFlexItem> <EuiFlexItem grow={false} className="layout-container layout-footer"> diff --git a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_input_visible_state.ts b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_input_visible_state.ts new file mode 100644 index 0000000000000..f9879ebb599e1 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_input_visible_state.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useConsoleStore } from '../../components/console_state/console_state'; +import type { ConsoleDataState } from '../../components/console_state/types'; + +export const useWithInputVisibleState = (): ConsoleDataState['input']['visibleState'] => { + return useConsoleStore().state.input.visibleState; +}; diff --git a/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts b/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts index 420d95517a4b7..984dd77eb4786 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts @@ -181,7 +181,9 @@ export const getArgumentsForCommand = (command: CommandDefinition): string[] => optional: optionalArgs, }); }) - : [buildArgumentText({ required: requiredArgs, optional: optionalArgs })]; + : requiredArgs || optionalArgs + ? [buildArgumentText({ required: requiredArgs, optional: optionalArgs })] + : []; }; export const parsedPidOrEntityIdParameter = (parameters: { diff --git a/x-pack/plugins/security_solution/public/management/components/console/types.ts b/x-pack/plugins/security_solution/public/management/components/console/types.ts index d929a8a4b4984..f5ee45733f860 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/types.ts @@ -63,9 +63,18 @@ export interface CommandDefinition<TMeta = any> { /** If all args are optional, but at least one must be defined, set to true */ mustHaveArgs?: boolean; - exampleUsage?: string; + /** + * Displayed in the input hint area when the user types the command. The Command usage will be + * appended to this value + */ exampleInstruction?: string; + /** + * Displayed in the input hint area when the user types the command. This value will override + * the command usage generated by the console from the Command Definition + */ + exampleUsage?: string; + /** * Validate the command entered by the user. This is called only after the Console has ran * through all of its builtin validations (based on `CommandDefinition`). diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx index 2e9ad0bd42959..0f199e175a235 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx @@ -12,10 +12,10 @@ import type { CommandExecutionResultComponent } from '../console/components/comm import type { ImmutableArray } from '../../../../common/endpoint/types'; export const ActionError = memo<{ - title: string; - dataTestSubj?: string; errors: ImmutableArray<string>; + title?: string; ResultComponent: CommandExecutionResultComponent; + dataTestSubj?: string; }>(({ title, dataTestSubj, errors, ResultComponent }) => { return ( <ResultComponent showAs="failure" title={title} data-test-subj={dataTestSubj}> diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/console_exit_modal_info.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/console_exit_modal_info.tsx new file mode 100644 index 0000000000000..319241b40fe9a --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/console_exit_modal_info.tsx @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import React, { memo } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { EuiText } from '@elastic/eui'; + +import { CONSOLE_EXIT_MODAL_INFO } from '../console/components/console_manager/translations'; + +const actionLogLink = i18n.translate('xpack.securitySolution.consolePageOverlay.exitModal.link', { + defaultMessage: 'Action log', +}); + +export const HostNameText = ({ hostName }: { hostName: string }) => ( + <EuiText size="s" style={{ maxWidth: 100, display: 'inline-flex' }}> + <span className="eui-textTruncate"> + <strong>{hostName}</strong> + </span> + </EuiText> +); + +export const ConsoleExitModalInfo = memo(({ hostName }: { hostName: string }) => { + return ( + <EuiText size="s"> + <FormattedMessage + id="xpack.securitySolution.consolePageOverlay.exitModal.actionLogLink" + defaultMessage="{genericMessage} You may track progress of the action on {hostName}'s {link}." + values={{ + genericMessage: CONSOLE_EXIT_MODAL_INFO.genericMessage, + hostName: <HostNameText hostName={hostName} />, + link: <strong>{actionLogLink}</strong>, + }} + /> + </EuiText> + ); +}); + +ConsoleExitModalInfo.displayName = 'ConsoleExitModalInfo'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_exit_modal_message.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_exit_modal_message.tsx new file mode 100644 index 0000000000000..963f8d7df6a4b --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_exit_modal_message.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { EuiSpacer, EuiText } from '@elastic/eui'; +import type { HostMetadata } from '../../../../common/endpoint/types'; +import { ConsoleExitModalInfo, HostNameText } from './console_exit_modal_info'; + +export const EndpointExitModalMessage = memo(({ meta }: { meta: { endpoint: HostMetadata } }) => { + return ( + <> + <ConsoleExitModalInfo hostName={meta.endpoint.host.hostname} /> + <EuiSpacer size="l" /> + <EuiText size="s"> + <FormattedMessage + id="xpack.securitySolution.consolePageOverlay.exitModal.body" + defaultMessage="Access it here : {linkText}" + values={{ + linkText: ( + <strong> + <FormattedMessage + id="xpack.securitySolution.consolePageOverlay.exitModal.linkText" + defaultMessage="Manage> Endpoints> {hostName}> Action log." + values={{ + hostName: <HostNameText hostName={meta.endpoint.host.hostname} />, + }} + /> + </strong> + ), + }} + /> + </EuiText> + </> + ); +}); + +EndpointExitModalMessage.displayName = 'EndpointExitModalMessage'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts index 1a8476fb9c51c..8043416dcbced 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts @@ -32,6 +32,21 @@ const HELP_GROUPS = Object.freeze({ }, }); +const ENTER_PID_OR_ENTITY_ID_INSTRUCTION = i18n.translate( + 'xpack.securitySolution.endpointResponseActionsConsoleCommands.enterPidOrEntityId', + { defaultMessage: 'Enter a pid or an entity id to execute' } +); + +const ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION = i18n.translate( + 'xpack.securitySolution.endpointResponseActionsConsoleCommands.enterOrAddOptionalComment', + { defaultMessage: 'Hit enter to execute or add an optional comment' } +); + +const COMMENT_ARG_ABOUT = i18n.translate( + 'xpack.securitySolution.endpointConsoleCommands.suspendProcess.commandArgAbout', + { defaultMessage: 'A comment to go along with the action' } +); + export const getEndpointResponseActionsConsoleCommands = ( endpointAgentId: string ): CommandDefinition[] => { @@ -46,15 +61,12 @@ export const getEndpointResponseActionsConsoleCommands = ( endpointId: endpointAgentId, }, exampleUsage: 'isolate --comment "isolate this host"', - exampleInstruction: 'Hit enter to execute or add an optional comment', + exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, args: { comment: { required: false, allowMultiples: false, - about: i18n.translate( - 'xpack.securitySolution.endpointConsoleCommands.isolate.arg.comment', - { defaultMessage: 'A comment to go along with the action' } - ), + about: COMMENT_ARG_ABOUT, }, }, helpGroupLabel: HELP_GROUPS.responseActions.label, @@ -71,15 +83,12 @@ export const getEndpointResponseActionsConsoleCommands = ( endpointId: endpointAgentId, }, exampleUsage: 'release --comment "isolate this host"', - exampleInstruction: 'Hit enter to execute or add an optional comment', + exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, args: { comment: { required: false, allowMultiples: false, - about: i18n.translate( - 'xpack.securitySolution.endpointConsoleCommands.release.arg.comment', - { defaultMessage: 'A comment to go along with the action' } - ), + about: COMMENT_ARG_ABOUT, }, }, helpGroupLabel: HELP_GROUPS.responseActions.label, @@ -96,16 +105,13 @@ export const getEndpointResponseActionsConsoleCommands = ( endpointId: endpointAgentId, }, exampleUsage: 'kill-process --pid 123 --comment "kill this process"', - exampleInstruction: 'Enter a pid or an entity id to execute', + exampleInstruction: ENTER_PID_OR_ENTITY_ID_INSTRUCTION, mustHaveArgs: true, args: { comment: { required: false, allowMultiples: false, - about: i18n.translate( - 'xpack.securitySolution.endpointConsoleCommands.release.arg.comment', - { defaultMessage: 'A comment to go along with the action' } - ), + about: COMMENT_ARG_ABOUT, }, pid: { required: false, @@ -143,16 +149,13 @@ export const getEndpointResponseActionsConsoleCommands = ( endpointId: endpointAgentId, }, exampleUsage: 'suspend-process --pid 123 --comment "suspend this process"', - exampleInstruction: 'Enter a pid or an entity id to execute', + exampleInstruction: ENTER_PID_OR_ENTITY_ID_INSTRUCTION, mustHaveArgs: true, args: { comment: { required: false, allowMultiples: false, - about: i18n.translate( - 'xpack.securitySolution.endpointConsoleCommands.suspendProcess.arg.comment', - { defaultMessage: 'A comment to go along with the action' } - ), + about: COMMENT_ARG_ABOUT, }, pid: { required: false, @@ -206,15 +209,12 @@ export const getEndpointResponseActionsConsoleCommands = ( endpointId: endpointAgentId, }, exampleUsage: 'processes --comment "get the processes"', - exampleInstruction: 'Hit enter to execute or add an optional comment', + exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, args: { comment: { required: false, allowMultiples: false, - about: i18n.translate( - 'xpack.securitySolution.endpointConsoleCommands.processes.arg.comment', - { defaultMessage: 'A comment to go along with the action' } - ), + about: COMMENT_ARG_ABOUT, }, }, helpGroupLabel: HELP_GROUPS.responseActions.label, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx index 8977b1fb425a4..5e68bb018e6a6 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx @@ -187,5 +187,16 @@ describe('When using processes action from response actions console', () => { expect(apiMocks.responseProvider.actionDetails).toHaveBeenCalledTimes(1); }); + + it('should show exit modal when action still pending', async () => { + const pendingDetailResponse = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + pendingDetailResponse.data.isCompleted = false; + apiMocks.responseProvider.actionDetails.mockReturnValue(pendingDetailResponse); + await render(); + await consoleManagerMockAccess.openRunningConsole(); + await consoleManagerMockAccess.hideOpenedConsole(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx index 215e7554cc5bf..550b677d4d938 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx @@ -50,7 +50,7 @@ describe('Responder header endpoint info', () => { }); it('should show endpoint name', async () => { const name = await renderResult.findByTestId('responderHeaderEndpointName'); - expect(name.textContent).toBe(`ENDPOINT ${endpointDetails.metadata.host.name}`); + expect(name.textContent).toBe(`${endpointDetails.metadata.host.name}`); }); it('should show agent and isolation status', async () => { const agentStatus = await renderResult.findByTestId( diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx index c9c6ab9e1097c..2da620fb833b7 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx @@ -6,7 +6,14 @@ */ import React, { memo, useMemo } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingContent, EuiToolTip } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiText, + EuiLoadingContent, + EuiToolTip, + EuiSpacer, +} from '@elastic/eui'; import { FormattedMessage, FormattedRelative } from '@kbn/i18n-react'; import { useGetEndpointDetails } from '../../hooks/endpoint/use_get_endpoint_details'; import { useGetEndpointPendingActionsSummary } from '../../hooks/endpoint/use_get_endpoint_pending_actions_summary'; @@ -60,13 +67,7 @@ export const HeaderEndpointInfo = memo<HeaderEndpointInfoProps>(({ endpointId }) anchorClassName="eui-textTruncate" > <EuiText size="s" data-test-subj="responderHeaderEndpointName"> - <h6 className="eui-textTruncate"> - <FormattedMessage - id="xpack.securitySolution.responder.header.endpointName" - defaultMessage="ENDPOINT {name}" - values={{ name: endpointDetails.metadata.host.name }} - /> - </h6> + <h6 className="eui-textTruncate">{endpointDetails.metadata.host.name}</h6> </EuiText> </EuiToolTip> </EuiFlexItem> @@ -81,6 +82,7 @@ export const HeaderEndpointInfo = memo<HeaderEndpointInfoProps>(({ endpointId }) </EuiFlexGroup> </EuiFlexItem> <EuiFlexItem grow={false}> + <EuiSpacer size="xs" /> <EuiText color="subdued" size="s" data-test-subj="responderHeaderLastSeen"> <FormattedMessage id="xpack.securitySolution.responder.header.lastSeen" diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/index.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/index.ts index 35b632d1ea4ee..842826a1f6017 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/index.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/index.ts @@ -7,3 +7,4 @@ export { getEndpointResponseActionsConsoleCommands } from './endpoint_response_actions_console_commands'; export { ActionLogButton } from './action_log_button'; +export { EndpointExitModalMessage } from './endpoint_exit_modal_message'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx index 7694606490f37..c177f8e6fa113 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx @@ -171,5 +171,16 @@ describe('When using isolate action from response actions console', () => { expect(apiMocks.responseProvider.actionDetails).toHaveBeenCalledTimes(1); }); + + it('should show exit modal when action still pending', async () => { + const pendingDetailResponse = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + pendingDetailResponse.data.isCompleted = false; + apiMocks.responseProvider.actionDetails.mockReturnValue(pendingDetailResponse); + await render(); + await consoleManagerMockAccess.openRunningConsole(); + await consoleManagerMockAccess.hideOpenedConsole(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx index c719dfb7787bd..f3110dcc17357 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx @@ -6,7 +6,6 @@ */ import React, { memo, useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; import type { EndpointCommandDefinitionMeta } from './types'; @@ -81,10 +80,6 @@ export const IsolateActionResult = memo< if (completedActionDetails?.errors) { return ( <ActionError - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.isolate.errorMessageTitle', - { defaultMessage: 'Error. Isolate action failed.' } - )} dataTestSubj={'isolateErrorCallout'} errors={completedActionDetails?.errors} ResultComponent={ResultComponent} @@ -93,14 +88,6 @@ export const IsolateActionResult = memo< } // Show Success - return ( - <ResultComponent - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.isolate.successMessageTitle', - { defaultMessage: 'Success. Host isolated.' } - )} - data-test-subj="isolateSuccessCallout" - /> - ); + return <ResultComponent showAs="success" data-test-subj="isolateSuccessCallout" />; }); IsolateActionResult.displayName = 'IsolateActionResult'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx index ff027aa7c788e..264cb3779c938 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx @@ -234,5 +234,16 @@ describe('When using the kill-process action from response actions console', () expect(apiMocks.responseProvider.actionDetails).toHaveBeenCalledTimes(1); }); + + it('should show exit modal when action still pending', async () => { + const pendingDetailResponse = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + pendingDetailResponse.data.isCompleted = false; + apiMocks.responseProvider.actionDetails.mockReturnValue(pendingDetailResponse); + await render(); + await consoleManagerMockAccess.openRunningConsole(); + await consoleManagerMockAccess.hideOpenedConsole(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.tsx index e1dbc922bcdb1..684887617b5f0 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.tsx @@ -6,8 +6,6 @@ */ import React, { memo, useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; import type { EndpointCommandDefinitionMeta } from './types'; @@ -84,24 +82,13 @@ export const KillProcessActionResult = memo< // Show nothing if still pending if (isPending) { - return ( - <ResultComponent showAs="pending"> - <FormattedMessage - id="xpack.securitySolution.endpointResponseActions.killProcess.pendingMessage" - defaultMessage="Killing process" - /> - </ResultComponent> - ); + return <ResultComponent showAs="pending" />; } // Show errors if (completedActionDetails?.errors) { return ( <ActionError - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.killProcess.errorMessageTitle', - { defaultMessage: 'Kill process action failure' } - )} dataTestSubj={'killProcessErrorCallout'} errors={completedActionDetails?.errors} ResultComponent={ResultComponent} @@ -110,14 +97,6 @@ export const KillProcessActionResult = memo< } // Show Success - return ( - <ResultComponent - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.killProcess.successMessageTitle', - { defaultMessage: 'Process killed successfully!' } - )} - data-test-subj="killProcessSuccessCallout" - /> - ); + return <ResultComponent showAs="success" data-test-subj="killProcessSuccessCallout" />; }); KillProcessActionResult.displayName = 'KillProcessActionResult'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx index a132fe11f254b..2314949a4a46b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx @@ -172,5 +172,16 @@ describe('When using the release action from response actions console', () => { expect(apiMocks.responseProvider.actionDetails).toHaveBeenCalledTimes(1); }); + + it('should show exit modal when action still pending', async () => { + const pendingDetailResponse = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + pendingDetailResponse.data.isCompleted = false; + apiMocks.responseProvider.actionDetails.mockReturnValue(pendingDetailResponse); + await render(); + await consoleManagerMockAccess.openRunningConsole(); + await consoleManagerMockAccess.hideOpenedConsole(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx index c4cacd6d03b78..1a12c1538caa4 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx @@ -6,7 +6,6 @@ */ import React, { memo, useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; import type { EndpointCommandDefinitionMeta } from './types'; @@ -81,10 +80,6 @@ export const ReleaseActionResult = memo< if (completedActionDetails?.errors) { return ( <ActionError - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.release.errorMessageTitle', - { defaultMessage: 'Error. Release action failed.' } - )} dataTestSubj={'releaseErrorCallout'} errors={completedActionDetails?.errors} ResultComponent={ResultComponent} @@ -93,14 +88,6 @@ export const ReleaseActionResult = memo< } // Show Success - return ( - <ResultComponent - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.release.successMessageTitle', - { defaultMessage: 'Success. Host released.' } - )} - data-test-subj="releaseSuccessCallout" - /> - ); + return <ResultComponent data-test-subj="releaseSuccessCallout" />; }); ReleaseActionResult.displayName = 'ReleaseActionResult'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.test.tsx index 1b3cf93bd8e1d..c28515ec11b38 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.test.tsx @@ -234,5 +234,16 @@ describe('When using the suspend-process action from response actions console', expect(apiMocks.responseProvider.actionDetails).toHaveBeenCalledTimes(1); }); + + it('should show exit modal when action still pending', async () => { + const pendingDetailResponse = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + pendingDetailResponse.data.isCompleted = false; + apiMocks.responseProvider.actionDetails.mockReturnValue(pendingDetailResponse); + await render(); + await consoleManagerMockAccess.openRunningConsole(); + await consoleManagerMockAccess.hideOpenedConsole(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.tsx index b18060a3d2776..448d26daaae7b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/suspend_process_action.tsx @@ -6,8 +6,6 @@ */ import React, { memo, useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; import type { EndpointCommandDefinitionMeta } from './types'; @@ -78,24 +76,13 @@ export const SuspendProcessActionResult = memo< // Show nothing if still pending if (isPending) { - return ( - <ResultComponent showAs="pending"> - <FormattedMessage - id="xpack.securitySolution.endpointResponseActions.suspendProcess.pendingMessage" - defaultMessage="Suspending process" - /> - </ResultComponent> - ); + return <ResultComponent showAs="pending" />; } // Show errors if (completedActionDetails?.errors) { return ( <ActionError - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.suspendProcess.errorMessageTitle', - { defaultMessage: 'Suspend process action failure' } - )} dataTestSubj={'suspendProcessErrorCallout'} errors={completedActionDetails?.errors} ResultComponent={ResultComponent} @@ -104,14 +91,6 @@ export const SuspendProcessActionResult = memo< } // Show Success - return ( - <ResultComponent - title={i18n.translate( - 'xpack.securitySolution.endpointResponseActions.suspendProcess.successMessageTitle', - { defaultMessage: 'Process suspended successfully' } - )} - data-test-subj="suspendProcessSuccessCallout" - /> - ); + return <ResultComponent data-test-subj="suspendProcessSuccessCallout" />; }); SuspendProcessActionResult.displayName = 'SuspendProcessActionResult'; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx index a4ef569c0a0c5..c5d29ef261369 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx @@ -23,8 +23,7 @@ import { useGetEndpointDetails } from '../../hooks'; jest.mock('../../hooks/endpoint/use_get_endpoint_policy_response'); jest.mock('../../hooks/endpoint/use_get_endpoint_details'); -// FLAKY: https://github.com/elastic/kibana/issues/136272 -describe.skip('when on the policy response', () => { +describe('when on the policy response', () => { const docGenerator = new EndpointDocGenerator(); const createPolicyResponse = ( overallStatus: HostPolicyResponseActionStatus = HostPolicyResponseActionStatus.success, @@ -42,7 +41,21 @@ describe.skip('when on the policy response', () => { policyResponse.Endpoint.policy.applied.status = overallStatus; malwareResponseConfigurations.status = overallStatus; - for (const extraAction of extraActions) { + // remove existing extra actions so no dupes when we add them in later + Object.values(policyResponse.Endpoint.policy.applied.response.configurations).forEach( + (responseConfiguration) => { + extraActions.forEach((extraAction) => { + let extraActionIndex = responseConfiguration.concerned_actions.indexOf(extraAction.name); + // generator can pick same action multiple times + while (extraActionIndex !== -1) { + responseConfiguration.concerned_actions.splice(extraActionIndex, 1); + extraActionIndex = responseConfiguration.concerned_actions.indexOf(extraAction.name); + } + }); + } + ); + + extraActions.forEach((extraAction) => { let foundExtraAction = policyResponse.Endpoint.policy.applied.actions.find( (action) => action.name === extraAction.name ); @@ -53,13 +66,7 @@ describe.skip('when on the policy response', () => { } else { // Else, make sure the status of the generated action matches what was passed in foundExtraAction.status = overallStatus; - } - - if ( - overallStatus === HostPolicyResponseActionStatus.failure || - overallStatus === HostPolicyResponseActionStatus.warning - ) { - foundExtraAction.message = 'no action taken'; + foundExtraAction.message = extraAction.message; } // Make sure that at least one configuration has the above action, else @@ -67,27 +74,7 @@ describe.skip('when on the policy response', () => { if (malwareResponseConfigurations.concerned_actions.indexOf(foundExtraAction.name) === -1) { malwareResponseConfigurations.concerned_actions.push(foundExtraAction.name); } - } - - // if extra actions exist more than once, remove dupes to maintain exact counts - Object.entries(policyResponse.Endpoint.policy.applied.response.configurations).forEach( - ([responseConfigurationKey, responseConfiguration]) => { - if (responseConfigurationKey === 'malware') { - return; - } - - extraActions.forEach((extraAction) => { - const extraActionIndex = responseConfiguration.concerned_actions.indexOf( - extraAction.name - ); - if (extraActionIndex === -1) { - return; - } - - responseConfiguration.concerned_actions.splice(extraActionIndex, 1); - }); - } - ); + }); // Add an unknown Action Name - to ensure we handle the format of it on the UI const unknownAction: HostPolicyResponseAppliedAction = { diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx index 4c16dcbaed2c9..15541625fbf39 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import { useUserPrivileges } from '../../../common/components/user_privileges'; import { ActionLogButton, + EndpointExitModalMessage, getEndpointResponseActionsConsoleCommands, } from '../../components/endpoint_responder'; import { useConsoleManager } from '../../components/console'; @@ -55,6 +56,7 @@ export const useWithShowEndpointResponder = (): ShowEndpointResponseActionsConso PageTitleComponent: () => <>{RESPONDER_PAGE_TITLE}</>, PageBodyComponent: () => <OfflineCallout endpointId={endpointAgentId} />, ActionComponents: [ActionLogButton], + ExitPendingActionComponent: EndpointExitModalMessage, }) .show(); } diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx index ddb6a246d78d9..6ebf4eb4e3283 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx @@ -19,7 +19,7 @@ export interface TableRowActionProps { export const TableRowActions = memo<TableRowActionProps>(({ endpointMetadata }) => { const [isOpen, setIsOpen] = useState(false); - const endpointActions = useEndpointActionItems(endpointMetadata); + const endpointActions = useEndpointActionItems(endpointMetadata, { isEndpointList: true }); const handleCloseMenu = useCallback(() => setIsOpen(false), [setIsOpen]); const handleToggleMenu = useCallback(() => setIsOpen(!isOpen), [isOpen]); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx index 0f08122f506c6..911d3b12931a6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx @@ -80,6 +80,11 @@ describe('When using the Endpoint Details Actions Menu', () => { }; }); + it('should not show the actions log link', async () => { + await render(); + expect(renderResult.queryByTestId('actionsLink')).toBeNull(); + }); + describe('and endpoint host is NOT isolated', () => { beforeEach(() => setEndpointMetadataResponse()); @@ -138,7 +143,7 @@ describe('When using the Endpoint Details Actions Menu', () => { afterEach(() => licenseServiceMock.isPlatinumPlus.mockReturnValue(true)); - it('should not show the `isoalte` action', async () => { + it('should not show the `isolate` action', async () => { setEndpointMetadataResponse(); await render(); expect(renderResult.queryByTestId('isolateLink')).toBeNull(); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index 5cbbb682d5045..c40d38aab8d6f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -22,12 +22,17 @@ import { isEndpointHostIsolated } from '../../../../../common/utils/validators'; import { useLicense } from '../../../../../common/hooks/use_license'; import { isIsolationSupported } from '../../../../../../common/endpoint/service/host_isolation/utils'; +interface Options { + isEndpointList: boolean; +} + /** * Returns a list (array) of actions for an individual endpoint * @param endpointMetadata */ export const useEndpointActionItems = ( - endpointMetadata: MaybeImmutable<HostMetadata> | undefined + endpointMetadata: MaybeImmutable<HostMetadata> | undefined, + options?: Options ): ContextMenuItemNavByRouterProps[] => { const isPlatinumPlus = useLicense().isPlatinumPlus(); const { getAppUrl } = useAppUrl(); @@ -56,6 +61,11 @@ export const useEndpointActionItems = ( selected_endpoint: _selectedEndpoint, ...currentUrlParams } = allCurrentUrlParams; + const endpointActionsPath = getEndpointDetailsPath({ + name: 'endpointActivityLog', + ...currentUrlParams, + selected_endpoint: endpointId, + }); const endpointIsolatePath = getEndpointDetailsPath({ name: 'endpointIsolate', ...currentUrlParams, @@ -128,6 +138,24 @@ export const useEndpointActionItems = ( }, ] : []), + ...(options?.isEndpointList + ? [ + { + 'data-test-subj': 'actionsLink', + icon: 'logoSecurity', + key: 'actionsLogLink', + navigateAppId: APP_UI_ID, + navigateOptions: { path: endpointActionsPath }, + href: getAppUrl({ path: endpointActionsPath }), + children: ( + <FormattedMessage + id="xpack.securitySolution.endpoint.actions.actionsLog" + defaultMessage="View actions log" + /> + ), + }, + ] + : []), { 'data-test-subj': 'hostLink', icon: 'logoSecurity', @@ -228,5 +256,6 @@ export const useEndpointActionItems = ( isPlatinumPlus, isResponseActionsConsoleEnabled, showEndpointResponseActionsConsole, + options?.isEndpointList, ]); }; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 62d01b2da3bff..78ca2bc06d02d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -1065,6 +1065,19 @@ describe('when on the endpoint list page', () => { jest.clearAllMocks(); }); + it('navigates to the Actions log flyout', async () => { + const actionsLink = await renderResult.findByTestId('actionsLink'); + + expect(actionsLink.getAttribute('href')).toEqual( + `${APP_PATH}${getEndpointDetailsPath({ + name: 'endpointActivityLog', + page_index: '0', + page_size: '10', + selected_endpoint: hostInfo.metadata.agent.id, + })}` + ); + }); + it('navigates to the Host Details Isolate flyout', async () => { const isolateLink = await renderResult.findByTestId('isolateLink'); expect(isolateLink.getAttribute('href')).toEqual( diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/translations.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/translations.ts index 9cd55a70005ec..2f032d15be064 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/translations.ts @@ -13,7 +13,7 @@ export const OVERVIEW = i18n.translate('xpack.securitySolution.endpointDetails.o export const ACTIVITY_LOG = { tabTitle: i18n.translate('xpack.securitySolution.endpointDetails.activityLog', { - defaultMessage: 'Activity Log', + defaultMessage: 'Actions Log', }), LogEntry: { endOfLog: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts index dc230057d637c..bd62bb1647e60 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts @@ -948,4 +948,37 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ ), license: 'platinum', }, + { + key: 'linux.advanced.fanotify.ignore_unknown_filesystems', + first_supported_version: '8.4', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.fanotify.ignore_unknown_filesystems', + { + defaultMessage: + 'Whether fanotify should ignore unknown filesystems. When true, only CI tested filesystems will be marked by default; additional filesystems can be added or removed with "monitored_filesystems" and "ignored_filesystems", respectively. When false, only an internally curated list of filesystems will be ignored, all others will be marked; additional filesystems can be ignored via "ignored_filesystems". "monitored_filesystems" is ignored when "ignore_unknown_filesystems" is false. Default: true', + } + ), + }, + { + key: 'linux.advanced.fanotify.monitored_filesystems', + first_supported_version: '8.4', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.fanotify.monitored_filesystems', + { + defaultMessage: + 'Additional filesystems for fanotify to monitor. The format is a comma separated list of filesystem names as they appear in "/proc/filesystems", e.g. "jfs,ufs,ramfs". It is recommended to avoid network-backed filesystems. When "ignore_unknown_filesystems" is false, this option is ignored. When "ignore_unknown_filesystems" is true, parsed entries of this option are monitored by fanotify unless overridden by entries in "ignored_filesystems" or internally known bad filesystems.', + } + ), + }, + { + key: 'linux.advanced.fanotify.ignored_filesystems', + first_supported_version: '8.4', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.fanotify.ignored_filesystems', + { + defaultMessage: + 'Additional filesystems for fanotify to ignore. The format is a comma separated list of filesystem names as they appear in "/proc/filesystems", e.g. "ext4,tmpfs". When "ignore_unknown_filesystems" is false, parsed entries of this option supplement internally known bad filesystems to be ignored. When "ignore_unknown_filesystems" is true, parsed entries of this option override entries in "monitored_filesystems" and internally CI tested filesystems.', + } + ), + }, ]; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx b/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx index f35e9fc5c1872..e91af28390736 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx @@ -7,26 +7,75 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../common/mock'; -import { ID, useNetworkHttp } from '.'; -import { NetworkType } from '../../store/model'; +import { useNetworkHttp, ID } from '.'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { networkModel } from '../../store'; + +jest.mock('../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const props = { + endDate: '2020-07-08T08:20:18.966Z', + indexNames: ['auditbeat-*'], + skip: false, + startDate: '2020-07-07T08:20:18.966Z', + type: networkModel.NetworkType.page, + id: ID, +}; describe('useNetworkHttp', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useNetworkHttp(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const localProps = { + ...props, + skip: true, + }; + renderHook(() => useNetworkHttp(localProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); + it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); const localProps = { - docValueFields: [], - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - id: `${ID}-${NetworkType.page}`, - indexNames: ['cool'], - type: NetworkType.page, - skip: false, + ...props, }; const { rerender } = renderHook(() => useNetworkHttp(localProps), { wrapper: TestProviders, }); localProps.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(3); + expect(mockUseSearchStrategy.mock.calls[2][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx index 830209f16d87d..fbfd2e762b672 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx @@ -5,16 +5,12 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useState, useEffect, useCallback, useMemo, useRef } from 'react'; +import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import type { ESTermQuery } from '../../../../common/typed_json'; import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; import type { networkModel } from '../../store'; @@ -23,21 +19,20 @@ import type { NetworkHttpEdges, PageInfoPaginated, NetworkHttpRequestOptions, - NetworkHttpStrategyResponse, SortField, } from '../../../../common/search_strategy'; import { NetworkQueries } from '../../../../common/search_strategy'; import * as i18n from './translations'; import type { InspectResponse } from '../../../types'; -import { getInspectResponse } from '../../../helpers'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; + +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'networkHttpQuery'; export interface NetworkHttpArgs { id: string; - ip?: string; inspect: InspectResponse; + ip?: string; isInspected: boolean; loadPage: (newActivePage: number) => void; networkHttp: NetworkHttpEdges[]; @@ -47,14 +42,14 @@ export interface NetworkHttpArgs { } interface UseNetworkHttp { + endDate: string; + filterQuery?: ESTermQuery | string; id: string; - ip?: string; indexNames: string[]; - type: networkModel.NetworkType; - filterQuery?: ESTermQuery | string; - endDate: string; - startDate: string; + ip?: string; skip: boolean; + startDate: string; + type: networkModel.NetworkType; } export const useNetworkHttp = ({ @@ -69,11 +64,6 @@ export const useNetworkHttp = ({ }: UseNetworkHttp): [boolean, NetworkHttpArgs] => { const getHttpSelector = useMemo(() => networkSelectors.httpSelector(), []); const { activePage, limit, sort } = useDeepEqualSelector((state) => getHttpSelector(state, type)); - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); const [networkHttpRequest, setHostRequest] = useState<NetworkHttpRequestOptions | null>(null); @@ -93,72 +83,51 @@ export const useNetworkHttp = ({ [limit] ); - const [networkHttpResponse, setNetworkHttpResponse] = useState<NetworkHttpArgs>({ - networkHttp: [], - id, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<NetworkQueries.http>({ + factoryQueryType: NetworkQueries.http, + initialResult: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, }, - isInspected: false, - loadPage: wrappedLoadMore, - pageInfo: { - activePage: 0, - fakeTotalCount: 0, - showMorePagesIndicator: false, - }, - refetch: refetch.current, - totalCount: -1, + errorMessage: i18n.FAIL_NETWORK_HTTP, + abort: skip, }); - const { addError, addWarning } = useAppToasts(); - const networkHttpSearch = useCallback( - (request: NetworkHttpRequestOptions | null) => { - if (request == null || skip) { - return; - } - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - searchSubscription$.current = data.search - .search<NetworkHttpRequestOptions, NetworkHttpStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setNetworkHttpResponse((prevResponse) => ({ - ...prevResponse, - networkHttp: response.edges, - inspect: getInspectResponse(response, prevResponse.inspect), - pageInfo: response.pageInfo, - refetch: refetch.current, - totalCount: response.totalCount, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_NETWORK_HTTP); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_NETWORK_HTTP, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const networkHttpResponse = useMemo( + () => ({ + endDate, + networkHttp: response.edges, + id, + inspect, + isInspected: false, + loadPage: wrappedLoadMore, + pageInfo: response.pageInfo, + refetch, + startDate, + totalCount: response.totalCount, + }), + [ + endDate, + id, + inspect, + refetch, + response.edges, + response.pageInfo, + response.totalCount, + startDate, + wrappedLoadMore, + ] ); useEffect(() => { @@ -185,20 +154,10 @@ export const useNetworkHttp = ({ }, [activePage, indexNames, endDate, filterQuery, ip, limit, startDate, sort]); useEffect(() => { - networkHttpSearch(networkHttpRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [networkHttpRequest, networkHttpSearch]); - - useEffect(() => { - if (skip) { - setLoading(false); - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip && networkHttpRequest) { + search(networkHttpRequest); } - }, [skip]); + }, [networkHttpRequest, search, skip]); return [loading, networkHttpResponse]; }; diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx b/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx index f6899475b4647..db1c028b74fb3 100644 --- a/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx @@ -8,28 +8,77 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../common/mock'; import { ID, useNetworkTls } from '.'; -import { NetworkType } from '../../store/model'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { networkModel } from '../../store'; import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +jest.mock('../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const props = { + endDate: '2020-07-08T08:20:18.966Z', + flowTarget: FlowTargetSourceDest.source, + id: ID, + indexNames: ['auditbeat-*'], + ip: '139.177.197.217', + skip: false, + startDate: '2020-07-07T08:20:18.966Z', + type: networkModel.NetworkType.page, +}; + describe('useNetworkTls', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useNetworkTls(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const localProps = { + ...props, + skip: true, + }; + renderHook(() => useNetworkTls(localProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); + it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); const localProps = { - docValueFields: [], - flowTarget: FlowTargetSourceDest.source, - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - id: `${ID}-${NetworkType.page}`, - indexNames: ['cool'], - ip: '1.1.1.1', - type: NetworkType.page, - skip: false, + ...props, }; const { rerender } = renderHook(() => useNetworkTls(localProps), { wrapper: TestProviders, }); localProps.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(3); + expect(mockUseSearchStrategy.mock.calls[2][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx b/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx index 1609b76612b76..9d13900619a08 100644 --- a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx @@ -5,16 +5,12 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useState, useEffect, useCallback, useMemo, useRef } from 'react'; +import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import type { ESTermQuery } from '../../../../common/typed_json'; import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; import type { networkModel } from '../../store'; @@ -26,9 +22,8 @@ import type { import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../helpers'; import type { FlowTargetSourceDest, PageInfoPaginated } from '../../../../common/search_strategy'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'networkTlsQuery'; @@ -70,17 +65,12 @@ export const useNetworkTls = ({ const { activePage, limit, sort } = useDeepEqualSelector((state) => getTlsSelector(state, type, flowTarget) ); - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); - const [networkTlsRequest, setHostRequest] = useState<NetworkTlsRequestOptions | null>(null); + const [networkTlsRequest, setNetworkTlsRequest] = useState<NetworkTlsRequestOptions | null>(null); const wrappedLoadMore = useCallback( (newActivePage: number) => { - setHostRequest((prevRequest) => { + setNetworkTlsRequest((prevRequest) => { if (!prevRequest) { return prevRequest; } @@ -94,79 +84,55 @@ export const useNetworkTls = ({ [limit] ); - const [networkTlsResponse, setNetworkTlsResponse] = useState<NetworkTlsArgs>({ - tls: [], - id: ID, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<NetworkQueries.tls>({ + factoryQueryType: NetworkQueries.tls, + initialResult: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, }, - isInspected: false, - loadPage: wrappedLoadMore, - pageInfo: { - activePage: 0, - fakeTotalCount: 0, - showMorePagesIndicator: false, - }, - refetch: refetch.current, - totalCount: -1, + errorMessage: i18n.FAIL_NETWORK_TLS, + abort: skip, }); - const { addError, addWarning } = useAppToasts(); - - const networkTlsSearch = useCallback( - (request: NetworkTlsRequestOptions | null) => { - if (request == null || skip) { - return; - } - - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - - searchSubscription$.current = data.search - .search<NetworkTlsRequestOptions, NetworkTlsStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setNetworkTlsResponse((prevResponse) => ({ - ...prevResponse, - tls: response.edges, - inspect: getInspectResponse(response, prevResponse.inspect), - pageInfo: response.pageInfo, - refetch: refetch.current, - totalCount: response.totalCount, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_NETWORK_TLS); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_NETWORK_TLS, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const networkTlsResponse = useMemo( + () => ({ + endDate, + tls: response.edges, + id, + inspect, + isInspected: false, + loadPage: wrappedLoadMore, + pageInfo: response.pageInfo, + refetch, + startDate, + totalCount: response.totalCount, + }), + [ + endDate, + id, + inspect, + refetch, + response.edges, + response.pageInfo, + response.totalCount, + startDate, + wrappedLoadMore, + ] ); useEffect(() => { - setHostRequest((prevRequest) => { + setNetworkTlsRequest((prevRequest) => { const myRequest = { ...(prevRequest ?? {}), defaultIndex: indexNames, @@ -190,20 +156,10 @@ export const useNetworkTls = ({ }, [activePage, indexNames, endDate, filterQuery, limit, startDate, sort, flowTarget, ip, id]); useEffect(() => { - networkTlsSearch(networkTlsRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [networkTlsRequest, networkTlsSearch]); - - useEffect(() => { - if (skip) { - setLoading(false); - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip && networkTlsRequest) { + search(networkTlsRequest); } - }, [skip]); + }, [networkTlsRequest, search, skip]); return [loading, networkTlsResponse]; }; diff --git a/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx b/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx index ecd8acbded072..409b5238bba79 100644 --- a/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx @@ -7,29 +7,78 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../common/mock'; -import { ID, useNetworkUsers } from '.'; -import { NetworkType } from '../../store/model'; +import { useNetworkUsers, ID } from '.'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { networkModel } from '../../store'; import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +jest.mock('../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const props = { + endDate: '2020-07-08T08:20:18.966Z', + flowTarget: FlowTargetSourceDest.source, + id: ID, + indexNames: ['auditbeat-*'], + ip: '192.168.1.1', + skip: false, + startDate: '2020-07-07T08:20:18.966Z', + type: networkModel.NetworkType.details, +}; + describe('useNetworkUsers', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useNetworkUsers(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const localProps = { + ...props, + skip: true, + }; + renderHook(() => useNetworkUsers(localProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); + it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); const localProps = { - docValueFields: [], - id: `${ID}-${NetworkType.page}`, - ip: '1.1.1.1', - flowTarget: FlowTargetSourceDest.source, - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - indexNames: ['cool'], - type: NetworkType.page, - skip: false, + ...props, }; const { rerender } = renderHook(() => useNetworkUsers(localProps), { wrapper: TestProviders, }); localProps.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(3); + expect(mockUseSearchStrategy.mock.calls[2][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx b/x-pack/plugins/security_solution/public/network/containers/users/index.tsx index 7158ca8ed6efb..6f9ecc8b353cf 100644 --- a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/users/index.tsx @@ -5,12 +5,9 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useState, useEffect, useCallback, useMemo, useRef } from 'react'; +import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import type { ESTermQuery } from '../../../../common/typed_json'; import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; @@ -26,10 +23,9 @@ import type { } from '../../../../common/search_strategy/security_solution/network'; import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../helpers'; import type { InspectResponse } from '../../../types'; import type { PageInfoPaginated } from '../../../../common/search_strategy'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'networkUsersQuery'; @@ -66,12 +62,8 @@ export const useNetworkUsers = ({ }: UseNetworkUsers): [boolean, NetworkUsersArgs] => { const getNetworkUsersSelector = useMemo(() => networkSelectors.usersSelector(), []); const { activePage, sort, limit } = useDeepEqualSelector(getNetworkUsersSelector); - const { data, uiSettings } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); + const { uiSettings } = useKibana().services; const defaultIndex = uiSettings.get<string[]>(DEFAULT_INDEX_KEY); - const [loading, setLoading] = useState(false); const [networkUsersRequest, setNetworkUsersRequest] = useState<NetworkUsersRequestOptions | null>( null @@ -93,74 +85,51 @@ export const useNetworkUsers = ({ [limit] ); - const [networkUsersResponse, setNetworkUsersResponse] = useState<NetworkUsersArgs>({ - networkUsers: [], - id, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<NetworkQueries.users>({ + factoryQueryType: NetworkQueries.users, + initialResult: { + edges: [], + totalCount: -1, + pageInfo: { + activePage: 0, + fakeTotalCount: 0, + showMorePagesIndicator: false, + }, }, - isInspected: false, - loadPage: wrappedLoadMore, - pageInfo: { - activePage: 0, - fakeTotalCount: 0, - showMorePagesIndicator: false, - }, - refetch: refetch.current, - totalCount: -1, + errorMessage: i18n.FAIL_NETWORK_USERS, + abort: skip, }); - const { addError, addWarning } = useAppToasts(); - - const networkUsersSearch = useCallback( - (request: NetworkUsersRequestOptions | null) => { - if (request == null || skip) { - return; - } - - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - searchSubscription$.current = data.search - .search<NetworkUsersRequestOptions, NetworkUsersStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setNetworkUsersResponse((prevResponse) => ({ - ...prevResponse, - networkUsers: response.edges, - inspect: getInspectResponse(response, prevResponse.inspect), - pageInfo: response.pageInfo, - refetch: refetch.current, - totalCount: response.totalCount, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_NETWORK_USERS); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_NETWORK_USERS, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const networkUsersResponse = useMemo( + () => ({ + endDate, + networkUsers: response.edges, + id, + inspect, + isInspected: false, + loadPage: wrappedLoadMore, + pageInfo: response.pageInfo, + refetch, + startDate, + totalCount: response.totalCount, + }), + [ + endDate, + id, + inspect, + refetch, + response.edges, + response.pageInfo, + response.totalCount, + startDate, + wrappedLoadMore, + ] ); useEffect(() => { @@ -188,20 +157,10 @@ export const useNetworkUsers = ({ }, [activePage, defaultIndex, endDate, filterQuery, limit, startDate, sort, ip, flowTarget]); useEffect(() => { - networkUsersSearch(networkUsersRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [networkUsersRequest, networkUsersSearch]); - - useEffect(() => { - if (skip) { - setLoading(false); - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip && networkUsersRequest) { + search(networkUsersRequest); } - }, [skip]); + }, [networkUsersRequest, search, skip]); return [loading, networkUsersResponse]; }; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx index 4e40832a2d718..5e75ed3643a71 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx @@ -14,11 +14,10 @@ const MAX_CASES_TO_SHOW = 3; const RecentCasesComponent = () => { const { cases } = useKibana().services; - const permissions = useGetUserCasesPermissions(); - const casesPermissions = { all: permissions.crud, read: permissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); return cases.ui.getRecentCases({ - permissions: casesPermissions, + permissions: userCasesPermissions, maxCasesToShow: MAX_CASES_TO_SHOW, owner: [APP_ID], }); diff --git a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx index 757f9fc5aa5f2..692ffd0b44ec8 100644 --- a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx @@ -13,6 +13,7 @@ import { Sidebar } from './sidebar'; import { useGetUserCasesPermissions, useKibana } from '../../../common/lib/kibana'; import type { CaseUiClientMock } from '@kbn/cases-plugin/public/mocks'; import { casesPluginMock } from '@kbn/cases-plugin/public/mocks'; +import { noCasesPermissions, readCasesPermissions } from '../../../cases_test_utils'; jest.mock('../../../common/lib/kibana'); @@ -37,10 +38,7 @@ describe('Sidebar', () => { }); it('does not render the recently created cases section when the user does not have read permissions', async () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: false, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(noCasesPermissions()); await waitFor(() => mount( @@ -54,10 +52,7 @@ describe('Sidebar', () => { }); it('does render the recently created cases section when the user has read permissions', async () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); await waitFor(() => mount( diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx index 27714fd14449d..bae3b708ec3a5 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx @@ -4,25 +4,68 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../common/mock'; import { useHostOverview } from '.'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; + +jest.mock('../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const defaultProps = { + endDate: '2020-07-08T08:20:18.966Z', + hostName: 'my-macbook', + indexNames: ['fakebeat-*'], + skip: false, + startDate: '2020-07-07T08:20:18.966Z', +}; describe('useHostOverview', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + hostDetails: {}, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useHostOverview(defaultProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const props = { + ...defaultProps, + skip: true, + }; + renderHook(() => useHostOverview(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); - const localProps = { - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - indexNames: ['cool'], - skip: false, + const props = { + ...defaultProps, }; - const { rerender } = renderHook(() => useHostOverview(localProps), { + const { rerender } = renderHook(() => useHostOverview(props), { wrapper: TestProviders, }); - localProps.skip = true; + props.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(2); + expect(mockUseSearchStrategy.mock.calls[1][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx index 20dab088f14ea..a7a0b6a68b9cd 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx @@ -5,25 +5,16 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; +import { useEffect, useMemo } from 'react'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import type { - HostOverviewRequestOptions, - HostsOverviewStrategyResponse, -} from '../../../../common/search_strategy/security_solution'; +import type { HostsOverviewStrategyResponse } from '../../../../common/search_strategy/security_solution'; import { HostsQueries } from '../../../../common/search_strategy/security_solution'; -import { useKibana } from '../../../common/lib/kibana'; import type { inputsModel } from '../../../common/store/inputs'; import { createFilter } from '../../../common/containers/helpers'; import type { ESQuery } from '../../../../common/typed_json'; -import { getInspectResponse } from '../../../helpers'; import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'overviewHostQuery'; @@ -50,108 +41,53 @@ export const useHostOverview = ({ skip = false, startDate, }: UseHostOverview): [boolean, HostOverviewArgs] => { - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); - const [overviewHostRequest, setHostRequest] = useState<HostOverviewRequestOptions | null>(null); - - const [overviewHostResponse, setHostOverviewResponse] = useState<HostOverviewArgs>({ - overviewHost: {}, - id: ID, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<HostsQueries.overview>({ + factoryQueryType: HostsQueries.overview, + initialResult: { + overviewHost: {}, }, - isInspected: false, - refetch: refetch.current, + errorMessage: i18n.FAIL_HOST_OVERVIEW, + abort: skip, }); - const { addError, addWarning } = useAppToasts(); - - const overviewHostSearch = useCallback( - (request: HostOverviewRequestOptions | null) => { - if (request == null || skip) { - return; - } - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - - searchSubscription$.current = data.search - .search<HostOverviewRequestOptions, HostsOverviewStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setHostOverviewResponse((prevResponse) => ({ - ...prevResponse, - overviewHost: response.overviewHost, - inspect: getInspectResponse(response, prevResponse.inspect), - refetch: refetch.current, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_HOST_OVERVIEW); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_HOST_OVERVIEW, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const overviewHostResponse = useMemo( + () => ({ + endDate, + overviewHost: response.overviewHost, + id: ID, + inspect, + isInspected: false, + refetch, + startDate, + }), + [endDate, inspect, refetch, response.overviewHost, startDate] ); - useEffect(() => { - setHostRequest((prevRequest) => { - const myRequest = { - ...(prevRequest ?? {}), - defaultIndex: indexNames, - factoryQueryType: HostsQueries.overview, - filterQuery: createFilter(filterQuery), - timerange: { - interval: '12h', - from: startDate, - to: endDate, - }, - }; - if (!deepEqual(prevRequest, myRequest)) { - return myRequest; - } - return prevRequest; - }); - }, [indexNames, endDate, filterQuery, startDate]); - - useEffect(() => { - overviewHostSearch(overviewHostRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [overviewHostRequest, overviewHostSearch]); + const overviewHostRequest = useMemo( + () => ({ + defaultIndex: indexNames, + factoryQueryType: HostsQueries.overview, + filterQuery: createFilter(filterQuery), + timerange: { + interval: '12h', + from: startDate, + to: endDate, + }, + }), + [endDate, filterQuery, indexNames, startDate] + ); useEffect(() => { - if (skip) { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip) { + search(overviewHostRequest); } - }, [skip]); + }, [overviewHostRequest, search, skip]); return [loading, overviewHostResponse]; }; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx index 23bfea8ad55bd..c842fb0a51cae 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx @@ -4,25 +4,67 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../common/mock'; import { useNetworkOverview } from '.'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; + +jest.mock('../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const defaultProps = { + endDate: '2020-07-08T08:20:18.966Z', + indexNames: ['fakebeat-*'], + skip: false, + startDate: '2020-07-07T08:20:18.966Z', +}; describe('useNetworkOverview', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + overviewNetwork: {}, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useNetworkOverview(defaultProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const props = { + ...defaultProps, + skip: true, + }; + renderHook(() => useNetworkOverview(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); it('skip = true will cancel any running request', () => { - const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); - const localProps = { - startDate: '2020-07-07T08:20:18.966Z', - endDate: '2020-07-08T08:20:18.966Z', - indexNames: ['cool'], - skip: false, + const props = { + ...defaultProps, }; - const { rerender } = renderHook(() => useNetworkOverview(localProps), { + const { rerender } = renderHook(() => useNetworkOverview(props), { wrapper: TestProviders, }); - localProps.skip = true; + props.skip = true; act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(4); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(2); + expect(mockUseSearchStrategy.mock.calls[1][0].abort).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx index 3d8f4af168244..cc2997495ea41 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx @@ -5,25 +5,16 @@ * 2.0. */ -import { noop } from 'lodash/fp'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import deepEqual from 'fast-deep-equal'; -import { Subscription } from 'rxjs'; +import { useEffect, useMemo } from 'react'; -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import type { - NetworkOverviewRequestOptions, - NetworkOverviewStrategyResponse, -} from '../../../../common/search_strategy/security_solution'; +import type { NetworkOverviewStrategyResponse } from '../../../../common/search_strategy/security_solution'; import { NetworkQueries } from '../../../../common/search_strategy/security_solution'; -import { useKibana } from '../../../common/lib/kibana'; import type { inputsModel } from '../../../common/store/inputs'; import { createFilter } from '../../../common/containers/helpers'; import type { ESQuery } from '../../../../common/typed_json'; -import { getInspectResponse } from '../../../helpers'; import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'overviewNetworkQuery'; @@ -50,109 +41,53 @@ export const useNetworkOverview = ({ skip = false, startDate, }: UseNetworkOverview): [boolean, NetworkOverviewArgs] => { - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); - const [overviewNetworkRequest, setNetworkRequest] = - useState<NetworkOverviewRequestOptions | null>(null); - - const [overviewNetworkResponse, setNetworkOverviewResponse] = useState<NetworkOverviewArgs>({ - overviewNetwork: {}, - id: ID, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<NetworkQueries.overview>({ + factoryQueryType: NetworkQueries.overview, + initialResult: { + overviewNetwork: {}, }, - isInspected: false, - refetch: refetch.current, + errorMessage: i18n.FAIL_NETWORK_OVERVIEW, + abort: skip, }); - const { addError, addWarning } = useAppToasts(); - - const overviewNetworkSearch = useCallback( - (request: NetworkOverviewRequestOptions | null) => { - if (request == null || skip) { - return; - } - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - - searchSubscription$.current = data.search - .search<NetworkOverviewRequestOptions, NetworkOverviewStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setNetworkOverviewResponse((prevResponse) => ({ - ...prevResponse, - overviewNetwork: response.overviewNetwork, - inspect: getInspectResponse(response, prevResponse.inspect), - refetch: refetch.current, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_NETWORK_OVERVIEW); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_NETWORK_OVERVIEW, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const overviewNetworkResponse = useMemo( + () => ({ + endDate, + overviewNetwork: response.overviewNetwork, + id: ID, + inspect, + isInspected: false, + refetch, + startDate, + }), + [endDate, inspect, refetch, response.overviewNetwork, startDate] ); - useEffect(() => { - setNetworkRequest((prevRequest) => { - const myRequest = { - ...(prevRequest ?? {}), - defaultIndex: indexNames, - factoryQueryType: NetworkQueries.overview, - filterQuery: createFilter(filterQuery), - timerange: { - interval: '12h', - from: startDate, - to: endDate, - }, - }; - if (!deepEqual(prevRequest, myRequest)) { - return myRequest; - } - return prevRequest; - }); - }, [indexNames, endDate, filterQuery, startDate]); - - useEffect(() => { - overviewNetworkSearch(overviewNetworkRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [overviewNetworkRequest, overviewNetworkSearch]); + const overviewNetworkRequest = useMemo( + () => ({ + defaultIndex: indexNames, + factoryQueryType: NetworkQueries.overview, + filterQuery: createFilter(filterQuery), + timerange: { + interval: '12h', + from: startDate, + to: endDate, + }, + }), + [endDate, filterQuery, indexNames, startDate] + ); useEffect(() => { - if (skip) { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); + if (!skip) { + search(overviewNetworkRequest); } - }, [skip]); + }, [overviewNetworkRequest, search, skip]); return [loading, overviewNetworkResponse]; }; diff --git a/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx index 3b88d22eb4da9..6d6c4965b7ec1 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx @@ -10,6 +10,7 @@ import { MemoryRouter } from 'react-router-dom'; import { render } from '@testing-library/react'; import { DetectionResponse } from './detection_response'; import { TestProviders } from '../../common/mock'; +import { noCasesPermissions, readCasesPermissions } from '../../cases_test_utils'; jest.mock('../components/detection_response/alerts_by_status', () => ({ AlertsByStatus: () => <div data-test-subj="mock_AlertsByStatus" />, @@ -67,7 +68,7 @@ jest.mock('../../detections/containers/detection_engine/alerts/use_alerts_privil useAlertsPrivileges: () => mockUseAlertsPrivileges(), })); -const defaultUseCasesPermissionsReturn = { read: true }; +const defaultUseCasesPermissionsReturn = readCasesPermissions(); const mockUseCasesPermissions = jest.fn(() => defaultUseCasesPermissionsReturn); jest.mock('../../common/lib/kibana/hooks', () => { const original = jest.requireActual('../../common/lib/kibana/hooks'); @@ -189,8 +190,8 @@ describe('DetectionResponse', () => { expect(result.queryByTestId('mock_AlertsByStatus')).not.toBeInTheDocument(); }); - it('should not render cases data sections if user has not cases read permission', () => { - mockUseCasesPermissions.mockReturnValue({ read: false }); + it('should not render cases data sections if the user does not have cases read permission', () => { + mockUseCasesPermissions.mockReturnValue(noCasesPermissions()); const result = render( <TestProviders> @@ -210,8 +211,8 @@ describe('DetectionResponse', () => { expect(result.queryByTestId('mock_AlertsByStatus')).toBeInTheDocument(); }); - it('should render page permissions message if user has any read permission', () => { - mockUseCasesPermissions.mockReturnValue({ read: false }); + it('should render page permissions message if the user does not have read permission', () => { + mockUseCasesPermissions.mockReturnValue(noCasesPermissions()); mockUseAlertsPrivileges.mockReturnValue({ hasKibanaREAD: true, hasIndexRead: false, diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx index 41f7d298eaa61..bc104ad70f1f1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx @@ -67,8 +67,7 @@ const AddToCaseButtonComponent: React.FC<Props> = ({ timelineId }) => { [dispatch, graphEventId, navigateToApp, savedObjectId, timelineId, timelineTitle] ); - const userPermissions = useGetUserCasesPermissions(); - const casesPermissions = { all: userPermissions.crud, read: userPermissions.read }; + const userCasesPermissions = useGetUserCasesPermissions(); const handleButtonClick = useCallback(() => { setPopover((currentIsOpen) => !currentIsOpen); @@ -165,7 +164,7 @@ const AddToCaseButtonComponent: React.FC<Props> = ({ timelineId }) => { cases.ui.getAllCasesSelectorModal({ onRowClick, owner: [APP_ID], - permissions: casesPermissions, + permissions: userCasesPermissions, })} </> ); diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.test.tsx index 8906bff912d68..42306a7d3d205 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.test.tsx @@ -16,6 +16,7 @@ import { FlyoutHeader } from '.'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { mockBrowserFields, mockDocValueFields } from '../../../../common/containers/source/mock'; import { getEmptyValue } from '../../../../common/components/empty_value'; +import { allCasesPermissions, readCasesPermissions } from '../../../../cases_test_utils'; const mockUseSourcererDataView: jest.Mock = useSourcererDataView as jest.Mock; jest.mock('../../../../common/containers/sourcerer'); @@ -78,11 +79,8 @@ describe('header', () => { mockUseTimelineKpis.mockReturnValue([false, mockUseTimelineKpiResponse]); }); - it('renders the button when the user has write permissions', () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: true, - read: false, - }); + it('renders the button when the user has create and read permissions', () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(allCasesPermissions()); render( <TestProviders> @@ -93,11 +91,8 @@ describe('header', () => { expect(screen.getByTestId('attach-timeline-case-button')).toBeInTheDocument(); }); - it('does not render the button when the user does not have write permissions', () => { - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: false, - read: false, - }); + it('does not render the button when the user does not have create permissions', () => { + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(readCasesPermissions()); render( <TestProviders> diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx index 3541af9fcb7ca..4dc62c43e7f1e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx @@ -415,7 +415,7 @@ const FlyoutHeaderComponent: React.FC<FlyoutHeaderProps> = ({ timelineId }) => { filterQuery: combinedQueries?.filterQuery ?? '', }); - const hasWritePermissions = useGetUserCasesPermissions()?.crud ?? false; + const userCasesPermissions = useGetUserCasesPermissions(); return ( <StyledTimelineHeader alignItems="center" gutterSize="s"> @@ -448,7 +448,7 @@ const FlyoutHeaderComponent: React.FC<FlyoutHeaderProps> = ({ timelineId }) => { <EuiFlexItem grow={false}> <AddToFavoritesButton timelineId={timelineId} /> </EuiFlexItem> - {hasWritePermissions && ( + {userCasesPermissions.create && userCasesPermissions.read && ( <EuiFlexItem grow={false}> <AddToCaseButton timelineId={timelineId} /> </EuiFlexItem> diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx index ba965cd7ad3d4..1eb8839ee3672 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx @@ -11,8 +11,16 @@ import React from 'react'; import { TestProviders } from '../../../../common/mock'; import { TimelineId } from '../../../../../common/types/timeline'; import { Pane } from '.'; +import { useGetUserCasesPermissions } from '../../../../common/lib/kibana'; jest.mock('../../../../common/lib/kibana'); +const originalKibanaLib = jest.requireActual('../../../../common/lib/kibana'); + +// Restore the useGetUserCasesPermissions so the calling functions can receive a valid permissions object +// The returned permissions object will indicate that the user does not have permissions by default +const mockUseGetUserCasesPermissions = useGetUserCasesPermissions as jest.Mock; +mockUseGetUserCasesPermissions.mockImplementation(originalKibanaLib.useGetUserCasesPermissions); + jest.mock('../../../../common/components/url_state/normalize_time_range'); jest.mock('../../../../common/hooks/use_resolve_conflict', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx index e99072a759949..2e69985258247 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx @@ -21,6 +21,7 @@ import { import { mockBrowserFields, mockRuntimeMappings } from '../../../../common/containers/source/mock'; import { coreMock } from '@kbn/core/public/mocks'; import { mockCasesContext } from '@kbn/cases-plugin/public/mocks/mock_cases_context'; +import { allCasesPermissions } from '../../../../cases_test_utils'; const ecsData: Ecs = { _id: '1', @@ -138,10 +139,7 @@ describe('event details footer component', () => { }, }, }); - (useGetUserCasesPermissions as jest.Mock).mockReturnValue({ - crud: true, - read: true, - }); + (useGetUserCasesPermissions as jest.Mock).mockReturnValue(allCasesPermissions()); }); afterEach(() => { jest.clearAllMocks(); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx index a9d3f8c31b0a0..c34ace14f91a4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx @@ -32,6 +32,7 @@ import { defaultRowRenderers } from './body/renderers'; import { useSourcererDataView } from '../../../common/containers/sourcerer'; import { createStore } from '../../../common/store'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { useGetUserCasesPermissions } from '../../../common/lib/kibana'; jest.mock('../../containers', () => ({ useTimelineEvents: jest.fn(), @@ -40,6 +41,13 @@ jest.mock('../../containers', () => ({ jest.mock('./tabs_content'); jest.mock('../../../common/lib/kibana'); +const originalKibanaLib = jest.requireActual('../../../common/lib/kibana'); + +// Restore the useGetUserCasesPermissions so the calling functions can receive a valid permissions object +// The returned permissions object will indicate that the user does not have permissions by default +const mockUseGetUserCasesPermissions = useGetUserCasesPermissions as jest.Mock; +mockUseGetUserCasesPermissions.mockImplementation(originalKibanaLib.useGetUserCasesPermissions); + jest.mock('../../../common/components/url_state/normalize_time_range'); jest.mock('@kbn/i18n-react', () => { const originalModule = jest.requireActual('@kbn/i18n-react'); diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx b/x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx new file mode 100644 index 0000000000000..f6427252f0689 --- /dev/null +++ b/x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { act, renderHook } from '@testing-library/react-hooks'; +import { TestProviders } from '../../../../common/mock'; +import { useUserDetails } from '.'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; + +jest.mock('../../../../common/containers/use_search_strategy', () => ({ + useSearchStrategy: jest.fn(), +})); +const mockUseSearchStrategy = useSearchStrategy as jest.Mock; +const mockSearch = jest.fn(); + +const defaultProps = { + endDate: '2020-07-08T08:20:18.966Z', + indexNames: ['fakebeat-*'], + skip: false, + startDate: '2020-07-07T08:20:18.966Z', + userName: 'myUserName', +}; + +describe('useUserDetails', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseSearchStrategy.mockReturnValue({ + loading: false, + result: { + overviewNetwork: {}, + }, + search: mockSearch, + refetch: jest.fn(), + inspect: {}, + }); + }); + + it('runs search', () => { + renderHook(() => useUserDetails(defaultProps), { + wrapper: TestProviders, + }); + + expect(mockSearch).toHaveBeenCalled(); + }); + + it('does not run search when skip = true', () => { + const props = { + ...defaultProps, + skip: true, + }; + renderHook(() => useUserDetails(props), { + wrapper: TestProviders, + }); + + expect(mockSearch).not.toHaveBeenCalled(); + }); + it('skip = true will cancel any running request', () => { + const props = { + ...defaultProps, + }; + const { rerender } = renderHook(() => useUserDetails(props), { + wrapper: TestProviders, + }); + props.skip = true; + act(() => rerender()); + expect(mockUseSearchStrategy).toHaveBeenCalledTimes(2); + expect(mockUseSearchStrategy.mock.calls[1][0].abort).toEqual(true); + }); +}); diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx b/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx index 83b2a017737c5..4f75f02c8108b 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx +++ b/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx @@ -5,25 +5,13 @@ * 2.0. */ -import deepEqual from 'fast-deep-equal'; -import { noop } from 'lodash/fp'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import { Subscription } from 'rxjs'; - -import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { useEffect, useMemo } from 'react'; import type { inputsModel } from '../../../../common/store'; -import { useKibana } from '../../../../common/lib/kibana'; - import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; import type { InspectResponse } from '../../../../types'; -import type { - UserDetailsRequestOptions, - UserDetailsStrategyResponse, -} from '../../../../../common/search_strategy/security_solution/users/details'; import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; import type { UserItem } from '../../../../../common/search_strategy/security_solution/users/common'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'usersDetailsQuery'; @@ -53,104 +41,53 @@ export const useUserDetails = ({ skip = false, startDate, }: UseUserDetails): [boolean, UserDetailsArgs] => { - const { data } = useKibana().services; - const refetch = useRef<inputsModel.Refetch>(noop); - const abortCtrl = useRef(new AbortController()); - const searchSubscription$ = useRef(new Subscription()); - const [loading, setLoading] = useState(false); - const [userDetailsRequest, setUserDetailsRequest] = useState<UserDetailsRequestOptions | null>( - null - ); - const { addError, addWarning } = useAppToasts(); - - const [userDetailsResponse, setUserDetailsResponse] = useState<UserDetailsArgs>({ - endDate, - userDetails: {}, - id, - inspect: { - dsl: [], - response: [], + const { + loading, + result: response, + search, + refetch, + inspect, + } = useSearchStrategy<UsersQueries.details>({ + factoryQueryType: UsersQueries.details, + initialResult: { + userDetails: {}, }, - refetch: refetch.current, - startDate, + errorMessage: i18n.FAIL_USER_DETAILS, + abort: skip, }); - const userDetailsSearch = useCallback( - (request: UserDetailsRequestOptions | null) => { - if (request == null || skip) { - return; - } - - const asyncSearch = async () => { - abortCtrl.current = new AbortController(); - setLoading(true); - - searchSubscription$.current = data.search - .search<UserDetailsRequestOptions, UserDetailsStrategyResponse>(request, { - strategy: 'securitySolutionSearchStrategy', - abortSignal: abortCtrl.current.signal, - }) - .subscribe({ - next: (response) => { - if (isCompleteResponse(response)) { - setLoading(false); - setUserDetailsResponse((prevResponse) => ({ - ...prevResponse, - userDetails: response.userDetails, - inspect: getInspectResponse(response, prevResponse.inspect), - refetch: refetch.current, - })); - searchSubscription$.current.unsubscribe(); - } else if (isErrorResponse(response)) { - setLoading(false); - addWarning(i18n.ERROR_USER_DETAILS); - searchSubscription$.current.unsubscribe(); - } - }, - error: (msg) => { - setLoading(false); - addError(msg, { - title: i18n.FAIL_USER_DETAILS, - }); - searchSubscription$.current.unsubscribe(); - }, - }); - }; - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - asyncSearch(); - refetch.current = asyncSearch; - }, - [data.search, addError, addWarning, skip] + const userDetailsResponse = useMemo( + () => ({ + endDate, + userDetails: response.userDetails, + id, + inspect, + isInspected: false, + refetch, + startDate, + }), + [endDate, id, inspect, refetch, response.userDetails, startDate] ); - useEffect(() => { - setUserDetailsRequest((prevRequest) => { - const myRequest = { - ...(prevRequest ?? {}), - defaultIndex: indexNames, - factoryQueryType: UsersQueries.details, - userName, - timerange: { - interval: '12h', - from: startDate, - to: endDate, - }, - }; - if (!deepEqual(prevRequest, myRequest)) { - return myRequest; - } - return prevRequest; - }); - }, [endDate, userName, indexNames, startDate]); + const userDetailsRequest = useMemo( + () => ({ + defaultIndex: indexNames, + factoryQueryType: UsersQueries.details, + userName, + timerange: { + interval: '12h', + from: startDate, + to: endDate, + }, + }), + [endDate, indexNames, startDate, userName] + ); useEffect(() => { - userDetailsSearch(userDetailsRequest); - return () => { - searchSubscription$.current.unsubscribe(); - abortCtrl.current.abort(); - }; - }, [userDetailsRequest, userDetailsSearch]); + if (!skip) { + search(userDetailsRequest); + } + }, [userDetailsRequest, search, skip]); return [loading, userDetailsResponse]; }; diff --git a/x-pack/plugins/security_solution/scripts/storybook.js b/x-pack/plugins/security_solution/scripts/storybook.js index 98771d7fc18c4..794f4d7b93641 100644 --- a/x-pack/plugins/security_solution/scripts/storybook.js +++ b/x-pack/plugins/security_solution/scripts/storybook.js @@ -7,7 +7,6 @@ import { join } from 'path'; -// eslint-disable-next-line require('@kbn/storybook').runStorybookCli({ name: 'siem', storyGlobs: [join(__dirname, '..', 'public', '**', '*.stories.tsx')], diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts index e9c088d17e00a..84d124a398a93 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts @@ -19,8 +19,7 @@ import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import { TaskStatus } from '@kbn/task-manager-plugin/server'; import type { CoreSetup } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { TRANSFORM_STATES } from '../../../../common/constants'; import { METADATA_TRANSFORMS_PATTERN } from '../../../../common/endpoint/constants'; import type { RunResult } from '@kbn/task-manager-plugin/server/task'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 36ae8d9f95af3..5746e1e93f9bb 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -57,8 +57,7 @@ import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; import type { ClusterClientMock, ScopedClusterClientMock, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '@kbn/core/server/elasticsearch/client/mocks'; +} from '@kbn/core-elasticsearch-client-server-mocks'; import { EndpointHostNotFoundError } from '../../services/metadata'; import { FleetAgentGenerator } from '../../../../common/endpoint/data_generators/fleet_agent_generator'; import { createMockAgentClient, createMockPackageService } from '@kbn/fleet-plugin/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts index 7cd02dace23ea..a9a7c7c4837e3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts @@ -31,8 +31,7 @@ import { import type { Agent } from '@kbn/fleet-plugin/common/types/models'; import type { AgentClient, AgentService } from '@kbn/fleet-plugin/server/services'; import { get } from 'lodash'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { ScopedClusterClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ScopedClusterClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; describe('test policy response handler', () => { let endpointAppContextService: EndpointAppContextService; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts index 5fa55f9a3cbba..814dd457347ab 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts @@ -7,8 +7,7 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; // Because mocks are for testing only, should be ok to import the FleetArtifactsClient directly // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { FleetArtifactsClient } from '@kbn/fleet-plugin/server/services'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts index adc41b3ec7df8..2e7d606e10f5d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts @@ -8,8 +8,7 @@ import type { EndpointMetadataServiceTestContextMock } from './mocks'; import { createEndpointMetadataServiceTestContextMock } from './mocks'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { legacyMetadataSearchResponseMock, unitedMetadataSearchResponseMock, diff --git a/x-pack/plugins/security_solution/server/features.ts b/x-pack/plugins/security_solution/server/features.ts index 96ae8497ad19d..4da85d9fe540a 100644 --- a/x-pack/plugins/security_solution/server/features.ts +++ b/x-pack/plugins/security_solution/server/features.ts @@ -10,48 +10,89 @@ import { i18n } from '@kbn/i18n'; import type { KibanaFeatureConfig, SubFeatureConfig } from '@kbn/features-plugin/common'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common'; +import { createUICapabilities } from '@kbn/cases-plugin/common'; import { APP_ID, CASES_FEATURE_ID, SERVER_APP_ID } from '../common/constants'; import { savedObjectTypes } from './saved_objects'; -export const getCasesKibanaFeature = (): KibanaFeatureConfig => ({ - id: CASES_FEATURE_ID, - name: i18n.translate('xpack.securitySolution.featureRegistry.linkSecuritySolutionCaseTitle', { - defaultMessage: 'Cases', - }), - order: 1100, - category: DEFAULT_APP_CATEGORIES.security, - app: [CASES_FEATURE_ID, 'kibana'], - catalogue: [APP_ID], - cases: [APP_ID], - privileges: { - all: { - app: [CASES_FEATURE_ID, 'kibana'], - catalogue: [APP_ID], - cases: { - all: [APP_ID], +export const getCasesKibanaFeature = (): KibanaFeatureConfig => { + const casesCapabilities = createUICapabilities(); + + return { + id: CASES_FEATURE_ID, + name: i18n.translate('xpack.securitySolution.featureRegistry.linkSecuritySolutionCaseTitle', { + defaultMessage: 'Cases', + }), + order: 1100, + category: DEFAULT_APP_CATEGORIES.security, + app: [CASES_FEATURE_ID, 'kibana'], + catalogue: [APP_ID], + cases: [APP_ID], + privileges: { + all: { + app: [CASES_FEATURE_ID, 'kibana'], + catalogue: [APP_ID], + cases: { + create: [APP_ID], + read: [APP_ID], + update: [APP_ID], + push: [APP_ID], + }, + api: [], + savedObject: { + all: [], + read: [], + }, + ui: casesCapabilities.all, }, - api: [], - savedObject: { - all: [], - read: [], + read: { + app: [CASES_FEATURE_ID, 'kibana'], + catalogue: [APP_ID], + cases: { + read: [APP_ID], + }, + api: [], + savedObject: { + all: [], + read: [], + }, + ui: casesCapabilities.read, }, - ui: ['crud_cases', 'read_cases'], // uiCapabilities[CASES_FEATURE_ID].crud_cases or read_cases }, - read: { - app: [CASES_FEATURE_ID, 'kibana'], - catalogue: [APP_ID], - cases: { - read: [APP_ID], - }, - api: [], - savedObject: { - all: [], - read: [], + subFeatures: [ + { + name: i18n.translate('xpack.securitySolution.featureRegistry.deleteSubFeatureName', { + defaultMessage: 'Delete', + }), + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + api: [], + id: 'cases_delete', + name: i18n.translate( + 'xpack.securitySolution.featureRegistry.deleteSubFeatureDetails', + { + defaultMessage: 'Delete cases and comments', + } + ), + includeIn: 'all', + savedObject: { + all: [], + read: [], + }, + cases: { + delete: [APP_ID], + }, + ui: casesCapabilities.delete, + }, + ], + }, + ], }, - ui: ['read_cases'], // uiCapabilities[CASES_FEATURE_ID].read_cases - }, - }, -}); + ], + }; +}; export const getAlertsSubFeature = (ruleTypes: string[]): SubFeatureConfig => ({ name: i18n.translate('xpack.securitySolution.featureRegistry.manageAlertsName', { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts index e47d9ff732270..e6dc6017fe67a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts @@ -7,9 +7,15 @@ import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; +import type { DetectionAlert } from '../../../../common/detection_engine/schemas/alerts'; +import { ALERT_THRESHOLD_RESULT_COUNT } from '../../../../common/field_maps/field_names'; import { sampleThresholdAlert } from '../rule_types/__mocks__/threshold'; import type { NotificationRuleTypeParams } from './schedule_notification_actions'; -import { scheduleNotificationActions } from './schedule_notification_actions'; +import { + formatAlertsForNotificationActions, + normalizeAlertForNotificationActions, + scheduleNotificationActions, +} from './schedule_notification_actions'; describe('schedule_notification_actions', () => { const alertServices: RuleExecutorServicesMock = alertsMock.createRuleExecutorServices(); @@ -72,6 +78,9 @@ describe('schedule_notification_actions', () => { expect.objectContaining({ alerts: [ expect.objectContaining({ + host: expect.objectContaining({ + name: 'garden-gnomes', + }), kibana: expect.objectContaining({ alert: expect.objectContaining({ rule: expect.objectContaining({ @@ -103,4 +112,38 @@ describe('schedule_notification_actions', () => { }) ); }); + + it('should properly generate normalized alert', () => { + const signal = sampleThresholdAlert._source; + expect(normalizeAlertForNotificationActions(signal as unknown as DetectionAlert)).toEqual( + expect.objectContaining({ + [ALERT_THRESHOLD_RESULT_COUNT]: 3, + }) + ); + }); + + // Deprecation warning: we'll stop supporting signal.* fields eventually. At that point, this test + // and supporting code should be removed. + it('should properly generate legacy alert shim', () => { + const signals = [sampleThresholdAlert._source]; + expect(formatAlertsForNotificationActions(signals)[0]).toEqual( + expect.objectContaining({ + kibana: expect.objectContaining({ + alert: expect.objectContaining({ + threshold_result: expect.objectContaining({ + count: 3, + }), + }), + }), + signal: expect.objectContaining({ + rule: expect.objectContaining({ + id: '7a7065d7-6e8b-4aae-8d20-c93613dec9f9', + }), + threshold_result: expect.objectContaining({ + count: 3, + }), + }), + }) + ); + }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts index 8d17b871bd14a..0d0d40293d1a3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts @@ -7,6 +7,10 @@ import { mapKeys, snakeCase } from 'lodash/fp'; import type { Alert } from '@kbn/alerting-plugin/server'; +import { ALERT_RULE_TYPE } from '@kbn/rule-data-utils'; +import { flattenWithPrefix } from '@kbn/securitysolution-rules'; +import { ALERT_THRESHOLD_RESULT } from '../../../../common/field_maps/field_names'; +import { isThresholdRule } from '../../../../common/detection_engine/utils'; import { expandDottedObject } from '../../../../common/utils/expand_dotted'; import type { RuleParams } from '../schemas/rule_schemas'; import aadFieldConversion from '../routes/index/signal_aad_mapping.json'; @@ -30,19 +34,33 @@ const convertToLegacyAlert = (alert: DetectionAlert) => return acc; }, {}); +export const normalizeAlertForNotificationActions = (alert: DetectionAlert) => { + if (isThresholdRule(alert[ALERT_RULE_TYPE])) { + const { 'kibana.alert.threshold_result': thresholdResult, ...alertWithoutThresholdResult } = + alert; + return { + ...alertWithoutThresholdResult, + ...flattenWithPrefix(ALERT_THRESHOLD_RESULT, thresholdResult), + }; + } + return alert; +}; + /* * Formats alerts before sending to `scheduleActions`. We augment the context with * the equivalent "legacy" alert context so that pre-8.0 actions will continue to work. */ -const formatAlertsForNotificationActions = (alerts: unknown[]): unknown[] => { - return alerts.map((alert) => - isDetectionAlert(alert) - ? { - ...expandDottedObject(convertToLegacyAlert(alert)), - ...expandDottedObject(alert), - } - : alert - ); +export const formatAlertsForNotificationActions = (alerts: unknown[]): unknown[] => { + return alerts.map((alert) => { + if (isDetectionAlert(alert)) { + const normalizedAlert = normalizeAlertForNotificationActions(alert); + return { + ...expandDottedObject(convertToLegacyAlert(normalizedAlert)), + ...expandDottedObject(normalizedAlert), + }; + } + return alert; + }); }; interface ScheduleNotificationActions { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts index 002b4c2264eee..40c82c255c1f5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts @@ -8,8 +8,7 @@ import { readPrivilegesRoute } from './read_privileges_route'; import { serverMock, requestContextMock } from '../__mocks__'; import { getPrivilegeRequest, getMockPrivilegesResult } from '../__mocks__/request_responses'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; describe('read_privileges route', () => { let server: ReturnType<typeof serverMock.create>; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts index f56a1a4be67d3..6c6cfde2cbaa8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts @@ -18,8 +18,7 @@ import { addPrepackedRulesRoute, createPrepackagedRules } from './add_prepackage import { listMock } from '@kbn/lists-plugin/server/mocks'; import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { installPrepackagedTimelines } from '../../../timeline/routes/prepackaged_timelines/install_prepackaged_timelines'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; import { legacyMigrate } from '../../rules/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index 8b23aca24c791..c845f2e0a381c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -20,8 +20,7 @@ import { import { requestContextMock, serverMock, requestMock } from '../__mocks__'; import { createRulesBulkRoute } from './create_rules_bulk_route'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; import { loggingSystemMock } from '@kbn/core/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index 163a6b8e43229..658461f148cb8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -20,8 +20,7 @@ import { buildMlAuthz } from '../../../machine_learning/authz'; import { requestContextMock, serverMock, requestMock } from '../__mocks__'; import { createRulesRoute } from './create_rules_route'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; jest.mock('../../../machine_learning/authz', () => mockMlAuthzFactory.create()); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index 578ba7786780b..bf83471631a8c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -25,8 +25,7 @@ import { ruleIdsToNdJsonString, rulesToNdJsonString, } from '../../../../../common/detection_engine/schemas/request/import_rules_schema.mock'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; jest.mock('../../../machine_learning/authz', () => mockMlAuthzFactory.create()); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts index c51d82c539db6..1438905a5c079 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../common/constants'; +import { + DETECTION_ENGINE_RULES_BULK_ACTION, + BulkActionsDryRunErrCode, +} from '../../../../../common/constants'; import { mlServicesMock, mlAuthzMock as mockMlAuthzFactory } from '../../../machine_learning/mocks'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { @@ -168,6 +171,46 @@ describe('perform_bulk_action', () => { errors: [ { message: 'mocked validation message', + err_code: BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH, + status_code: 403, + rules: [ + { + id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', + name: 'Detect Root/Admin Users', + }, + ], + }, + ], + results: someBulkActionResults(), + summary: { + failed: 1, + succeeded: 0, + total: 1, + }, + }, + message: 'Bulk edit failed', + status_code: 500, + }); + }); + + it('returns error if machine learning rule validation fails in dry run mode', async () => { + (buildMlAuthz as jest.Mock).mockReturnValueOnce({ + validateRuleType: jest + .fn() + .mockResolvedValue({ valid: false, message: 'mocked validation message' }), + }); + const response = await server.inject( + { ...getBulkActionRequest(), query: { dry_run: 'true' } }, + requestContextMock.convertContext(context) + ); + + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + attributes: { + errors: [ + { + message: 'mocked validation message', + err_code: BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH, status_code: 403, rules: [ { @@ -425,6 +468,19 @@ describe('perform_bulk_action', () => { expect.stringContaining('Invalid value "[]" supplied to "edit"') ); }); + + it('rejects payloads if search query dry_run is invalid', async () => { + const request = requestMock.create({ + method: 'patch', + path: DETECTION_ENGINE_RULES_BULK_ACTION, + body: getPerformBulkActionEditSchemaMock(), + query: { dry_run: 'invalid' }, + }); + const result = server.validate(request); + expect(result.badRequest).toHaveBeenCalledWith( + expect.stringContaining('Invalid value "invalid" supplied to "dry_run"') + ); + }); }); it('should process large number of rules, larger than configured concurrency', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts index 27ad55b7b0179..3c288184e0736 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts @@ -15,13 +15,17 @@ import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; import type { RuleAlertType } from '../../rules/types'; +import type { BulkActionsDryRunErrCode } from '../../../../../common/constants'; import { DETECTION_ENGINE_RULES_BULK_ACTION, MAX_RULES_TO_UPDATE_IN_PARALLEL, RULES_TABLE_MAX_PAGE_SIZE, } from '../../../../../common/constants'; import { BulkAction } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { performBulkActionSchema } from '../../../../../common/detection_engine/schemas/request/perform_bulk_action_schema'; +import { + performBulkActionSchema, + performBulkActionQuerySchema, +} from '../../../../../common/detection_engine/schemas/request/perform_bulk_action_schema'; import type { SetupPlugins } from '../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; @@ -29,7 +33,6 @@ import { routeLimitedConcurrencyTag } from '../../../../utils/route_limited_conc import type { PromisePoolError, PromisePoolOutcome } from '../../../../utils/promise_pool'; import { initPromisePool } from '../../../../utils/promise_pool'; import { buildMlAuthz } from '../../../machine_learning/authz'; -import { throwAuthzError } from '../../../machine_learning/validation'; import { deleteRules } from '../../rules/delete_rules'; import { duplicateRule } from '../../rules/duplicate_rule'; import { findRules } from '../../rules/find_rules'; @@ -39,6 +42,13 @@ import { getExportByObjectIds } from '../../rules/get_export_by_object_ids'; import { buildSiemResponse } from '../utils'; import { internalRuleToAPIResponse } from '../../schemas/rule_converters'; import { legacyMigrate } from '../../rules/utils'; +import type { DryRunError } from '../../rules/bulk_actions/dry_run'; +import { + validateBulkEnableRule, + validateBulkDisableRule, + validateBulkDuplicateRule, + dryRunValidateBulkEditRule, +} from '../../rules/bulk_actions/validations'; import type { RuleParams } from '../../schemas/rule_schemas'; const MAX_RULES_TO_PROCESS_TOTAL = 10000; @@ -52,6 +62,7 @@ interface RuleDetailsInError { interface NormalizedRuleError { message: string; status_code: number; + err_code?: BulkActionsDryRunErrCode; rules: RuleDetailsInError[]; } @@ -63,8 +74,8 @@ const normalizeErrorResponse = (errors: BulkActionError[]): NormalizedRuleError[ errors.forEach((errorObj) => { let message: string; let statusCode: number = 500; + let errorCode: BulkActionsDryRunErrCode | undefined; let rule: RuleDetailsInError; - // transform different error types (PromisePoolError<string> | PromisePoolError<RuleAlertType> | BulkEditError) // to one common used in NormalizedRuleError if ('rule' in errorObj) { @@ -77,6 +88,7 @@ const normalizeErrorResponse = (errors: BulkActionError[]): NormalizedRuleError[ ? transformError(error) : { message: String(error), statusCode: 500 }; + errorCode = (error as DryRunError)?.errorCode; message = transformedError.message; statusCode = transformedError.statusCode; // The promise pool item is either a rule ID string or a rule object. We have @@ -91,6 +103,7 @@ const normalizeErrorResponse = (errors: BulkActionError[]): NormalizedRuleError[ errorsMap.set(message, { message: truncate(message, { length: MAX_ERROR_MESSAGE_LENGTH }), status_code: statusCode, + err_code: errorCode, rules: [rule], }); } @@ -102,11 +115,13 @@ const normalizeErrorResponse = (errors: BulkActionError[]): NormalizedRuleError[ const buildBulkResponse = ( response: KibanaResponseFactory, { + isDryRun = false, errors = [], updated = [], created = [], deleted = [], }: { + isDryRun?: boolean; errors?: BulkActionError[]; updated?: RuleAlertType[]; created?: RuleAlertType[]; @@ -121,11 +136,19 @@ const buildBulkResponse = ( total: numSucceeded + numFailed, }; - const results = { - updated: updated.map((rule) => internalRuleToAPIResponse(rule)), - created: created.map((rule) => internalRuleToAPIResponse(rule)), - deleted: deleted.map((rule) => internalRuleToAPIResponse(rule)), - }; + // if response is for dry_run, empty lists of rules returned, as rules are not actually updated and stored within ES + // thus, it's impossible to return reliably updated/duplicated/deleted rules + const results = isDryRun + ? { + updated: [], + created: [], + deleted: [], + } + : { + updated: updated.map((rule) => internalRuleToAPIResponse(rule)), + created: created.map((rule) => internalRuleToAPIResponse(rule)), + deleted: deleted.map((rule) => internalRuleToAPIResponse(rule)), + }; if (numFailed > 0) { return response.custom({ @@ -245,6 +268,9 @@ export const performBulkActionRoute = ( path: DETECTION_ENGINE_RULES_BULK_ACTION, validate: { body: buildRouteValidation<typeof performBulkActionSchema>(performBulkActionSchema), + query: buildRouteValidation<typeof performBulkActionQuerySchema>( + performBulkActionQuerySchema + ), }, options: { tags: ['access:securitySolution', routeLimitedConcurrencyTag(MAX_ROUTE_CONCURRENCY)], @@ -271,6 +297,16 @@ export const performBulkActionRoute = ( }); } + const isDryRun = request.query.dry_run === 'true'; + + // dry run is not supported for export, as it doesn't change ES state and has different response format(exported JSON file) + if (isDryRun && body.action === BulkAction.export) { + return siemResponse.error({ + body: `Export action doesn't support dry_run mode`, + statusCode: 400, + }); + } + const abortController = new AbortController(); // subscribing to completed$, because it handles both cases when request was completed and aborted. @@ -301,7 +337,7 @@ export const performBulkActionRoute = ( // handling this action before switch statement as bulkEditRules fetch rules within // rulesClient method, hence there is no need to use fetchRulesByQueryOrIds utility - if (body.action === BulkAction.edit) { + if (body.action === BulkAction.edit && !isDryRun) { const { rules, errors } = await bulkEditRules({ rulesClient, filter: query, @@ -356,6 +392,13 @@ export const performBulkActionRoute = ( concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, executor: async (rule) => { + await validateBulkEnableRule({ mlAuthz, rule }); + + // during dry run only validation is getting performed and rule is not saved in ES, thus return early + if (isDryRun) { + return rule; + } + const migratedRule = await migrateRuleActions({ rulesClient, savedObjectsClient, @@ -363,7 +406,6 @@ export const performBulkActionRoute = ( }); if (!migratedRule.enabled) { - throwAuthzError(await mlAuthz.validateRuleType(migratedRule.params.type)); await rulesClient.enable({ id: migratedRule.id }); } @@ -383,6 +425,13 @@ export const performBulkActionRoute = ( concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, executor: async (rule) => { + await validateBulkDisableRule({ mlAuthz, rule }); + + // during dry run only validation is getting performed and rule is not saved in ES, thus return early + if (isDryRun) { + return rule; + } + const migratedRule = await migrateRuleActions({ rulesClient, savedObjectsClient, @@ -390,7 +439,6 @@ export const performBulkActionRoute = ( }); if (migratedRule.enabled) { - throwAuthzError(await mlAuthz.validateRuleType(migratedRule.params.type)); await rulesClient.disable({ id: migratedRule.id }); } @@ -405,11 +453,17 @@ export const performBulkActionRoute = ( .map(({ result }) => result) .filter((rule): rule is RuleAlertType => rule !== null); break; + case BulkAction.delete: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, executor: async (rule) => { + // during dry run return early for delete, as no validations needed for this action + if (isDryRun) { + return null; + } + const migratedRule = await migrateRuleActions({ rulesClient, savedObjectsClient, @@ -430,19 +484,25 @@ export const performBulkActionRoute = ( .map(({ item }) => item) .filter((rule): rule is RuleAlertType => rule !== null); break; + case BulkAction.duplicate: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, executor: async (rule) => { + await validateBulkDuplicateRule({ mlAuthz, rule }); + + // during dry run only validation is getting performed and rule is not saved in ES, thus return early + if (isDryRun) { + return rule; + } + const migratedRule = await migrateRuleActions({ rulesClient, savedObjectsClient, rule, }); - throwAuthzError(await mlAuthz.validateRuleType(migratedRule.params.type)); - const createdRule = await rulesClient.create({ data: duplicateRule(migratedRule), }); @@ -455,6 +515,7 @@ export const performBulkActionRoute = ( .map(({ result }) => result) .filter((rule): rule is RuleAlertType => rule !== null); break; + case BulkAction.export: const exported = await getExportByObjectIds( rulesClient, @@ -473,6 +534,23 @@ export const performBulkActionRoute = ( }, body: responseBody, }); + + // will be processed only when isDryRun === true + // during dry run only validation is getting performed and rule is not saved in ES + case BulkAction.edit: + bulkActionOutcome = await initPromisePool({ + concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, + items: rules, + executor: async (rule) => { + await dryRunValidateBulkEditRule({ mlAuthz, rule, edit: body.edit }); + + return rule; + }, + abortSignal: abortController.signal, + }); + updated = bulkActionOutcome.results + .map(({ result }) => result) + .filter((rule): rule is RuleAlertType => rule !== null); } if (abortController.signal.aborted === true) { @@ -484,6 +562,7 @@ export const performBulkActionRoute = ( deleted, created, errors: [...fetchRulesOutcome.errors, ...bulkActionOutcome.errors], + isDryRun, }); } catch (err) { const error = transformError(err); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts index 80efbaed06886..3785ccf812eb1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts @@ -33,6 +33,7 @@ import { ALERT_ANCESTORS, ALERT_ORIGINAL_TIME, ALERT_ORIGINAL_EVENT, + ALERT_THRESHOLD_RESULT, } from '../../../../../common/field_maps/field_names'; export const mockThresholdResults = { @@ -111,6 +112,9 @@ export const sampleThresholdAlert = { [ALERT_RULE_PRODUCER]: 'siem', [ALERT_RULE_TYPE_ID]: 'query-rule-id', [ALERT_RULE_UUID]: '151af49f-2e82-4b6f-831b-7f8cb341a5ff', + [ALERT_THRESHOLD_RESULT]: { + count: 3, + }, [ALERT_RULE_PARAMETERS]: { author: [], description: 'some description', @@ -152,7 +156,7 @@ export const sampleThresholdAlert = { updated_by: 'elastic_kibana', tags: ['some fake tag 1', 'some fake tag 2'], to: 'now', - type: 'query', + type: 'threshold', threat: [], version: 1, max_signals: 100, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.test.ts index 91d92a4d076ef..4a6b6b3c9d867 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { allowedExperimentalValues } from '../../../../../common/experimental_features'; import { createQueryAlertType } from './create_query_alert_type'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/action_to_rules_client_operation.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/action_to_rules_client_operation.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/action_to_rules_client_operation.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/action_to_rules_client_operation.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/dry_run.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/dry_run.ts new file mode 100644 index 0000000000000..608324e5bb280 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/dry_run.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { BulkActionsDryRunErrCode } from '../../../../../common/constants'; + +/** + * Error instance that has properties: errorCode & statusCode to use within run_dry + * errorCode({@link BulkActionsDryRunErrCode}) is used to categorize error and make possible to handle it later + */ +export class DryRunError extends Error { + public readonly errorCode: BulkActionsDryRunErrCode; + public readonly statusCode: number; + + constructor(message: string, errorCode: BulkActionsDryRunErrCode, statusCode?: number) { + super(message); + this.name = 'BulkActionDryRunError'; + this.errorCode = errorCode; + this.statusCode = statusCode ?? 500; + } +} + +/** + * executes function, if error thrown, wraps this error into {@link DryRunError} + * @param executor - function that can be executed + * @param errorCode - enum error code {@link BulkActionsDryRunErrCode} to use in DryRunError wrapper + */ +export const throwDryRunError = async ( + executor: () => void, + errorCode: BulkActionsDryRunErrCode +) => { + try { + await executor(); + } catch (e) { + throw new DryRunError(e.message, errorCode, e.statusCode); + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/split_bulk_edit_actions.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/split_bulk_edit_actions.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/split_bulk_edit_actions.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/split_bulk_edit_actions.ts diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/utils.ts new file mode 100644 index 0000000000000..65a4af2308e0e --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/utils.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; + +/** + * helper utility that defines whether bulk edit action is related to index patterns, i.e. one of: + * 'add_index_patterns', 'delete_index_patterns', 'set_index_patterns' + * @param editAction {@link BulkActionEditType} + * @returns {boolean} + */ +export const isIndexPatternsBulkEditAction = (editAction: BulkActionEditType) => + [ + BulkActionEditType.add_index_patterns, + BulkActionEditType.delete_index_patterns, + BulkActionEditType.set_index_patterns, + ].includes(editAction); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/validations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/validations.ts new file mode 100644 index 0000000000000..28793f9fe9c88 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/validations.ts @@ -0,0 +1,112 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Type as RuleType } from '@kbn/securitysolution-io-ts-alerting-types'; +import { invariant } from '../../../../../common/utils/invariant'; +import { isMlRule } from '../../../../../common/machine_learning/helpers'; +import { BulkActionsDryRunErrCode } from '../../../../../common/constants'; +import type { BulkActionEditPayload } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { RuleAlertType } from '../types'; +import { isIndexPatternsBulkEditAction } from './utils'; +import { throwDryRunError } from './dry_run'; +import type { MlAuthz } from '../../../machine_learning/authz'; +import { throwAuthzError } from '../../../machine_learning/validation'; + +interface BulkActionsValidationArgs { + rule: RuleAlertType; + mlAuthz: MlAuthz; +} + +interface BulkEditBulkActionsValidationArgs { + ruleType: RuleType; + mlAuthz: MlAuthz; +} + +interface DryRunBulkEditBulkActionsValidationArgs { + rule: RuleAlertType; + mlAuthz: MlAuthz; + edit: BulkActionEditPayload[]; +} + +/** + * throws ML authorization error wrapped with MACHINE_LEARNING_AUTH error code + * @param mlAuthz - {@link MlAuthz} + * @param ruleType - {@link RuleType} + */ +const throwMlAuthError = (mlAuthz: MlAuthz, ruleType: RuleType) => + throwDryRunError( + async () => throwAuthzError(await mlAuthz.validateRuleType(ruleType)), + BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH + ); + +/** + * runs validation for bulk enable for a single rule + * @param params - {@link BulkActionsValidationArgs} + */ +export const validateBulkEnableRule = async ({ rule, mlAuthz }: BulkActionsValidationArgs) => { + if (!rule.enabled) { + await throwMlAuthError(mlAuthz, rule.params.type); + } +}; + +/** + * runs validation for bulk disable for a single rule + * @param params - {@link BulkActionsValidationArgs} + */ +export const validateBulkDisableRule = async ({ rule, mlAuthz }: BulkActionsValidationArgs) => { + if (rule.enabled) { + await throwMlAuthError(mlAuthz, rule.params.type); + } +}; + +/** + * runs validation for bulk duplicate for a single rule + * @param params - {@link BulkActionsValidationArgs} + */ +export const validateBulkDuplicateRule = async ({ rule, mlAuthz }: BulkActionsValidationArgs) => { + await throwMlAuthError(mlAuthz, rule.params.type); +}; + +/** + * runs validation for bulk edit for a single rule + * @param params - {@link BulkActionsValidationArgs} + */ +export const validateBulkEditRule = async ({ + ruleType, + mlAuthz, +}: BulkEditBulkActionsValidationArgs) => { + await throwMlAuthError(mlAuthz, ruleType); +}; + +/** + * executes dry run validations for bulk edit of a single rule + * @param params - {@link DryRunBulkEditBulkActionsValidationArgs} + */ +export const dryRunValidateBulkEditRule = async ({ + rule, + edit, + mlAuthz, +}: DryRunBulkEditBulkActionsValidationArgs) => { + await validateBulkEditRule({ ruleType: rule.params.type, mlAuthz }); + + // if rule is immutable, it can't be edited + await throwDryRunError( + () => invariant(rule.params.immutable === false, "Elastic rule can't be edited"), + BulkActionsDryRunErrCode.IMMUTABLE + ); + + // if rule is machine_learning, index pattern action can't be applied to it + await throwDryRunError( + () => + invariant( + !isMlRule(rule.params.type) || + !edit.some((action) => isIndexPatternsBulkEditAction(action.type)), + "Machine learning rule doesn't have index patterns" + ), + BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN + ); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts index 1592a8e58972b..587d7d539caa6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts @@ -9,11 +9,11 @@ import type { RulesClient } from '@kbn/alerting-plugin/server'; import type { BulkActionEditPayload } from '../../../../common/detection_engine/schemas/common'; import { enrichFilterWithRuleTypeMapping } from './enrich_filter_with_rule_type_mappings'; import type { MlAuthz } from '../../machine_learning/authz'; -import { throwAuthzError } from '../../machine_learning/validation'; -import { ruleParamsModifier } from './bulk_edit/rule_params_modifier'; -import { splitBulkEditActions } from './bulk_edit/split_bulk_edit_actions'; -import { bulkEditActionToRulesClientOperation } from './bulk_edit/action_to_rules_client_operation'; +import { ruleParamsModifier } from './bulk_actions/rule_params_modifier'; +import { splitBulkEditActions } from './bulk_actions/split_bulk_edit_actions'; +import { validateBulkEditRule } from './bulk_actions/validations'; +import { bulkEditActionToRulesClientOperation } from './bulk_actions/action_to_rules_client_operation'; import type { RuleAlertType } from './types'; @@ -45,8 +45,7 @@ export const bulkEditRules = ({ ...(ids ? { ids } : { filter: enrichFilterWithRuleTypeMapping(filter) }), operations: attributesActions.map(bulkEditActionToRulesClientOperation), paramsModifier: async (ruleParams: RuleAlertType['params']) => { - throwAuthzError(await mlAuthz.validateRuleType(ruleParams.type)); - + await validateBulkEditRule({ mlAuthz, ruleType: ruleParams.type }); return ruleParamsModifier(ruleParams, paramsActions); }, }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts index e21e8ae21d91f..79966e6d9887f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts @@ -7,8 +7,7 @@ import dateMath from '@kbn/datemath'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { thresholdExecutor } from './threshold'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts index 88f12f7157683..bcc70e3fb735f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts @@ -24,8 +24,7 @@ import type { BulkCreate, BulkResponse, RuleRangeTuple, WrapHits } from './types import type { SearchListItemArraySchema } from '@kbn/securitysolution-io-ts-list-types'; import { getSearchListItemResponseMock } from '@kbn/lists-plugin/common/schemas/response/search_list_item_schema.mock'; import { getRuleRangeTuples } from './utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getCompleteRuleMock, getQueryRuleParams } from '../schemas/rule_schemas.mock'; import { bulkCreateFactory } from '../rule_types/factories/bulk_create_factory'; import { wrapHitsFactory } from '../rule_types/factories/wrap_hits_factory'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts index f2411b8a981bc..b75eb81eb4163 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts @@ -14,8 +14,7 @@ import { singleSearchAfter } from './single_search_after'; import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { buildRuleMessageFactory } from './rule_messages'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; const buildRuleMessage = buildRuleMessageFactory({ id: 'fake id', diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts index 8e54a9ac9da8f..ad3c96c69cde3 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts @@ -18,8 +18,7 @@ import { getRuleType } from './rule_type'; import { EsQueryRuleParams, EsQueryRuleState } from './rule_type_params'; import { ActionContext } from './action_context'; import { ESSearchResponse, ESSearchRequest } from '@kbn/core/types/elasticsearch'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { coreMock } from '@kbn/core/server/mocks'; import { ActionGroupId, ConditionMetAlertInstanceId } from './constants'; import { OnlyEsQueryRuleParams, OnlySearchSourceRuleParams } from './types'; diff --git a/x-pack/plugins/synthetics/common/constants/client_defaults.ts b/x-pack/plugins/synthetics/common/constants/client_defaults.ts index 5293205a183cb..161ce5fb3635d 100644 --- a/x-pack/plugins/synthetics/common/constants/client_defaults.ts +++ b/x-pack/plugins/synthetics/common/constants/client_defaults.ts @@ -51,6 +51,28 @@ export const SUMMARY_FILTER = { }, }; +export const getLocationFilter = ({ + locationName, + locationId, +}: { + locationName: string; + locationId: string; +}) => ({ + minimum_should_match: 1, + should: [ + { + term: { + 'observer.name': locationId, + }, + }, + { + term: { + 'observer.geo.name': locationName, + }, + }, + ], +}); + export const getTimeSpanFilter = () => ({ range: { 'monitor.timespan': { diff --git a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts index 62af6aadc8ba3..6aca7913bb8f6 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/monitor_types.ts @@ -8,7 +8,11 @@ import * as t from 'io-ts'; import { secretKeys } from '../../constants/monitor_management'; import { ConfigKey } from './config_key'; -import { MonitorServiceLocationsCodec, ServiceLocationErrors } from './locations'; +import { + MonitorServiceLocationsCodec, + MonitorServiceLocationCodec, + ServiceLocationErrors, +} from './locations'; import { DataStream, DataStreamCodec, @@ -355,19 +359,19 @@ export const MonitorManagementListResultCodec = t.type({ export type MonitorManagementListResult = t.TypeOf<typeof MonitorManagementListResultCodec>; +export const MonitorOverviewItemCodec = t.interface({ + name: t.string, + id: t.string, + location: MonitorServiceLocationCodec, + isEnabled: t.boolean, +}); + +export type MonitorOverviewItem = t.TypeOf<typeof MonitorOverviewItemCodec>; + export const MonitorOverviewResultCodec = t.type({ total: t.number, allMonitorIds: t.array(t.string), - pages: t.record( - t.number, - t.array( - t.interface({ - name: t.string, - id: t.string, - location: MonitorServiceLocationsCodec, - }) - ) - ), + pages: t.record(t.string, t.array(MonitorOverviewItemCodec)), }); export type MonitorOverviewResult = t.TypeOf<typeof MonitorOverviewResultCodec>; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_summary/tabs_content/locations_status.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_summary/tabs_content/locations_status.tsx index 8bf7a3975ed0c..050ec505e7f76 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_summary/tabs_content/locations_status.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_summary/tabs_content/locations_status.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiBadge, EuiBadgeGroup, EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; import { useTheme } from '@kbn/observability-plugin/public'; -import { useStatusByLocation } from '../../../../../hooks/use_status_by_location'; +import { useStatusByLocation } from '../../../hooks/use_status_by_location'; export const LocationsStatus = () => { const { locations, loading } = useStatusByLocation(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts index ccc5d0e4d2737..ba8b43677809a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts @@ -20,7 +20,7 @@ export function useMonitorList() { const dispatch = useDispatch(); const [isDataQueried, setIsDataQueried] = useState(false); - const { pageState, loading, error, data } = useSelector(selectMonitorListState); + const { pageState, loading, loaded, error, data } = useSelector(selectMonitorListState); const syntheticsMonitors = useSelector(selectEncryptedSyntheticsSavedMonitors); const { query, tags, monitorType, locations: locationFilters } = useGetUrlParams(); @@ -61,6 +61,7 @@ export function useMonitorList() { return { loading, + loaded, error, pageState, syntheticsMonitors, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.test.tsx index 37ddab9bb0ca7..90239f7d5f9f6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/monitor_errors/monitor_async_error.test.tsx @@ -51,6 +51,7 @@ describe('<MonitorAsyncError />', () => { monitorList: { error: null, loading: true, + loaded: false, data: { absoluteTotal: 6, perPage: 5, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx new file mode 100644 index 0000000000000..3348f529fe799 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item.tsx @@ -0,0 +1,94 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { Chart, Settings, Metric, MetricTrendShape } from '@elastic/charts'; +import { EuiPanel, EuiLoadingChart } from '@elastic/eui'; +import { DARK_THEME } from '@elastic/charts'; +import { useTheme } from '@kbn/observability-plugin/public'; +import { useLocationName, useStatusByLocation } from '../../../../hooks'; +import { formatDuration } from '../../../../utils/formatting'; +import { Ping } from '../../../../../../../common/runtime_types'; + +export const getColor = (theme: ReturnType<typeof useTheme>, isEnabled: boolean, ping?: Ping) => { + if (!isEnabled) { + return theme.eui.euiColorLightestShade; + } + return (ping?.summary?.down || 0) > 0 + ? theme.eui.euiColorVis9_behindText + : theme.eui.euiColorVis0_behindText; +}; + +export const MetricItem = ({ + monitorId, + locationId, + monitorName, + isMonitorEnabled, + averageDuration, + data, + loaded, +}: { + monitorId: string; + locationId: string; + monitorName: string; + isMonitorEnabled: boolean; + data: Array<{ x: number; y: number }>; + averageDuration: number; + loaded: boolean; +}) => { + const locationName = useLocationName({ locationId }); + const { locations } = useStatusByLocation(monitorId); + const ping = locations.find((loc) => loc.observer?.geo?.name === locationName); + const theme = useTheme(); + + return ( + <div + style={{ + height: '160px', + }} + > + {loaded ? ( + <EuiPanel + style={{ + padding: '0px', + height: '100%', + overflow: 'hidden', + }} + > + <Chart> + <Settings baseTheme={DARK_THEME} /> + <Metric + id={`${monitorId}-${locationId}`} + data={[ + [ + { + title: monitorName, + subtitle: locationName, + value: averageDuration, + trendShape: MetricTrendShape.Area, + trend: data, + extra: ( + <span> + {i18n.translate('xpack.synthetics.overview.duration.label', { + defaultMessage: 'Duration', + })} + </span> + ), + valueFormatter: (d: number) => formatDuration(d), + color: getColor(theme, isMonitorEnabled, ping), + }, + ], + ]} + /> + </Chart> + </EuiPanel> + ) : ( + <EuiLoadingChart mono /> + )} + </div> + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx new file mode 100644 index 0000000000000..0e566856364bc --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.test.tsx @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render } from '../../../../utils/testing/rtl_helpers'; +import { MonitorOverviewItem } from '../types'; +import { OverviewGrid } from './overview_grid'; +import * as hooks from '../../../../hooks/use_last_50_duration_chart'; + +describe('Overview Grid', () => { + const getMockData = (): MonitorOverviewItem[] => { + const data: MonitorOverviewItem[] = []; + for (let i = 0; i < 20; i++) { + data.push({ + id: `${i}`, + location: { + id: 'us_central', + isServiceManaged: true, + }, + name: `Monitor ${i}`, + isEnabled: true, + }); + data.push({ + id: `${i}`, + location: { + id: 'us_east', + isServiceManaged: true, + }, + name: `Monitor ${i}`, + isEnabled: true, + }); + } + return data; + }; + + const getMockChart = (): Array<{ x: number; y: number }> => { + const hits = []; + for (let i = 0; i < 20; i++) { + hits.push({ + x: i, + y: i, + }); + } + return hits; + }; + + it('renders correctly', async () => { + jest + .spyOn(hooks, 'useLast50DurationChart') + .mockReturnValue({ data: getMockChart(), averageDuration: 30000, loading: false }); + + const { getByText, getAllByTestId } = render(<OverviewGrid />, { + state: { + overview: { + pageState: { + perPage: 20, + }, + data: { + pages: { + 0: getMockData().slice(0, 20), + 1: getMockData().slice(20, 40), + }, + allMonitorIds: [], // not critical for this test + total: getMockData().length, + }, + loaded: true, + loading: false, + }, + serviceLocations: { + locations: [ + { + id: 'us_central', + label: 'Us Central', + }, + { + id: 'us_east', + label: 'US East', + }, + ], + locationsLoaded: true, + loading: false, + }, + }, + }); + + expect(getByText(/1-20/)).toBeInTheDocument(); + expect(getByText(/of 40/)).toBeInTheDocument(); + expect(getByText('Rows per page: 20')).toBeInTheDocument(); + expect(getAllByTestId('syntheticsOverviewGridItem').length).toEqual(20); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx new file mode 100644 index 0000000000000..24059c6e90330 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useState } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { i18n } from '@kbn/i18n'; +import { EuiFlexItem, EuiFlexGrid, EuiSpacer, EuiTablePagination } from '@elastic/eui'; +import { selectOverviewState, setOverviewPerPageAction } from '../../../../state/overview'; +import { OverviewPaginationInfo } from './overview_pagination_info'; +import { OverviewGridItem } from './overview_grid_item'; + +export const OverviewGrid = () => { + const { + data: { pages }, + loaded, + pageState: { perPage }, + } = useSelector(selectOverviewState); + const dispatch = useDispatch(); + const [page, setPage] = useState(0); + const currentMonitors = pages[page] || []; + + const goToPage = (pageNumber: number) => { + setPage(pageNumber); + }; + + const changeItemsPerPage = (itemsPerPage: number) => { + dispatch(setOverviewPerPageAction(itemsPerPage)); + }; + + return loaded ? ( + <> + <OverviewPaginationInfo page={page} /> + <EuiSpacer /> + <EuiFlexGrid columns={4}> + {currentMonitors.map((monitor) => ( + <EuiFlexItem + key={`${monitor.id}-${monitor.location?.id}`} + data-test-subj="syntheticsOverviewGridItem" + > + <OverviewGridItem + monitorId={monitor.id} + locationId={monitor.location?.id} + monitorName={monitor.name} + isMonitorEnabled={monitor.isEnabled} + /> + </EuiFlexItem> + ))} + </EuiFlexGrid> + <EuiTablePagination + aria-label={i18n.translate('xpack.synthetics.overview.pagination.ariaLabel', { + defaultMessage: 'Pagination for monitor overview', + })} + pageCount={Object.keys(pages).length} + activePage={page} + onChangePage={goToPage} + itemsPerPage={perPage} + onChangeItemsPerPage={changeItemsPerPage} + itemsPerPageOptions={[10, 20, 40]} + /> + </> + ) : null; +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx new file mode 100644 index 0000000000000..b11534b096f91 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid_item.tsx @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { MetricItem } from './metric_item'; +import { useLast50DurationChart } from '../../../../hooks'; + +export const OverviewGridItem = ({ + monitorId, + monitorName, + locationId, + isMonitorEnabled, +}: { + monitorId: string; + monitorName: string; + locationId: string; + isMonitorEnabled: boolean; +}) => { + const { data, loading, averageDuration } = useLast50DurationChart({ locationId, monitorId }); + return ( + <MetricItem + monitorId={monitorId} + monitorName={monitorName} + isMonitorEnabled={isMonitorEnabled} + locationId={locationId} + data={data} + loaded={!loading} + averageDuration={averageDuration} + /> + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_pagination_info.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_pagination_info.tsx new file mode 100644 index 0000000000000..a00f9f9d1692e --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_pagination_info.tsx @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { EuiText } from '@elastic/eui'; +import { useSelector } from 'react-redux'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { selectOverviewState } from '../../../../state/overview'; + +export const OverviewPaginationInfo = ({ page }: { page: number }) => { + const { + data: { total, pages }, + loaded, + pageState: { perPage }, + } = useSelector(selectOverviewState); + const startRange = (page + 1) * perPage - perPage + 1; + const endRange = startRange + (pages[`${page}`]?.length || 0) - 1; + + if (loaded && !Object.keys(pages).length) { + return null; + } + + return loaded ? ( + <EuiText size="xs"> + <FormattedMessage + id="xpack.synthetics.overview.pagination.description" + defaultMessage="Showing {currentCount} of {total} {monitors}" + values={{ + currentCount: <strong>{`${startRange}-${endRange}`}</strong>, + total, + monitors: ( + <strong> + <FormattedMessage + id="xpack.synthetics.overview.monitors.label" + defaultMessage="Monitors" + /> + </strong> + ), + }} + /> + </EuiText> + ) : null; +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx index 134d8c024555e..4eb864e7a2a3c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/overview_page.tsx @@ -5,31 +5,78 @@ * 2.0. */ -import React from 'react'; +import React, { useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { EuiLoadingElastic, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { useTrackPageview } from '@kbn/observability-plugin/public'; import { Redirect } from 'react-router-dom'; import { useEnablement } from '../../../hooks'; +import { useSyntheticsRefreshContext } from '../../../contexts/synthetics_refresh_context'; +import { + fetchMonitorOverviewAction, + selectOverviewState, + selectServiceLocationsState, +} from '../../../state'; +import { getServiceLocations } from '../../../state/service_locations'; -import { MONITORS_ROUTE, GETTING_STARTED_ROUTE } from '../../../../../../common/constants'; +import { GETTING_STARTED_ROUTE, MONITORS_ROUTE } from '../../../../../../common/constants'; import { useMonitorList } from '../hooks/use_monitor_list'; import { useOverviewBreadcrumbs } from './use_breadcrumbs'; +import { OverviewGrid } from './overview/overview_grid'; export const OverviewPage: React.FC = () => { useTrackPageview({ app: 'synthetics', path: 'overview' }); useTrackPageview({ app: 'synthetics', path: 'overview', delay: 15000 }); useOverviewBreadcrumbs(); + const dispatch = useDispatch(); + + const { refreshApp } = useSyntheticsRefreshContext(); + + const { loading, pageState } = useSelector(selectOverviewState); + const { loading: locationsLoading, locationsLoaded } = useSelector(selectServiceLocationsState); + + useEffect(() => { + const interval = setInterval(() => { + refreshApp(); + }, 1000 * 30); + return () => clearInterval(interval); + }, [refreshApp]); + + useEffect(() => { + if (!locationsLoading && !locationsLoaded) { + dispatch(getServiceLocations()); + } + }, [dispatch, locationsLoaded, locationsLoading, pageState]); + + useEffect(() => { + dispatch(fetchMonitorOverviewAction.get(pageState)); + }, [dispatch, pageState]); + const { enablement: { isEnabled }, loading: enablementLoading, } = useEnablement(); - const { syntheticsMonitors, loading: monitorsLoading } = useMonitorList(); + const { syntheticsMonitors, loading: monitorsLoading, loaded: monitorsLoaded } = useMonitorList(); if (!enablementLoading && isEnabled && !monitorsLoading && syntheticsMonitors.length === 0) { return <Redirect to={GETTING_STARTED_ROUTE} />; - } else { + } + + if (!enablementLoading && !isEnabled && monitorsLoaded && syntheticsMonitors.length === 0) { return <Redirect to={MONITORS_ROUTE} />; } + + return !loading ? ( + <OverviewGrid /> + ) : ( + <EuiFlexGroup alignItems="center" justifyContent="center"> + <EuiSpacer size="xxl" /> + <EuiFlexItem grow={false}> + <EuiLoadingElastic size="xxl" /> + </EuiFlexItem> + </EuiFlexGroup> + ); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/types.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/types.ts new file mode 100644 index 0000000000000..c449c8c0c2a19 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/overview/types.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from '../../../../../../common/runtime_types/monitor_management'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/index.ts index 09aaebd46c40f..35b9f786d4700 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/index.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/index.ts @@ -11,3 +11,7 @@ export * from '../../../hooks/use_breakpoints'; export * from './use_service_allowed'; export * from './use_enablement'; export * from './use_locations'; +export * from './use_last_x_checks'; +export * from './use_last_50_duration_chart'; +export * from './use_location_name'; +export * from './use_status_by_location'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.test.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.test.ts new file mode 100644 index 0000000000000..bb2e74712322f --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.test.ts @@ -0,0 +1,176 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderHook } from '@testing-library/react-hooks'; +import * as hooks from './use_last_x_checks'; +import { useLast50DurationChart } from './use_last_50_duration_chart'; +import { WrappedHelper } from '../utils/testing'; + +describe('useLast50DurationChart', () => { + const getMockHits = (): Array<{ 'monitor.duration.us': number[] | undefined }> => { + const hits = []; + for (let i = 0; i < 10; i++) { + hits.push({ + 'monitor.duration.us': [i], + }); + } + return hits; + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('returns expected results', () => { + jest.spyOn(hooks, 'useLastXChecks').mockReturnValue({ hits: getMockHits(), loading: false }); + + const { result } = renderHook( + () => useLast50DurationChart({ monitorId: 'mock-id', locationId: 'loc' }), + { wrapper: WrappedHelper } + ); + expect(result.current).toEqual({ + averageDuration: 4.5, + data: [ + { + x: 0, + y: 9, + }, + { + x: 1, + y: 8, + }, + { + x: 2, + y: 7, + }, + { + x: 3, + y: 6, + }, + { + x: 4, + y: 5, + }, + { + x: 5, + y: 4, + }, + { + x: 6, + y: 3, + }, + { + x: 7, + y: 2, + }, + { + x: 8, + y: 1, + }, + { + x: 9, + y: 0, + }, + ], + loading: false, + }); + }); + + it('handles undefined monitor duration', () => { + const hitsWithAnUndefinedDuration = [...getMockHits()]; + hitsWithAnUndefinedDuration[1] = { 'monitor.duration.us': undefined }; + + jest + .spyOn(hooks, 'useLastXChecks') + .mockReturnValue({ hits: hitsWithAnUndefinedDuration, loading: false }); + const { result } = renderHook( + () => useLast50DurationChart({ monitorId: 'mock-id', locationId: 'loc' }), + { wrapper: WrappedHelper } + ); + + const data = [ + { + x: 0, + y: 9, + }, + { + x: 1, + y: 8, + }, + { + x: 2, + y: 7, + }, + { + x: 3, + y: 6, + }, + { + x: 4, + y: 5, + }, + { + x: 5, + y: 4, + }, + { + x: 6, + y: 3, + }, + { + x: 7, + y: 2, + }, + { + x: 9, + y: 0, + }, + ]; + + expect(result.current).toEqual({ + averageDuration: data.reduce((acc, datum) => (acc += datum.y), 0) / 9, + data, + loading: false, + }); + }); + + it('passes proper params to useLastXChecks', () => { + const hitsWithAnUndefinedDuration = [...getMockHits()]; + hitsWithAnUndefinedDuration[1] = { 'monitor.duration.us': undefined }; + const monitorId = 'mock-id'; + const locationId = 'loc'; + + const spy = jest + .spyOn(hooks, 'useLastXChecks') + .mockReturnValue({ hits: hitsWithAnUndefinedDuration, loading: false }); + renderHook(() => useLast50DurationChart({ monitorId, locationId }), { + wrapper: WrappedHelper, + }); + + expect(spy).toBeCalledTimes(1); + expect(spy).toBeCalledWith({ + monitorId, + locationId, + fields: ['monitor.duration.us'], + size: 50, + }); + }); + + it('returns loading properly', () => { + const loading = true; + + jest.spyOn(hooks, 'useLastXChecks').mockReturnValue({ hits: getMockHits(), loading }); + const { result } = renderHook( + () => useLast50DurationChart({ monitorId: 'mock-id', locationId: 'loc' }), + { wrapper: WrappedHelper } + ); + renderHook(() => useLast50DurationChart({ monitorId: 'test-id', locationId: 'loc' }), { + wrapper: WrappedHelper, + }); + expect(result.current.loading).toEqual(loading); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.ts new file mode 100644 index 0000000000000..6bfd3616e8654 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_50_duration_chart.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo } from 'react'; +import { useLastXChecks } from './use_last_x_checks'; + +const fields = ['monitor.duration.us']; + +export function useLast50DurationChart({ + monitorId, + locationId, +}: { + monitorId: string; + locationId: string; +}) { + const { hits, loading } = useLastXChecks<{ + 'monitor.duration.us': number[] | undefined; + }>({ + monitorId, + locationId, + fields, + size: 50, + }); + const { data, averageDuration } = useMemo(() => { + if (loading) { + return { + data: [], + averageDuration: 0, + }; + } + let totalDuration = 0; + + const coords = hits + .reverse() // results are returned in desc order by timestamp. Reverse to ensure the data is in asc order by timestamp + .map((hit, index) => { + const duration = hit['monitor.duration.us']?.[0]; + totalDuration += duration || 0; + if (duration === undefined) { + return null; + } + return { + x: index, + y: duration, + }; + }) + .filter((item) => item !== null); + + return { + data: coords as Array<{ x: number; y: number }>, + averageDuration: totalDuration / coords.length, + }; + }, [hits, loading]); + + return useMemo( + () => ({ + data, + averageDuration, + loading, + }), + [loading, data, averageDuration] + ); +} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.test.tsx new file mode 100644 index 0000000000000..fab9114345b52 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.test.tsx @@ -0,0 +1,228 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { renderHook } from '@testing-library/react-hooks'; +import { useLastXChecks } from './use_last_x_checks'; +import { WrappedHelper } from '../utils/testing'; +import * as searchHooks from '@kbn/observability-plugin/public/hooks/use_es_search'; +import { SYNTHETICS_INDEX_PATTERN } from '../../../../common/constants'; + +describe('useLastXChecks', () => { + const getMockHits = (): Array<{ fields: { 'monitor.duration.us': number[] | undefined } }> => { + const hits = []; + for (let i = 0; i < 10; i++) { + hits.push({ + fields: { + 'monitor.duration.us': [i], + }, + }); + } + return hits; + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('returns expected results', () => { + jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: { hits: { hits: getMockHits() } } as unknown as ReturnType< + typeof searchHooks.useEsSearch + >['data'], + loading: false, + }); + + const { result } = renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size: 30, + fields: ['monitor.duration.us'], + }), + { wrapper: WrappedHelper } + ); + expect(result.current).toEqual({ + hits: [ + { + 'monitor.duration.us': [0], + }, + { + 'monitor.duration.us': [1], + }, + { + 'monitor.duration.us': [2], + }, + { + 'monitor.duration.us': [3], + }, + { + 'monitor.duration.us': [4], + }, + { + 'monitor.duration.us': [5], + }, + { + 'monitor.duration.us': [6], + }, + { + 'monitor.duration.us': [7], + }, + { + 'monitor.duration.us': [8], + }, + { + 'monitor.duration.us': [9], + }, + ], + loading: false, + }); + }); + + it('passes proper params', () => { + const loading = true; + const spy = jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: { hits: { hits: getMockHits() } } as unknown as ReturnType< + typeof searchHooks.useEsSearch + >['data'], + loading, + }); + + const fields = ['monitor.summary']; + const size = 30; + + renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size, + fields, + }), + { wrapper: WrappedHelper } + ); + expect(spy).toBeCalledTimes(1); + expect(spy).toBeCalledWith( + expect.objectContaining({ body: expect.objectContaining({ fields, size }) }), + expect.anything(), + expect.anything() + ); + }); + + it('returns loading properly', () => { + jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: { hits: { hits: getMockHits() } } as unknown as ReturnType< + typeof searchHooks.useEsSearch + >['data'], + loading: false, + }); + + const { result } = renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size: 30, + fields: ['monitor.duration.us'], + }), + { wrapper: WrappedHelper } + ); + expect(result.current.loading).toEqual(false); + }); + + it('returns loading true when there is no data', () => { + jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: undefined as unknown as ReturnType<typeof searchHooks.useEsSearch>['data'], + loading: false, + }); + + const { result } = renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size: 30, + fields: ['monitor.duration.us'], + }), + { wrapper: WrappedHelper } + ); + expect(result.current.loading).toEqual(true); + }); + + it('calls useEsSearch with empty index when locations have not loaded, to prevent calling twice', () => { + const loading = true; + const spy = jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: { hits: { hits: getMockHits() } } as unknown as ReturnType< + typeof searchHooks.useEsSearch + >['data'], + loading, + }); + + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + <WrappedHelper + state={{ serviceLocations: { locationsLoaded: false, loading: false, locations: [] } }} + > + {children} + </WrappedHelper> + ); + }; + + renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size: 30, + fields: ['monitor.duration.us'], + }), + { wrapper: WrapperWithState } + ); + expect(spy).toBeCalledTimes(1); + expect(spy).toBeCalledWith( + expect.objectContaining({ index: '' }), + expect.anything(), + expect.anything() + ); + }); + + it('calls useEsSearch with correct index', () => { + const loading = true; + const spy = jest.spyOn(searchHooks, 'useEsSearch').mockReturnValue({ + data: { hits: { hits: getMockHits() } } as unknown as ReturnType< + typeof searchHooks.useEsSearch + >['data'], + loading, + }); + + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + <WrappedHelper + state={{ serviceLocations: { locationsLoaded: true, loading: false, locations: [] } }} + > + {children} + </WrappedHelper> + ); + }; + + renderHook( + () => + useLastXChecks({ + monitorId: 'mock-id', + locationId: 'loc', + size: 30, + fields: ['monitor.duration.us'], + }), + { wrapper: WrapperWithState } + ); + expect(spy).toBeCalledWith( + expect.objectContaining({ index: SYNTHETICS_INDEX_PATTERN }), + expect.anything(), + expect.anything() + ); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.ts b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.ts new file mode 100644 index 0000000000000..17455ba09bb50 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_last_x_checks.ts @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo } from 'react'; +import { useSelector } from 'react-redux'; +import { useEsSearch, createEsParams } from '@kbn/observability-plugin/public'; +import { Ping } from '../../../../common/runtime_types'; + +import { + EXCLUDE_RUN_ONCE_FILTER, + getLocationFilter, + SUMMARY_FILTER, +} from '../../../../common/constants/client_defaults'; +import { selectServiceLocationsState } from '../state'; +import { useSyntheticsRefreshContext } from '../contexts/synthetics_refresh_context'; +import { SYNTHETICS_INDEX_PATTERN, UNNAMED_LOCATION } from '../../../../common/constants'; + +export function useLastXChecks<Fields>({ + monitorId, + locationId, + fields = ['*'], + size = 50, +}: { + monitorId: string; + locationId: string; + fields?: string[]; + size?: number; +}) { + const { lastRefresh } = useSyntheticsRefreshContext(); + const { locationsLoaded, locations } = useSelector(selectServiceLocationsState); + + const params = createEsParams({ + index: locationsLoaded ? SYNTHETICS_INDEX_PATTERN : '', // don't run query until locations are loaded + body: { + size, + query: { + bool: { + filter: [ + SUMMARY_FILTER, + EXCLUDE_RUN_ONCE_FILTER, + { + term: { + config_id: monitorId, + }, + }, + ], + ...getLocationFilter({ + locationId, + locationName: + locations.find((location) => location.id === locationId)?.label || UNNAMED_LOCATION, + }), + }, + }, + sort: [{ '@timestamp': 'desc' }], + fields, + }, + }); + + const { data } = useEsSearch<Ping, typeof params>(params, [lastRefresh], { + name: 'getLastXMonitorRunsByLocation', + }); + + const dataAsJSON = JSON.stringify(data?.hits?.hits); + + return useMemo(() => { + return { + hits: (data?.hits?.hits.map((hit) => hit.fields) as Fields[]) || [], + loading: !data, + }; + }, [dataAsJSON]); // eslint-disable-line react-hooks/exhaustive-deps +} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.test.tsx new file mode 100644 index 0000000000000..ef92e3c3254b0 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.test.tsx @@ -0,0 +1,96 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { renderHook } from '@testing-library/react-hooks'; +import { useLocationName } from './use_location_name'; +import { WrappedHelper } from '../utils/testing'; + +describe('useMonitorListFilters', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('returns expected label', () => { + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + <WrappedHelper + state={{ + serviceLocations: { + locationsLoaded: true, + loading: false, + locations: [ + { + url: 'mockUrl', + id: 'us_central', + label: 'US Central', + isServiceManaged: true, + }, + { + url: 'mockUrl', + id: 'us_east', + label: 'US East', + isServiceManaged: true, + }, + ], + }, + }} + > + {children} + </WrappedHelper> + ); + }; + + const { result } = renderHook( + () => + useLocationName({ + locationId: 'us_central', + }), + { wrapper: WrapperWithState } + ); + expect(result.current).toEqual('US Central'); + }); + + it('returns the location id if matching location cannot be found', () => { + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + <WrappedHelper + state={{ + serviceLocations: { + locationsLoaded: true, + loading: false, + locations: [ + { + url: 'mockUrl', + id: 'us_central', + label: 'US Central', + isServiceManaged: true, + }, + { + url: 'mockUrl', + id: 'us_east', + label: 'US East', + isServiceManaged: true, + }, + ], + }, + }} + > + {children} + </WrappedHelper> + ); + }; + + const { result } = renderHook( + () => + useLocationName({ + locationId: 'us_west', + }), + { wrapper: WrapperWithState } + ); + expect(result.current).toEqual('us_west'); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.tsx new file mode 100644 index 0000000000000..31b4ca6bd5324 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_location_name.tsx @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo, useEffect } from 'react'; +import { useSelector, useDispatch } from 'react-redux'; +import { selectServiceLocationsState, getServiceLocations } from '../state'; + +export function useLocationName({ locationId }: { locationId: string }) { + const dispatch = useDispatch(); + const { locationsLoaded, locations } = useSelector(selectServiceLocationsState); + useEffect(() => { + if (!locationsLoaded) { + dispatch(getServiceLocations()); + } + }); + + return useMemo(() => { + if (!locationsLoaded) { + return undefined; + } else { + return locations.find((location) => location.id === locationId)?.label || locationId; + } + }, [locationsLoaded, locations, locationId]); +} diff --git a/x-pack/plugins/synthetics/public/hooks/use_status_by_location.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_status_by_location.tsx similarity index 88% rename from x-pack/plugins/synthetics/public/hooks/use_status_by_location.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_status_by_location.tsx index 649c53d09e6f0..21930e1d559c6 100644 --- a/x-pack/plugins/synthetics/public/hooks/use_status_by_location.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/hooks/use_status_by_location.tsx @@ -8,14 +8,14 @@ import { useEsSearch } from '@kbn/observability-plugin/public'; import { useParams } from 'react-router-dom'; import { useMemo } from 'react'; -import { Ping } from '../../common/runtime_types'; +import { Ping } from '../../../../common/runtime_types'; import { EXCLUDE_RUN_ONCE_FILTER, getTimeSpanFilter, SUMMARY_FILTER, -} from '../../common/constants/client_defaults'; -import { SYNTHETICS_INDEX_PATTERN, UNNAMED_LOCATION } from '../../common/constants'; -import { useSyntheticsRefreshContext } from '../apps/synthetics/contexts'; +} from '../../../../common/constants/client_defaults'; +import { SYNTHETICS_INDEX_PATTERN, UNNAMED_LOCATION } from '../../../../common/constants'; +import { useSyntheticsRefreshContext } from '../contexts'; export function useStatusByLocation(monitorIdArg?: string) { const { lastRefresh } = useSyntheticsRefreshContext(); @@ -69,6 +69,9 @@ export function useStatusByLocation(monitorIdArg?: string) { return loc.summary.hits.hits?.[0]._source as Ping; }); - return { locations, loading }; + return { + locations, + loading, + }; }, [data, loading]); } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx index a5453aba8c9c2..9356b55ce5eb2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx @@ -9,7 +9,7 @@ import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types'; import React, { FC, useEffect } from 'react'; import { tint } from 'polished'; import { EuiPageTemplateProps, EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; -import { Route, Switch } from 'react-router-dom'; +import { Route, Switch, useHistory } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { APP_WRAPPER_CLASS } from '@kbn/core/public'; @@ -58,7 +58,10 @@ export const MONITOR_MANAGEMENT_LABEL = i18n.translate( } ); -const getRoutes = (euiTheme: EuiThemeComputed): RouteProps[] => { +const getRoutes = ( + euiTheme: EuiThemeComputed, + history: ReturnType<typeof useHistory> +): RouteProps[] => { return [ { title: i18n.translate('xpack.synthetics.gettingStartedRoute.title', { @@ -116,6 +119,29 @@ const getRoutes = (euiTheme: EuiThemeComputed): RouteProps[] => { rightSideItems: [ /* <AddMonitorBtn />*/ ], + tabs: [ + { + label: ( + <FormattedMessage + id="xpack.synthetics.monitorManagement.overviewTab.title" + defaultMessage="Overview" + /> + ), + isSelected: true, + }, + { + label: ( + <FormattedMessage + id="xpack.synthetics.monitorManagement.monitorsTab.title" + defaultMessage="Management" + /> + ), + onClick: () => + history.push({ + pathname: MONITORS_ROUTE, + }), + }, + ], }, }, { @@ -145,6 +171,18 @@ const getRoutes = (euiTheme: EuiThemeComputed): RouteProps[] => { style: { margin: 0 }, pageTitle: <MonitorsPageHeader />, tabs: [ + { + label: ( + <FormattedMessage + id="xpack.synthetics.monitorManagement.overviewTab.title" + defaultMessage="Overview" + /> + ), + onClick: () => + history.push({ + pathname: OVERVIEW_ROUTE, + }), + }, { label: ( <FormattedMessage @@ -193,7 +231,8 @@ const RouteInit: React.FC<Pick<RouteProps, 'path' | 'title'>> = ({ path, title } export const PageRouter: FC = () => { const { addInspectorRequest } = useInspectorContext(); const { euiTheme } = useEuiTheme(); - const routes = getRoutes(euiTheme); + const history = useHistory(); + const routes = getRoutes(euiTheme, history); apiService.addInspectorRequest = addInspectorRequest; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts index dc3bd19b41b99..b3d7a364cfd0b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts @@ -18,6 +18,7 @@ export interface MonitorListState { data: MonitorManagementListResult; pageState: MonitorListPageState; loading: boolean; + loaded: boolean; error: IHttpSerializedFetchError | null; } @@ -30,6 +31,7 @@ const initialState: MonitorListState = { sortField: `${ConfigKey.NAME}.keyword`, }, loading: false, + loaded: false, error: null, }; @@ -38,9 +40,11 @@ export const monitorListReducer = createReducer(initialState, (builder) => { .addCase(fetchMonitorListAction.get, (state, action) => { state.pageState = action.payload; state.loading = true; + state.loaded = false; }) .addCase(fetchMonitorListAction.success, (state, action) => { state.loading = false; + state.loaded = true; state.data = action.payload; }) .addCase(fetchMonitorListAction.fail, (state, action) => { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/actions.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/actions.ts index cef0570885691..5cfd832f951d3 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/actions.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/actions.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { createAction } from '@reduxjs/toolkit'; import { createAsyncAction } from '../utils/actions'; import { MonitorOverviewPageState } from './models'; @@ -14,3 +14,5 @@ export const fetchMonitorOverviewAction = createAsyncAction< MonitorOverviewPageState, MonitorOverviewResult >('fetchMonitorOverivewAction'); + +export const setOverviewPerPageAction = createAction<number>('setOverviewPerPageAction'); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/index.ts index 875fe8f273693..5130ac63e6974 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/index.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/overview/index.ts @@ -12,12 +12,13 @@ import { MonitorOverviewResult } from '../../../../../common/runtime_types'; import { IHttpSerializedFetchError, serializeHttpFetchError } from '../utils/http_error'; import { MonitorOverviewPageState } from './models'; -import { fetchMonitorOverviewAction } from './actions'; +import { fetchMonitorOverviewAction, setOverviewPerPageAction } from './actions'; export interface MonitorOverviewState { data: MonitorOverviewResult; pageState: MonitorOverviewPageState; loading: boolean; + loaded: boolean; error: IHttpSerializedFetchError | null; } @@ -31,6 +32,7 @@ const initialState: MonitorOverviewState = { perPage: 20, }, loading: false, + loaded: false, error: null, }; @@ -39,14 +41,23 @@ export const monitorOverviewReducer = createReducer(initialState, (builder) => { .addCase(fetchMonitorOverviewAction.get, (state, action) => { state.pageState = action.payload; state.loading = true; + state.loaded = false; }) .addCase(fetchMonitorOverviewAction.success, (state, action) => { - state.loading = false; state.data = action.payload; + state.loading = false; + state.loaded = true; }) .addCase(fetchMonitorOverviewAction.fail, (state, action) => { state.loading = false; state.error = serializeHttpFetchError(action.payload); + }) + .addCase(setOverviewPerPageAction, (state, action) => { + state.pageState = { + ...state.pageState, + perPage: action.payload, + }; + state.loaded = false; }); }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.test.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.test.ts new file mode 100644 index 0000000000000..f76f02fc7d9b5 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.test.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { formatDuration } from './format'; +describe('formatDuration', () => { + it('returns zero for < 1 millisecond', () => { + expect(formatDuration(984)).toBe('0 ms'); + }); + + it('returns milliseconds string if < 1 seconds', () => { + expect(formatDuration(921_039)).toBe('921 ms'); + }); + + it('returns s string for seconds', () => { + expect(formatDuration(1_032_100)).toBe('1 s'); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.ts new file mode 100644 index 0000000000000..2fd43d198b8b4 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/format.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; + +// one second = 1 million micros +const ONE_SECOND_AS_MICROS = 1000000; + +// the limit for converting to seconds is >= 1 sec +const MILLIS_LIMIT = ONE_SECOND_AS_MICROS * 1; + +const NUM_MICROSECONDS_IN_MILLISECOND = 1000; + +/** + * This simply converts microseconds to milliseconds. People tend to prefer ms to us + * when visualizing request duration times. + */ +export const microsToMillis = (microseconds: number | null): number | null => { + if (!microseconds && microseconds !== 0) return null; + return Math.floor(microseconds / NUM_MICROSECONDS_IN_MILLISECOND); +}; + +export const formatDuration = (durationMicros: number) => { + if (durationMicros < MILLIS_LIMIT) { + return i18n.translate('xpack.synthetics.overview.durationMsFormatting', { + values: { millis: microsToMillis(durationMicros) }, + defaultMessage: '{millis} ms', + }); + } + const seconds = (durationMicros / ONE_SECOND_AS_MICROS).toFixed(0); + + return i18n.translate('xpack.synthetics.overview.durationSecondsFormatting', { + values: { seconds }, + defaultMessage: '{seconds} s', + }); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/index.ts new file mode 100644 index 0000000000000..e244d818e84b1 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/formatting/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './format'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/syncthetics_store.mock.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/syncthetics_store.mock.ts index 4ca2633d1165f..9a478cbf33a58 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/syncthetics_store.mock.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/syncthetics_store.mock.ts @@ -76,6 +76,7 @@ export const mockState: SyntheticsAppState = { }, error: null, loading: false, + loaded: false, }, overview: { pageState: { @@ -87,6 +88,7 @@ export const mockState: SyntheticsAppState = { pages: {}, }, error: null, + loaded: false, loading: false, }, syntheticsEnablement: { loading: false, error: null, enablement: null }, diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts index 315b0bd3d0f96..96de0a435ee72 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts @@ -6,8 +6,7 @@ */ import { AggregationsAggregate } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { createUptimeESClient, UptimeESClient } from '../lib'; diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts index 0035ab004f016..a76315f181f18 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts @@ -10,7 +10,11 @@ import { SavedObjectsErrorHelpers, SavedObjectsFindResponse, } from '@kbn/core/server'; -import { EncryptedSyntheticsMonitor, ServiceLocations } from '../../../common/runtime_types'; +import { + ConfigKey, + EncryptedSyntheticsMonitor, + ServiceLocations, +} from '../../../common/runtime_types'; import { monitorAttributes } from '../../../common/types/saved_objects'; import { UMServerLibs } from '../../legacy_uptime/lib/lib'; import { UMRestApiRouteFactory } from '../../legacy_uptime/routes/types'; @@ -197,7 +201,7 @@ export const getSyntheticsMonitorOverviewRoute: UMRestApiRouteFactory = () => ({ const allMonitorIds: string[] = []; const pages: Record<number, unknown[]> = {}; - let currentPage = 1; + let currentPage = 0; let currentItem = 0; let total = 0; @@ -208,12 +212,13 @@ export const getSyntheticsMonitorOverviewRoute: UMRestApiRouteFactory = () => ({ allMonitorIds.push(id); /* for reach location, add a config item */ - const locations = monitor.attributes.locations; + const locations = monitor.attributes[ConfigKey.LOCATIONS]; locations.forEach((location) => { const config = { id, - name: monitor.attributes.name, + name: monitor.attributes[ConfigKey.NAME], location, + isEnabled: monitor.attributes[ConfigKey.ENABLED], }; if (!pages[currentPage]) { pages[currentPage] = [config]; diff --git a/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.test.ts new file mode 100644 index 0000000000000..3ff7747f554d7 --- /dev/null +++ b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.test.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Logger } from '@kbn/core/server'; +import { ServiceAPIClient } from './service_api_client'; +import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; +import { ServiceConfig } from '../../common/config'; + +jest.mock('@kbn/server-http-tools', () => ({ + SslConfig: jest.fn().mockImplementation(({ certificate, key }) => ({ certificate, key })), +})); + +describe('getHttpsAgent', () => { + it('does not use certs if basic auth is set', () => { + const apiClient = new ServiceAPIClient( + jest.fn() as unknown as Logger, + { username: 'u', password: 'p' }, + { isDev: true } as UptimeServerSetup + ); + const { options: result } = apiClient.getHttpsAgent('https://localhost:10001'); + expect(result).not.toHaveProperty('cert'); + expect(result).not.toHaveProperty('key'); + }); + + it('rejectUnauthorised is true for requests out of localhost even in dev', () => { + const apiClient = new ServiceAPIClient( + jest.fn() as unknown as Logger, + { tls: { certificate: 'crt', key: 'k' } } as ServiceConfig, + { isDev: true } as UptimeServerSetup + ); + + const { options: result } = apiClient.getHttpsAgent('https://example.com'); + expect(result).toEqual(expect.objectContaining({ rejectUnauthorized: true })); + }); + + it('use rejectUnauthorised as true out of dev for localhost', () => { + const apiClient = new ServiceAPIClient( + jest.fn() as unknown as Logger, + { tls: { certificate: 'crt', key: 'k' } } as ServiceConfig, + { isDev: false } as UptimeServerSetup + ); + + const { options: result } = apiClient.getHttpsAgent('https://localhost:10001'); + expect(result).toEqual(expect.objectContaining({ rejectUnauthorized: true })); + }); + + it('uses certs when defined', () => { + const apiClient = new ServiceAPIClient( + jest.fn() as unknown as Logger, + { tls: { certificate: 'crt', key: 'k' } } as ServiceConfig, + { isDev: false } as UptimeServerSetup + ); + + const { options: result } = apiClient.getHttpsAgent('https://localhost:10001'); + expect(result).toEqual(expect.objectContaining({ cert: 'crt', key: 'k' })); + }); +}); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts index 235055b8c2b38..1b2def581c22d 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/service_api_client.ts @@ -55,22 +55,28 @@ export class ServiceAPIClient { this.server = server; } - getHttpsAgent(url: string) { + getHttpsAgent(targetUrl: string) { + const parsedTargetUrl = new URL(targetUrl); + + const rejectUnauthorized = parsedTargetUrl.hostname !== 'localhost' || !this.server.isDev; + const baseHttpsAgent = new https.Agent({ rejectUnauthorized }); + const config = this.config; - if (url !== this.config.devUrl && this.authorization && this.server.isDev) { - return; - } + + // If using basic-auth, ignore certificate configs + if (this.authorization) return baseHttpsAgent; + if (config.tls && config.tls.certificate && config.tls.key) { const tlsConfig = new SslConfig(config.tls); - const rejectUnauthorized = process.env.NODE_ENV === 'production'; - return new https.Agent({ rejectUnauthorized, cert: tlsConfig.certificate, key: tlsConfig.key, }); } + + return baseHttpsAgent; } async post(data: ServiceData) { diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts index cd93d5e8817b5..dd3bc128f0b51 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts @@ -40,7 +40,7 @@ describe('SyntheticsService', () => { return { id: `loc-${n}`, label: `Location ${n}`, - url: `example.com/${n}`, + url: `https://example.com/${n}`, geo: { lat: 0, lon: 0, diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 7c30e55ab151a..e18b16b14c224 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -2602,6 +2602,9 @@ "properties": { "services_per_agent": { "properties": { + "android/java": { + "type": "long" + }, "dotnet": { "type": "long" }, @@ -2672,6 +2675,90 @@ }, "agents": { "properties": { + "android/java": { + "properties": { + "agent": { + "properties": { + "version": { + "type": "array", + "items": { + "type": "keyword" + } + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "name": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "version": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "composite": { + "type": "array", + "items": { + "type": "keyword" + } + } + } + }, + "language": { + "properties": { + "name": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "version": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "composite": { + "type": "array", + "items": { + "type": "keyword" + } + } + } + }, + "runtime": { + "properties": { + "name": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "version": { + "type": "array", + "items": { + "type": "keyword" + } + }, + "composite": { + "type": "array", + "items": { + "type": "keyword" + } + } + } + } + } + } + } + }, "dotnet": { "properties": { "agent": { @@ -5832,6 +5919,34 @@ } } }, + "es_ml_anomalies": { + "properties": { + "min": { + "type": "long", + "_meta": { + "description": "min number of es machine learning anomaly layers per map" + } + }, + "max": { + "type": "long", + "_meta": { + "description": "max number of es machine learning anomaly layers per map" + } + }, + "avg": { + "type": "float", + "_meta": { + "description": "avg number of es machine learning anomaly layers per map" + } + }, + "total": { + "type": "long", + "_meta": { + "description": "total number of es machine learning anomaly layers in cluster" + } + } + } + }, "es_point_to_point": { "properties": { "min": { diff --git a/x-pack/plugins/timelines/public/components/utils/use_mount_appended.ts b/x-pack/plugins/timelines/public/components/utils/use_mount_appended.ts index e63a2b20a5ad5..6acc21b5e4763 100644 --- a/x-pack/plugins/timelines/public/components/utils/use_mount_appended.ts +++ b/x-pack/plugins/timelines/public/components/utils/use_mount_appended.ts @@ -8,7 +8,8 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { mount } from 'enzyme'; -type WrapperOf<F extends (...args: any) => any> = (...args: Parameters<F>) => ReturnType<F>; // eslint-disable-line +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type WrapperOf<F extends (...args: any) => any> = (...args: Parameters<F>) => ReturnType<F>; export type MountAppended = WrapperOf<typeof mount>; export const useMountAppended = () => { diff --git a/x-pack/plugins/transform/server/routes/api/field_histograms.ts b/x-pack/plugins/transform/server/routes/api/field_histograms.ts index c9623f262b5e0..700b7433af994 100644 --- a/x-pack/plugins/transform/server/routes/api/field_histograms.ts +++ b/x-pack/plugins/transform/server/routes/api/field_histograms.ts @@ -5,12 +5,13 @@ * 2.0. */ +import { fetchHistogramsForFields } from '@kbn/ml-agg-utils'; + import { dataViewTitleSchema, DataViewTitleSchema } from '../../../common/api_schemas/common'; import { fieldHistogramsRequestSchema, FieldHistogramsRequestSchema, } from '../../../common/api_schemas/field_histograms'; -import { getHistogramsForFields } from '../../shared_imports'; import { RouteDependencies } from '../../types'; import { addBasePath } from '..'; @@ -33,8 +34,8 @@ export function registerFieldHistogramsRoutes({ router, license }: RouteDependen try { const esClient = (await ctx.core).elasticsearch.client; - const resp = await getHistogramsForFields( - esClient, + const resp = await fetchHistogramsForFields( + esClient.asCurrentUser, dataViewTitle, query, fields, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 780ea4fe5f40c..ddc14eb55173e 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -293,7 +293,6 @@ "xpack.lens.fieldFormats.suffix.m": "/m", "xpack.lens.fieldFormats.suffix.s": "/s", "xpack.lens.fieldFormats.suffix.title": "Suffixe", - "xpack.lens.filterBy.removeLabel": "Supprimer le filtre", "xpack.lens.fittingFunctionsDescription.carry": "Remplit les blancs avec la dernière valeur", "xpack.lens.fittingFunctionsDescription.linear": "Remplit les blancs avec une ligne", "xpack.lens.fittingFunctionsDescription.lookahead": "Remplit les blancs avec la valeur suivante", @@ -669,7 +668,6 @@ "xpack.lens.indexPattern.termsWithMultipleTermsAndScriptedFields": "Les champs scriptés ne sont pas pris en charge lors de l’utilisation de champs multiples ; {fields} trouvés.", "xpack.lens.indexPattern.time_scale": "indicateur : nombre, unité : s|m|h|d|w|M|y", "xpack.lens.indexPattern.timeScale": "Normaliser par unité", - "xpack.lens.indexPattern.timeScale.enableTimeScale": "Normaliser par unité", "xpack.lens.indexPattern.timeScale.label": "Normaliser par unité", "xpack.lens.indexPattern.timeScale.missingUnit": "Aucune unité spécifiée pour Normaliser par unité.", "xpack.lens.indexPattern.timeScale.tooltip": "Normalisez les valeurs pour qu'elles soient toujours affichées en tant que taux par unité de temps spécifiée, indépendamment de l'intervalle de dates sous-jacent.", @@ -878,8 +876,6 @@ "xpack.lens.table.visualOptionsHeaderRowHeightLabel": "Hauteur de ligne d’en-tête", "xpack.lens.table.visualOptionsPaginateTable": "Paginer le tableau", "xpack.lens.table.visualOptionsPaginateTableTooltip": "La pagination est masquée lorsqu’il y a moins de 10 éléments.", - "xpack.lens.timeScale.removeLabel": "Retirer la normalisation par unité de temps", - "xpack.lens.timeShift.removeLabel": "Retirer le décalage temporel", "xpack.lens.TSVBLabel": "TSVB", "xpack.lens.uniqueLabel": "{label} [{num}]", "xpack.lens.unknownVisType.shortMessage": "Type de visualisation inconnu", @@ -2900,8 +2896,6 @@ "discover.advancedSettings.params.maxCellHeightTitle": "Hauteur de cellule maximale dans le tableau classique", "discover.advancedSettings.params.rowHeightText": "Nombre de sous-lignes à autoriser dans une ligne. La valeur -1 ajuste automatiquement la hauteur de ligne selon le contenu. La valeur 0 affiche le contenu en une seule ligne.", "discover.advancedSettings.params.rowHeightTitle": "Hauteur de ligne dans l'explorateur de documents", - "discover.advancedSettings.sampleSizeText": "Le nombre de lignes à afficher dans le tableau", - "discover.advancedSettings.sampleSizeTitle": "Nombre de lignes", "discover.advancedSettings.searchOnPageLoadText": "Détermine si une recherche est exécutée lors du premier chargement de Discover. Ce paramètre n'a pas d'effet lors du chargement d’une recherche enregistrée.", "discover.advancedSettings.searchOnPageLoadTitle": "Recherche au chargement de la page", "discover.advancedSettings.sortDefaultOrderText": "Détermine le sens de tri par défaut pour les vues de données temporelles dans l'application Discover.", @@ -7559,15 +7553,6 @@ "xpack.apm.apmSchema.index": "Schéma du serveur APM - Index", "xpack.apm.apmServiceGroups.index": "Groupes de services APM - Index", "xpack.apm.apmSettings.index": "Paramètres APM - Index", - "xpack.apm.backendDetail.dependenciesTableColumnBackend": "Service", - "xpack.apm.backendDetail.dependenciesTableTitle": "Services en amont", - "xpack.apm.backendDetailFailedTransactionRateChartTitle": "Taux de transactions ayant échoué", - "xpack.apm.backendDetailLatencyChartTitle": "Latence", - "xpack.apm.backendDetailThroughputChartTitle": "Rendement", - "xpack.apm.backendErrorRateChart.chartTitle": "Taux de transactions ayant échoué", - "xpack.apm.backendInventory.dependencyTableColumn": "Dépendance", - "xpack.apm.backendLatencyChart.chartTitle": "Latence", - "xpack.apm.backendThroughputChart.chartTitle": "Rendement", "xpack.apm.chart.annotation.version": "Version", "xpack.apm.chart.cpuSeries.processAverageLabel": "Moyenne de processus", "xpack.apm.chart.cpuSeries.processMaxLabel": "Max de processus", @@ -8079,7 +8064,6 @@ "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningText": "Nous n'avons pas pu déterminer à quelles JVM ces indicateurs correspondent. Cela provient probablement du fait que vous exécutez une version du serveur APM antérieure à 7.5. La mise à niveau du serveur APM vers la version 7.5 ou supérieure devrait résoudre le problème. Pour plus d'informations sur la mise à niveau, consultez {link}. Vous pouvez également utiliser la barre de recherche de Kibana pour filtrer par nom d'hôte, par ID de conteneur ou en fonction d'autres champs.", "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningTitle": "Impossible d'identifier les JVM", "xpack.apm.serviceNodeNameMissing": "(vide)", - "xpack.apm.serviceOveriew.errorsTableOccurrences": "{occurrences} occ.", "xpack.apm.serviceOverview.coldstartHelp": "Le taux de démarrage à froid indique le pourcentage de demandes qui déclenchent un démarrage à froid d'une fonction sans serveur.", "xpack.apm.serviceOverview.dependenciesTableColumn": "Dépendance", "xpack.apm.serviceOverview.dependenciesTableTabLink": "Afficher les dépendances", @@ -8088,9 +8072,6 @@ "xpack.apm.serviceOverview.errorsTable.errorMessage": "Impossible de récupérer", "xpack.apm.serviceOverview.errorsTable.loading": "Chargement...", "xpack.apm.serviceOverview.errorsTable.noResults": "Aucune erreur trouvée", - "xpack.apm.serviceOverview.errorsTableColumnLastSeen": "Vu en dernier", - "xpack.apm.serviceOverview.errorsTableColumnName": "Nom", - "xpack.apm.serviceOverview.errorsTableColumnOccurrences": "Occurrences", "xpack.apm.serviceOverview.errorsTableLinkText": "Afficher les erreurs", "xpack.apm.serviceOverview.errorsTableTitle": "Erreurs", "xpack.apm.serviceOverview.instancesTable.actionMenus.container.subtitle": "Affichez les logs et les indicateurs de ce conteneur pour plus de détails.", @@ -11641,13 +11622,8 @@ "xpack.enterpriseSearch.content.newIndex.emptyState.footer.link": "Lisez les documents", "xpack.enterpriseSearch.content.newIndex.emptyState.footer.title": "Vous souhaitez en savoir plus sur les index de recherche ?", "xpack.enterpriseSearch.content.newIndex.emptyState.title": "Sélectionner une méthode d'ingestion", - "xpack.enterpriseSearch.content.newIndex.methodConnector.description": "Ingérez les données de sources de contenu telles que like GitHub, Google Drive ou SharePoint. Vous pouvez également créer vos propres connecteurs à l'aide de sources d'API personnalisées.", - "xpack.enterpriseSearch.content.newIndex.methodCrawler.description": "Le robot d'indexation Elastic vous permet d'indexer facilement et automatiquement un contenu à partir de bases de connaissances et de sites web publics.", - "xpack.enterpriseSearch.content.newIndex.methodElasticsearch.description": "Traitez les résultats d'un index Elasticsearch existant avec votre autre contenu. Utilisez les fonctionnalités d'Enterprise Search telles que les curations et le réglage de la pertinence.", - "xpack.enterpriseSearch.content.newIndex.methodJson.description": "Collez ou chargez les données JSON.", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.createIndex.buttonText": "Créer un index de recherche", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputLabel": "Langue", - "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMore.linkText": "En savoir plus", "xpack.enterpriseSearch.content.newIndex.pageTitle": "Nouvel index de recherche", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.description": "Ajoutez votre contenu à Enterprise Search en créant un index de recherche.", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.title": "Créer un index de recherche", @@ -22218,7 +22194,6 @@ "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} Activer la fonctionnalité Explorateur de traces APM qui vous permet de rechercher et d'inspecter les traces avec KQL ou EQL", "xpack.observability.apply.label": "Appliquer", "xpack.observability.breadcrumbs.alertsLinkText": "Alertes", - "xpack.observability.breadcrumbs.landingLinkText": "Premiers pas", "xpack.observability.breadcrumbs.observabilityLinkText": "Observability", "xpack.observability.breadcrumbs.overviewLinkText": "Aperçu", "xpack.observability.breadcrumbs.rulesLinkText": "Règles", @@ -22528,7 +22503,6 @@ "xpack.observability.ruleDetails.rule.eventLogTabText": "Historique d'exécution", "xpack.observability.ruleDetails.ruleLoadError": "Impossible de charger la règle. Raison : {message}", "xpack.observability.ruleDetails.tagsTitle": "Balises", - "xpack.observability.ruleDetails.triggreAction.status": "Statut", "xpack.observability.rules.addRuleButtonLabel": "Créer une règle", "xpack.observability.rules.deleteSelectedIdsConfirmModal.cancelButtonLabel": "Annuler", "xpack.observability.rules.deleteSelectedIdsConfirmModal.deleteButtonLabel": "Supprimer {numIdsToDelete, plural, one {{singleTitle}} other {# {multipleTitle}}} ", @@ -22550,14 +22524,6 @@ "xpack.observability.rulesList.unableToLoadRuleTags": "Impossible de charger les balises de règle", "xpack.observability.rulesTitle": "Règles", "xpack.observability.search.url.close": "Fermer", - "xpack.observability.section.apps.apm.description": "Suivez les transactions via une architecture distribuée et mappez vos interactions de services pour repérer facilement les goulets d'étranglement des performances.", - "xpack.observability.section.apps.apm.title": "APM", - "xpack.observability.section.apps.logs.description": "Centralisez les logs à partir de n'importe quelle source. Recherchez, suivez, automatisez la détection des anomalies et visualisez les tendances afin d'entreprendre des actions plus rapidement.", - "xpack.observability.section.apps.logs.title": "Logs", - "xpack.observability.section.apps.metrics.description": "Analysez les indicateurs à partir de votre infrastructure, vos applications et vos services. Découvrez les tendances, prévoyez les comportements, recevez des alertes sur les anomalies, et plus encore.", - "xpack.observability.section.apps.metrics.title": "Indicateurs", - "xpack.observability.section.apps.uptime.description": "Monitorez de façon proactive la disponibilité de vos sites et services. Recevez des alertes et corrigez les problèmes plus rapidement pour optimiser l'expérience de vos utilisateurs.", - "xpack.observability.section.apps.uptime.title": "Uptime", "xpack.observability.section.errorPanel": "Une erreur est survenue pendant la tentative de récupération des données. Réessayez plus tard", "xpack.observability.seriesEditor.actionsAriaContextLabel": "Liste des actions de la série", "xpack.observability.seriesEditor.clone": "Dupliquer la série", @@ -24782,7 +24748,6 @@ "xpack.securitySolution.detectionEngine.alerts.utilityBar.takeActionTitle": "Entreprendre une action", "xpack.securitySolution.detectionEngine.alertTitle": "Alertes", "xpack.securitySolution.detectionEngine.buttonManageRules": "Gérer les règles", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "Modifier les règles personnalisées", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "Annuler", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "Sélectionnez les modèles d'indexation par défaut des index Elasticsearch à partir de la liste déroulante. Vous pouvez ajouter des modèles d'indexation personnalisés, puis appuyer sur Entrée pour en ajouter un nouveau.", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "Ajouter des modèles d'indexation pour les règles sélectionnées", @@ -25704,9 +25669,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addIndexPatternsTitle": "Ajouter des modèles d'indexation", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "Ajouter des balises", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "Appliquer le modèle de chronologie", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDescription": "L'action de mise à jour sera appliquée uniquement à {customRulesCount, plural, =1 {# règle personnalisée que vous avez sélectionnée} other {# règles personnalisées que vous avez sélectionnées}}.", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationTitle": "Impossible de modifier {elasticRulesCount, plural, =1 {# règle Elastic} other {# règles Elastic}}", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditRejectionDescription": "Les règles Elastic ne sont pas modifiables. L'action de mise à jour sera appliquée uniquement aux règles personnalisées.", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, =1 {# règle est} other {# règles sont}} en cours de mise à jour.", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "M'envoyer une notification à la fin", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastTitle": "Les mises à jour des règles sont en cours", @@ -26466,8 +26428,6 @@ "xpack.securitySolution.endpointManagemnet.noPermissionsText": "Vous ne disposez pas des autorisations Kibana requises pour utiliser Elastic Security Administration", "xpack.securitySolution.endpointPolicyStatus.revisionNumber": "rév. {revNumber}", "xpack.securitySolution.endpointPolicyStatus.tooltipTitleLabel": "Politique appliquée", - "xpack.securitySolution.endpointResponseActions.isolate.errorMessageTitle": "Échec", - "xpack.securitySolution.endpointResponseActions.isolate.successMessageTitle": "Réussite", "xpack.securitySolution.endpointResponseActions.status.agentStatus": "Statut de l'agent", "xpack.securitySolution.endpointResponseActions.status.lastActive": "Dernière activité", "xpack.securitySolution.endpointResponseActions.status.policyStatus": "Statut de la politique", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5f076322b4917..0caf8c69cd81f 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -294,7 +294,6 @@ "xpack.lens.fieldFormats.suffix.m": "/m", "xpack.lens.fieldFormats.suffix.s": "/s", "xpack.lens.fieldFormats.suffix.title": "接尾辞", - "xpack.lens.filterBy.removeLabel": "フィルターを削除", "xpack.lens.fittingFunctionsDescription.carry": "ギャップを最後の値で埋める", "xpack.lens.fittingFunctionsDescription.linear": "ギャップを線で埋める", "xpack.lens.fittingFunctionsDescription.lookahead": "ギャップを次の値で埋める", @@ -670,7 +669,6 @@ "xpack.lens.indexPattern.termsWithMultipleTermsAndScriptedFields": "複数のフィールドを使用するときには、スクリプトフィールドがサポートされていません。{fields}が見つかりました", "xpack.lens.indexPattern.time_scale": "メトリック:数値、単位:s|m|h|d|w|M|y", "xpack.lens.indexPattern.timeScale": "単位で正規化", - "xpack.lens.indexPattern.timeScale.enableTimeScale": "単位で正規化", "xpack.lens.indexPattern.timeScale.label": "単位で正規化", "xpack.lens.indexPattern.timeScale.missingUnit": "単位による正規化の単位が指定されていません。", "xpack.lens.indexPattern.timeScale.tooltip": "基本の日付間隔に関係なく、常に指定された時間単位のレートとして表示されるように値を正規化します。", @@ -879,8 +877,6 @@ "xpack.lens.table.visualOptionsHeaderRowHeightLabel": "ヘッダー行高さ", "xpack.lens.table.visualOptionsPaginateTable": "表のページ制御", "xpack.lens.table.visualOptionsPaginateTableTooltip": "項目が9件以下の場合、ページ制御は非表示です", - "xpack.lens.timeScale.removeLabel": "時間単位で正規化を削除", - "xpack.lens.timeShift.removeLabel": "時間シフトを削除", "xpack.lens.TSVBLabel": "TSVB", "xpack.lens.uniqueLabel": "{label} [{num}]", "xpack.lens.unknownVisType.longMessage": "ビジュアライゼーションタイプ{visType}を解決できませんでした。", @@ -2900,8 +2896,6 @@ "discover.advancedSettings.params.maxCellHeightTitle": "クラシック表の最大セル高さ", "discover.advancedSettings.params.rowHeightText": "行に追加できる線数。値-1は、コンテンツに合わせて、行の高さを自動的に調整します。値0はコンテンツが1行に表示されます。", "discover.advancedSettings.params.rowHeightTitle": "ドキュメントエクスプローラーの行高さ", - "discover.advancedSettings.sampleSizeText": "表に表示する行数です", - "discover.advancedSettings.sampleSizeTitle": "行数", "discover.advancedSettings.searchOnPageLoadText": "Discover の最初の読み込み時に検索を実行するかを制御します。この設定は、保存された検索の読み込み時には影響しません。", "discover.advancedSettings.searchOnPageLoadTitle": "ページの読み込み時の検索", "discover.advancedSettings.sortDefaultOrderText": "Discover アプリのデータビューに基づく時刻のデフォルトの並べ替え方向をコントロールします。", @@ -7553,15 +7547,6 @@ "xpack.apm.apmSchema.index": "APMサーバースキーマ - インデックス", "xpack.apm.apmServiceGroups.index": "APMサービスグループ - インデックス", "xpack.apm.apmSettings.index": "APM 設定 - インデックス", - "xpack.apm.backendDetail.dependenciesTableColumnBackend": "サービス", - "xpack.apm.backendDetail.dependenciesTableTitle": "アップストリームサービス", - "xpack.apm.backendDetailFailedTransactionRateChartTitle": "失敗したトランザクション率", - "xpack.apm.backendDetailLatencyChartTitle": "レイテンシ", - "xpack.apm.backendDetailThroughputChartTitle": "スループット", - "xpack.apm.backendErrorRateChart.chartTitle": "失敗したトランザクション率", - "xpack.apm.backendInventory.dependencyTableColumn": "依存関係", - "xpack.apm.backendLatencyChart.chartTitle": "レイテンシ", - "xpack.apm.backendThroughputChart.chartTitle": "スループット", "xpack.apm.chart.annotation.version": "バージョン", "xpack.apm.chart.cpuSeries.processAverageLabel": "プロセス平均", "xpack.apm.chart.cpuSeries.processMaxLabel": "プロセス最大", @@ -8071,7 +8056,6 @@ "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningText": "これらのメトリックが所属する JVM を特定できませんでした。7.5 よりも古い APM Server を実行していることが原因である可能性が高いです。この問題は APM Server 7.5 以降にアップグレードすることで解決されます。アップグレードに関する詳細は、{link} をご覧ください。代わりに Kibana クエリバーを使ってホスト名、コンテナー ID、またはその他フィールドでフィルタリングすることもできます。", "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningTitle": "JVM を特定できませんでした", "xpack.apm.serviceNodeNameMissing": "(空)", - "xpack.apm.serviceOveriew.errorsTableOccurrences": "{occurrences}件", "xpack.apm.serviceOverview.coldstartHelp": "コールドスタート率は、サーバーレス機能のコールドスタートをトリガーするリクエストの割合を示します。", "xpack.apm.serviceOverview.dependenciesTableColumn": "依存関係", "xpack.apm.serviceOverview.dependenciesTableTabLink": "依存関係を表示", @@ -8080,9 +8064,6 @@ "xpack.apm.serviceOverview.errorsTable.errorMessage": "取得できませんでした", "xpack.apm.serviceOverview.errorsTable.loading": "読み込み中...", "xpack.apm.serviceOverview.errorsTable.noResults": "エラーが見つかりません", - "xpack.apm.serviceOverview.errorsTableColumnLastSeen": "前回の認識", - "xpack.apm.serviceOverview.errorsTableColumnName": "名前", - "xpack.apm.serviceOverview.errorsTableColumnOccurrences": "オカレンス", "xpack.apm.serviceOverview.errorsTableLinkText": "エラーを表示", "xpack.apm.serviceOverview.errorsTableTitle": "エラー", "xpack.apm.serviceOverview.instancesTable.actionMenus.container.subtitle": "このコンテナーのログとインデックスを表示し、さらに詳細を確認できます。", @@ -11632,13 +11613,8 @@ "xpack.enterpriseSearch.content.newIndex.emptyState.footer.link": "<b>ドキュメント</b><b>を読む</b>", "xpack.enterpriseSearch.content.newIndex.emptyState.footer.title": "検索インデックスの詳細", "xpack.enterpriseSearch.content.newIndex.emptyState.title": "インジェスチョン方法を選択", - "xpack.enterpriseSearch.content.newIndex.methodConnector.description": "GitHub、Google Drive、SharePointなどのコンテンツソースからデータを取り込みます。カスタムAPIソースを使用して、独自のコネクターを作成することもできます。", - "xpack.enterpriseSearch.content.newIndex.methodCrawler.description": "Elastic Webクローラーでは、簡単に、公開Webサイトやナレッジベースのコンテンツに自動的にインデックスを作成できます。", - "xpack.enterpriseSearch.content.newIndex.methodElasticsearch.description": "既存のElasticsearchインデックスの結果と他のコンテンツに対応します。キュレーションや関連性チューニングなどのエンタープライズ サーチ機能を使用します。", - "xpack.enterpriseSearch.content.newIndex.methodJson.description": "JSONデータを貼り付けるか、アップロードします。", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.createIndex.buttonText": "検索インデックスの作成", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputLabel": "言語", - "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMore.linkText": "詳細", "xpack.enterpriseSearch.content.newIndex.pageTitle": "新しい検索インデックス", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.description": "検索インデックスを作成し、コンテンツをエンタープライズ サーチに追加します。", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.title": "検索インデックスの作成", @@ -22205,7 +22181,6 @@ "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} APMトレースエクスプローラー機能を有効にし、KQLまたはEQLでトレースを検索、検査できます", "xpack.observability.apply.label": "適用", "xpack.observability.breadcrumbs.alertsLinkText": "アラート", - "xpack.observability.breadcrumbs.landingLinkText": "はじめて使う", "xpack.observability.breadcrumbs.observabilityLinkText": "Observability", "xpack.observability.breadcrumbs.overviewLinkText": "概要", "xpack.observability.breadcrumbs.rulesLinkText": "ルール", @@ -22515,7 +22490,6 @@ "xpack.observability.ruleDetails.rule.eventLogTabText": "実行履歴", "xpack.observability.ruleDetails.ruleLoadError": "ルールを読み込めません。理由:{message}", "xpack.observability.ruleDetails.tagsTitle": "タグ", - "xpack.observability.ruleDetails.triggreAction.status": "ステータス", "xpack.observability.rules.addRuleButtonLabel": "ルールを作成", "xpack.observability.rules.deleteSelectedIdsConfirmModal.cancelButtonLabel": "キャンセル", "xpack.observability.rules.deleteSelectedIdsConfirmModal.deleteButtonLabel": "{numIdsToDelete, plural, one {{singleTitle}} other {# {multipleTitle}}}を削除 ", @@ -22537,14 +22511,6 @@ "xpack.observability.rulesList.unableToLoadRuleTags": "ルールタグを読み込めません", "xpack.observability.rulesTitle": "ルール", "xpack.observability.search.url.close": "閉じる", - "xpack.observability.section.apps.apm.description": "分散アーキテクチャ全体でトランザクションを追跡し、サービスの通信をマップ化して、簡単にパフォーマンスボトルネックを特定できます。", - "xpack.observability.section.apps.apm.title": "APM", - "xpack.observability.section.apps.logs.description": "任意のソースからログを一元化します。より迅速に対応できるように、検索、追跡、異常検知の自動化、傾向の可視化を行います。", - "xpack.observability.section.apps.logs.title": "ログ", - "xpack.observability.section.apps.metrics.description": "インフラストラクチャ、アプリ、サービスからメトリックを分析します。傾向、予測動作を発見し、異常などに関するアラートを通知します。", - "xpack.observability.section.apps.metrics.title": "メトリック", - "xpack.observability.section.apps.uptime.description": "サイトとサービスの可用性をアクティブに監視するアラートを受信し、問題をより迅速に解決して、ユーザーエクスペリエンスを最適化します。", - "xpack.observability.section.apps.uptime.title": "アップタイム", "xpack.observability.section.errorPanel": "データの取得時にエラーが発生しました。再試行してください", "xpack.observability.seriesEditor.actionsAriaContextLabel": "系列アクションリスト", "xpack.observability.seriesEditor.clone": "系列の複製", @@ -24767,7 +24733,6 @@ "xpack.securitySolution.detectionEngine.alerts.utilityBar.takeActionTitle": "アクションを実行", "xpack.securitySolution.detectionEngine.alertTitle": "アラート", "xpack.securitySolution.detectionEngine.buttonManageRules": "ルールの管理", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "カスタムルールの編集", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "キャンセル", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "Elasticsearchインデックスのデフォルトインデックスパターンをドロップダウンから選択します。カスタムインデックスパターンを追加し、Enterを押すと、新しいインデックスパターンを開始できます。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "選択したルールのインデックスパターンを追加", @@ -25689,9 +25654,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addIndexPatternsTitle": "インデックスパターンを追加", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "タグを追加", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "タイムラインテンプレートを適用", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDescription": "更新アクションは、選択した{customRulesCount, plural, other {#個のカスタムルール}}にのみ適用されます。", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationTitle": "{elasticRulesCount, plural, other {#個のElasticルール}}を編集できません", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditRejectionDescription": "Elasticルールは変更できません。更新アクションはカスタムルールにのみ適用されます。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {#個のルール}}を更新しています。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "完了時に通知", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastTitle": "ルールを更新しています", @@ -26451,8 +26413,6 @@ "xpack.securitySolution.endpointManagemnet.noPermissionsText": "Elastic Security Administrationを使用するために必要なKibana権限がありません。", "xpack.securitySolution.endpointPolicyStatus.revisionNumber": "rev. {revNumber}", "xpack.securitySolution.endpointPolicyStatus.tooltipTitleLabel": "ポリシーが適用されました", - "xpack.securitySolution.endpointResponseActions.isolate.errorMessageTitle": "失敗", - "xpack.securitySolution.endpointResponseActions.isolate.successMessageTitle": "成功", "xpack.securitySolution.endpointResponseActions.status.agentStatus": "エージェントステータス", "xpack.securitySolution.endpointResponseActions.status.lastActive": "前回のアーカイブ", "xpack.securitySolution.endpointResponseActions.status.policyStatus": "ポリシーステータス", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 5f8dc58573275..921ca2a48b925 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -294,7 +294,6 @@ "xpack.lens.fieldFormats.suffix.m": "/m", "xpack.lens.fieldFormats.suffix.s": "/s", "xpack.lens.fieldFormats.suffix.title": "后缀", - "xpack.lens.filterBy.removeLabel": "移除筛选", "xpack.lens.fittingFunctionsDescription.carry": "使用最后一个值填充空距", "xpack.lens.fittingFunctionsDescription.linear": "使用线填充空距", "xpack.lens.fittingFunctionsDescription.lookahead": "使用下一个值填充空距", @@ -670,7 +669,6 @@ "xpack.lens.indexPattern.termsWithMultipleTermsAndScriptedFields": "使用多个字段时不支持脚本字段,找到 {fields}", "xpack.lens.indexPattern.time_scale": "指标:数字,单位:s|m|h|d|w|M|y", "xpack.lens.indexPattern.timeScale": "按单位标准化", - "xpack.lens.indexPattern.timeScale.enableTimeScale": "按单位标准化", "xpack.lens.indexPattern.timeScale.label": "按单位标准化", "xpack.lens.indexPattern.timeScale.missingUnit": "没有为按单位标准化指定单位。", "xpack.lens.indexPattern.timeScale.tooltip": "将值标准化为始终显示为每指定时间单位速率,无论基础日期时间间隔是多少。", @@ -879,8 +877,6 @@ "xpack.lens.table.visualOptionsHeaderRowHeightLabel": "标题行高", "xpack.lens.table.visualOptionsPaginateTable": "对表分页", "xpack.lens.table.visualOptionsPaginateTableTooltip": "如果小于 10 项,将隐藏分页", - "xpack.lens.timeScale.removeLabel": "删除按时间单位标准化", - "xpack.lens.timeShift.removeLabel": "移除时间偏移", "xpack.lens.TSVBLabel": "TSVB", "xpack.lens.uniqueLabel": "{label} [{num}]", "xpack.lens.unknownVisType.longMessage": "无法解析可视化类型 {visType}。", @@ -2902,8 +2898,6 @@ "discover.advancedSettings.params.maxCellHeightTitle": "经典表中的最大单元格高度", "discover.advancedSettings.params.rowHeightText": "一行中允许的文本行数。值为 -1 时,会自动调整行高以适应内容。值为 0 时,会在单文本行中显示内容。", "discover.advancedSettings.params.rowHeightTitle": "Document Explorer 中的行高", - "discover.advancedSettings.sampleSizeText": "要在表中显示的行数目", - "discover.advancedSettings.sampleSizeTitle": "行数目", "discover.advancedSettings.searchOnPageLoadText": "控制在 Discover 首次加载时是否执行搜索。加载已保存搜索时,此设置无效。", "discover.advancedSettings.searchOnPageLoadTitle": "在页面加载时搜索", "discover.advancedSettings.sortDefaultOrderText": "在 Discover 应用中控制基于时间的数据视图的默认排序方向。", @@ -7565,15 +7559,6 @@ "xpack.apm.apmSchema.index": "APM Server 架构 - 索引", "xpack.apm.apmServiceGroups.index": "APM 服务组 - 索引", "xpack.apm.apmSettings.index": "APM 设置 - 索引", - "xpack.apm.backendDetail.dependenciesTableColumnBackend": "服务", - "xpack.apm.backendDetail.dependenciesTableTitle": "上游服务", - "xpack.apm.backendDetailFailedTransactionRateChartTitle": "失败事务率", - "xpack.apm.backendDetailLatencyChartTitle": "延迟", - "xpack.apm.backendDetailThroughputChartTitle": "吞吐量", - "xpack.apm.backendErrorRateChart.chartTitle": "失败事务率", - "xpack.apm.backendInventory.dependencyTableColumn": "依赖项", - "xpack.apm.backendLatencyChart.chartTitle": "延迟", - "xpack.apm.backendThroughputChart.chartTitle": "吞吐量", "xpack.apm.chart.annotation.version": "版本", "xpack.apm.chart.cpuSeries.processAverageLabel": "进程平均值", "xpack.apm.chart.cpuSeries.processMaxLabel": "进程最大值", @@ -8085,7 +8070,6 @@ "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningText": "无法识别这些指标属于哪些 JVM。这可能因为运行的 APM Server 版本低于 7.5。如果升级到 APM Server 7.5 或更高版本,应可解决此问题。有关升级的详细信息,请参阅 {link}。或者,也可以使用 Kibana 查询栏按主机名、容器 ID 或其他字段筛选。", "xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningTitle": "找不到 JVM", "xpack.apm.serviceNodeNameMissing": "(空)", - "xpack.apm.serviceOveriew.errorsTableOccurrences": "{occurrences} 次", "xpack.apm.serviceOverview.coldstartHelp": "冷启动速率指示触发无服务器功能冷启动的请求百分比。", "xpack.apm.serviceOverview.dependenciesTableColumn": "依赖项", "xpack.apm.serviceOverview.dependenciesTableTabLink": "查看依赖项", @@ -8094,9 +8078,6 @@ "xpack.apm.serviceOverview.errorsTable.errorMessage": "无法提取", "xpack.apm.serviceOverview.errorsTable.loading": "正在加载……", "xpack.apm.serviceOverview.errorsTable.noResults": "未找到错误", - "xpack.apm.serviceOverview.errorsTableColumnLastSeen": "最后看到时间", - "xpack.apm.serviceOverview.errorsTableColumnName": "名称", - "xpack.apm.serviceOverview.errorsTableColumnOccurrences": "发生次数", "xpack.apm.serviceOverview.errorsTableLinkText": "查看错误", "xpack.apm.serviceOverview.errorsTableTitle": "错误", "xpack.apm.serviceOverview.instancesTable.actionMenus.container.subtitle": "查看此容器的日志和指标以获取进一步详情。", @@ -11648,13 +11629,8 @@ "xpack.enterpriseSearch.content.newIndex.emptyState.footer.link": "阅读文档", "xpack.enterpriseSearch.content.newIndex.emptyState.footer.title": "想要详细了解搜索索引?", "xpack.enterpriseSearch.content.newIndex.emptyState.title": "选择采集方法", - "xpack.enterpriseSearch.content.newIndex.methodConnector.description": "从 GitHub、Google 云端硬盘或 SharePoint 等内容源中采集数据。您还可以使用定制 API 源构建自己的连接器。", - "xpack.enterpriseSearch.content.newIndex.methodCrawler.description": "通过 Elastic 网络爬虫,您可以轻松、自动索引来自面向公众的网站和知识库的内容。", - "xpack.enterpriseSearch.content.newIndex.methodElasticsearch.description": "提供来自现有 Elasticsearch 索引的结果以及其他内容。使用 Enterprise Search 功能,如策展和相关性调整。", - "xpack.enterpriseSearch.content.newIndex.methodJson.description": "粘贴或上传 JSON 数据。", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.createIndex.buttonText": "创建搜索索引", "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputLabel": "语言", - "xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMore.linkText": "了解详情", "xpack.enterpriseSearch.content.newIndex.pageTitle": "新搜索索引", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.description": "通过创建搜索索引将内容添加到 Enterprise Search。", "xpack.enterpriseSearch.content.newIndex.selectSearchIndex.title": "创建搜索索引", @@ -22231,7 +22207,6 @@ "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} 启用 APM Trace Explorer 功能,它允许您通过 KQL 或 EQL 搜索和检查跟踪", "xpack.observability.apply.label": "应用", "xpack.observability.breadcrumbs.alertsLinkText": "告警", - "xpack.observability.breadcrumbs.landingLinkText": "入门", "xpack.observability.breadcrumbs.observabilityLinkText": "Observability", "xpack.observability.breadcrumbs.overviewLinkText": "概览", "xpack.observability.breadcrumbs.rulesLinkText": "规则", @@ -22541,7 +22516,6 @@ "xpack.observability.ruleDetails.rule.eventLogTabText": "执行历史记录", "xpack.observability.ruleDetails.ruleLoadError": "无法加载规则。原因:{message}", "xpack.observability.ruleDetails.tagsTitle": "标签", - "xpack.observability.ruleDetails.triggreAction.status": "状态", "xpack.observability.rules.addRuleButtonLabel": "创建规则", "xpack.observability.rules.deleteSelectedIdsConfirmModal.cancelButtonLabel": "取消", "xpack.observability.rules.deleteSelectedIdsConfirmModal.deleteButtonLabel": "删除{numIdsToDelete, plural, one {{singleTitle}} other { # 个{multipleTitle}}} ", @@ -22562,14 +22536,6 @@ "xpack.observability.rulesList.unableToLoadRuleTags": "无法加载规则标签", "xpack.observability.rulesTitle": "规则", "xpack.observability.search.url.close": "关闭", - "xpack.observability.section.apps.apm.description": "通过分布式体系结构跟踪事务并映射服务的交互以轻松发现性能瓶颈。", - "xpack.observability.section.apps.apm.title": "APM", - "xpack.observability.section.apps.logs.description": "集中任何源的日志。搜索、跟踪、自动化异常检测并可视化趋势,以便您可以更迅速地采取操作。", - "xpack.observability.section.apps.logs.title": "日志", - "xpack.observability.section.apps.metrics.description": "分析您的基础设施、应用和服务的指标。发现趋势、预测行为、接收异常告警等等。", - "xpack.observability.section.apps.metrics.title": "指标", - "xpack.observability.section.apps.uptime.description": "主动监测站点和服务的可用性。接收告警并更快地解决问题,从而优化用户体验。", - "xpack.observability.section.apps.uptime.title": "运行时间", "xpack.observability.section.errorPanel": "尝试提取数据时发生错误。请重试", "xpack.observability.seriesEditor.actionsAriaContextLabel": "序列操作列表", "xpack.observability.seriesEditor.clone": "序列重复", @@ -24793,7 +24759,6 @@ "xpack.securitySolution.detectionEngine.alerts.utilityBar.takeActionTitle": "采取操作", "xpack.securitySolution.detectionEngine.alertTitle": "告警", "xpack.securitySolution.detectionEngine.buttonManageRules": "管理规则", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "编辑定制规则", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "取消", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "从下拉列表中选择 Elasticsearch 索引的默认索引模式。您可以添加定制索引模式,然后按 Enter 键以开始新索引。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "为选定规则添加索引模式", @@ -25715,9 +25680,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addIndexPatternsTitle": "添加索引模式", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "添加标签", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "应用时间线模板", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDescription": "将仅对您选定的 {customRulesCount, plural, other {# 个定制规则}}应用更新操作。", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationTitle": "无法编辑 {elasticRulesCount, plural, other {# 个 Elastic 规则}}", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditRejectionDescription": "无法修改 Elastic 规则。将仅对定制规则应用更新操作。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {# 个规则}}正在更新。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "在完成时通知我", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastTitle": "正在进行规则更新", @@ -26478,8 +26440,6 @@ "xpack.securitySolution.endpointManagemnet.noPermissionsText": "您没有所需的 Kibana 权限,无法使用 Elastic Security 管理", "xpack.securitySolution.endpointPolicyStatus.revisionNumber": "修订版 {revNumber}", "xpack.securitySolution.endpointPolicyStatus.tooltipTitleLabel": "已应用策略", - "xpack.securitySolution.endpointResponseActions.isolate.errorMessageTitle": "失败", - "xpack.securitySolution.endpointResponseActions.isolate.successMessageTitle": "成功", "xpack.securitySolution.endpointResponseActions.status.agentStatus": "代理状态", "xpack.securitySolution.endpointResponseActions.status.lastActive": "上次活动时间", "xpack.securitySolution.endpointResponseActions.status.policyStatus": "策略状态", @@ -32048,4 +32008,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。", "xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/triggers_actions_ui/common/experimental_features.ts b/x-pack/plugins/triggers_actions_ui/common/experimental_features.ts index 3265469bea640..8c7e5a500bf0e 100644 --- a/x-pack/plugins/triggers_actions_ui/common/experimental_features.ts +++ b/x-pack/plugins/triggers_actions_ui/common/experimental_features.ts @@ -14,7 +14,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues; export const allowedExperimentalValues = Object.freeze({ rulesListDatagrid: true, internalAlertsTable: false, - internalShareableComponentsSandbox: false, ruleTagFilter: true, ruleStatusFilter: true, rulesDetailLogs: true, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx index e63999edf31a9..770a939620b9b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx @@ -73,7 +73,7 @@ export const renderApp = (deps: TriggersAndActionsUiServices) => { export const App = ({ deps }: { deps: TriggersAndActionsUiServices }) => { const { dataViews, uiSettings, theme$ } = deps; - const sections: Section[] = ['rules', 'connectors', 'alerts', '__components_sandbox']; + const sections: Section[] = ['rules', 'connectors', 'alerts']; const isDarkMode = useObservable<boolean>(uiSettings.get$('theme:darkMode')); const sectionsRegex = sections.join('|'); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts index a416eb18b5a52..a65aac10d7564 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/constants/index.ts @@ -13,14 +13,13 @@ export { } from '@kbn/alerting-plugin/common'; export { BASE_ACTION_API_PATH, INTERNAL_BASE_ACTION_API_PATH } from '@kbn/actions-plugin/common'; -export type Section = 'connectors' | 'rules' | 'alerts' | '__components_sandbox'; +export type Section = 'connectors' | 'rules' | 'alerts'; export const routeToHome = `/`; export const routeToConnectors = `/connectors`; export const routeToRules = `/rules`; export const routeToRuleDetails = `/rule/:ruleId`; export const routeToInternalAlerts = `/alerts`; -export const routeToInternalShareableComponentsSandbox = '/__components_sandbox'; export const legacyRouteToRules = `/alerts`; export const legacyRouteToRuleDetails = `/alert/:alertId`; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/home.tsx b/x-pack/plugins/triggers_actions_ui/public/application/home.tsx index 802e3178b1554..9110ebe1f51c8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/home.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/home.tsx @@ -11,13 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiSpacer, EuiButtonEmpty, EuiPageHeader } from '@elastic/eui'; import { getIsExperimentalFeatureEnabled } from '../common/get_experimental_features'; -import { - Section, - routeToConnectors, - routeToRules, - routeToInternalAlerts, - routeToInternalShareableComponentsSandbox, -} from './constants'; +import { Section, routeToConnectors, routeToRules, routeToInternalAlerts } from './constants'; import { getAlertingSectionBreadcrumb } from './lib/breadcrumb'; import { getCurrentDocTitle } from './lib/doc_title'; import { hasShowActionsCapability } from './lib/capabilities'; @@ -32,9 +26,6 @@ const ActionsConnectorsList = lazy( ); const RulesList = lazy(() => import('./sections/rules_list/components/rules_list')); const AlertsPage = lazy(() => import('./sections/alerts_table/alerts_page')); -const InternalShareableComponentsSandbox = lazy( - () => import('./internal/shareable_components_sandbox/shareable_components_sandbox') -); export interface MatchParams { section: Section; @@ -54,9 +45,6 @@ export const TriggersActionsUIHome: React.FunctionComponent<RouteComponentProps< docLinks, } = useKibana().services; const isInternalAlertsTableEnabled = getIsExperimentalFeatureEnabled('internalAlertsTable'); - const isInternalShareableComponentsSandboxEnabled = getIsExperimentalFeatureEnabled( - 'internalShareableComponentsSandbox' - ); const canShowActions = hasShowActionsCapability(capabilities); const tabs: Array<{ @@ -162,13 +150,6 @@ export const TriggersActionsUIHome: React.FunctionComponent<RouteComponentProps< path={routeToRules} component={suspendedComponentWithProps(RulesList, 'xl')} /> - {isInternalShareableComponentsSandboxEnabled && ( - <Route - exact - path={routeToInternalShareableComponentsSandbox} - component={suspendedComponentWithProps(InternalShareableComponentsSandbox, 'xl')} - /> - )} {isInternalAlertsTableEnabled ? ( <Route exact diff --git a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/shareable_components_sandbox.tsx b/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/shareable_components_sandbox.tsx deleted file mode 100644 index 93be110510912..0000000000000 --- a/x-pack/plugins/triggers_actions_ui/public/application/internal/shareable_components_sandbox/shareable_components_sandbox.tsx +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { RuleStatusDropdownSandbox } from './rule_status_dropdown_sandbox'; -import { RuleTagFilterSandbox } from './rule_tag_filter_sandbox'; -import { RuleStatusFilterSandbox } from './rule_status_filter_sandbox'; -import { RuleTagBadgeSandbox } from './rule_tag_badge_sandbox'; -import { RuleEventLogListSandbox } from './rule_event_log_list_sandbox'; -import { RulesListNotifyBadgeSandbox } from './rules_list_notify_badge_sandbox'; -import { RulesListSandbox } from './rules_list_sandbox'; - -export const InternalShareableComponentsSandbox: React.FC<{}> = () => { - return ( - <> - <RuleStatusDropdownSandbox /> - <RuleTagFilterSandbox /> - <RuleStatusFilterSandbox /> - <RuleTagBadgeSandbox /> - <RulesListSandbox /> - <RuleEventLogListSandbox /> - <RulesListNotifyBadgeSandbox /> - </> - ); -}; - -// eslint-disable-next-line import/no-default-export -export { InternalShareableComponentsSandbox as default }; diff --git a/x-pack/plugins/triggers_actions_ui/public/common/get_experimental_features.test.tsx b/x-pack/plugins/triggers_actions_ui/public/common/get_experimental_features.test.tsx index a59a25c62a8e9..18e2f240dac21 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/get_experimental_features.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/get_experimental_features.test.tsx @@ -20,7 +20,6 @@ describe('getIsExperimentalFeatureEnabled', () => { rulesDetailLogs: true, ruleTagFilter: true, ruleStatusFilter: true, - internalShareableComponentsSandbox: true, }, }); @@ -36,10 +35,6 @@ describe('getIsExperimentalFeatureEnabled', () => { expect(result).toEqual(true); - result = getIsExperimentalFeatureEnabled('internalShareableComponentsSandbox'); - - expect(result).toEqual(true); - result = getIsExperimentalFeatureEnabled('ruleTagFilter'); expect(result).toEqual(true); diff --git a/x-pack/plugins/triggers_actions_ui/public/index.ts b/x-pack/plugins/triggers_actions_ui/public/index.ts index 47a0d7b98167b..ae5cf94b0a0d6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/index.ts @@ -16,7 +16,9 @@ export type { Rule, RuleType, RuleTypeModel, + RuleStatusFilterProps, RuleStatus, + RuleTableItem, ActionType, ActionTypeRegistryContract, RuleTypeRegistryContract, diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.test.ts index c17cc160a6ce1..3afe9b3b54bad 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.test.ts @@ -7,8 +7,7 @@ import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ScopedClusterClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ScopedClusterClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import moment from 'moment'; import { diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts index 062782560ef2b..ae979ddcf9d22 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts @@ -10,8 +10,7 @@ import { BehaviorSubject } from 'rxjs'; import { TransportResult } from '@elastic/elasticsearch'; import { Logger } from '@kbn/core/server'; import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ScopedClusterClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ScopedClusterClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { ReindexOperation, diff --git a/x-pack/test/accessibility/apps/tags.ts b/x-pack/test/accessibility/apps/tags.ts index 7f56257b285c2..dd992b191e436 100644 --- a/x-pack/test/accessibility/apps/tags.ts +++ b/x-pack/test/accessibility/apps/tags.ts @@ -15,12 +15,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const retry = getService('retry'); const toasts = getService('toasts'); - const kibanaServer = getService('kibanaServer'); - // Failing: See https://github.com/elastic/kibana/issues/135339 + // FLAKY: https://github.com/elastic/kibana/issues/136033 describe.skip('Kibana Tags Page Accessibility', () => { before(async () => { - await kibanaServer.savedObjects.cleanStandardList(); await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', { useActualUrl: true, }); @@ -36,7 +34,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.home.removeSampleDataSet('flights'); - await kibanaServer.savedObjects.cleanStandardList(); }); it('tags main page meets a11y validations', async () => { @@ -75,7 +72,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await a11y.testAppSnapshot(); }); - it('tag assignment panel meets a11y requirements', async () => { + // https://github.com/elastic/kibana/issues/135985 inconsistent test failure + it.skip('tag assignment panel meets a11y requirements', async () => { await testSubjects.click('euiCollapsedItemActionsButton'); const actionOnTag = 'assign'; await PageObjects.tagManagement.clickActionItem(actionOnTag); @@ -83,9 +81,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('tag management page with connections column populated meets a11y requirements', async () => { + await testSubjects.click('euiCollapsedItemActionsButton'); + const actionOnTag = 'assign'; + await PageObjects.tagManagement.clickActionItem(actionOnTag); await testSubjects.click('assignFlyout-selectAllButton'); + await testSubjects.click('assignFlyoutConfirmButton'); await toasts.dismissAllToasts(); + await retry.try(async () => { await a11y.testAppSnapshot(); }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/actions_telemetry.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/actions_telemetry.ts index bf2bc67789529..f61e59ee420ba 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/actions_telemetry.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/actions_telemetry.ts @@ -19,7 +19,8 @@ export default function createActionsTelemetryTests({ getService }: FtrProviderC const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); - describe('actions telemetry', () => { + // FLAKY: https://github.com/elastic/kibana/issues/136152 + describe.skip('actions telemetry', () => { const alwaysFiringRuleId: { [key: string]: string } = {}; before(async () => { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/alerting_telemetry.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/alerting_telemetry.ts index 9231fefd3277f..c73081e61117a 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/alerting_telemetry.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/alerting_telemetry.ts @@ -27,7 +27,8 @@ export default function createAlertingTelemetryTests({ getService }: FtrProvider const esTestIndexTool = new ESTestIndexTool(es, retry); const esArchiver = getService('esArchiver'); - describe('alerting telemetry', () => { + // FLAKY: https://github.com/elastic/kibana/issues/136679 + describe.skip('alerting telemetry', () => { const alwaysFiringRuleId: { [key: string]: string } = {}; before(async () => { diff --git a/x-pack/test/api_integration/apis/aiops/explain_log_rate_spikes.ts b/x-pack/test/api_integration/apis/aiops/explain_log_rate_spikes.ts index 82a6ca42fce83..f096541f1a7fd 100644 --- a/x-pack/test/api_integration/apis/aiops/explain_log_rate_spikes.ts +++ b/x-pack/test/api_integration/apis/aiops/explain_log_rate_spikes.ts @@ -34,11 +34,12 @@ export default ({ getService }: FtrProviderContext) => { }; const expected = { - chunksLength: 8, - actionsLength: 7, + chunksLength: 12, + actionsLength: 11, noIndexChunksLength: 4, noIndexActionsLength: 3, - actionFilter: 'add_change_points', + changePointFilter: 'add_change_points', + histogramFilter: 'add_change_points_histogram', errorFilter: 'error', changePoints: [ { @@ -60,6 +61,7 @@ export default ({ getService }: FtrProviderContext) => { normalizedScore: 0.7661649691018979, }, ], + histogramLength: 20, }; describe('POST /internal/aiops/explain_log_rate_spikes', () => { @@ -100,7 +102,7 @@ export default ({ getService }: FtrProviderContext) => { expect(typeof d.type).to.be('string'); }); - const addChangePointsActions = data.filter((d) => d.type === expected.actionFilter); + const addChangePointsActions = data.filter((d) => d.type === expected.changePointFilter); expect(addChangePointsActions.length).to.greaterThan(0); const changePoints = addChangePointsActions @@ -120,6 +122,15 @@ export default ({ getService }: FtrProviderContext) => { expect(cp.doc_count).to.equal(ecp.doc_count); expect(cp.bg_count).to.equal(ecp.bg_count); }); + + const histogramActions = data.filter((d) => d.type === expected.histogramFilter); + const histograms = histogramActions.flatMap((d) => d.payload); + // for each change point we should get a histogram + expect(histogramActions.length).to.be(changePoints.length); + // each histogram should have a length of 20 items. + histograms.forEach((h, index) => { + expect(h.histogram.length).to.be(20); + }); }); it('should return data in chunks with streaming', async () => { @@ -148,7 +159,7 @@ export default ({ getService }: FtrProviderContext) => { } expect(data.length).to.be(expected.actionsLength); - const addChangePointsActions = data.filter((d) => d.type === expected.actionFilter); + const addChangePointsActions = data.filter((d) => d.type === expected.changePointFilter); expect(addChangePointsActions.length).to.greaterThan(0); const changePoints = addChangePointsActions @@ -168,6 +179,15 @@ export default ({ getService }: FtrProviderContext) => { expect(cp.doc_count).to.equal(ecp.doc_count); expect(cp.bg_count).to.equal(ecp.bg_count); }); + + const histogramActions = data.filter((d) => d.type === expected.histogramFilter); + const histograms = histogramActions.flatMap((d) => d.payload); + // for each change point we should get a histogram + expect(histogramActions.length).to.be(changePoints.length); + // each histogram should have a length of 20 items. + histograms.forEach((h, index) => { + expect(h.histogram.length).to.be(20); + }); } }); diff --git a/x-pack/test/api_integration/apis/cases/common/roles.ts b/x-pack/test/api_integration/apis/cases/common/roles.ts new file mode 100644 index 0000000000000..96393dfa6c423 --- /dev/null +++ b/x-pack/test/api_integration/apis/cases/common/roles.ts @@ -0,0 +1,405 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Role } from '../../../../cases_api_integration/common/lib/authentication/types'; + +/** + * Roles for Cases in Security Solution + */ + +export const secAllCasesOnlyDelete: Role = { + name: 'sec_all_cases_only_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['cases_delete'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAllCasesNoDelete: Role = { + name: 'sec_all_cases_no_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['minimal_all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAll: Role = { + name: 'sec_all_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAllCasesRead: Role = { + name: 'sec_all_cases_read_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + securitySolutionCases: ['read'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secAllCasesNone: Role = { + name: 'sec_all_cases_none_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secReadCasesAll: Role = { + name: 'sec_read_cases_all_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['read'], + securitySolutionCases: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secReadCasesRead: Role = { + name: 'sec_read_cases_read_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['read'], + securitySolutionCases: ['read'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secRead: Role = { + name: 'sec_read_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['read'], + securitySolutionCases: ['read'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const secReadCasesNone: Role = { + name: 'sec_read_cases_none_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + siem: ['read'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +/** + * Roles for Cases in the stack + */ + +export const casesOnlyDelete: Role = { + name: 'cases_only_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['cases_delete'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const casesNoDelete: Role = { + name: 'cases_no_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['minimal_all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const casesAll: Role = { + name: 'cases_all_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +/** + * Roles for Cases in Observability + */ + +export const obsCasesOnlyDelete: Role = { + name: 'obs_cases_only_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + observabilityCases: ['cases_delete'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const obsCasesNoDelete: Role = { + name: 'obs_cases_no_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + observabilityCases: ['minimal_all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const obsCasesAll: Role = { + name: 'obs_cases_all_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + observabilityCases: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const roles = [ + secAllCasesOnlyDelete, + secAllCasesNoDelete, + secAll, + secAllCasesRead, + secAllCasesNone, + secReadCasesAll, + secReadCasesRead, + secReadCasesNone, + secRead, + casesOnlyDelete, + casesNoDelete, + casesAll, + obsCasesOnlyDelete, + obsCasesNoDelete, + obsCasesAll, +]; diff --git a/x-pack/test/api_integration/apis/cases/common/users.ts b/x-pack/test/api_integration/apis/cases/common/users.ts new file mode 100644 index 0000000000000..13e36f16fde10 --- /dev/null +++ b/x-pack/test/api_integration/apis/cases/common/users.ts @@ -0,0 +1,151 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { User } from '../../../../cases_api_integration/common/lib/authentication/types'; +import { + casesAll, + casesNoDelete, + casesOnlyDelete, + obsCasesAll, + obsCasesNoDelete, + obsCasesOnlyDelete, + secAll, + secAllCasesNoDelete, + secAllCasesNone, + secAllCasesOnlyDelete, + secAllCasesRead, + secRead, + secReadCasesAll, + secReadCasesNone, + secReadCasesRead, +} from './roles'; + +/** + * Users for Cases in Security Solution + */ + +export const secAllCasesOnlyDeleteUser: User = { + username: 'sec_all_cases_only_delete_user', + password: 'password', + roles: [secAllCasesOnlyDelete.name], +}; + +export const secAllCasesNoDeleteUser: User = { + username: 'sec_all_cases_no_delete_user', + password: 'password', + roles: [secAllCasesNoDelete.name], +}; + +export const secAllUser: User = { + username: 'sec_all_user', + password: 'password', + roles: [secAll.name], +}; + +export const secAllCasesReadUser: User = { + username: 'sec_all_cases_read_user', + password: 'password', + roles: [secAllCasesRead.name], +}; + +export const secAllCasesNoneUser: User = { + username: 'sec_all_cases_none_user', + password: 'password', + roles: [secAllCasesNone.name], +}; + +export const secReadCasesAllUser: User = { + username: 'sec_read_cases_all_user', + password: 'password', + roles: [secReadCasesAll.name], +}; + +export const secReadCasesReadUser: User = { + username: 'sec_read_cases_read_user', + password: 'password', + roles: [secReadCasesRead.name], +}; + +export const secReadUser: User = { + username: 'sec_read_user', + password: 'password', + roles: [secRead.name], +}; + +export const secReadCasesNoneUser: User = { + username: 'sec_read_cases_none_user', + password: 'password', + roles: [secReadCasesNone.name], +}; + +/** + * Users for Cases in the Stack + */ + +export const casesOnlyDeleteUser: User = { + username: 'cases_only_delete_user', + password: 'password', + roles: [casesOnlyDelete.name], +}; + +export const casesNoDeleteUser: User = { + username: 'cases_no_delete_user', + password: 'password', + roles: [casesNoDelete.name], +}; + +export const casesAllUser: User = { + username: 'cases_all_user', + password: 'password', + roles: [casesAll.name], +}; + +/** + * Users for Cases in Observability + */ + +export const obsCasesOnlyDeleteUser: User = { + username: 'obs_cases_only_delete_user', + password: 'password', + roles: [obsCasesOnlyDelete.name], +}; + +export const obsCasesNoDeleteUser: User = { + username: 'obs_cases_no_delete_user', + password: 'password', + roles: [obsCasesNoDelete.name], +}; + +export const obsCasesAllUser: User = { + username: 'obs_cases_all_user', + password: 'password', + roles: [obsCasesAll.name], +}; + +export const users = [ + secAllCasesOnlyDeleteUser, + secAllCasesNoDeleteUser, + secAllUser, + secAllCasesReadUser, + secAllCasesNoneUser, + secReadCasesAllUser, + secReadCasesReadUser, + secReadUser, + secReadCasesNoneUser, + casesOnlyDeleteUser, + casesNoDeleteUser, + casesAllUser, + obsCasesOnlyDeleteUser, + obsCasesNoDeleteUser, + obsCasesAllUser, +]; diff --git a/x-pack/test/api_integration/apis/cases/index.ts b/x-pack/test/api_integration/apis/cases/index.ts new file mode 100644 index 0000000000000..3ec21e4d1cce1 --- /dev/null +++ b/x-pack/test/api_integration/apis/cases/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('cases', function () { + loadTestFile(require.resolve('./privileges')); + }); +} diff --git a/x-pack/test/api_integration/apis/cases/privileges.ts b/x-pack/test/api_integration/apis/cases/privileges.ts new file mode 100644 index 0000000000000..7279e89c9b167 --- /dev/null +++ b/x-pack/test/api_integration/apis/cases/privileges.ts @@ -0,0 +1,178 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { APP_ID as CASES_APP_ID } from '@kbn/cases-plugin/common/constants'; +import { APP_ID as SECURITY_SOLUTION_APP_ID } from '@kbn/security-solution-plugin/common/constants'; +import { observabilityFeatureId as OBSERVABILITY_APP_ID } from '@kbn/observability-plugin/common'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { + createUsersAndRoles, + deleteUsersAndRoles, +} from '../../../cases_api_integration/common/lib/authentication'; + +import { + createCase, + deleteAllCaseItems, + deleteCases, + getCase, +} from '../../../cases_api_integration/common/lib/utils'; +import { + casesAllUser, + casesNoDeleteUser, + casesOnlyDeleteUser, + obsCasesAllUser, + obsCasesNoDeleteUser, + obsCasesOnlyDeleteUser, + secAllCasesNoDeleteUser, + secAllCasesNoneUser, + secAllCasesOnlyDeleteUser, + secAllCasesReadUser, + secAllUser, + secReadCasesAllUser, + secReadCasesNoneUser, + secReadCasesReadUser, + secReadUser, + users, +} from './common/users'; +import { roles } from './common/roles'; +import { getPostCaseRequest } from '../../../cases_api_integration/common/lib/mock'; + +export default ({ getService }: FtrProviderContext): void => { + describe('feature privilege', () => { + const es = getService('es'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const supertest = getService('supertest'); + + before(async () => { + await createUsersAndRoles(getService, users, roles); + }); + + after(async () => { + await deleteUsersAndRoles(getService, users, roles); + }); + + afterEach(async () => { + await deleteAllCaseItems(es); + }); + + for (const { user, owner } of [ + { user: secAllUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesAllUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesAllUser, owner: CASES_APP_ID }, + { user: casesNoDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesAllUser, owner: OBSERVABILITY_APP_ID }, + { user: obsCasesNoDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${user.username} with role(s) ${user.roles.join()} can create a case`, async () => { + await createCase(supertestWithoutAuth, getPostCaseRequest({ owner }), 200, { + user, + space: null, + }); + }); + } + + for (const { user, owner } of [ + { user: secAllCasesReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesAllUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesAllUser, owner: CASES_APP_ID }, + { user: casesNoDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesAllUser, owner: OBSERVABILITY_APP_ID }, + { user: obsCasesNoDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${user.username} with role(s) ${user.roles.join()} can get a case`, async () => { + const caseInfo = await createCase(supertest, getPostCaseRequest({ owner })); + const retrievedCase = await getCase({ + supertest: supertestWithoutAuth, + caseId: caseInfo.id, + expectedHttpCode: 200, + auth: { user, space: null }, + }); + + expect(caseInfo.owner).to.eql(retrievedCase.owner); + }); + } + + for (const { user, owner } of [ + { user: secAllCasesReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secAllCasesNoneUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesNoneUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesOnlyDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesOnlyDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${ + user.username + } with role(s) ${user.roles.join()} cannot create a case`, async () => { + await createCase(supertestWithoutAuth, getPostCaseRequest({ owner }), 403, { + user, + space: null, + }); + }); + } + + for (const { user, owner } of [ + { user: secAllCasesNoneUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secReadCasesNoneUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secAllCasesOnlyDeleteUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesOnlyDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesOnlyDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${user.username} with role(s) ${user.roles.join()} cannot get a case`, async () => { + const caseInfo = await createCase(supertest, getPostCaseRequest({ owner })); + + await getCase({ + supertest: supertestWithoutAuth, + caseId: caseInfo.id, + expectedHttpCode: 403, + auth: { user, space: null }, + }); + }); + } + + for (const { user, owner } of [ + { user: secAllUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secAllCasesOnlyDeleteUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesAllUser, owner: CASES_APP_ID }, + { user: casesOnlyDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesAllUser, owner: OBSERVABILITY_APP_ID }, + { user: obsCasesOnlyDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${user.username} with role(s) ${user.roles.join()} can delete a case`, async () => { + const caseInfo = await createCase(supertest, getPostCaseRequest({ owner })); + await deleteCases({ + caseIDs: [caseInfo.id], + supertest: supertestWithoutAuth, + expectedHttpCode: 204, + auth: { user, space: null }, + }); + }); + } + + for (const { user, owner } of [ + { user: secAllCasesReadUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: secAllCasesNoDeleteUser, owner: SECURITY_SOLUTION_APP_ID }, + { user: casesNoDeleteUser, owner: CASES_APP_ID }, + { user: obsCasesNoDeleteUser, owner: OBSERVABILITY_APP_ID }, + ]) { + it(`User ${ + user.username + } with role(s) ${user.roles.join()} cannot delete a case`, async () => { + const caseInfo = await createCase(supertest, getPostCaseRequest({ owner })); + await deleteCases({ + caseIDs: [caseInfo.id], + supertest: supertestWithoutAuth, + expectedHttpCode: 403, + auth: { user, space: null }, + }); + }); + } + }); +}; diff --git a/x-pack/test/api_integration/apis/index.ts b/x-pack/test/api_integration/apis/index.ts index 46b10af2a52b3..5f99067833afd 100644 --- a/x-pack/test/api_integration/apis/index.ts +++ b/x-pack/test/api_integration/apis/index.ts @@ -36,6 +36,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./watcher')); loadTestFile(require.resolve('./logs_ui')); loadTestFile(require.resolve('./osquery')); + loadTestFile(require.resolve('./cases')); loadTestFile(require.resolve('./monitoring_collection')); }); } diff --git a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts index d9e7b0383144e..0065057d762f4 100644 --- a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts +++ b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts @@ -16,12 +16,21 @@ import { API_BASE_PATH } from './constants'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const { createComponentTemplate, cleanUpComponentTemplates, deleteComponentTemplate } = - initElasticsearchHelpers(getService); + const { + createComponentTemplate, + createIndexTemplate, + cleanUpIndexTemplates, + cleanUpComponentTemplates, + deleteComponentTemplate, + cleanupDatastreams, + createDatastream, + } = initElasticsearchHelpers(getService); describe('Component templates', function () { after(async () => { + await cleanUpIndexTemplates(); await cleanUpComponentTemplates(); + await cleanupDatastreams(); }); describe('Get', () => { @@ -391,5 +400,74 @@ export default function ({ getService }: FtrProviderContext) { }); }); }); + + describe('Get datastreams', () => { + const COMPONENT_NAME = 'test_get_component_template_datastreams'; + const COMPONENT = { + template: { + settings: { + index: { + number_of_shards: 1, + }, + }, + mappings: { + _source: { + enabled: false, + }, + properties: { + host_name: { + type: 'keyword', + }, + created_at: { + type: 'date', + format: 'EEE MMM dd HH:mm:ss Z yyyy', + }, + }, + }, + }, + }; + const DATASTREAM_NAME = 'logs-test-component-template-default'; + const INDEX_PATTERN = 'logs-test-component-template-*'; + const TEMPLATE_NAME = 'test_get_component_template_datastreams'; + const TEMPLATE = { + index_patterns: INDEX_PATTERN, + composed_of: [COMPONENT_NAME], + }; + + // Create component template to verify GET requests + before(async () => { + try { + await createComponentTemplate({ body: COMPONENT, name: COMPONENT_NAME }, true); + await createIndexTemplate({ body: TEMPLATE, name: TEMPLATE_NAME }, true); + } catch (err) { + // eslint-disable-next-line no-console + console.log('[Setup error] Error creating component template'); + throw err; + } + }); + + describe('without datastreams', () => { + it('should return no datastreams', async () => { + const uri = `${API_BASE_PATH}/component_templates/${COMPONENT_NAME}/datastreams`; + + const { body } = await supertest.get(uri).set('kbn-xsrf', 'xxx').expect(200); + + expect(body).to.eql({ data_streams: [] }); + }); + }); + + describe('with datastreams', () => { + before(async () => { + await createDatastream(DATASTREAM_NAME); + }); + it('should return datastreams', async () => { + const uri = `${API_BASE_PATH}/component_templates/${COMPONENT_NAME}/datastreams`; + + const { body } = await supertest.get(uri).set('kbn-xsrf', 'xxx').expect(200); + + expect(body).to.eql({ data_streams: ['logs-test-component-template-default'] }); + }); + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/management/index_management/data_streams.ts b/x-pack/test/api_integration/apis/management/index_management/data_streams.ts index cd3c63ab96f4a..0117204343285 100644 --- a/x-pack/test/api_integration/apis/management/index_management/data_streams.ts +++ b/x-pack/test/api_integration/apis/management/index_management/data_streams.ts @@ -39,6 +39,33 @@ export default function ({ getService }: FtrProviderContext) { await es.indices.createDataStream({ name }); }; + const updateIndexTemplateMappings = async (name: string, mappings: any) => { + await es.indices.putIndexTemplate({ + name, + body: { + // We need to match the names of backing indices with this template. + index_patterns: [name + '*'], + template: { + mappings, + }, + data_stream: {}, + }, + }); + }; + + const getDatastream = async (name: string) => { + const { + data_streams: [datastream], + } = await es.indices.getDataStream({ name }); + return datastream; + }; + + const getMapping = async (name: string) => { + const res = await es.indices.getMapping({ index: name }); + + return Object.values(res)[0]!.mappings; + }; + const deleteComposableIndexTemplate = async (name: string) => { await es.indices.deleteIndexTemplate({ name }); }; @@ -214,5 +241,62 @@ export default function ({ getService }: FtrProviderContext) { .expect(404); }); }); + + describe('Mappings from template', () => { + const testDataStreamName1 = 'test-data-stream-mappings-1'; + + before(async () => { + await createDataStream(testDataStreamName1); + }); + + after(async () => { + await deleteDataStream(testDataStreamName1); + }); + + it('Apply mapping from index template', async () => { + const beforeMapping = await getMapping(testDataStreamName1); + expect(beforeMapping.properties).eql({ + '@timestamp': { type: 'date' }, + }); + await updateIndexTemplateMappings(testDataStreamName1, { + properties: { + test: { type: 'integer' }, + }, + }); + await supertest + .post(`${API_BASE_PATH}/data_streams/${testDataStreamName1}/mappings_from_template`) + .set('kbn-xsrf', 'xxx') + .expect(200); + + const afterMapping = await getMapping(testDataStreamName1); + expect(afterMapping.properties).eql({ + '@timestamp': { type: 'date' }, + test: { type: 'integer' }, + }); + }); + }); + + describe('Rollover', () => { + const testDataStreamName1 = 'test-data-stream-rollover-1'; + + before(async () => { + await createDataStream(testDataStreamName1); + }); + + after(async () => { + await deleteDataStream(testDataStreamName1); + }); + + it('Rollover datastreams', async () => { + await supertest + .post(`${API_BASE_PATH}/data_streams/${testDataStreamName1}/rollover`) + .set('kbn-xsrf', 'xxx') + .expect(200); + + const datastream = await getDatastream(testDataStreamName1); + + expect(datastream.generation).equal(2); + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/management/index_management/lib/elasticsearch.js b/x-pack/test/api_integration/apis/management/index_management/lib/elasticsearch.js index 9c67f493a7ca3..d71085439e868 100644 --- a/x-pack/test/api_integration/apis/management/index_management/lib/elasticsearch.js +++ b/x-pack/test/api_integration/apis/management/index_management/lib/elasticsearch.js @@ -17,8 +17,29 @@ export const initElasticsearchHelpers = (getService) => { const esDeleteAllIndices = getService('esDeleteAllIndices'); let indicesCreated = []; + let datastreamCreated = []; + let indexTemplatesCreated = []; let componentTemplatesCreated = []; + const createDatastream = (datastream) => { + datastreamCreated.push(datastream); + return es.indices.createDataStream({ name: datastream }); + }; + + const deleteDatastream = (datastream) => { + return es.indices.deleteDataStream({ name: datastream }); + }; + + const cleanupDatastreams = () => + Promise.all(datastreamCreated.map(deleteDatastream)) + .then(() => { + datastreamCreated = []; + }) + .catch((err) => { + // eslint-disable-next-line no-console + console.log(`[Cleanup error] Error deleting ES resources: ${err.message}`); + }); + const createIndex = (index = getRandomString(), body) => { indicesCreated.push(index); return es.indices.create({ index, body }).then(() => index); @@ -37,6 +58,18 @@ export const initElasticsearchHelpers = (getService) => { const catTemplate = (name) => es.cat.templates({ name, format: 'json' }, { meta: true }); + const createIndexTemplate = (indexTemplate, shouldCacheTemplate) => { + if (shouldCacheTemplate) { + indexTemplatesCreated.push(indexTemplate.name); + } + + return es.indices.putIndexTemplate(indexTemplate, { meta: true }); + }; + + const deleteIndexTemplate = (indexTemplateName) => { + return es.indices.deleteIndexTemplate({ name: indexTemplateName }, { meta: true }); + }; + const createComponentTemplate = (componentTemplate, shouldCacheTemplate) => { if (shouldCacheTemplate) { componentTemplatesCreated.push(componentTemplate.name); @@ -59,13 +92,29 @@ export const initElasticsearchHelpers = (getService) => { console.log(`[Cleanup error] Error deleting ES resources: ${err.message}`); }); + const cleanUpIndexTemplates = () => + Promise.all(indexTemplatesCreated.map(deleteIndexTemplate)) + .then(() => { + indexTemplatesCreated = []; + }) + .catch((err) => { + // eslint-disable-next-line no-console + console.log(`[Cleanup error] Error deleting ES resources: ${err.message}`); + }); + return { createIndex, deleteAllIndices, catIndex, indexStats, + createDatastream, + deleteDatastream, + cleanupDatastreams, cleanUp, catTemplate, + createIndexTemplate, + deleteIndexTemplate, + cleanUpIndexTemplates, createComponentTemplate, deleteComponentTemplate, cleanUpComponentTemplates, diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/explain.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/explain.ts index 6a5cb782ed651..8be131781eeae 100644 --- a/x-pack/test/api_integration/apis/ml/data_frame_analytics/explain.ts +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/explain.ts @@ -98,7 +98,7 @@ export default ({ getService }: FtrProviderContext) => { ml.api.assertResponseStatusCode(200, status, body); expect(body).to.have.property('field_selection'); - // eslint-disable-next-line + // eslint-disable-next-line @typescript-eslint/naming-convention const { memory_estimation, field_selection } = body; const fieldObject = field_selection[0]; expect(memory_estimation).to.have.property('expected_memory_with_disk'); diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index 61ac283dfea34..3e6d18ef40840 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -28,8 +28,8 @@ export default function ({ getService }: FtrProviderContext) { savedObjectsTagging: ['all', 'read', 'minimal_all', 'minimal_read'], canvas: ['all', 'read', 'minimal_all', 'minimal_read'], maps: ['all', 'read', 'minimal_all', 'minimal_read'], - generalCases: ['all', 'read', 'minimal_all', 'minimal_read'], - observabilityCases: ['all', 'read', 'minimal_all', 'minimal_read'], + generalCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + observabilityCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'], fleet: ['all', 'read', 'minimal_all', 'minimal_read'], actions: ['all', 'read', 'minimal_all', 'minimal_read'], @@ -37,7 +37,7 @@ export default function ({ getService }: FtrProviderContext) { ml: ['all', 'read', 'minimal_all', 'minimal_read'], siem: ['all', 'read', 'minimal_all', 'minimal_read'], uptime: ['all', 'read', 'minimal_all', 'minimal_read'], - securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read'], + securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], infrastructure: ['all', 'read', 'minimal_all', 'minimal_read'], logs: ['all', 'read', 'minimal_all', 'minimal_read'], apm: ['all', 'read', 'minimal_all', 'minimal_read'], diff --git a/x-pack/test/api_integration/apis/security_solution/cases_privileges.ts b/x-pack/test/api_integration/apis/security_solution/cases_privileges.ts deleted file mode 100644 index 67341c0dccb99..0000000000000 --- a/x-pack/test/api_integration/apis/security_solution/cases_privileges.ts +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import expect from '@kbn/expect'; - -import { APP_ID } from '@kbn/security-solution-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { - createUsersAndRoles, - deleteUsersAndRoles, -} from '../../../cases_api_integration/common/lib/authentication'; - -import { Role, User } from '../../../cases_api_integration/common/lib/authentication/types'; -import { - createCase, - deleteAllCaseItems, - getCase, -} from '../../../cases_api_integration/common/lib/utils'; -import { getPostCaseRequest } from '../../../cases_api_integration/common/lib/mock'; - -const secAll: Role = { - name: 'sec_all_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['all'], - securitySolutionCases: ['all'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secAllUser: User = { - username: 'sec_all_user', - password: 'password', - roles: [secAll.name], -}; - -const secAllCasesRead: Role = { - name: 'sec_all_cases_read_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['all'], - securitySolutionCases: ['read'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secAllCasesReadUser: User = { - username: 'sec_all_cases_read_user', - password: 'password', - roles: [secAllCasesRead.name], -}; - -const secAllCasesNone: Role = { - name: 'sec_all_cases_none_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['all'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secAllCasesNoneUser: User = { - username: 'sec_all_cases_none_user', - password: 'password', - roles: [secAllCasesNone.name], -}; - -const secReadCasesAll: Role = { - name: 'sec_read_cases_all_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['read'], - securitySolutionCases: ['all'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secReadCasesAllUser: User = { - username: 'sec_read_cases_all_user', - password: 'password', - roles: [secReadCasesAll.name], -}; - -const secReadCasesRead: Role = { - name: 'sec_read_cases_read_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['read'], - securitySolutionCases: ['read'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secReadCasesReadUser: User = { - username: 'sec_read_cases_read_user', - password: 'password', - roles: [secReadCasesRead.name], -}; - -const secRead: Role = { - name: 'sec_read_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['read'], - securitySolutionCases: ['read'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secReadUser: User = { - username: 'sec_read_user', - password: 'password', - roles: [secRead.name], -}; - -const secReadCasesNone: Role = { - name: 'sec_read_cases_none_role', - privileges: { - elasticsearch: { - indices: [ - { - names: ['*'], - privileges: ['all'], - }, - ], - }, - kibana: [ - { - feature: { - siem: ['read'], - actions: ['all'], - actionsSimulators: ['all'], - }, - spaces: ['*'], - }, - ], - }, -}; - -const secReadCasesNoneUser: User = { - username: 'sec_read_cases_none_user', - password: 'password', - roles: [secReadCasesNone.name], -}; - -const roles = [ - secAll, - secAllCasesRead, - secAllCasesNone, - secReadCasesAll, - secReadCasesRead, - secRead, - secReadCasesNone, -]; - -const users = [ - secAllUser, - secAllCasesReadUser, - secAllCasesNoneUser, - secReadCasesAllUser, - secReadCasesReadUser, - secReadUser, - secReadCasesNoneUser, -]; - -export default ({ getService }: FtrProviderContext): void => { - describe('security solution cases sub feature privilege', () => { - const es = getService('es'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - const supertest = getService('supertest'); - - before(async () => { - await createUsersAndRoles(getService, users, roles); - }); - - after(async () => { - await deleteUsersAndRoles(getService, users, roles); - }); - - afterEach(async () => { - await deleteAllCaseItems(es); - }); - - for (const user of [secAllUser, secReadCasesAllUser]) { - it(`User ${user.username} with role(s) ${user.roles.join()} can create a case`, async () => { - await createCase(supertestWithoutAuth, getPostCaseRequest({ owner: APP_ID }), 200, { - user, - space: null, - }); - }); - } - - for (const user of [ - secAllCasesReadUser, - secReadCasesAllUser, - secReadCasesReadUser, - secReadUser, - ]) { - it(`User ${user.username} with role(s) ${user.roles.join()} can get a case`, async () => { - const caseInfo = await createCase(supertest, getPostCaseRequest({ owner: APP_ID })); - const retrievedCase = await getCase({ - supertest: supertestWithoutAuth, - caseId: caseInfo.id, - expectedHttpCode: 200, - auth: { user, space: null }, - }); - - expect(caseInfo.owner).to.eql(retrievedCase.owner); - }); - } - - for (const user of [ - secAllCasesReadUser, - secAllCasesNoneUser, - secReadCasesReadUser, - secReadUser, - secReadCasesNoneUser, - ]) { - it(`User ${ - user.username - } with role(s) ${user.roles.join()} cannot create a case`, async () => { - await createCase(supertestWithoutAuth, getPostCaseRequest({ owner: APP_ID }), 403, { - user, - space: null, - }); - }); - } - - for (const user of [secAllCasesNoneUser, secReadCasesNoneUser]) { - it(`User ${user.username} with role(s) ${user.roles.join()} cannot get a case`, async () => { - const caseInfo = await createCase(supertest, getPostCaseRequest({ owner: APP_ID })); - - await getCase({ - supertest: supertestWithoutAuth, - caseId: caseInfo.id, - expectedHttpCode: 403, - auth: { user, space: null }, - }); - }); - } - }); -}; diff --git a/x-pack/test/api_integration/apis/security_solution/index.js b/x-pack/test/api_integration/apis/security_solution/index.js index 316ffb9601ccd..ba35ac7240852 100644 --- a/x-pack/test/api_integration/apis/security_solution/index.js +++ b/x-pack/test/api_integration/apis/security_solution/index.js @@ -8,7 +8,6 @@ export default function ({ loadTestFile }) { describe('SecuritySolution Endpoints', () => { loadTestFile(require.resolve('./authentications')); - loadTestFile(require.resolve('./cases_privileges')); loadTestFile(require.resolve('./events')); loadTestFile(require.resolve('./hosts')); loadTestFile(require.resolve('./host_details')); diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/reindex_operation_with_large_error_message.ts b/x-pack/test/api_integration/apis/upgrade_assistant/reindex_operation_with_large_error_message.ts index 8d54d7b908d0c..dab89a1797c70 100644 --- a/x-pack/test/api_integration/apis/upgrade_assistant/reindex_operation_with_large_error_message.ts +++ b/x-pack/test/api_integration/apis/upgrade_assistant/reindex_operation_with_large_error_message.ts @@ -14,7 +14,7 @@ export const reindexOperationWithLargeErrorMessage = { locked: null, reindexTaskId: 'MrzNyPknSyCk6WnmIJeLyQ:151888', reindexTaskPercComplete: 0, - // eslint-disable-next-line + // eslint-disable-next-line prettier/prettier errorMessage: 'Error: Reindexing failed: {\"completed\":true,\"task\":{\"node\":\"MrzNyPknSyCk6WnmIJeLyQ\",\"id\":151888,\"type\":\"transport\",\"action\":\"indices:data/write/reindex\",\"status\":{\"total\":12031,\"updated\":0,\"created\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until_millis\":0},\"description\":\"reindex from [filebeat-2019] to [reindexed-v7-filebeat-2019][_doc]\",\"start_time_in_millis\":1565576543962,\"running_time_in_nanos\":139827660,\"cancellable\":true,\"headers\":{}},\"response\":{\"took\":139,\"timed_out\":false,\"total\":12031,\"updated\":0,\"created\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled\":\"0s\",\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until\":\"0s\",\"throttled_until_millis\":0,\"failures\":[{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WWcIB2gBP1edM8bXWzIA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WWcIB2gBP1edM8bXWzIA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T01:30:08,792] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ub6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ub6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,712] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WmcIB2gBP1edM8bXWzIA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WmcIB2gBP1edM8bXWzIA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T01:30:10,143] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ur6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ur6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,715] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yWcIB2gBP1edM8bXbTI3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yWcIB2gBP1edM8bXbTI3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T01:30:10,144] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"u76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'u76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,716] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xmuoCGgBP1edM8bXjNTs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xmuoCGgBP1edM8bXjNTs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:04:44,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vL6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vL6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,717] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x2uoCGgBP1edM8bXjNTs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x2uoCGgBP1edM8bXjNTs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:04:44,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vb6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vb6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,727] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y2umCGgBP1edM8bXCM1f\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y2umCGgBP1edM8bXCM1f\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:02:04,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vr6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vr6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,728] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZGumCGgBP1edM8bXCM1f\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZGumCGgBP1edM8bXCM1f\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:02:04,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"v76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'v76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,728] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zGuoCGgBP1edM8bXoNR0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zGuoCGgBP1edM8bXoNR0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:04:44,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wL6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wL6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,729] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xmuqCGgBP1edM8bX_dvy\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xmuqCGgBP1edM8bX_dvy\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:07:24,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wb6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wb6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,715] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y2urCGgBP1edM8bXEdt8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y2urCGgBP1edM8bXEdt8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:07:24,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wr6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wr6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,731] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0GumCGgBP1edM8bXG83n\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0GumCGgBP1edM8bXG83n\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:02:04,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"w76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'w76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,732] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EmulCGgBP1edM8bXk8wr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EmulCGgBP1edM8bXk8wr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:01:24,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xL6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xL6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,735] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3WupCGgBP1edM8bXsdfn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3WupCGgBP1edM8bXsdfn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:06:04,163] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xb6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xb6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,735] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SmupCGgBP1edM8bXxdhv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SmupCGgBP1edM8bXxdhv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:06:04,164] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xr6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xr6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,739] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KGuwCGgBP1edM8bXaOvE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KGuwCGgBP1edM8bXaOvE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:13:24,170] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,740] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KWuwCGgBP1edM8bXaOvE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KWuwCGgBP1edM8bXaOvE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:13:24,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yL6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yL6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,743] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0WuvCGgBP1edM8bX4OkJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0WuvCGgBP1edM8bX4OkJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:12:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yb6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yb6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,744] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1muvCGgBP1edM8bX8-mR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1muvCGgBP1edM8bX8-mR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:12:44,183] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yr6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yr6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,744] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lWuwCGgBP1edM8bXfOtL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lWuwCGgBP1edM8bXfOtL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:13:24,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,747] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UGuuCGgBP1edM8bXp-aj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UGuuCGgBP1edM8bXp-aj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:11:24,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zL6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zL6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,748] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"VWuuCGgBP1edM8bXu-YM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'VWuuCGgBP1edM8bXu-YM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:11:24,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zb6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zb6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,751] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8GuvCGgBP1edM8bXkejm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8GuvCGgBP1edM8bXkejm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:12:24,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zr6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zr6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,752] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kGuuCGgBP1edM8bXC-RA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kGuuCGgBP1edM8bXC-RA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:10:44,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"z76zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'z76zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,755] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hGuvCGgBP1edM8bXfuhe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hGuvCGgBP1edM8bXfuhe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:12:24,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,756] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0WzHCGgBP1edM8bXXyzY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0WzHCGgBP1edM8bXXyzY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:38:24,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,759] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0mzHCGgBP1edM8bXXyzY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0mzHCGgBP1edM8bXXyzY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:38:24,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,763] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"12zHCGgBP1edM8bXcyxh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'12zHCGgBP1edM8bXcyxh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:38:24,181] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"076zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'076zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,764] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x2zDCGgBP1edM8bX8SKV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x2zDCGgBP1edM8bX8SKV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:34:44,233] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,764] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"M2zECGgBP1edM8bXBCNx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'M2zECGgBP1edM8bXBCNx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:34:44,234] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,767] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"MmzGCGgBP1edM8bXdSp1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'MmzGCGgBP1edM8bXdSp1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:37:24,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,768] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xmzGCGgBP1edM8bXYSnu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xmzGCGgBP1edM8bXYSnu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:37:24,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"176zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'176zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,771] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cGzFCGgBP1edM8bX2Sg0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cGzFCGgBP1edM8bX2Sg0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:36:44,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,775] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dWzFCGgBP1edM8bX7Ci8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dWzFCGgBP1edM8bX7Ci8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:36:44,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,776] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SWzHCGgBP1edM8bXmi1y\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SWzHCGgBP1edM8bXmi1y\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T09:38:44,228] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,777] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WGzwCGgBP1edM8bXk6IO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WGzwCGgBP1edM8bXk6IO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"276zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'276zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,779] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WWzwCGgBP1edM8bXk6IO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WWzwCGgBP1edM8bXk6IO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:24,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,783] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0WzwCGgBP1edM8bXzaKs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0WzwCGgBP1edM8bXzaKs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:44,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,787] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0mzwCGgBP1edM8bXzaKs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0mzwCGgBP1edM8bXzaKs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:44,216] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,788] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1mzvCGgBP1edM8bXWp6K\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1mzvCGgBP1edM8bXWp6K\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:22:04,200] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"376zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'376zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,733] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"PmzwCGgBP1edM8bX4aMx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'PmzwCGgBP1edM8bX4aMx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:44,217] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,791] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"22zvCGgBP1edM8bXbp4T\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'22zvCGgBP1edM8bXbp4T\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:22:04,201] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,797] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"XmzwCGgBP1edM8bXpqKY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'XmzwCGgBP1edM8bXpqKY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:24,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,798] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"FmzuCGgBP1edM8bXvp1I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'FmzuCGgBP1edM8bXvp1I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:21:24,223] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"476zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'476zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,792] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CWzwCGgBP1edM8bXMaFn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CWzwCGgBP1edM8bXMaFn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:04,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,799] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dmzwCGgBP1edM8bXRKHz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dmzwCGgBP1edM8bXRKHz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:23:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,800] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EGz2CGgBP1edM8bXEbJo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EGz2CGgBP1edM8bXEbJo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:29:24,224] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,803] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EWz2CGgBP1edM8bXEbJo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EWz2CGgBP1edM8bXEbJo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:29:24,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"576zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'576zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,804] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z2z2CGgBP1edM8bXmrMV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z2z2CGgBP1edM8bXmrMV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:30:04,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6L6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6L6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,805] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aGz2CGgBP1edM8bXmrMV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aGz2CGgBP1edM8bXmrMV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:30:04,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6b6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6b6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,806] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"imzzCGgBP1edM8bX2qvw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'imzzCGgBP1edM8bX2qvw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:27:04,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6r6zJWgBP1edM8bXctF2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6r6zJWgBP1edM8bXctF2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,813] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"i2zzCGgBP1edM8bX2qvw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'i2zzCGgBP1edM8bX2qvw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:27:04,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"676zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'676zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:40,626] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1Wz2CGgBP1edM8bXrbOd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1Wz2CGgBP1edM8bXrbOd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:30:04,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7L6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7L6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,088] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Fmz2CGgBP1edM8bXJLLl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Fmz2CGgBP1edM8bXJLLl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:29:24,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7b6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7b6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,592] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4WzxCGgBP1edM8bX36Ue\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4WzxCGgBP1edM8bX36Ue\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:24:44,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7r6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7r6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,590] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lGz3CGgBP1edM8bXSbXe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lGz3CGgBP1edM8bXSbXe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:30:44,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"776zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'776zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,605] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3GzxCGgBP1edM8bXy6WU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3GzxCGgBP1edM8bXy6WU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:24:44,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8L6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8L6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,605] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-GzzCGgBP1edM8bX7qt5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-GzzCGgBP1edM8bX7qt5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T10:27:04,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8b6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8b6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,611] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fnrGDWgBP1edM8bX9nN0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fnrGDWgBP1edM8bX9nN0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:56:04,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8r6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8r6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,613] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f3rGDWgBP1edM8bX9nN0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f3rGDWgBP1edM8bX9nN0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:56:04,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"876zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'876zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,617] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AXq6DWgBP1edM8bXS0_E\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AXq6DWgBP1edM8bXS0_E\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:42:09,899] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9L6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9L6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,617] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_Xq6DWgBP1edM8bXOE47\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_Xq6DWgBP1edM8bXOE47\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:42:09,166] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9b6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9b6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,647] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rHq5DWgBP1edM8bXw00K\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rHq5DWgBP1edM8bXw00K\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:41:31,488] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9r6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9r6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,648] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"V3GLCmgBP1edM8bXgjTB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'V3GLCmgBP1edM8bXgjTB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-01T17:52:15,311] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"976zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'976zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,649] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"g3rHDWgBP1edM8bXCXO3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'g3rHDWgBP1edM8bXCXO3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:56:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-L6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-L6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,649] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"THUeDGgBP1edM8bX-bs8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'THUeDGgBP1edM8bX-bs8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T01:12:56,601] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-b6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-b6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,650] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4HUeDGgBP1edM8bX5rpU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4HUeDGgBP1edM8bX5rpU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T01:12:56,466] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-r6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-r6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,647] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qHq5DWgBP1edM8bXsE0Y\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qHq5DWgBP1edM8bXsE0Y\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T08:41:31,487] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-76zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-76zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,651] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"NnrYDWgBP1edM8bXDqRl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'NnrYDWgBP1edM8bXDqRl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:14:44,217] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_L6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_L6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,653] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"N3rYDWgBP1edM8bXDqRl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'N3rYDWgBP1edM8bXDqRl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:14:44,218] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_b6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_b6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,655] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UXrZDWgBP1edM8bXRaf5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UXrZDWgBP1edM8bXRaf5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:16:04,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_r6zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_r6zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,656] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UnrZDWgBP1edM8bXRaf5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UnrZDWgBP1edM8bXRaf5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:16:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_76zJWgBP1edM8bXctH1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_76zJWgBP1edM8bXctH1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,652] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QHraDWgBP1edM8bXfqt9\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QHraDWgBP1edM8bXfqt9\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:17:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AL6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AL6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,661] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QXraDWgBP1edM8bXfqt9\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QXraDWgBP1edM8bXfqt9\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:17:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ab6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ab6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,662] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"O3rYDWgBP1edM8bXIKT8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'O3rYDWgBP1edM8bXIKT8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:14:44,218] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ar6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ar6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,665] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_3rYDWgBP1edM8bX0KXG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_3rYDWgBP1edM8bX0KXG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:15:24,164] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"A76zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'A76zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,665] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZHraDWgBP1edM8bXV6pr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZHraDWgBP1edM8bXV6pr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:17:04,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BL6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BL6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,666] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-3rYDWgBP1edM8bXvaU9\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-3rYDWgBP1edM8bXvaU9\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:15:24,163] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Bb6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Bb6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,671] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YHraDWgBP1edM8bXQ6rj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YHraDWgBP1edM8bXQ6rj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:17:04,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Br6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Br6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,672] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"v3rZDWgBP1edM8bXWaeA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'v3rZDWgBP1edM8bXWaeA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:16:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"B76zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'B76zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,663] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3XrlDWgBP1edM8bXQMmM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3XrlDWgBP1edM8bXQMmM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:29:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CL6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CL6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,674] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3nrlDWgBP1edM8bXQMmM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3nrlDWgBP1edM8bXQMmM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:29:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Cb6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Cb6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,676] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lnsBDmgBP1edM8bX3Ru0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lnsBDmgBP1edM8bX3Ru0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:00:24,333] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Cr6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Cr6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,678] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"l3sBDmgBP1edM8bX3Ru0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'l3sBDmgBP1edM8bX3Ru0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:00:24,334] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"C76zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'C76zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,683] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AnriDWgBP1edM8bXgcJl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AnriDWgBP1edM8bXgcJl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:26:04,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DL6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DL6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,684] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BnriDWgBP1edM8bXlMLt\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BnriDWgBP1edM8bXlMLt\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:26:04,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Db6zJWgBP1edM8bXctL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Db6zJWgBP1edM8bXctL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,684] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4nrlDWgBP1edM8bXVMkU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4nrlDWgBP1edM8bXVMkU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:29:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Dr6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Dr6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,685] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W3sCDmgBP1edM8bXjB3u\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W3sCDmgBP1edM8bXjB3u\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:01:04,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"D76zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'D76zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,677] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5XriDWgBP1edM8bXz8KI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5XriDWgBP1edM8bXz8KI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:26:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EL6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EL6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,686] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eHriDWgBP1edM8bXu8L_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eHriDWgBP1edM8bXu8L_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T09:26:24,184] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Eb6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Eb6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,687] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"m3sBDmgBP1edM8bX8Rse\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'m3sBDmgBP1edM8bX8Rse\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:00:24,334] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Er6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Er6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,691] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GnsIDmgBP1edM8bXCy09\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GnsIDmgBP1edM8bXCy09\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:07:04,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"E76zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'E76zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,695] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"G3sIDmgBP1edM8bXCy09\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'G3sIDmgBP1edM8bXCy09\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:07:04,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"FL6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'FL6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,696] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tHsLDmgBP1edM8bXUzYg\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tHsLDmgBP1edM8bXUzYg\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:10:44,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Fb6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Fb6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,697] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tXsLDmgBP1edM8bXUzYg\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tXsLDmgBP1edM8bXUzYg\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:10:44,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Fr6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Fr6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,699] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"D3sKDmgBP1edM8bXaDS6\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'D3sKDmgBP1edM8bXaDS6\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:09:44,335] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"F76zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'F76zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,700] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EHsKDmgBP1edM8bXaDS6\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EHsKDmgBP1edM8bXaDS6\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:09:44,335] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GL6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GL6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,703] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iHsIDmgBP1edM8bXHi3G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iHsIDmgBP1edM8bXHi3G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:07:04,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Gb6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Gb6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,705] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WXsHDmgBP1edM8bXbysD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WXsHDmgBP1edM8bXbysD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:06:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Gr6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Gr6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,705] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"FHsKDmgBP1edM8bXfDRC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'FHsKDmgBP1edM8bXfDRC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:09:44,336] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"G76zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'G76zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,688] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y3sKDmgBP1edM8bX3TXu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y3sKDmgBP1edM8bX3TXu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:10:04,162] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HL6zJWgBP1edM8bXctL2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HL6zJWgBP1edM8bXctL2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,707] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9nsKDmgBP1edM8bXyjRm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9nsKDmgBP1edM8bXyjRm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:10:04,161] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Hb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Hb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,799] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"VXsHDmgBP1edM8bXWytz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'VXsHDmgBP1edM8bXWytz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:06:24,184] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Hr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Hr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,815] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BHsPDmgBP1edM8bXrEN3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BHsPDmgBP1edM8bXrEN3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:15:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"H76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'H76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,817] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BXsPDmgBP1edM8bXrEN3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BXsPDmgBP1edM8bXrEN3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:15:24,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"IL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'IL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,818] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LnsNDmgBP1edM8bX6z45\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LnsNDmgBP1edM8bX6z45\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:13:24,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ib6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ib6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,823] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"PHsfDmgBP1edM8bXeHBQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'PHsfDmgBP1edM8bXeHBQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:32:44,306] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ir6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ir6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,814] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QHsfDmgBP1edM8bXi3At\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QHsfDmgBP1edM8bXi3At\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:32:44,307] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"I76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'I76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,837] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cnsPDmgBP1edM8bXwEMA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cnsPDmgBP1edM8bXwEMA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:15:24,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,838] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AHsgDmgBP1edM8bXJ3Jv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AHsgDmgBP1edM8bXJ3Jv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:33:24,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Jb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Jb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,837] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oHsODmgBP1edM8bXEj5M\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oHsODmgBP1edM8bXEj5M\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:13:44,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Jr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Jr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,839] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pHsODmgBP1edM8bXJT7T\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pHsODmgBP1edM8bXJT7T\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:13:44,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"J76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'J76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,840] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wXsNDmgBP1edM8bX1z2y\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wXsNDmgBP1edM8bX1z2y\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:13:24,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,844] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X3smDmgBP1edM8bXm4Te\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X3smDmgBP1edM8bXm4Te\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:24,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Kb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Kb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,846] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YHsmDmgBP1edM8bXm4Te\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YHsmDmgBP1edM8bXm4Te\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:36,621] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Kr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Kr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,847] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_HsnDmgBP1edM8bXcoa5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_HsnDmgBP1edM8bXcoa5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,855] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_XsnDmgBP1edM8bXcoa5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_XsnDmgBP1edM8bXcoa5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:24,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,856] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WnsmDmgBP1edM8bXkIQm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WnsmDmgBP1edM8bXkIQm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:24,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Lb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Lb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,857] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W3smDmgBP1edM8bXkIQm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W3smDmgBP1edM8bXkIQm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:24,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Lr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Lr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,858] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dXsnDmgBP1edM8bXrYdU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dXsnDmgBP1edM8bXrYdU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:44,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"L76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'L76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,846] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dnsnDmgBP1edM8bXrYdU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dnsnDmgBP1edM8bXrYdU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:44,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ML6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ML6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,867] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zHsmDmgBP1edM8bXr4Rm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zHsmDmgBP1edM8bXr4Rm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:36,622] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Mb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Mb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,863] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AnsnDmgBP1edM8bXhodB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AnsnDmgBP1edM8bXhodB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:24,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Mr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Mr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,882] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dHsmDmgBP1edM8bXLoN8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dHsmDmgBP1edM8bXLoN8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:04,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"M76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'M76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,884] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eHsmDmgBP1edM8bXQoME\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eHsmDmgBP1edM8bXQoME\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:40:04,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"NL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'NL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,886] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4nsnDmgBP1edM8bXwIfb\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4nsnDmgBP1edM8bXwIfb\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-02T10:41:44,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Nb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Nb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,888] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QYc4EmgBP1edM8bXKyWs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QYc4EmgBP1edM8bXKyWs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T05:38:05,730] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Nr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Nr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,891] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yJToFmgBP1edM8bXBIlI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yJToFmgBP1edM8bXBIlI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T03:28:44,660] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"N76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'N76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,884] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xJTnFmgBP1edM8bX8Ym-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xJTnFmgBP1edM8bX8Ym-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T03:28:44,479] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"OL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'OL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,893] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZI8WFWgBP1edM8bXYFDI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZI8WFWgBP1edM8bXYFDI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T19:00:07,762] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ob6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ob6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,899] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aI8WFWgBP1edM8bXc1Dn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aI8WFWgBP1edM8bXc1Dn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T19:00:07,763] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Or6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Or6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,902] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hpCnFWgBP1edM8bXavHK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hpCnFWgBP1edM8bXavHK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T21:38:25,222] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"O76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'O76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,903] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"co2NFGgBP1edM8bX4ss3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'co2NFGgBP1edM8bX4ss3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T16:31:00,752] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"PL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'PL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,904] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hJCnFWgBP1edM8bXWPEZ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hJCnFWgBP1edM8bXWPEZ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T21:38:25,221] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Pb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Pb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,906] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kYdOEmgBP1edM8bXwWXL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kYdOEmgBP1edM8bXwWXL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-03T06:02:43,588] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Pr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Pr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,911] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RpVOF2gBP1edM8bX8a_D\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RpVOF2gBP1edM8bX8a_D\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T05:21:11,967] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"P76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'P76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,914] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"R5VOF2gBP1edM8bX8a_D\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'R5VOF2gBP1edM8bX8a_D\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T05:21:13,240] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,902] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SJVOF2gBP1edM8bX8a_D\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SJVOF2gBP1edM8bX8a_D\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T05:21:13,241] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Qb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Qb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,923] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e5fMF2gBP1edM8bXYBR0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e5fMF2gBP1edM8bXYBR0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T07:38:10,221] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Qr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Qr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,925] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fJfMF2gBP1edM8bXYBR0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fJfMF2gBP1edM8bXYBR0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T07:38:10,222] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Q76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Q76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,926] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fZfMF2gBP1edM8bXYBR0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fZfMF2gBP1edM8bXYBR0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T07:38:10,222] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,924] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"OpcXGGgBP1edM8bXweua\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'OpcXGGgBP1edM8bXweua\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:00:24,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Rb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Rb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,927] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ypcXGGgBP1edM8bXruoP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ypcXGGgBP1edM8bXruoP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:00:24,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Rr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Rr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,928] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TJVPF2gBP1edM8bXBK-g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TJVPF2gBP1edM8bXBK-g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T05:21:13,241] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"R76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'R76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,935] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fpfMF2gBP1edM8bXcxRp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fpfMF2gBP1edM8bXcxRp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T07:38:10,330] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,936] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d5cXGGgBP1edM8bXJenY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d5cXGGgBP1edM8bXJenY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T08:59:51,298] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Sb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Sb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,939] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eZcXGGgBP1edM8bXOOnd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eZcXGGgBP1edM8bXOOnd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T08:59:51,299] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Sr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Sr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,940] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"D5VCF2gBP1edM8bXqYwC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'D5VCF2gBP1edM8bXqYwC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T05:07:44,837] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"S76zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'S76zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,947] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lJcaGGgBP1edM8bXp_PR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lJcaGGgBP1edM8bXp_PR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:03:44,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TL6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TL6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,948] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lZcaGGgBP1edM8bXp_PR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lZcaGGgBP1edM8bXp_PR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:03:44,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Tb6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Tb6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,951] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rZcXGGgBP1edM8bX6Ouo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rZcXGGgBP1edM8bX6Ouo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:00:44,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Tr6zJWgBP1edM8bXc9Id\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Tr6zJWgBP1edM8bXc9Id\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,959] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rpcXGGgBP1edM8bX6Ouo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rpcXGGgBP1edM8bX6Ouo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:00:44,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"T76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'T76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,961] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"35cYGGgBP1edM8bXq-39\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'35cYGGgBP1edM8bXq-39\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:01:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,963] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"b5cYGGgBP1edM8bXmO1y\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'b5cYGGgBP1edM8bXmO1y\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:01:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ub6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ub6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,928] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"r5cXGGgBP1edM8bX_Osx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'r5cXGGgBP1edM8bX_Osx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:00:44,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ur6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ur6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,975] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9JcZGGgBP1edM8bX0PD3\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9JcZGGgBP1edM8bX0PD3\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:02:44,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"U76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'U76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,976] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZJcZGGgBP1edM8bX5PGH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZJcZGGgBP1edM8bX5PGH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:02:44,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"VL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'VL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,976] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UZcYGGgBP1edM8bX0-4k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UZcYGGgBP1edM8bX0-4k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:01:44,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Vb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Vb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,983] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UpcYGGgBP1edM8bX5u6V\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UpcYGGgBP1edM8bX5u6V\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:01:44,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Vr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Vr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,984] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1pghGGgBP1edM8bXcgYu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1pghGGgBP1edM8bXcgYu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:04,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"V76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'V76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,985] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"15ghGGgBP1edM8bXcgYu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'15ghGGgBP1edM8bXcgYu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:04,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,987] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2pcfGGgBP1edM8bXAf8o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2pcfGGgBP1edM8bXAf8o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:08:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Wb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Wb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,988] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SpgfGGgBP1edM8bXFACx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SpgfGGgBP1edM8bXFACx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:08:24,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Wr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Wr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,992] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"R5ghGGgBP1edM8bXhQe7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'R5ghGGgBP1edM8bXhQe7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:04,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,995] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"m5giGGgBP1edM8bXDghw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'m5giGGgBP1edM8bXDghw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:44,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"XL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'XL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,999] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vJgfGGgBP1edM8bXOwDC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vJgfGGgBP1edM8bXOwDC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:08:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Xb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Xb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,000] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vZgfGGgBP1edM8bXTwBK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vZgfGGgBP1edM8bXTwBK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:08:44,183] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Xr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Xr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,003] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uZghGGgBP1edM8bXrAfK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uZghGGgBP1edM8bXrAfK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:24,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,004] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"upghGGgBP1edM8bXwAdP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'upghGGgBP1edM8bXwAdP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:11:24,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:43,975] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tZg3GGgBP1edM8bXHURQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tZg3GGgBP1edM8bXHURQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:34:44,181] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Yb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Yb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,026] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tpg3GGgBP1edM8bXHURQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tpg3GGgBP1edM8bXHURQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:34:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Yr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Yr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,032] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kJg5GGgBP1edM8bX3Ex1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kJg5GGgBP1edM8bX3Ex1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:37:44,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,032] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kZg5GGgBP1edM8bX3Ex1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kZg5GGgBP1edM8bX3Ex1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:37:44,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,033] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"OJg1GGgBP1edM8bX5EHK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'OJg1GGgBP1edM8bX5EHK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:33:24,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Zb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Zb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,034] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"N5g1GGgBP1edM8bX0UFG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'N5g1GGgBP1edM8bX0UFG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:33:24,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Zr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Zr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,011] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dpg1GGgBP1edM8bXSD-I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dpg1GGgBP1edM8bXSD-I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:32:44,166] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,039] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5pg1GGgBP1edM8bXXD8R\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5pg1GGgBP1edM8bXXD8R\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:32:44,167] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,041] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Jpg3GGgBP1edM8bXMEXX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Jpg3GGgBP1edM8bXMEXX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:34:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ab6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ab6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,044] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mZg3GGgBP1edM8bXV0Xo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mZg3GGgBP1edM8bXV0Xo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:35:04,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ar6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ar6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,046] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mpg3GGgBP1edM8bXa0Vw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mpg3GGgBP1edM8bXa0Vw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:35:04,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"a76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'a76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,040] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Wpg8GGgBP1edM8bX6VXC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Wpg8GGgBP1edM8bX6VXC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:41:04,169] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,070] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W5g8GGgBP1edM8bX6VXC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W5g8GGgBP1edM8bX6VXC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:41:04,170] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,074] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Xpg_GGgBP1edM8bXR1xA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Xpg_GGgBP1edM8bXR1xA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:43:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"br6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'br6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,079] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X5g_GGgBP1edM8bXR1xA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X5g_GGgBP1edM8bXR1xA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:43:44,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"b76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'b76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,080] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e5g_GGgBP1edM8bXDFuz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e5g_GGgBP1edM8bXDFuz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:43:24,166] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,081] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"65g_GGgBP1edM8bXIFsw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'65g_GGgBP1edM8bXIFsw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:43:24,167] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,082] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y5g8GGgBP1edM8bX_VVL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y5g8GGgBP1edM8bX_VVL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:41:04,170] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,083] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mJg8GGgBP1edM8bXOVP4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mJg8GGgBP1edM8bXOVP4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:40:24,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"c76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'c76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,087] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mZg8GGgBP1edM8bXTVN-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mZg8GGgBP1edM8bXTVN-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:40:24,198] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,091] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-pg9GGgBP1edM8bXwFeb\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-pg9GGgBP1edM8bXwFeb\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:42:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"db6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'db6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,092] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-5g9GGgBP1edM8bX1Fcl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-5g9GGgBP1edM8bX1Fcl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:42:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,093] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KJhCGGgBP1edM8bXaGUV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KJhCGGgBP1edM8bXaGUV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:47:04,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,094] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KZhCGGgBP1edM8bXaGUV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KZhCGGgBP1edM8bXaGUV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:47:04,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,094] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hJhUGGgBP1edM8bXaZil\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hJhUGGgBP1edM8bXaZil\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:06:44,224] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,097] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hZhUGGgBP1edM8bXaZil\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hZhUGGgBP1edM8bXaZil\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:06:44,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"er6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'er6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,099] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mZhCGGgBP1edM8bXe2Wc\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mZhCGGgBP1edM8bXe2Wc\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:47:04,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,103] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z5hUGGgBP1edM8bXpJk_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z5hUGGgBP1edM8bXpJk_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:07:04,167] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,104] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"C5hCGGgBP1edM8bXomaw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'C5hCGGgBP1edM8bXomaw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:47:24,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fb6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fb6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,105] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9ZhUGGgBP1edM8bXfZgu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9ZhUGGgBP1edM8bXfZgu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:06:44,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fr6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fr6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,106] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DJhCGGgBP1edM8bXtmY2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DJhCGGgBP1edM8bXtmY2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T09:47:24,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f76zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f76zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,111] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oZhUGGgBP1edM8bXCJfp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oZhUGGgBP1edM8bXCJfp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:06:24,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gL6zJWgBP1edM8bXc9I_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gL6zJWgBP1edM8bXc9I_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,112] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ophUGGgBP1edM8bXG5eD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ophUGGgBP1edM8bXG5eD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:06:24,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gb6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gb6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,112] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EJhYGGgBP1edM8bXE6Mt\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EJhYGGgBP1edM8bXE6Mt\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:44,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gr6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gr6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,113] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"FJhYGGgBP1edM8bXGqP9\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'FJhYGGgBP1edM8bXGqP9\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:50,727] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"g76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'g76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,114] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K5hXGGgBP1edM8bXxaIL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K5hXGGgBP1edM8bXxaIL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:24,200] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hL6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hL6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,114] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"m5hXGGgBP1edM8bX2KKV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'m5hXGGgBP1edM8bX2KKV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:24,201] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hb6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hb6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,115] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lphZGGgBP1edM8bXU6Z_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lphZGGgBP1edM8bXU6Z_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:12:04,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hr6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hr6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,116] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"A5hZGGgBP1edM8bXZ6cI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'A5hZGGgBP1edM8bXZ6cI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:12:04,181] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"h76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'h76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,116] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DZhXGGgBP1edM8bX_6Ou\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DZhXGGgBP1edM8bX_6Ou\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:44,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iL6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iL6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,119] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gZhYGGgBP1edM8bXLqOG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gZhYGGgBP1edM8bXLqOG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:10:50,728] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ib6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ib6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,120] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sJhYGGgBP1edM8bX8aXW\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sJhYGGgBP1edM8bX8aXW\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:11:44,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ir6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ir6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,121] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tJhZGGgBP1edM8bXBaVe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tJhZGGgBP1edM8bXBaVe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:11:44,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"i76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'i76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,124] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"85hfGGgBP1edM8bXqLih\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'85hfGGgBP1edM8bXqLih\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:19:04,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jL6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jL6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,128] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9JhfGGgBP1edM8bXqLih\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9JhfGGgBP1edM8bXqLih\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:19:04,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jb6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jb6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,129] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"MZhfGGgBP1edM8bXH7fp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'MZhfGGgBP1edM8bXH7fp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:18:24,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jr6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jr6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,131] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xphyGGgBP1edM8bX3O8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xphyGGgBP1edM8bX3O8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:40:04,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"j76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'j76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,132] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x5hyGGgBP1edM8bX7u92\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x5hyGGgBP1edM8bX7u92\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:40:04,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kL6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kL6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,133] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EphfGGgBP1edM8bXbrgH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EphfGGgBP1edM8bXbrgH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:18:44,201] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kb6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kb6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,135] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f5hfGGgBP1edM8bXgbiQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f5hfGGgBP1edM8bXgbiQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:18:44,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kr6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kr6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,136] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dJhgGGgBP1edM8bX9Lyr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dJhgGGgBP1edM8bX9Lyr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:20:24,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,139] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4ZhhGGgBP1edM8bXCLwy\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4ZhhGGgBP1edM8bXCLwy\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:20:24,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lL6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lL6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,141] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-JhfGGgBP1edM8bXvLgp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-JhfGGgBP1edM8bXvLgp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:19:04,216] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lb6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lb6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,143] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k5h4GGgBP1edM8bXbP_Q\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k5h4GGgBP1edM8bXbP_Q\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:46:04,184] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lr6zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lr6zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,144] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lJh4GGgBP1edM8bXbP_Q\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lJh4GGgBP1edM8bXbP_Q\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:46:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"l76zJWgBP1edM8bXc9JX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'l76zJWgBP1edM8bXc9JX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:44,147] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_5h2GGgBP1edM8bXD_hO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_5h2GGgBP1edM8bXD_hO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:43:24,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mb6zJWgBP1edM8bXg9KN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mb6zJWgBP1edM8bXg9KN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-07T00:24:46,435] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BJl4GGgBP1edM8bXgABZ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BJl4GGgBP1edM8bXgABZ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:46:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZtC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZtC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,295] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gJh3GGgBP1edM8bXR_zS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gJh3GGgBP1edM8bXR_zS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:44:44,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,295] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"T5h2GGgBP1edM8bXhPp-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'T5h2GGgBP1edM8bXhPp-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:44:04,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,295] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UZh2GGgBP1edM8bXmPoG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UZh2GGgBP1edM8bXmPoG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:44:04,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"adC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'adC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,296] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"85h3GGgBP1edM8bXbvzk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'85h3GGgBP1edM8bXbvzk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:45:04,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"atC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'atC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,296] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9Jh3GGgBP1edM8bXgvxs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9Jh3GGgBP1edM8bXgvxs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:45:04,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"a9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'a9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,296] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EJh3GGgBP1edM8bXNPxI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EJh3GGgBP1edM8bXNPxI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:44:44,173] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,297] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"epl9GGgBP1edM8bXnQ4C\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'epl9GGgBP1edM8bXnQ4C\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:51:44,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,297] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e5l9GGgBP1edM8bXnQ4C\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e5l9GGgBP1edM8bXnQ4C\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:51:44,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"btC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'btC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,298] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4Jl_GGgBP1edM8bXEBIj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4Jl_GGgBP1edM8bXEBIj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:53:24,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"b9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'b9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,299] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4Zl_GGgBP1edM8bXEBIj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4Zl_GGgBP1edM8bXEBIj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:53:24,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,299] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_pl-GGgBP1edM8bX1RGG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_pl-GGgBP1edM8bX1RGG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:53:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bZl-GGgBP1edM8bX6RIP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bZl-GGgBP1edM8bX6RIP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:53:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ctC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ctC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6pl9GGgBP1edM8bXsA6L\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6pl9GGgBP1edM8bXsA6L\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:51:44,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"c9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'c9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"25l8GGgBP1edM8bXsgue\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'25l8GGgBP1edM8bXsgue\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:50:44,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"XZl9GGgBP1edM8bX1w-k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'XZl9GGgBP1edM8bX1w-k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:52:04,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ddC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ddC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,303] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X5l9GGgBP1edM8bX6w8l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X5l9GGgBP1edM8bX6w8l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:52:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dtC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dtC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,303] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"45l_GGgBP1edM8bXIxKr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'45l_GGgBP1edM8bXIxKr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-04T10:53:24,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,303] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"MqW9HGgBP1edM8bXOzPd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'MqW9HGgBP1edM8bXOzPd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:44,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,303] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"NKW9HGgBP1edM8bXTzNl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'NKW9HGgBP1edM8bXTzNl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:44,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"edC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'edC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,311] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rqW8HGgBP1edM8bXFy9k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rqW8HGgBP1edM8bXFy9k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:38:24,322] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"etC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'etC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,311] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HaW8HGgBP1edM8bXKjBk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HaW8HGgBP1edM8bXKjBk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:38:24,326] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,311] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"daW6HGgBP1edM8bXQioX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'daW6HGgBP1edM8bXQioX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:36:24,240] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,312] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bqW8HGgBP1edM8bXnzGY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bqW8HGgBP1edM8bXnzGY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:04,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,312] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cKW8HGgBP1edM8bXszEh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cKW8HGgBP1edM8bXszEh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:04,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ftC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ftC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,312] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4qW8HGgBP1edM8bX2jFE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4qW8HGgBP1edM8bX2jFE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,313] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UaW8HGgBP1edM8bX7TLF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UaW8HGgBP1edM8bX7TLF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:39:24,197] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,313] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CaW-HGgBP1edM8bX_Tgd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CaW-HGgBP1edM8bX_Tgd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:41:44,217] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,313] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CqW-HGgBP1edM8bX_Tgd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CqW-HGgBP1edM8bX_Tgd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:41:44,217] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gtC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gtC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,313] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hqW9HGgBP1edM8bXxDSY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hqW9HGgBP1edM8bXxDSY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:40:24,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"g9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'g9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,314] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"h6W9HGgBP1edM8bXxDSY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'h6W9HGgBP1edM8bXxDSY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:40:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,314] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"a6XAHGgBP1edM8bXgzzD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'a6XAHGgBP1edM8bXgzzD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:24,198] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,314] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bKXAHGgBP1edM8bXgzzD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bKXAHGgBP1edM8bXgzzD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:24,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"htC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'htC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,314] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eaW_HGgBP1edM8bXEDil\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eaW_HGgBP1edM8bXEDil\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:41:44,218] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"h9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'h9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,315] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lKW-HGgBP1edM8bXwjeF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lKW-HGgBP1edM8bXwjeF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:41:24,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,315] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lqW-HGgBP1edM8bX1jcN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lqW-HGgBP1edM8bX1jcN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:41:24,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"idC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'idC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,315] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W6W_HGgBP1edM8bXXjnH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W6W_HGgBP1edM8bXXjnH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:42:04,198] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"itC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'itC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,316] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"XaW_HGgBP1edM8bXcjlP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'XaW_HGgBP1edM8bXcjlP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:42:04,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"i9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'i9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,316] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9qW9HGgBP1edM8bX2DQf\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9qW9HGgBP1edM8bX2DQf\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:40:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,316] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YqXBHGgBP1edM8bXz0DU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YqXBHGgBP1edM8bXz0DU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:44:44,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,316] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y6XBHGgBP1edM8bXz0DU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y6XBHGgBP1edM8bXz0DU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:44:44,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jtC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jtC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,317] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vaXAHGgBP1edM8bX5T1s\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vaXAHGgBP1edM8bX5T1s\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:44,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"j9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'j9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,317] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vqXAHGgBP1edM8bX5T1s\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vqXAHGgBP1edM8bX5T1s\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:44,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,319] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZaXBHGgBP1edM8bX40Ba\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZaXBHGgBP1edM8bX40Ba\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:44:44,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kdC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kdC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,320] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"26XAHGgBP1edM8bXlzxL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'26XAHGgBP1edM8bXlzxL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:24,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ktC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ktC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,320] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EaXBHGgBP1edM8bXbj8n\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EaXBHGgBP1edM8bXbj8n\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:44:24,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,320] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gKXBHGgBP1edM8bXgT-w\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gKXBHGgBP1edM8bXgT-w\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:44:24,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lNC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lNC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,320] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tqXCHGgBP1edM8bXWEGO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tqXCHGgBP1edM8bXWEGO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:45:24,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ldC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ldC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,322] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JaXCHGgBP1edM8bXbEIV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JaXCHGgBP1edM8bXbEIV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:45:24,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ltC1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ltC1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,323] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wKXAHGgBP1edM8bX-D30\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wKXAHGgBP1edM8bX-D30\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:43:44,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"l9C1K2gBP1edM8bXby--\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'l9C1K2gBP1edM8bXby--\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,323] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"PaXEHGgBP1edM8bXj0gD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'PaXEHGgBP1edM8bXj0gD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:47:44,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mNC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mNC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,323] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"P6XEHGgBP1edM8bXokiN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'P6XEHGgBP1edM8bXokiN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:47:44,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mdC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mdC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,324] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x6XFHGgBP1edM8bXx0uL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x6XFHGgBP1edM8bXx0uL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:04,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mtC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mtC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,324] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AqXFHGgBP1edM8bXK0pF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AqXFHGgBP1edM8bXK0pF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:24,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"m9C1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'m9C1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,324] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"saXEHGgBP1edM8bXyUic\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'saXEHGgBP1edM8bXyUic\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"nNC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'nNC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,325] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"IaXEHGgBP1edM8bX3Ukl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'IaXEHGgBP1edM8bX3Ukl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ndC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ndC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,325] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dqXFHGgBP1edM8bXZUri\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dqXFHGgBP1edM8bXZUri\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:44,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ntC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ntC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,325] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5aXFHGgBP1edM8bXeUpq\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5aXFHGgBP1edM8bXeUpq\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:44,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"n9C1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'n9C1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,325] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BKXFHGgBP1edM8bXPkrP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BKXFHGgBP1edM8bXPkrP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:48:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oNC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oNC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,326] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yaXFHGgBP1edM8bX20sT\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yaXFHGgBP1edM8bX20sT\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:04,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"odC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'odC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,327] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_6XGHGgBP1edM8bXnk1r\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_6XGHGgBP1edM8bXnk1r\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:50:04,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"otC1K2gBP1edM8bXby_o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'otC1K2gBP1edM8bXby_o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,327] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"b6XGHGgBP1edM8bXsU7z\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'b6XGHGgBP1edM8bXsU7z\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:50:04,183] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"o9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'o9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,327] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"i6XGHGgBP1edM8bXY03P\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'i6XGHGgBP1edM8bXY03P\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:44,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,328] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jaXGHGgBP1edM8bXd01X\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jaXGHGgBP1edM8bXd01X\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:44,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,330] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AqXYHGgBP1edM8bXKoDS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AqXYHGgBP1edM8bXKoDS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:09:04,378] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ptC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ptC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,331] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qqXGHGgBP1edM8bXFUyt\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qqXGHGgBP1edM8bXFUyt\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:24,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"p9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'p9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,331] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"O6XGHGgBP1edM8bXAkwm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'O6XGHGgBP1edM8bXAkwm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T06:49:24,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,331] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AKXYHGgBP1edM8bXF4D_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AKXYHGgBP1edM8bXF4D_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:09:04,377] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,332] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1aUCHWgBP1edM8bXIfd-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1aUCHWgBP1edM8bXIfd-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:55:04,167] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qtC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qtC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,332] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"caXjHGgBP1edM8bXdaCh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'caXjHGgBP1edM8bXdaCh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:21:24,191] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"q9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'q9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,332] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"paUBHWgBP1edM8bXS_Wj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'paUBHWgBP1edM8bXS_Wj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:54:04,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,333] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BKUCHWgBP1edM8bX5PrT\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BKUCHWgBP1edM8bX5PrT\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:55:44,169] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,333] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"46XjHGgBP1edM8bXnKCw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'46XjHGgBP1edM8bXnKCw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:21:44,177] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rtC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rtC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,333] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UqXjHGgBP1edM8bXsKE5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UqXjHGgBP1edM8bXsKE5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:21:44,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"r9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'r9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,333] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RaUCHWgBP1edM8bXNfgF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RaUCHWgBP1edM8bXNfgF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:55:04,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,334] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8KUEHWgBP1edM8bXRP1o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8KUEHWgBP1edM8bXRP1o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:57:24,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,451] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"p6UBHWgBP1edM8bXXvUs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'p6UBHWgBP1edM8bXXvUs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T07:54:04,200] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"stC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'stC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,451] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pKYIHWgBP1edM8bXnQrD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pKYIHWgBP1edM8bXnQrD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:04,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"s9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'s9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,451] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"paYIHWgBP1edM8bXnQrD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'paYIHWgBP1edM8bXnQrD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:04,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,452] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GKYLHWgBP1edM8bXSRJe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GKYLHWgBP1edM8bXSRJe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:05:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,452] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GaYLHWgBP1edM8bXSRJe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GaYLHWgBP1edM8bXSRJe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:05:04,185] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ttC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ttC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,452] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-KYJHWgBP1edM8bXJgt8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-KYJHWgBP1edM8bXJgt8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:44,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"t9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'t9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,453] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-aYJHWgBP1edM8bXJgt8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-aYJHWgBP1edM8bXJgt8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:44,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,453] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"S6YJHWgBP1edM8bXiA0l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'S6YJHWgBP1edM8bXiA0l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:03:04,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"udC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'udC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,453] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TKYJHWgBP1edM8bXiA0l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TKYJHWgBP1edM8bXiA0l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:03:04,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"utC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'utC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,453] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"J6YMHWgBP1edM8bXRxVH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'J6YMHWgBP1edM8bXRxVH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:06:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"u9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'u9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,454] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KKYMHWgBP1edM8bXRxVH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KKYMHWgBP1edM8bXRxVH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:06:04,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,454] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"p6YIHWgBP1edM8bXsQpJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'p6YIHWgBP1edM8bXsQpJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:04,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,454] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TqYJHWgBP1edM8bXmw2v\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TqYJHWgBP1edM8bXmw2v\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:03:04,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vtC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vtC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,455] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z6YJHWgBP1edM8bXOgwE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z6YJHWgBP1edM8bXOgwE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:02:44,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"v9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'v9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,455] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iaYLHWgBP1edM8bXXBLn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iaYLHWgBP1edM8bXXBLn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:05:04,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,455] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"b6YhHWgBP1edM8bXB1Dh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'b6YhHWgBP1edM8bXB1Dh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:28:46,868] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,455] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cKYhHWgBP1edM8bXB1Dh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cKYhHWgBP1edM8bXB1Dh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:28:46,869] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wtC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wtC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,456] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cqYhHWgBP1edM8bXC1DK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cqYhHWgBP1edM8bXC1DK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:28:46,869] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"w9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'w9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,456] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"c6YhHWgBP1edM8bXC1DK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'c6YhHWgBP1edM8bXC1DK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:28:50,023] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,456] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y6YlHWgBP1edM8bX6l5k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y6YlHWgBP1edM8bX6l5k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:33:59,840] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xdC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xdC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,456] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZKYlHWgBP1edM8bX6l5k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZKYlHWgBP1edM8bX6l5k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:33:59,841] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xtC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xtC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,457] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZaYlHWgBP1edM8bX6l5k\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZaYlHWgBP1edM8bX6l5k\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:34:00,157] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x9C1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x9C1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,457] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KKYfHWgBP1edM8bXM0sa\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KKYfHWgBP1edM8bXM0sa\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:44,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yNC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yNC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,457] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KaYfHWgBP1edM8bXM0sa\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KaYfHWgBP1edM8bXM0sa\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:44,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ydC1K2gBP1edM8bXby_p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ydC1K2gBP1edM8bXby_p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,458] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1qYeHWgBP1edM8bX0Ulx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1qYeHWgBP1edM8bX0Ulx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:24,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ytC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ytC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,458] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"16YeHWgBP1edM8bX0Ulx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'16YeHWgBP1edM8bX0Ulx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:24,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y9C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y9C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,458] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"faYfHWgBP1edM8bXu0zV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'faYfHWgBP1edM8bXu0zV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:27:24,183] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zNC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zNC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,458] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fqYfHWgBP1edM8bXu0zV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fqYfHWgBP1edM8bXu0zV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:27:24,184] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zdC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zdC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,459] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K6YfHWgBP1edM8bXRkuj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K6YfHWgBP1edM8bXRkuj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:44,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ztC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ztC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,459] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RaYeHWgBP1edM8bX5Er4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RaYeHWgBP1edM8bX5Er4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:26:24,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"z9C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'z9C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,459] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7aYfHWgBP1edM8bXz0xd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7aYfHWgBP1edM8bXz0xd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:27:24,184] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,459] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d6YhHWgBP1edM8bXH1BQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d6YhHWgBP1edM8bXH1BQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T08:28:50,262] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,460] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7aZWHWgBP1edM8bXIudC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7aZWHWgBP1edM8bXIudC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:44,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,460] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7qZWHWgBP1edM8bXIudC\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7qZWHWgBP1edM8bXIudC\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:44,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"09C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'09C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,460] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wKZVHWgBP1edM8bXcuV4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wKZVHWgBP1edM8bXcuV4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:04,178] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,461] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"waZVHWgBP1edM8bXcuV4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'waZVHWgBP1edM8bXcuV4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:04,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,461] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KaZSHWgBP1edM8bXF9wR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KaZSHWgBP1edM8bXF9wR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:24,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,461] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KqZSHWgBP1edM8bXF9wR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KqZSHWgBP1edM8bXF9wR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:24,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"19C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'19C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,461] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LaZVHWgBP1edM8bXhuYA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LaZVHWgBP1edM8bXhuYA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:04,179] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,462] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tqZRHWgBP1edM8bX79v8\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tqZRHWgBP1edM8bX79v8\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:04,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,462] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fKZSHWgBP1edM8bXjN1B\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fKZSHWgBP1edM8bXjN1B\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:44,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,462] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9KZWHWgBP1edM8bXNefJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9KZWHWgBP1edM8bXNefJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:26:44,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"29C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'29C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,463] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dqZSHWgBP1edM8bXeN25\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dqZSHWgBP1edM8bXeN25\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:44,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,463] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"laZSHWgBP1edM8bXKtyX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'laZSHWgBP1edM8bXKtyX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T09:22:24,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,463] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Jqd4HWgBP1edM8bX7EvJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Jqd4HWgBP1edM8bX7EvJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:44,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,463] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"J6d4HWgBP1edM8bX7EvJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'J6d4HWgBP1edM8bX7EvJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:44,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"39C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'39C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,464] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2Kd4HWgBP1edM8bXi0ke\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2Kd4HWgBP1edM8bXi0ke\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:24,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,464] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2ad4HWgBP1edM8bXi0ke\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2ad4HWgBP1edM8bXi0ke\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:24,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,464] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oKd5HWgBP1edM8bXJ0tl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oKd5HWgBP1edM8bXJ0tl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:05:04,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,464] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oad5HWgBP1edM8bXJ0tl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oad5HWgBP1edM8bXJ0tl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:05:04,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"49C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'49C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,465] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Lad5HWgBP1edM8bXAEtR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Lad5HWgBP1edM8bXAEtR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:44,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,465] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zKd5HWgBP1edM8bX100v\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zKd5HWgBP1edM8bX100v\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:05:44,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,465] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0qd5HWgBP1edM8bX6k23\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0qd5HWgBP1edM8bX6k23\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:05:44,190] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5tC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5tC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,466] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Zad4HWgBP1edM8bXZEkM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Zad4HWgBP1edM8bXZEkM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:04,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"59C1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'59C1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,466] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RKd4HWgBP1edM8bXnkqn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RKd4HWgBP1edM8bXnkqn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:04:24,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6NC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6NC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,466] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Dad5HWgBP1edM8bXOkzs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Dad5HWgBP1edM8bXOkzs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:05:04,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6dC1K2gBP1edM8bXcC8G\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6dC1K2gBP1edM8bXcC8G\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,466] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"z6eAHWgBP1edM8bXLF9i\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'z6eAHWgBP1edM8bXLF9i\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:12:42,992] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"79C1K2gBP1edM8bXgi-L\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'79C1K2gBP1edM8bXgi-L\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T04:25:34,467] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0KeAHWgBP1edM8bXLF9i\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0KeAHWgBP1edM8bXLF9i\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:12:42,992] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"OtKvLGgBP1edM8bXif-0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'OtKvLGgBP1edM8bXif-0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:58:44,251] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0aeAHWgBP1edM8bXLF9i\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0aeAHWgBP1edM8bXLF9i\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:12:44,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"O9KvLGgBP1edM8bXif-0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'O9KvLGgBP1edM8bXif-0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:58:44,252] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d6d9HWgBP1edM8bXMlef\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d6d9HWgBP1edM8bXMlef\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:24,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JdOvLGgBP1edM8bX6gCw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JdOvLGgBP1edM8bX6gCw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:59:04,299] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eKd9HWgBP1edM8bXMlef\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eKd9HWgBP1edM8bXMlef\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:24,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JtOvLGgBP1edM8bX6gCw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JtOvLGgBP1edM8bX6gCw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:59:04,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"PKeAHWgBP1edM8bXP2Dp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'PKeAHWgBP1edM8bXP2Dp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:12:44,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"QdKvLGgBP1edM8bXnP-P\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'QdKvLGgBP1edM8bXnP-P\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:58:44,255] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fqd9HWgBP1edM8bXRlco\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fqd9HWgBP1edM8bXRlco\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:24,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Z9DXK2gBP1edM8bX65OO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Z9DXK2gBP1edM8bX65OO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T05:03:04,971] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lKd_HWgBP1edM8bXVV2E\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lKd_HWgBP1edM8bXVV2E\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:11:44,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ktOvLGgBP1edM8bX_gA5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ktOvLGgBP1edM8bX_gA5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T08:59:04,300] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mqd_HWgBP1edM8bXaV0M\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mqd_HWgBP1edM8bXaV0M\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:11:44,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-tDXK2gBP1edM8bX2JIF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-tDXK2gBP1edM8bX2JIF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T05:03:04,819] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lad8HWgBP1edM8bX5FZ-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lad8HWgBP1edM8bX5FZ-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:04,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gtDXK2gBP1edM8bXnpJS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gtDXK2gBP1edM8bXnpJS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T05:02:53,938] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8Kd9HWgBP1edM8bXbVc4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8Kd9HWgBP1edM8bXbVc4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:44,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"h9DXK2gBP1edM8bXsJL1\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'h9DXK2gBP1edM8bXsJL1\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T05:02:55,438] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"W6d9HWgBP1edM8bXgFjB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'W6d9HWgBP1edM8bXgFjB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:09:44,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x9OwLGgBP1edM8bXwQKM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x9OwLGgBP1edM8bXwQKM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:00:04,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0qeVHWgBP1edM8bXiZxB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0qeVHWgBP1edM8bXiZxB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:36:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"yNOwLGgBP1edM8bXwQKM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'yNOwLGgBP1edM8bXwQKM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:00:04,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"06eVHWgBP1edM8bXiZxB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'06eVHWgBP1edM8bXiZxB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:36:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"G9OyLGgBP1edM8bXlghR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'G9OyLGgBP1edM8bXlghR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:02:04,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LaeUHWgBP1edM8bXnprd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LaeUHWgBP1edM8bXnprd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:35:04,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HNOyLGgBP1edM8bXlghR\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HNOyLGgBP1edM8bXlghR\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:02:04,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LqeUHWgBP1edM8bXnprd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LqeUHWgBP1edM8bXnprd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:35:04,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"O9OyLGgBP1edM8bXWwe5\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'O9OyLGgBP1edM8bXWwe5\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:01:44,223] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"P6eVHWgBP1edM8bXnJ3I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'P6eVHWgBP1edM8bXnJ3I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:36:04,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"p9OyLGgBP1edM8bXbwdA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'p9OyLGgBP1edM8bXbwdA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:01:44,224] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oqeEHWgBP1edM8bXS2sl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oqeEHWgBP1edM8bXS2sl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:17:04,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ztOwLGgBP1edM8bX1QIW\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ztOwLGgBP1edM8bX1QIW\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:00:04,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WaeVHWgBP1edM8bXTpyn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WaeVHWgBP1edM8bXTpyn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:35:44,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sdOxLGgBP1edM8bXIwM0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sdOxLGgBP1edM8bXIwM0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:00:24,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X6eVHWgBP1edM8bXYpwv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X6eVHWgBP1edM8bXYpwv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:35:44,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HdOxLGgBP1edM8bXNgTr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HdOxLGgBP1edM8bXNgTr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:00:24,196] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mqeUHWgBP1edM8bXsppm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mqeUHWgBP1edM8bXsppm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:35:04,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UdOxLGgBP1edM8bX-gYO\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UdOxLGgBP1edM8bX-gYO\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:01:24,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"tKeUHWgBP1edM8bXZJmu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'tKeUHWgBP1edM8bXZJmu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:34:44,366] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"V9OyLGgBP1edM8bXDQac\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'V9OyLGgBP1edM8bXDQac\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:01:24,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uqeUHWgBP1edM8bXd5nP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uqeUHWgBP1edM8bXd5nP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:34:44,367] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"v9O2LGgBP1edM8bXPxLd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'v9O2LGgBP1edM8bXPxLd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:06:04,230] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"X6ebHWgBP1edM8bXo67s\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'X6ebHWgBP1edM8bXo67s\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:44,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wNO2LGgBP1edM8bXPxLd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wNO2LGgBP1edM8bXPxLd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:06:04,231] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YKebHWgBP1edM8bXo67s\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YKebHWgBP1edM8bXo67s\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:44,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xtO2LGgBP1edM8bXUxJm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xtO2LGgBP1edM8bXUxJm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:06:04,231] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"B6ebHWgBP1edM8bXG60w\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'B6ebHWgBP1edM8bXG60w\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:04,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kNO5LGgBP1edM8bXYBur\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kNO5LGgBP1edM8bXYBur\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:09:24,218] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CKebHWgBP1edM8bXG60w\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CKebHWgBP1edM8bXG60w\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:04,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"39O2LGgBP1edM8bXBRFD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'39O2LGgBP1edM8bXBRFD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:05:44,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"2qeaHWgBP1edM8bXa6pn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'2qeaHWgBP1edM8bXa6pn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:41:24,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"S9O2LGgBP1edM8bXGBLN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'S9O2LGgBP1edM8bXGBLN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:05:44,216] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"26eaHWgBP1edM8bXa6pn\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'26eaHWgBP1edM8bXa6pn\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:41:24,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_NO5LGgBP1edM8bXdBs0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_NO5LGgBP1edM8bXdBs0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:09:24,219] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y6ebHWgBP1edM8bXt650\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y6ebHWgBP1edM8bXt650\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:44,172] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"WdO5LGgBP1edM8bX_B3v\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'WdO5LGgBP1edM8bX_B3v\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:10:04,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"s6ecHWgBP1edM8bXGa8g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'s6ecHWgBP1edM8bXGa8g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:43:04,336] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dtO5LGgBP1edM8bXrhzN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dtO5LGgBP1edM8bXrhzN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:09:44,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DqebHWgBP1edM8bXLq24\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DqebHWgBP1edM8bXLq24\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:42:04,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cNO5LGgBP1edM8bXmxxc\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cNO5LGgBP1edM8bXmxxc\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:09:44,224] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"raecHWgBP1edM8bXBa-Y\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'raecHWgBP1edM8bXBa-Y\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:43:04,335] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-tO6LGgBP1edM8bX0x_K\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-tO6LGgBP1edM8bX0x_K\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:04,219] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RqeaHWgBP1edM8bXfqvs\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RqeaHWgBP1edM8bXfqvs\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:41:24,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-9O6LGgBP1edM8bX0x_K\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-9O6LGgBP1edM8bX0x_K\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:04,220] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iKeZHWgBP1edM8bX9qkt\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iKeZHWgBP1edM8bX9qkt\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:40:44,186] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5dO7LGgBP1edM8bXNSB0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5dO7LGgBP1edM8bXNSB0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3aefHWgBP1edM8bXTbiD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3aefHWgBP1edM8bXTbiD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:46:44,278] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5tO7LGgBP1edM8bXNSB0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5tO7LGgBP1edM8bXNSB0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3qefHWgBP1edM8bXTbiD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3qefHWgBP1edM8bXTbiD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:46:44,279] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xdO6LGgBP1edM8bXEB13\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xdO6LGgBP1edM8bXEB13\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:10:04,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"wKedHWgBP1edM8bXKrKX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'wKedHWgBP1edM8bXKrKX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:44:24,182] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AdO6LGgBP1edM8bX5yBS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AdO6LGgBP1edM8bX5yBS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:04,220] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K6edHWgBP1edM8bXPrMr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K6edHWgBP1edM8bXPrMr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:44:24,183] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UtO7LGgBP1edM8bXSCH7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UtO7LGgBP1edM8bXSCH7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:11:24,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DKedHWgBP1edM8bXjLRE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DKedHWgBP1edM8bXjLRE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:44:44,181] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"htO8LGgBP1edM8bXDCNP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'htO8LGgBP1edM8bXDCNP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:12:24,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EqedHWgBP1edM8bXn7TM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EqedHWgBP1edM8bXn7TM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:44:44,181] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gtPNLGgBP1edM8bXcVX7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gtPNLGgBP1edM8bXcVX7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:31:24,378] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CaefHWgBP1edM8bX_btQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CaefHWgBP1edM8bX_btQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:47:24,170] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iNPNLGgBP1edM8bXhVUe\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iNPNLGgBP1edM8bXhVUe\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:31:24,379] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"D6egHWgBP1edM8bXELvY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'D6egHWgBP1edM8bXELvY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:47:24,171] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jNO8LGgBP1edM8bXHyPV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jNO8LGgBP1edM8bXHyPV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:12:24,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SaefHWgBP1edM8bXYbkM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SaefHWgBP1edM8bXYbkM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T10:46:44,279] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"etPPLGgBP1edM8bXPlqZ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'etPPLGgBP1edM8bXPlqZ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:33:24,202] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"R6jJHWgBP1edM8bXkjGL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'R6jJHWgBP1edM8bXkjGL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T11:32:44,970] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e9PPLGgBP1edM8bXPlqZ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e9PPLGgBP1edM8bXPlqZ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:33:24,203] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"u6gRHmgBP1edM8bX-v8g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'u6gRHmgBP1edM8bX-v8g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:53,494] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ddPQLGgBP1edM8bXil6n\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ddPQLGgBP1edM8bXil6n\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:34:44,248] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vKgRHmgBP1edM8bX-v8g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vKgRHmgBP1edM8bX-v8g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:53,495] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dtPQLGgBP1edM8bXil6n\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dtPQLGgBP1edM8bXil6n\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:34:44,249] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"vagRHmgBP1edM8bX-v8g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'vagRHmgBP1edM8bX-v8g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:58,622] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"w9PSLGgBP1edM8bXX2Nr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'w9PSLGgBP1edM8bXX2Nr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:36:44,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y6jSHWgBP1edM8bXzUuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y6jSHWgBP1edM8bXzUuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T11:42:53,918] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xNPSLGgBP1edM8bXX2Nr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xNPSLGgBP1edM8bXX2Nr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:36:44,226] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zKjSHWgBP1edM8bXzUuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zKjSHWgBP1edM8bXzUuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T11:42:53,919] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"4tPTLGgBP1edM8bXhGZo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'4tPTLGgBP1edM8bXhGZo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:38:04,224] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zajSHWgBP1edM8bXzUuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zajSHWgBP1edM8bXzUuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T11:42:54,044] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"49PTLGgBP1edM8bXhGZo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'49PTLGgBP1edM8bXhGZo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:38:04,225] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1KjSHWgBP1edM8bX4UsI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1KjSHWgBP1edM8bX4UsI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T11:42:54,044] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sNPRLGgBP1edM8bXYWCB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sNPRLGgBP1edM8bXYWCB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:35:44,235] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xagSHmgBP1edM8bXDf-p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xagSHmgBP1edM8bXDf-p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:58,622] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sdPRLGgBP1edM8bXYWCB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sdPRLGgBP1edM8bXYWCB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:35:44,236] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e6gQHmgBP1edM8bXJfrr\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e6gQHmgBP1edM8bXJfrr\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:49:55,044] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ydPSLGgBP1edM8bXcmPz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ydPSLGgBP1edM8bXcmPz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:36:44,226] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"g6gQHmgBP1edM8bXOPri\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'g6gQHmgBP1edM8bXOPri\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:49:55,044] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e9PQLGgBP1edM8bXnl4u\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e9PQLGgBP1edM8bXnl4u\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:34:44,249] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"3agRHmgBP1edM8bXv_6F\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'3agRHmgBP1edM8bXv_6F\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:38,804] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"6NPPLGgBP1edM8bXUloh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'6NPPLGgBP1edM8bXUloh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:33:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"R6gRHmgBP1edM8bX0_8N\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'R6gRHmgBP1edM8bX0_8N\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:51:38,915] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HtPRLGgBP1edM8bXdWEI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HtPRLGgBP1edM8bXdWEI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T09:35:44,236] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"RKkTHmgBP1edM8bXRgMv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'RKkTHmgBP1edM8bXRgMv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:53:23,512] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LdP5LGgBP1edM8bXxdXD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LdP5LGgBP1edM8bXxdXD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:19:44,232] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_6k7HmgBP1edM8bXfHVM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_6k7HmgBP1edM8bXfHVM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:37:18,162] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LtP5LGgBP1edM8bXxdXD\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LtP5LGgBP1edM8bXxdXD\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:19:44,234] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AKk7HmgBP1edM8bXfHZM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AKk7HmgBP1edM8bXfHZM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:37:18,163] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f9P9LGgBP1edM8bX-OEE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f9P9LGgBP1edM8bX-OEE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:24:24,204] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Aak7HmgBP1edM8bXfHZM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Aak7HmgBP1edM8bXfHZM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:37:18,163] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gNP9LGgBP1edM8bX-OEE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gNP9LGgBP1edM8bX-OEE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:24:24,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mKqHHmgBP1edM8bXK03_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mKqHHmgBP1edM8bXK03_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T14:59:55,728] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mtP5LGgBP1edM8bX2dVL\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mtP5LGgBP1edM8bX2dVL\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:19:44,234] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"maqHHmgBP1edM8bXK03_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'maqHHmgBP1edM8bXK03_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T14:59:55,729] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"1dP9LGgBP1edM8bXDd6g\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'1dP9LGgBP1edM8bXDd6g\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:23:24,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mqqHHmgBP1edM8bXK03_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mqqHHmgBP1edM8bXK03_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T14:59:55,729] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"29P9LGgBP1edM8bXId4o\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'29P9LGgBP1edM8bXId4o\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:23:24,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Oqk8HmgBP1edM8bXUnh7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Oqk8HmgBP1edM8bXUnh7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:38:08,956] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K9P9LGgBP1edM8bXguDS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K9P9LGgBP1edM8bXguDS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:23:44,193] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pak8HmgBP1edM8bXZXj6\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pak8HmgBP1edM8bXZXj6\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:38:08,957] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aNP5LGgBP1edM8bXKdN_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aNP5LGgBP1edM8bXKdN_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:19:04,247] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"oqqHHmgBP1edM8bXPk27\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'oqqHHmgBP1edM8bXPk27\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T14:59:55,942] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"htP-LGgBP1edM8bXC-GN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'htP-LGgBP1edM8bXC-GN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:24:24,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"B6k7HmgBP1edM8bXj3Yd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'B6k7HmgBP1edM8bXj3Yd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T13:37:18,270] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"v9P9LGgBP1edM8bXb99L\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'v9P9LGgBP1edM8bXb99L\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:23:44,192] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8qkWHmgBP1edM8bXPwvq\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8qkWHmgBP1edM8bXPwvq\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:56:33,750] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"htwiMGgBP1edM8bXffV7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'htwiMGgBP1edM8bXffV7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:08,778] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-akWHmgBP1edM8bXUwtz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-akWHmgBP1edM8bXUwtz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:56:33,751] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"h9wiMGgBP1edM8bXffV7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'h9wiMGgBP1edM8bXffV7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:11,461] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"r6kTHmgBP1edM8bXWQOz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'r6kTHmgBP1edM8bXWQOz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T12:53:23,512] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"iNwiMGgBP1edM8bXffV7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'iNwiMGgBP1edM8bXffV7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:11,773] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"KqsWH2gBP1edM8bXdOZj\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'KqsWH2gBP1edM8bXdOZj\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T17:36:20,633] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"idwiMGgBP1edM8bXffV7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'idwiMGgBP1edM8bXffV7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:11,942] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"j6sSH2gBP1edM8bXG9kS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'j6sSH2gBP1edM8bXG9kS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T17:31:33,746] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"itwiMGgBP1edM8bXffV7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'itwiMGgBP1edM8bXffV7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,064] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k6xpH2gBP1edM8bXd9Lh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k6xpH2gBP1edM8bXd9Lh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T19:07:07,037] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jdwiMGgBP1edM8bXgfVk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jdwiMGgBP1edM8bXgfVk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"l6xpH2gBP1edM8bXitLH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'l6xpH2gBP1edM8bXitLH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T19:07:07,038] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"jtwiMGgBP1edM8bXgfVk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'jtwiMGgBP1edM8bXgfVk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,401] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uqxsH2gBP1edM8bXv9sd\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uqxsH2gBP1edM8bXv9sd\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T19:10:36,342] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"j9wiMGgBP1edM8bXgfVk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'j9wiMGgBP1edM8bXgfVk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,582] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JqxsH2gBP1edM8bX0tyl\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JqxsH2gBP1edM8bX0tyl\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T19:10:37,978] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kNwiMGgBP1edM8bXgfVk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kNwiMGgBP1edM8bXgfVk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,722] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"aa4RIGgBP1edM8bXjLRA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'aa4RIGgBP1edM8bXjLRA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T22:10:34,083] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kdwiMGgBP1edM8bXgfVk\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kdwiMGgBP1edM8bXgfVk\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:12,899] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Za4RIGgBP1edM8bXebQt\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Za4RIGgBP1edM8bXebQt\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T22:10:34,082] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d9wiMGgBP1edM8bXbfXX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d9wiMGgBP1edM8bXbfXX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:03,716] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"La7jH2gBP1edM8bXdzGV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'La7jH2gBP1edM8bXdzGV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-05T21:20:15,922] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eNwiMGgBP1edM8bXcfXA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eNwiMGgBP1edM8bXcfXA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:06,493] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f7J9IWgBP1edM8bXGsfv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f7J9IWgBP1edM8bXGsfv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:47:45,189] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"edwiMGgBP1edM8bXcfXA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'edwiMGgBP1edM8bXcfXA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:08,379] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gLJ9IWgBP1edM8bXGsfv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gLJ9IWgBP1edM8bXGsfv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:47:45,195] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AtwiMGgBP1edM8bXVvVo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AtwiMGgBP1edM8bXVvVo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:02:57,261] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gbJ9IWgBP1edM8bXGsfv\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gbJ9IWgBP1edM8bXGsfv\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:47:47,198] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"A9wiMGgBP1edM8bXVvVo\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'A9wiMGgBP1edM8bXVvVo\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:00,367] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TbPIIWgBP1edM8bXLp3Z\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TbPIIWgBP1edM8bXLp3Z\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:09:44,205] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"CNwiMGgBP1edM8bXYvUm\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'CNwiMGgBP1edM8bXYvUm\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:03:02,154] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UrPIIWgBP1edM8bXQZ2m\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UrPIIWgBP1edM8bXQZ2m\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:09:44,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qdQZLWgBP1edM8bXIi9Q\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qdQZLWgBP1edM8bXIi9Q\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:53:58,795] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EbJdIWgBP1edM8bXcG21\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EbJdIWgBP1edM8bXcG21\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:13:05,036] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"qtQZLWgBP1edM8bXIi9Q\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'qtQZLWgBP1edM8bXIi9Q\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:53:58,796] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8rJdIWgBP1edM8bXvm3S\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8rJdIWgBP1edM8bXvm3S\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:13:36,215] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"q9QZLWgBP1edM8bXIi9Q\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'q9QZLWgBP1edM8bXIi9Q\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:53:58,988] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"XrJdIWgBP1edM8bX0m5b\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'XrJdIWgBP1edM8bX0m5b\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:13:36,216] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SNMGLWgBP1edM8bXNfl_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SNMGLWgBP1edM8bXNfl_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:33:24,291] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"a7JeIWgBP1edM8bX43HP\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'a7JeIWgBP1edM8bX43HP\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:14:42,656] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"SdMGLWgBP1edM8bXNfl_\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'SdMGLWgBP1edM8bXNfl_\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:33:24,292] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"cLJeIWgBP1edM8bX93Fa\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'cLJeIWgBP1edM8bX93Fa\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:14:42,657] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"M9MFLWgBP1edM8bXJPYM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'M9MFLWgBP1edM8bXJPYM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:32:04,194] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"hrJ9IWgBP1edM8bXLscM\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'hrJ9IWgBP1edM8bXLscM\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T04:47:49,811] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"sdQZLWgBP1edM8bXNS8E\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'sdQZLWgBP1edM8bXNS8E\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:53:58,989] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Y7POIWgBP1edM8bXNa4l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Y7POIWgBP1edM8bXNa4l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:24,161] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"T9MGLWgBP1edM8bXSfkH\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'T9MGLWgBP1edM8bXSfkH\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-08T10:33:24,292] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ZLPOIWgBP1edM8bXNa4l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ZLPOIWgBP1edM8bXNa4l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:24,162] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_twiMGgBP1edM8bXS_Rg\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_twiMGgBP1edM8bXS_Rg\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T01:02:55,896] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"srPOIWgBP1edM8bXlq_O\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'srPOIWgBP1edM8bXlq_O\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:44,153] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8N1bMGgBP1edM8bX-ZsE\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8N1bMGgBP1edM8bX-ZsE\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:56,320] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"s7POIWgBP1edM8bXlq_O\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'s7POIWgBP1edM8bXlq_O\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:44,153] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9d1bMGgBP1edM8bX_Jvp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9d1bMGgBP1edM8bX_Jvp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:58,337] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LrPNIWgBP1edM8bXXqxK\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LrPNIWgBP1edM8bXXqxK\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:15:24,167] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9t1bMGgBP1edM8bX_Jvp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9t1bMGgBP1edM8bX_Jvp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:59,493] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"M7PNIWgBP1edM8bXcazS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'M7PNIWgBP1edM8bXcazS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:15:24,168] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-d1cMGgBP1edM8bXAJvT\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-d1cMGgBP1edM8bXAJvT\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:00,382] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"0LPOIWgBP1edM8bXSK6t\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'0LPOIWgBP1edM8bXSK6t\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:24,162] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-91cMGgBP1edM8bXBJu4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-91cMGgBP1edM8bXBJu4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:01,278] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uLPOIWgBP1edM8bXqq9X\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uLPOIWgBP1edM8bXqq9X\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:16:44,154] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_N1cMGgBP1edM8bXBJu4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_N1cMGgBP1edM8bXBJu4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:02,129] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pbPQIWgBP1edM8bXCbPp\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pbPQIWgBP1edM8bXCbPp\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:18:24,159] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"AN1cMGgBP1edM8bXCJyh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'AN1cMGgBP1edM8bXCJyh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:02,130] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EbPQIWgBP1edM8bXHbRx\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EbPQIWgBP1edM8bXHbRx\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:18:24,160] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"bd1bMGgBP1edM8bX1ZvQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'bd1bMGgBP1edM8bX1ZvQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:47,031] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"kLPMIWgBP1edM8bXc6no\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'kLPMIWgBP1edM8bXc6no\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:14:24,293] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"dt1bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'dt1bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:48,514] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GLPUIWgBP1edM8bX_8KA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GLPUIWgBP1edM8bX_8KA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:23:44,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"d91bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'d91bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:51,596] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"GbPUIWgBP1edM8bX_8KA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'GbPUIWgBP1edM8bX_8KA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:23:44,175] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"eN1bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'eN1bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:51,596] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"krPVIWgBP1edM8bXOsIY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'krPVIWgBP1edM8bXOsIY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:24:04,141] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ed1bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ed1bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:51,597] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k7PVIWgBP1edM8bXOsIY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k7PVIWgBP1edM8bXOsIY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:24:04,142] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"et1bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'et1bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:51,597] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"xrPoIWgBP1edM8bXiPmJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'xrPoIWgBP1edM8bXiPmJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:45:04,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"e91bMGgBP1edM8bX4ZuQ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'e91bMGgBP1edM8bX4ZuQ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:51,597] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"x7PoIWgBP1edM8bXiPmJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'x7PoIWgBP1edM8bXiPmJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:45:04,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fN1bMGgBP1edM8bXl5pN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fN1bMGgBP1edM8bXl5pN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:30,365] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"k7PSIWgBP1edM8bXybsW\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'k7PSIWgBP1edM8bXybsW\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:21:24,141] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"fd1bMGgBP1edM8bXl5pN\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'fd1bMGgBP1edM8bXl5pN\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:30,365] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"lLPSIWgBP1edM8bXybsW\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'lLPSIWgBP1edM8bXybsW\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:21:24,142] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ft1bMGgBP1edM8bXm5o-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ft1bMGgBP1edM8bXm5o-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:31,892] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"zLPoIWgBP1edM8bXm_k0\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'zLPoIWgBP1edM8bXm_k0\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:45:04,188] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7t1bMGgBP1edM8bXppru\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7t1bMGgBP1edM8bXppru\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:34,730] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_7PVIWgBP1edM8bXTcKg\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_7PVIWgBP1edM8bXTcKg\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:24:04,142] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"8N1bMGgBP1edM8bXqprW\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'8N1bMGgBP1edM8bXqprW\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:36,576] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HrPVIWgBP1edM8bXE8II\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HrPVIWgBP1edM8bXE8II\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:23:44,176] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"9N1bMGgBP1edM8bXrpq-\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'9N1bMGgBP1edM8bXrpq-\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:38,524] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ILPSIWgBP1edM8bXorsB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ILPSIWgBP1edM8bXorsB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:21:04,164] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"-N1bMGgBP1edM8bXupp4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'-N1bMGgBP1edM8bXupp4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:40,174] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ALPSIWgBP1edM8bX3Lya\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ALPSIWgBP1edM8bX3Lya\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:21:24,142] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_N1bMGgBP1edM8bXxpox\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_N1bMGgBP1edM8bXxpox\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:43,187] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ILQPImgBP1edM8bX5mrS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ILQPImgBP1edM8bX5mrS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:04,240] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"_t1bMGgBP1edM8bXypoY\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'_t1bMGgBP1edM8bXypoY\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:45,157] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"IbQPImgBP1edM8bX5mrS\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'IbQPImgBP1edM8bX5mrS\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:04,241] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ft1bMGgBP1edM8bX6Ztc\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ft1bMGgBP1edM8bX6Ztc\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:53,693] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"5rQQImgBP1edM8bXgmtA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'5rQQImgBP1edM8bXgmtA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:44,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"gN1bMGgBP1edM8bX7ZtF\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'gN1bMGgBP1edM8bX7ZtF\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:55,250] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"57QQImgBP1edM8bXgmtA\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'57QQImgBP1edM8bXgmtA\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:44,212] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"q91aMGgBP1edM8bX55iB\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'q91aMGgBP1edM8bX55iB\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:04:38,035] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"TLTxIWgBP1edM8bXExIu\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'TLTxIWgBP1edM8bXExIu\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:54:24,161] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Ad1bMGgBP1edM8bXXJqz\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Ad1bMGgBP1edM8bXXJqz\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:09,704] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"UrTxIWgBP1edM8bXJhK2\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'UrTxIWgBP1edM8bXJhK2\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:54:24,162] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Bt1bMGgBP1edM8bXcJo7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Bt1bMGgBP1edM8bXcJo7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:05:10,891] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"J7QPImgBP1edM8bX-WqG\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'J7QPImgBP1edM8bX-WqG\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:04,241] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mN1cMGgBP1edM8bXwJ5I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mN1cMGgBP1edM8bXwJ5I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:46,924] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"o7TxIWgBP1edM8bXmxPq\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'o7TxIWgBP1edM8bXmxPq\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:55:04,387] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"md1cMGgBP1edM8bXwJ5I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'md1cMGgBP1edM8bXwJ5I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:48,727] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"DrTxIWgBP1edM8bXrxRw\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'DrTxIWgBP1edM8bXrxRw\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T06:55:04,388] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mt1cMGgBP1edM8bXxJ4x\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mt1cMGgBP1edM8bXxJ4x\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:50,422] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"BLQQImgBP1edM8bXNGsi\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'BLQQImgBP1edM8bXNGsi\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:24,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"m91cMGgBP1edM8bXxJ4x\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'m91cMGgBP1edM8bXxJ4x\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:50,566] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"mbQQImgBP1edM8bXIGqX\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'mbQQImgBP1edM8bXIGqX\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:24,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"nN1cMGgBP1edM8bXxJ4x\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'nN1cMGgBP1edM8bXxJ4x\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:51,055] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"LrQSImgBP1edM8bXV3EI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'LrQSImgBP1edM8bXV3EI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:30:44,206] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"nd1cMGgBP1edM8bXxJ4x\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'nd1cMGgBP1edM8bXxJ4x\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:51,249] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"L7QSImgBP1edM8bXV3EI\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'L7QSImgBP1edM8bXV3EI\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:30:44,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"o91cMGgBP1edM8bXz57p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'o91cMGgBP1edM8bXz57p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:51,249] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"NbQSImgBP1edM8bXanGU\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'NbQSImgBP1edM8bXanGU\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:30:44,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pN1cMGgBP1edM8bXz57p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pN1cMGgBP1edM8bXz57p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:52,620] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"YLQQImgBP1edM8bXvGza\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'YLQQImgBP1edM8bXvGza\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:04,199] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pd1cMGgBP1edM8bXz57p\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pd1cMGgBP1edM8bXz57p\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:53,920] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"y7QQImgBP1edM8bX0Gxh\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'y7QQImgBP1edM8bX0Gxh\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:04,200] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Lt1cMGgBP1edM8bX-p_l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Lt1cMGgBP1edM8bX-p_l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:03,717] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"rLQRImgBP1edM8bXHm2C\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'rLQRImgBP1edM8bXHm2C\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:24,207] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"MN1cMGgBP1edM8bX_p_N\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'MN1cMGgBP1edM8bX_p_N\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:05,375] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"srQRImgBP1edM8bXMm0L\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'srQRImgBP1edM8bXMm0L\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:24,208] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Md1cMGgBP1edM8bX_p_N\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Md1cMGgBP1edM8bX_p_N\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:06,058] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"7bQQImgBP1edM8bXlWvJ\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'7bQQImgBP1edM8bXlWvJ\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:28:44,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ot1dMGgBP1edM8bXCp-I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ot1dMGgBP1edM8bXCp-I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:06,292] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"j7QRImgBP1edM8bXbG6l\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'j7QRImgBP1edM8bXbG6l\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:44,214] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"o91dMGgBP1edM8bXCp-I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'o91dMGgBP1edM8bXCp-I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:07,782] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"JLQRImgBP1edM8bXWW4e\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'JLQRImgBP1edM8bXWW4e\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:29:44,213] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pN1dMGgBP1edM8bXCp-I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pN1dMGgBP1edM8bXCp-I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:08,180] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"uLQWImgBP1edM8bXAHuV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'uLQWImgBP1edM8bXAHuV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:34:44,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"pd1dMGgBP1edM8bXCp-I\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'pd1dMGgBP1edM8bXCp-I\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:09,433] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ubQWImgBP1edM8bXAHuV\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ubQWImgBP1edM8bXAHuV\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:34:44,209] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"IN1cMGgBP1edM8bX559b\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'IN1cMGgBP1edM8bX559b\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:59,267] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"EbQWImgBP1edM8bXiX1P\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'EbQWImgBP1edM8bXiX1P\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:35:24,217] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"It1cMGgBP1edM8bX659D\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'It1cMGgBP1edM8bX659D\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:06:59,732] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"ErQWImgBP1edM8bXiX1P\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'ErQWImgBP1edM8bXiX1P\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:35:24,218] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"I91cMGgBP1edM8bX659D\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'I91cMGgBP1edM8bX659D\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:00,679] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"frQZImgBP1edM8bXDYTb\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'frQZImgBP1edM8bXDYTb\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:38:04,210] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Jd1cMGgBP1edM8bX758r\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Jd1cMGgBP1edM8bX758r\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:01,299] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"f7QZImgBP1edM8bXDYTb\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'f7QZImgBP1edM8bXDYTb\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:38:04,211] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Kd1cMGgBP1edM8bX858T\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Kd1cMGgBP1edM8bX858T\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:01,781] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HLQXImgBP1edM8bXh4A4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HLQXImgBP1edM8bXh4A4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:36:24,228] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"K91cMGgBP1edM8bX9p_7\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'K91cMGgBP1edM8bX9p_7\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:02,962] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"HbQXImgBP1edM8bXh4A4\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'HbQXImgBP1edM8bXh4A4\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-06T07:36:24,229] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400},{\"index\":\"reindexed-v7-filebeat-2019\",\"type\":\"_doc\",\"id\":\"Nt1dMGgBP1edM8bXTKDy\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse field [@timestamp] of type [date] in document with id \'Nt1dMGgBP1edM8bXTKDy\'\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"failed to parse date field [2019-01-09T02:07:23,126] with format [strict_date_optional_time||epoch_millis]\",\"caused_by\":{\"type\":\"date_time_parse_exception\",\"reason\":\"Failed to parse with all enclosed parsers\"}}},\"status\":400}]}}', runningReindexCount: null, }, diff --git a/x-pack/test/api_integration/apis/uptime/feature_controls.ts b/x-pack/test/api_integration/apis/uptime/feature_controls.ts index 39d7406636353..8185cb0f03a20 100644 --- a/x-pack/test/api_integration/apis/uptime/feature_controls.ts +++ b/x-pack/test/api_integration/apis/uptime/feature_controls.ts @@ -145,7 +145,8 @@ export default function featureControlsTests({ getService }: FtrProviderContext) } }); - describe('spaces', () => { + // FLAKY: https://github.com/elastic/kibana/issues/136542 + describe.skip('spaces', () => { // the following tests create a user_1 which has uptime read access to space_1 and dashboard all access to space_2 const space1Id = 'space_1'; const space2Id = 'space_2'; diff --git a/x-pack/test/api_integration/apis/uptime/rest/get_monitor_overview.ts b/x-pack/test/api_integration/apis/uptime/rest/get_monitor_overview.ts index 56d69e8beb033..408ab34f6e5bb 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/get_monitor_overview.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/get_monitor_overview.ts @@ -82,7 +82,7 @@ export default function ({ getService }: FtrProviderContext) { expect(apiResponse.body.allMonitorIds.sort()).eql( savedMonitors.map((monitor) => monitor.id).sort() ); - expect(apiResponse.body.pages).to.have.keys(['1', '2']); + expect(apiResponse.body.pages).to.have.keys(['0', '1']); expect(apiResponse.body.pages[1].length).eql(20); } finally { await Promise.all( @@ -107,7 +107,7 @@ export default function ({ getService }: FtrProviderContext) { expect(apiResponse.body.allMonitorIds.sort()).eql( savedMonitors.map((monitor) => monitor.id).sort() ); - expect(apiResponse.body.pages).to.have.keys(['1', '2', '3', '4', '5']); + expect(apiResponse.body.pages).to.have.keys(['0', '1', '2', '3', '4']); expect(apiResponse.body.pages[1].length).eql(5); } finally { await Promise.all( diff --git a/x-pack/test/apm_api_integration/tests/dependencies/dependency_metrics.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/dependency_metrics.spec.ts index fb9f1ed9485e0..686f6ba313d7e 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/dependency_metrics.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/dependency_metrics.spec.ts @@ -33,27 +33,27 @@ export default function ApiTest({ getService }: FtrProviderContext) { const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; async function callApi<TMetricName extends 'latency' | 'throughput' | 'error_rate'>({ - backendName, + dependencyName, searchServiceDestinationMetrics, spanName = '', metric, kuery = '', environment = ENVIRONMENT_ALL.value, }: { - backendName: string; + dependencyName: string; searchServiceDestinationMetrics: boolean; spanName?: string; metric: TMetricName; kuery?: string; environment?: string; - }): Promise<SupertestReturnType<`GET /internal/apm/backends/charts/${TMetricName}`>> { + }): Promise<SupertestReturnType<`GET /internal/apm/dependencies/charts/${TMetricName}`>> { return await apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/charts/${ + endpoint: `GET /internal/apm/dependencies/charts/${ metric as 'latency' | 'throughput' | 'error_rate' }`, params: { query: { - backendName, + dependencyName, start: new Date(start).toISOString(), end: new Date(end).toISOString(), environment, @@ -80,7 +80,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { () => { it('handles empty state', async () => { const { body, status } = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', metric: 'latency', searchServiceDestinationMetrics: true, }); @@ -110,7 +110,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('without a kuery or environment', () => { it('returns the correct latency', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'latency', @@ -131,7 +131,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct throughput', async () => { const response = await callApi({ - backendName: 'redis', + dependencyName: 'redis', searchServiceDestinationMetrics: true, spanName: '', metric: 'throughput', @@ -142,7 +142,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct failure rate', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'error_rate', @@ -158,7 +158,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with a kuery', () => { it('returns the correct latency', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'latency', @@ -179,7 +179,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct throughput', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'throughput', @@ -194,7 +194,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct failure rate', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'error_rate', @@ -208,7 +208,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with an environment', () => { it('returns the correct latency', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'latency', @@ -229,7 +229,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct throughput', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'throughput', @@ -245,7 +245,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct failure rate', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: true, spanName: '', metric: 'error_rate', @@ -260,7 +260,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with spanName', () => { it('returns the correct latency', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: false, spanName: '/_search', metric: 'latency', @@ -281,7 +281,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct throughput', async () => { const response = await callApi({ - backendName: 'redis', + dependencyName: 'redis', searchServiceDestinationMetrics: false, spanName: 'SET', metric: 'throughput', @@ -292,7 +292,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct failure rate', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', searchServiceDestinationMetrics: false, spanName: '/_bulk', metric: 'error_rate', diff --git a/x-pack/test/apm_api_integration/tests/dependencies/metadata.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/metadata.spec.ts index b47a4fb11bfbd..0d7e4f01733e2 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/metadata.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/metadata.spec.ts @@ -18,10 +18,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { async function callApi() { return await apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/metadata`, + endpoint: `GET /internal/apm/dependencies/metadata`, params: { query: { - backendName: dataConfig.span.destination, + dependencyName: dataConfig.span.destination, start: new Date(start).toISOString(), end: new Date(end).toISOString(), }, diff --git a/x-pack/test/apm_api_integration/tests/dependencies/service_dependencies.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/service_dependencies.spec.ts index bbec4088235c3..e5d3b8a436086 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/service_dependencies.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/service_dependencies.spec.ts @@ -5,7 +5,7 @@ * 2.0. */ import expect from '@kbn/expect'; -import { BackendNode } from '@kbn/apm-plugin/common/connections'; +import { DependencyNode } from '@kbn/apm-plugin/common/connections'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { generateData } from './generate_data'; @@ -15,7 +15,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const registry = getService('registry'); const start = new Date('2021-01-01T00:00:00.000Z').getTime(); const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; - const backendName = 'elasticsearch'; + const dependencyName = 'elasticsearch'; const serviceName = 'synth-go'; async function callApi() { @@ -62,8 +62,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(status).to.be(200); expect( - body.serviceDependencies.map(({ location }) => (location as BackendNode).backendName) - ).to.eql([backendName]); + body.serviceDependencies.map( + ({ location }) => (location as DependencyNode).dependencyName + ) + ).to.eql([dependencyName]); const currentStatsLatencyValues = body.serviceDependencies[0].currentStats.latency.timeseries; @@ -101,8 +103,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(status).to.be(200); expect( - body.serviceDependencies.map(({ location }) => (location as BackendNode).backendName) - ).to.eql([backendName]); + body.serviceDependencies.map( + ({ location }) => (location as DependencyNode).dependencyName + ) + ).to.eql([dependencyName]); const currentStatsLatencyValues = body.serviceDependencies[0].currentStats.latency.timeseries; diff --git a/x-pack/test/apm_api_integration/tests/dependencies/top_dependencies.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/top_dependencies.spec.ts index 53ff1b47981e6..5160ea52b094e 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/top_dependencies.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/top_dependencies.spec.ts @@ -6,12 +6,12 @@ */ import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; -import { NodeType, BackendNode } from '@kbn/apm-plugin/common/connections'; +import { NodeType, DependencyNode } from '@kbn/apm-plugin/common/connections'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { dataConfig, generateData } from './generate_data'; import { roundNumber } from '../../utils'; -type TopDependencies = APIReturnType<'GET /internal/apm/backends/top_backends'>; +type TopDependencies = APIReturnType<'GET /internal/apm/dependencies/top_dependencies'>; export default function ApiTest({ getService }: FtrProviderContext) { const registry = getService('registry'); @@ -23,7 +23,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { async function callApi() { return await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/backends/top_backends', + endpoint: 'GET /internal/apm/dependencies/top_dependencies', params: { query: { start: new Date(start).toISOString(), @@ -44,7 +44,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('handles empty state', async () => { const { status, body } = await callApi(); expect(status).to.be(200); - expect(body.backends).to.empty(); + expect(body.dependencies).to.empty(); }); } ); @@ -65,40 +65,40 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(() => synthtraceEsClient.clean()); it('returns an array of dependencies', () => { - expect(topDependencies).to.have.property('backends'); - expect(topDependencies.backends).to.have.length(1); + expect(topDependencies).to.have.property('dependencies'); + expect(topDependencies.dependencies).to.have.length(1); }); it('returns correct dependency information', () => { - const location = topDependencies.backends[0].location as BackendNode; + const location = topDependencies.dependencies[0].location as DependencyNode; const { span } = dataConfig; - expect(location.type).to.be(NodeType.backend); - expect(location.backendName).to.be(span.destination); + expect(location.type).to.be(NodeType.dependency); + expect(location.dependencyName).to.be(span.destination); expect(location.spanType).to.be(span.type); expect(location.spanSubtype).to.be(span.subType); expect(location).to.have.property('id'); }); describe('returns the correct stats', () => { - let backends: TopDependencies['backends'][number]; + let dependencies: TopDependencies['dependencies'][number]; before(() => { - backends = topDependencies.backends[0]; + dependencies = topDependencies.dependencies[0]; }); it("doesn't have previous stats", () => { - expect(backends.previousStats).to.be(null); + expect(dependencies.previousStats).to.be(null); }); it('has an "impact" property', () => { - expect(backends.currentStats).to.have.property('impact'); + expect(dependencies.currentStats).to.have.property('impact'); }); it('returns the correct latency', () => { const { currentStats: { latency }, - } = backends; + } = dependencies; const { transaction } = dataConfig; @@ -111,7 +111,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct throughput', () => { const { currentStats: { throughput }, - } = backends; + } = dependencies; const { rate } = dataConfig; expect(roundNumber(throughput.value)).to.be(roundNumber(rate)); @@ -120,7 +120,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct total time', () => { const { currentStats: { totalTime }, - } = backends; + } = dependencies; const { rate, transaction } = dataConfig; expect( @@ -131,7 +131,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns the correct error rate', () => { const { currentStats: { errorRate }, - } = backends; + } = dependencies; expect(errorRate.value).to.be(0); expect(errorRate.timeseries.every(({ y }) => y === 0)).to.be(true); }); diff --git a/x-pack/test/apm_api_integration/tests/dependencies/top_operations.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/top_operations.spec.ts index 638d9740cf17d..1040bd58417f5 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/top_operations.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/top_operations.spec.ts @@ -12,7 +12,7 @@ import { FtrProviderContext } from '../../common/ftr_provider_context'; import { roundNumber } from '../../utils'; import { generateOperationData, generateOperationDataConfig } from './generate_operation_data'; -type TopOperations = APIReturnType<'GET /internal/apm/backends/operations'>['operations']; +type TopOperations = APIReturnType<'GET /internal/apm/dependencies/operations'>['operations']; const { ES_BULK_DURATION, @@ -34,24 +34,24 @@ export default function ApiTest({ getService }: FtrProviderContext) { const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; async function callApi({ - backendName, + dependencyName, environment = ENVIRONMENT_ALL.value, kuery = '', }: { - backendName: string; + dependencyName: string; environment?: string; kuery?: string; }) { return await apmApiClient .readUser({ - endpoint: 'GET /internal/apm/backends/operations', + endpoint: 'GET /internal/apm/dependencies/operations', params: { query: { start: new Date(start).toISOString(), end: new Date(end).toISOString(), environment, kuery, - backendName, + dependencyName, }, }, }) @@ -60,7 +60,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { registry.when('Top operations when data is not loaded', { config: 'basic', archives: [] }, () => { it('handles empty state', async () => { - const operations = await callApi({ backendName: 'elasticsearch' }); + const operations = await callApi({ dependencyName: 'elasticsearch' }); expect(operations).to.empty(); }); }); @@ -85,7 +85,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { let bulkOperation: ValuesType<TopOperations>; before(async () => { - response = await callApi({ backendName: 'elasticsearch' }); + response = await callApi({ dependencyName: 'elasticsearch' }); searchOperation = response.find((op) => op.spanName === '/_search')!; bulkOperation = response.find((op) => op.spanName === '/_bulk')!; }); @@ -151,7 +151,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { let setOperation: ValuesType<TopOperations>; before(async () => { - response = await callApi({ backendName: 'redis' }); + response = await callApi({ dependencyName: 'redis' }); setOperation = response.find((op) => op.spanName === 'SET')!; }); @@ -177,7 +177,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { before(async () => { response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', kuery: `service.name:"synth-go"`, }); searchOperation = response.find((op) => op.spanName === '/_search')!; @@ -199,7 +199,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { before(async () => { response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', environment: 'development', }); searchOperation = response.find((op) => op.spanName === '/_search'); diff --git a/x-pack/test/apm_api_integration/tests/dependencies/top_spans.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/top_spans.spec.ts index 5e497c969e920..ebc9fccc0904d 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/top_spans.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/top_spans.spec.ts @@ -19,14 +19,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; async function callApi({ - backendName, + dependencyName, spanName, kuery = '', environment = ENVIRONMENT_ALL.value, sampleRangeFrom, sampleRangeTo, }: { - backendName: string; + dependencyName: string; spanName: string; kuery?: string; environment?: string; @@ -34,10 +34,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { sampleRangeTo?: number; }) { return await apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/operations/spans`, + endpoint: `GET /internal/apm/dependencies/operations/spans`, params: { query: { - backendName, + dependencyName, start: new Date(start).toISOString(), end: new Date(end).toISOString(), environment, @@ -51,12 +51,12 @@ export default function ApiTest({ getService }: FtrProviderContext) { } registry.when( - 'Top backend spans when data is not loaded', + 'Top dependency spans when data is not loaded', { config: 'basic', archives: [] }, () => { it('handles empty state', async () => { const { body, status } = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: '/_search', }); @@ -67,7 +67,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { ); registry.when( - 'Top backend spans when data is loaded', + 'Top dependency spans when data is loaded', { config: 'basic', archives: ['apm_mappings_only_8.0.0'] }, () => { const javaInstance = apm.service('java', 'production', 'java').instance('instance-a'); @@ -126,7 +126,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('without a kuery or environment', () => { it('returns the correct spans for the requested spanName', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: '/_search', }); @@ -170,7 +170,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with a kuery', () => { it('returns the correct spans for the requested spanName', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: '/_search', kuery: 'service.name:go', }); @@ -192,7 +192,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with an environment', () => { it('returns the correct spans for the requested spanName', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: '/_search', environment: 'development', }); @@ -214,7 +214,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('when requesting spans without a transaction', () => { it('should return the spans without transaction metadata', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: 'without transaction', }); @@ -242,7 +242,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('when requesting spans within a specific sample range', () => { it('returns only spans whose duration falls into the requested range', async () => { const response = await callApi({ - backendName: 'elasticsearch', + dependencyName: 'elasticsearch', spanName: '/_search', sampleRangeFrom: 50000, sampleRangeTo: 99999, diff --git a/x-pack/test/apm_api_integration/tests/dependencies/upstream_services.spec.ts b/x-pack/test/apm_api_integration/tests/dependencies/upstream_services.spec.ts index 6822048e4e685..2d3a51054541b 100644 --- a/x-pack/test/apm_api_integration/tests/dependencies/upstream_services.spec.ts +++ b/x-pack/test/apm_api_integration/tests/dependencies/upstream_services.spec.ts @@ -15,14 +15,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { const registry = getService('registry'); const start = new Date('2021-01-01T00:00:00.000Z').getTime(); const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; - const backendName = 'elasticsearch'; + const dependencyName = 'elasticsearch'; async function callApi() { return await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/backends/upstream_services', + endpoint: 'GET /internal/apm/dependencies/upstream_services', params: { query: { - backendName, + dependencyName, environment: 'production', kuery: '', numBuckets: 20, diff --git a/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/generate_data.ts b/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/generate_data.ts new file mode 100644 index 0000000000000..e84021771cf9c --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/generate_data.ts @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { apm, timerange } from '@elastic/apm-synthtrace'; +import type { ApmSynthtraceEsClient } from '@elastic/apm-synthtrace'; + +export const config = { + firstTransaction: { + name: 'GET /apple 🍎 ', + successRate: 75, + failureRate: 25, + }, + secondTransaction: { + name: 'GET /banana 🍌', + successRate: 50, + failureRate: 50, + }, +}; + +export async function generateData({ + synthtraceEsClient, + serviceName, + start, + end, +}: { + synthtraceEsClient: ApmSynthtraceEsClient; + serviceName: string; + start: number; + end: number; +}) { + const serviceGoProdInstance = apm.service(serviceName, 'production', 'go').instance('instance-a'); + + const interval = '1m'; + + const { firstTransaction, secondTransaction } = config; + + const documents = [firstTransaction, secondTransaction].map((transaction) => { + return timerange(start, end) + .interval(interval) + .rate(transaction.successRate) + .generator((timestamp) => + serviceGoProdInstance + .transaction(transaction.name) + .timestamp(timestamp) + .duration(1000) + .success() + ) + .merge( + timerange(start, end) + .interval(interval) + .rate(transaction.failureRate) + .generator((timestamp) => + serviceGoProdInstance + .transaction(transaction.name) + .errors( + serviceGoProdInstance + .error('Error 1', transaction.name, 'Error test') + .timestamp(timestamp) + ) + .duration(1000) + .timestamp(timestamp) + .failure() + ) + ); + }); + + await synthtraceEsClient.index(documents); +} diff --git a/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts b/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts new file mode 100644 index 0000000000000..8e8078e00ab7a --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts @@ -0,0 +1,211 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { + APIClientRequestParamsOf, + APIReturnType, +} from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; +import { sumBy, first, last } from 'lodash'; +import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; +import { FtrProviderContext } from '../../../common/ftr_provider_context'; +import { config, generateData } from './generate_data'; + +type ErroneousTransactions = + APIReturnType<'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions'>; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const synthtraceEsClient = getService('synthtraceEsClient'); + + const serviceName = 'synth-go'; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + + async function callApi( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions'>['params'] + > + ) { + const response = await apmApiClient.readUser({ + endpoint: + 'GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions', + params: { + path: { + serviceName, + groupId: 'test', + ...overrides?.path, + }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + kuery: '', + offset: undefined, + numBuckets: 15, + ...overrides?.query, + }, + }, + }); + return response; + } + + registry.when('when data is not loaded', { config: 'basic', archives: [] }, () => { + it('handles the empty state', async () => { + const response = await callApi(); + expect(response.status).to.be(200); + expect(response.body.topErroneousTransactions).to.be.empty(); + }); + }); + + registry.when( + 'when data is loaded', + { config: 'basic', archives: ['apm_mappings_only_8.0.0'] }, + () => { + const { + firstTransaction: { name: firstTransactionName, failureRate: firstTransactionFailureRate }, + secondTransaction: { + name: secondTransactionName, + failureRate: secondTransactionFailureRate, + }, + } = config; + + describe('returns the correct data', () => { + before(async () => { + await generateData({ serviceName, start, end, synthtraceEsClient }); + }); + + after(() => synthtraceEsClient.clean()); + + describe('without comparison', () => { + const numberOfBuckets = 15; + let erroneousTransactions: ErroneousTransactions; + + before(async () => { + const response = await callApi({ + path: { groupId: '0000000000000000000000Error test' }, + }); + erroneousTransactions = response.body; + }); + + it('displays the correct number of occurrences', () => { + const { topErroneousTransactions } = erroneousTransactions; + expect(topErroneousTransactions.length).to.be(2); + + const firstTransaction = topErroneousTransactions.find( + (x) => x.transactionName === firstTransactionName + ); + expect(firstTransaction).to.not.be(undefined); + expect(firstTransaction?.occurrences).to.be( + firstTransactionFailureRate * numberOfBuckets + ); + + const secondTransaction = topErroneousTransactions.find( + (x) => x.transactionName === secondTransactionName + ); + expect(secondTransaction).to.not.be(undefined); + expect(secondTransaction?.occurrences).to.be( + secondTransactionFailureRate * numberOfBuckets + ); + }); + + it('displays the correct number of occurrences in time series', () => { + const { topErroneousTransactions } = erroneousTransactions; + + const firstTransaction = topErroneousTransactions.find( + (x) => x.transactionName === firstTransactionName + ); + const firstErrorCount = sumBy(firstTransaction?.currentPeriodTimeseries, 'y'); + expect(firstErrorCount).to.be(firstTransactionFailureRate * numberOfBuckets); + + const secondTransaction = topErroneousTransactions.find( + (x) => x.transactionName === secondTransactionName + ); + const secondErrorCount = sumBy(secondTransaction?.currentPeriodTimeseries, 'y'); + expect(secondErrorCount).to.be(secondTransactionFailureRate * numberOfBuckets); + }); + }); + + describe('with comparison', () => { + describe('when there are data for the time periods', () => { + let erroneousTransactions: ErroneousTransactions; + + before(async () => { + const fiveMinutes = 5 * 60 * 1000; + const response = await callApi({ + path: { groupId: '0000000000000000000000Error test' }, + query: { + start: new Date(end - fiveMinutes).toISOString(), + end: new Date(end).toISOString(), + offset: '5m', + }, + }); + erroneousTransactions = response.body; + }); + + it('returns some data', () => { + const { topErroneousTransactions } = erroneousTransactions; + + const hasCurrentPeriodData = topErroneousTransactions[0].currentPeriodTimeseries.some( + ({ y }) => isFiniteNumber(y) + ); + + const hasPreviousPeriodData = + topErroneousTransactions[0].previousPeriodTimeseries.some(({ y }) => + isFiniteNumber(y) + ); + + expect(hasCurrentPeriodData).to.be(true); + expect(hasPreviousPeriodData).to.be(true); + }); + + it('has the same start time for both periods', () => { + const { topErroneousTransactions } = erroneousTransactions; + expect(first(topErroneousTransactions[0].currentPeriodTimeseries)?.x).to.be( + first(topErroneousTransactions[0].previousPeriodTimeseries)?.x + ); + }); + + it('has same end time for both periods', () => { + const { topErroneousTransactions } = erroneousTransactions; + expect(last(topErroneousTransactions[0].currentPeriodTimeseries)?.x).to.be( + last(topErroneousTransactions[0].previousPeriodTimeseries)?.x + ); + }); + + it('returns same number of buckets for both periods', () => { + const { topErroneousTransactions } = erroneousTransactions; + expect(topErroneousTransactions[0].currentPeriodTimeseries.length).to.be( + topErroneousTransactions[0].previousPeriodTimeseries.length + ); + }); + }); + + describe('when there are no data for the time period', () => { + it('returns an empty array', async () => { + const response = await callApi({ + path: { groupId: '0000000000000000000000Error test' }, + query: { + start: '2021-01-03T00:00:00.000Z', + end: '2021-01-03T00:15:00.000Z', + offset: '1d', + }, + }); + + const { + body: { topErroneousTransactions }, + } = response; + + expect(topErroneousTransactions).to.be.empty(); + }); + }); + }); + }); + } + ); +} diff --git a/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/generate_data.ts b/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/generate_data.ts new file mode 100644 index 0000000000000..ca93406af1770 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/generate_data.ts @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { apm, timerange } from '@elastic/apm-synthtrace'; +import type { ApmSynthtraceEsClient } from '@elastic/apm-synthtrace'; + +export const config = { + firstTransaction: { + name: 'GET /apple 🍎', + successRate: 75, + failureRate: 25, + }, + secondTransaction: { + name: 'GET /banana 🍌', + successRate: 50, + failureRate: 50, + }, +}; + +export async function generateData({ + synthtraceEsClient, + serviceName, + start, + end, +}: { + synthtraceEsClient: ApmSynthtraceEsClient; + serviceName: string; + start: number; + end: number; +}) { + const serviceGoProdInstance = apm.service(serviceName, 'production', 'go').instance('instance-a'); + + const interval = '1m'; + + const { firstTransaction, secondTransaction } = config; + + const documents = [firstTransaction, secondTransaction].map((transaction, index) => { + return timerange(start, end) + .interval(interval) + .rate(transaction.successRate) + .generator((timestamp) => + serviceGoProdInstance + .transaction(transaction.name) + .timestamp(timestamp) + .duration(1000) + .success() + ) + .merge( + timerange(start, end) + .interval(interval) + .rate(transaction.failureRate) + .generator((timestamp) => + serviceGoProdInstance + .transaction(transaction.name) + .errors( + serviceGoProdInstance + .error(`Error 1 transaction ${transaction.name}`) + .timestamp(timestamp), + serviceGoProdInstance + .error(`Error 2 transaction ${transaction.name}`) + .timestamp(timestamp) + ) + .duration(1000) + .timestamp(timestamp) + .failure() + ) + ); + }); + + await synthtraceEsClient.index(documents); +} diff --git a/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts b/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts new file mode 100644 index 0000000000000..75d3ba0624375 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts @@ -0,0 +1,111 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { + APIClientRequestParamsOf, + APIReturnType, +} from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; +import moment from 'moment'; +import { FtrProviderContext } from '../../../common/ftr_provider_context'; +import { config, generateData } from './generate_data'; + +type ErrorGroups = + APIReturnType<'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name'>['errorGroups']; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const synthtraceEsClient = getService('synthtraceEsClient'); + + const serviceName = 'synth-go'; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + + async function callApi( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name'>['params'] + > + ) { + return await apmApiClient.readUser({ + endpoint: + 'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name', + params: { + path: { serviceName, ...overrides?.path }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + kuery: '', + maxNumberOfErrorGroups: 5, + transactionType: 'request', + transactionName: '', + ...overrides?.query, + }, + }, + }); + } + + registry.when('when data is not loaded', { config: 'basic', archives: [] }, () => { + it('handles empty state', async () => { + const response = await callApi(); + expect(response.status).to.be(200); + expect(response.body.errorGroups).to.empty(); + }); + }); + + registry.when( + 'when data is loaded', + { config: 'basic', archives: ['apm_mappings_only_8.0.0'] }, + () => { + describe('top errors for transaction', () => { + const { + firstTransaction: { + name: firstTransactionName, + failureRate: firstTransactionFailureRate, + }, + } = config; + + before(async () => { + await generateData({ serviceName, start, end, synthtraceEsClient }); + }); + + after(() => synthtraceEsClient.clean()); + + describe('returns the correct data', () => { + let errorGroups: ErrorGroups; + before(async () => { + const response = await callApi({ query: { transactionName: firstTransactionName } }); + errorGroups = response.body.errorGroups; + }); + + it('returns correct number of errors and error data', () => { + const numberOfBuckets = 15; + + expect(errorGroups.length).to.equal(2); + + const firstErrorId = `Error 1 transaction ${firstTransactionName}`; + const firstError = errorGroups.find((x) => x.groupId === firstErrorId); + expect(firstError).to.not.be(undefined); + expect(firstError?.groupId).to.be(firstErrorId); + expect(firstError?.name).to.be(firstErrorId); + expect(firstError?.occurrences).to.be(firstTransactionFailureRate * numberOfBuckets); + expect(firstError?.lastSeen).to.be(moment(end).startOf('minute').valueOf()); + + const secondErrorId = `Error 2 transaction ${firstTransactionName}`; + const secondError = errorGroups.find((x) => x.groupId === secondErrorId); + expect(secondError).to.not.be(undefined); + expect(secondError?.groupId).to.be(secondErrorId); + expect(secondError?.name).to.be(secondErrorId); + expect(secondError?.occurrences).to.be(firstTransactionFailureRate * numberOfBuckets); + expect(secondError?.lastSeen).to.be(moment(end).startOf('minute').valueOf()); + }); + }); + }); + } + ); +} diff --git a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts index 347dad2295565..c755f93d3b450 100644 --- a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts +++ b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts @@ -12,7 +12,7 @@ import { ApmApiError, SupertestReturnType } from '../../common/apm_api_supertest import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata'; import { FtrProviderContext } from '../../common/ftr_provider_context'; -type BackendResponse = SupertestReturnType<'GET /internal/apm/service-map/backend'>; +type DependencyResponse = SupertestReturnType<'GET /internal/apm/service-map/dependency'>; type ServiceNodeResponse = SupertestReturnType<'GET /internal/apm/service-map/service/{serviceName}'>; type ServiceMapResponse = SupertestReturnType<'GET /internal/apm/service-map'>; @@ -101,14 +101,14 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) }); }); - describe('/internal/apm/service-map/backend', () => { - let response: BackendResponse; + describe('/internal/apm/service-map/dependency', () => { + let response: DependencyResponse; before(async () => { response = await apmApiClient.readUser({ - endpoint: `GET /internal/apm/service-map/backend`, + endpoint: `GET /internal/apm/service-map/dependency`, params: { query: { - backendName: 'postgres', + dependencyName: 'postgres', start: metadata.start, end: metadata.end, environment: 'ENVIRONMENT_ALL', @@ -371,14 +371,14 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) }); }); - describe('/internal/apm/service-map/backend', () => { - let response: BackendResponse; + describe('/internal/apm/service-map/dependency', () => { + let response: DependencyResponse; before(async () => { response = await apmApiClient.readUser({ - endpoint: `GET /internal/apm/service-map/backend`, + endpoint: `GET /internal/apm/service-map/dependency`, params: { query: { - backendName: 'postgresql', + dependencyName: 'postgresql', start: metadata.start, end: metadata.end, environment: 'ENVIRONMENT_ALL', @@ -416,14 +416,14 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) }); describe('With comparison', () => { - describe('/internal/apm/service-map/backend', () => { - let response: BackendResponse; + describe('/internal/apm/service-map/dependency', () => { + let response: DependencyResponse; before(async () => { response = await apmApiClient.readUser({ - endpoint: `GET /internal/apm/service-map/backend`, + endpoint: `GET /internal/apm/service-map/dependency`, params: { query: { - backendName: 'postgresql', + dependencyName: 'postgresql', start: metadata.start, end: metadata.end, environment: 'ENVIRONMENT_ALL', diff --git a/x-pack/test/apm_api_integration/tests/service_overview/dependencies/index.spec.ts b/x-pack/test/apm_api_integration/tests/service_overview/dependencies/index.spec.ts index af04672913038..c3d5dbf6fe61c 100644 --- a/x-pack/test/apm_api_integration/tests/service_overview/dependencies/index.spec.ts +++ b/x-pack/test/apm_api_integration/tests/service_overview/dependencies/index.spec.ts @@ -28,7 +28,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const { start, end } = archives[archiveName]; function getName(node: Node) { - return node.type === NodeType.service ? node.serviceName : node.backendName; + return node.type === NodeType.service ? node.serviceName : node.dependencyName; } registry.when( @@ -282,7 +282,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { throughput: roundNumber(postgres?.currentStats.throughput.value), errorRate: roundNumber(postgres?.currentStats.errorRate.value), impact: postgres?.currentStats.impact, - ...pick(postgres?.location, 'spanType', 'spanSubtype', 'backendName', 'type'), + ...pick(postgres?.location, 'spanType', 'spanSubtype', 'dependencyName', 'type'), }; const count = 1; @@ -292,8 +292,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(values).to.eql({ spanType: 'external', spanSubtype: 'http', - backendName: 'postgres', - type: 'backend', + dependencyName: 'postgres', + type: 'dependency', errorRate: roundNumber(errors / count), latency: roundNumber(sum / count), throughput: roundNumber(count / ((endTime - startTime) / 1000 / 60)), diff --git a/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.spec.ts b/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.spec.ts index dd582238d4dd4..c46750d0d9d99 100644 --- a/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.spec.ts +++ b/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.spec.ts @@ -7,7 +7,7 @@ import { apm, timerange } from '@elastic/apm-synthtrace'; import expect from '@kbn/expect'; import { meanBy, sumBy } from 'lodash'; -import { BackendNode, ServiceNode } from '@kbn/apm-plugin/common/connections'; +import { DependencyNode, ServiceNode } from '@kbn/apm-plugin/common/connections'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { roundNumber } from '../../utils'; @@ -19,51 +19,57 @@ export default function ApiTest({ getService }: FtrProviderContext) { const start = new Date('2021-01-01T00:00:00.000Z').getTime(); const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; - async function getThroughputValues(overrides?: { serviceName?: string; backendName?: string }) { + async function getThroughputValues(overrides?: { + serviceName?: string; + dependencyName?: string; + }) { const commonQuery = { start: new Date(start).toISOString(), end: new Date(end).toISOString(), environment: 'ENVIRONMENT_ALL', }; - const [topBackendsAPIResponse, backendThroughputChartAPIResponse, upstreamServicesApiResponse] = - await Promise.all([ - apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/top_backends`, - params: { - query: { - ...commonQuery, - numBuckets: 20, - kuery: '', - }, + const [ + topDependenciesAPIResponse, + dependencyThroughputChartAPIResponse, + upstreamServicesApiResponse, + ] = await Promise.all([ + apmApiClient.readUser({ + endpoint: `GET /internal/apm/dependencies/top_dependencies`, + params: { + query: { + ...commonQuery, + numBuckets: 20, + kuery: '', }, - }), - apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/charts/throughput`, - params: { - query: { - ...commonQuery, - backendName: overrides?.backendName || 'elasticsearch', - spanName: '', - searchServiceDestinationMetrics: false, - kuery: '', - }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/dependencies/charts/throughput`, + params: { + query: { + ...commonQuery, + dependencyName: overrides?.dependencyName || 'elasticsearch', + spanName: '', + searchServiceDestinationMetrics: false, + kuery: '', }, - }), - apmApiClient.readUser({ - endpoint: `GET /internal/apm/backends/upstream_services`, - params: { - query: { - ...commonQuery, - backendName: overrides?.backendName || 'elasticsearch', - numBuckets: 20, - offset: '1d', - kuery: '', - }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/dependencies/upstream_services`, + params: { + query: { + ...commonQuery, + dependencyName: overrides?.dependencyName || 'elasticsearch', + numBuckets: 20, + offset: '1d', + kuery: '', }, - }), - ]); - const backendThroughputChartMean = roundNumber( - meanBy(backendThroughputChartAPIResponse.body.currentTimeseries, 'y') + }, + }), + ]); + const dependencyThroughputChartMean = roundNumber( + meanBy(dependencyThroughputChartAPIResponse.body.currentTimeseries, 'y') ); const upstreamServicesThroughput = upstreamServicesApiResponse.body.services.map( @@ -76,11 +82,11 @@ export default function ApiTest({ getService }: FtrProviderContext) { ); return { - topBackends: topBackendsAPIResponse.body.backends.map((item) => [ - (item.location as BackendNode).backendName, + topDependencies: topDependenciesAPIResponse.body.dependencies.map((item) => [ + (item.location as DependencyNode).dependencyName, roundNumber(item.currentStats.throughput.value), ]), - backendThroughputChartMean, + dependencyThroughputChartMean, upstreamServicesThroughput, }; } @@ -166,34 +172,34 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); it('returns elasticsearch and postgresql as dependencies', () => { - const { topBackends } = throughputValues; - const topBackendsAsObj = Object.fromEntries(topBackends); - expect(topBackendsAsObj.elasticsearch).to.equal( + const { topDependencies } = throughputValues; + const topDependenciesAsObj = Object.fromEntries(topDependencies); + expect(topDependenciesAsObj.elasticsearch).to.equal( roundNumber(JAVA_PROD_RATE + GO_PROD_RATE) ); - expect(topBackendsAsObj.postgresql).to.equal(roundNumber(GO_PROD_RATE)); + expect(topDependenciesAsObj.postgresql).to.equal(roundNumber(GO_PROD_RATE)); }); }); describe('compare throughput value between top backends, backend throughput chart and upstream services apis', () => { describe('elasticsearch dependency', () => { before(async () => { - throughputValues = await getThroughputValues({ backendName: 'elasticsearch' }); + throughputValues = await getThroughputValues({ dependencyName: 'elasticsearch' }); }); it('matches throughput values between throughput chart and top dependency', () => { - const { topBackends, backendThroughputChartMean } = throughputValues; - const topBackendsAsObj = Object.fromEntries(topBackends); - const elasticsearchDependency = topBackendsAsObj.elasticsearch; - [elasticsearchDependency, backendThroughputChartMean].forEach((value) => + const { topDependencies, dependencyThroughputChartMean } = throughputValues; + const topDependenciesAsObj = Object.fromEntries(topDependencies); + const elasticsearchDependency = topDependenciesAsObj.elasticsearch; + [elasticsearchDependency, dependencyThroughputChartMean].forEach((value) => expect(value).to.be.equal(roundNumber(JAVA_PROD_RATE + GO_PROD_RATE)) ); }); it('matches throughput values between upstream services and top dependency', () => { - const { topBackends, upstreamServicesThroughput } = throughputValues; - const topBackendsAsObj = Object.fromEntries(topBackends); - const elasticsearchDependency = topBackendsAsObj.elasticsearch; + const { topDependencies, upstreamServicesThroughput } = throughputValues; + const topDependenciesAsObj = Object.fromEntries(topDependencies); + const elasticsearchDependency = topDependenciesAsObj.elasticsearch; const upstreamServiceThroughputSum = roundNumber( sumBy(upstreamServicesThroughput, 'throughput') ); @@ -204,22 +210,22 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); describe('postgresql dependency', () => { before(async () => { - throughputValues = await getThroughputValues({ backendName: 'postgresql' }); + throughputValues = await getThroughputValues({ dependencyName: 'postgresql' }); }); it('matches throughput values between throughput chart and top dependency', () => { - const { topBackends, backendThroughputChartMean } = throughputValues; - const topBackendsAsObj = Object.fromEntries(topBackends); - const postgresqlDependency = topBackendsAsObj.postgresql; - [postgresqlDependency, backendThroughputChartMean].forEach((value) => + const { topDependencies, dependencyThroughputChartMean } = throughputValues; + const topDependenciesAsObj = Object.fromEntries(topDependencies); + const postgresqlDependency = topDependenciesAsObj.postgresql; + [postgresqlDependency, dependencyThroughputChartMean].forEach((value) => expect(value).to.be.equal(roundNumber(GO_PROD_RATE)) ); }); it('matches throughput values between upstream services and top dependency', () => { - const { topBackends, upstreamServicesThroughput } = throughputValues; - const topBackendsAsObj = Object.fromEntries(topBackends); - const postgresqlDependency = topBackendsAsObj.postgresql; + const { topDependencies, upstreamServicesThroughput } = throughputValues; + const topDependenciesAsObj = Object.fromEntries(topDependencies); + const postgresqlDependency = topDependenciesAsObj.postgresql; const upstreamServiceThroughputSum = roundNumber( sumBy(upstreamServicesThroughput, 'throughput') ); diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/kibana.json b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/kibana.json similarity index 88% rename from x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/kibana.json rename to x-pack/test/cases_api_integration/common/fixtures/plugins/cases/kibana.json index 950e3b23f6a34..70b86286bb6b9 100644 --- a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/kibana.json +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/kibana.json @@ -1,5 +1,5 @@ { - "id": "casesClientUserFixture", + "id": "casesFixture", "owner": { "githubTeam": "response-ops", "name": "ResponseOps" diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/package.json b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/package.json similarity index 70% rename from x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/package.json rename to x-pack/test/cases_api_integration/common/fixtures/plugins/cases/package.json index d396141fb0059..a9e25c9dc2cbe 100644 --- a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/package.json +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/package.json @@ -1,11 +1,11 @@ { - "name": "cases-client-user-fixture", + "name": "cases-fixture", "version": "1.0.0", "kibana": { "version": "kibana", "templateVersion": "1.0.0" }, - "main": "target/test/plugin_api_integration/plugins/cases_client_user_fixture", + "main": "target/test/plugin_api_integration/plugins/cases_fixture", "scripts": { "kbn": "node ../../../../../../../scripts/kbn.js", "build": "rm -rf './target' && ../../../../../../../node_modules/.bin/tsc" diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/external_reference.ts b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/external_reference.ts new file mode 100644 index 0000000000000..a54f586b4c3e3 --- /dev/null +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/external_reference.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ExternalReferenceAttachmentType } from '@kbn/cases-plugin/server/attachment_framework/types'; + +export const getExternalReferenceAttachment = (): ExternalReferenceAttachmentType => ({ + id: '.test', +}); diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/attachments/persistable_state.ts b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/persistable_state.ts similarity index 92% rename from x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/attachments/persistable_state.ts rename to x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/persistable_state.ts index 065137302acb7..4bb043c41ddb5 100644 --- a/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/attachments/persistable_state.ts +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/attachments/persistable_state.ts @@ -10,7 +10,7 @@ import { PersistableStateAttachmentTypeSetup, } from '@kbn/cases-plugin/server/attachment_framework/types'; -export const getPersistableAttachment = (): PersistableStateAttachmentTypeSetup => ({ +export const getPersistableStateAttachment = (): PersistableStateAttachmentTypeSetup => ({ id: '.test', inject: (state, references) => ({ ...state, diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/server/index.ts b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/index.ts similarity index 100% rename from x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/server/index.ts rename to x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/index.ts diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/server/plugin.ts b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/plugin.ts similarity index 83% rename from x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/server/plugin.ts rename to x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/plugin.ts index ea42b988d2f26..8fc826581dda6 100644 --- a/x-pack/test/cases_api_integration/common/fixtures/plugins/cases_client_user/server/plugin.ts +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/plugin.ts @@ -13,9 +13,13 @@ import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import { SecurityPluginStart } from '@kbn/security-plugin/server'; import { PluginStartContract as CasesPluginStart } from '@kbn/cases-plugin/server'; import { CasesPatchRequest } from '@kbn/cases-plugin/common/api'; +import { PluginSetupContract as CasesSetup } from '@kbn/cases-plugin/server/types'; +import { getPersistableStateAttachment } from './attachments/persistable_state'; +import { getExternalReferenceAttachment } from './attachments/external_reference'; export interface FixtureSetupDeps { features: FeaturesPluginSetup; + cases: CasesSetup; } export interface FixtureStartDeps { @@ -32,6 +36,9 @@ export class FixturePlugin implements Plugin<void, void, FixtureSetupDeps, Fixtu } public setup(core: CoreSetup<FixtureStartDeps>, deps: FixtureSetupDeps) { + deps.cases.attachmentFramework.registerExternalReference(getExternalReferenceAttachment()); + deps.cases.attachmentFramework.registerPersistableState(getPersistableStateAttachment()); + const router = core.http.createRouter(); /** * This simply wraps the cases patch case api so that we can test updating the status of an alert using diff --git a/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/server/plugin.ts b/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/server/plugin.ts index 347c69982e423..7fd45bb883f2f 100644 --- a/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/server/plugin.ts +++ b/x-pack/test/cases_api_integration/common/fixtures/plugins/security_solution/server/plugin.ts @@ -10,12 +10,9 @@ import { Plugin, CoreSetup } from '@kbn/core/server'; import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import { SecurityPluginStart } from '@kbn/security-plugin/server'; -import { PluginSetupContract as CasesPluginSetup } from '@kbn/cases-plugin/server'; -import { getPersistableAttachment } from '../attachments/persistable_state'; export interface FixtureSetupDeps { features: FeaturesPluginSetup; - cases: CasesPluginSetup; } export interface FixtureStartDeps { @@ -25,9 +22,7 @@ export interface FixtureStartDeps { export class FixturePlugin implements Plugin<void, void, FixtureSetupDeps, FixtureStartDeps> { public setup(core: CoreSetup<FixtureStartDeps>, deps: FixtureSetupDeps) { - const { features, cases } = deps; - - cases.attachmentFramework.registerPersistableState(getPersistableAttachment()); + const { features } = deps; features.registerKibanaFeature({ id: 'securitySolutionFixture', diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/external_references.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/external_references.ts index e831cd3c8f496..9490504e09d00 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/external_references.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/external_references.ts @@ -38,6 +38,10 @@ export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); const es = getService('es'); + /** + * Attachment types are being registered in + * x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/plugin.ts + */ describe('External references', () => { afterEach(async () => { await deleteAllCaseItems(es); @@ -455,5 +459,15 @@ export default ({ getService }: FtrProviderContext): void => { expectedHttpCode: 400, }); }); + + it('400s when creating a non registered external reference attachment type', async () => { + const postedCase = await createCase(supertest, postCaseReq); + await createComment({ + supertest, + caseId: postedCase.id, + params: { ...postExternalReferenceSOReq, externalReferenceAttachmentTypeId: 'not-exists' }, + expectedHttpCode: 400, + }); + }); }); }; diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/persistable_state.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/persistable_state.ts index c91aaa6953c7f..ce2cffac13cb3 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/persistable_state.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/attachments_framework/persistable_state.ts @@ -39,6 +39,10 @@ export default ({ getService }: FtrProviderContext): void => { const es = getService('es'); const kibanaServer = getService('kibanaServer'); + /** + * Attachment types are being registered in + * x-pack/test/cases_api_integration/common/fixtures/plugins/cases/server/plugin.ts + */ describe('Persistable state attachments', () => { describe('references', () => { afterEach(async () => { @@ -247,6 +251,16 @@ export default ({ getService }: FtrProviderContext): void => { expectedHttpCode: 400, }); }); + + it('400s when creating a non registered persistable state attachment type', async () => { + const postedCase = await createCase(supertest, postCaseReq); + await createComment({ + supertest, + caseId: postedCase.id, + params: { ...persistableStateAttachment, persistableStateAttachmentTypeId: 'not-exists' }, + expectedHttpCode: 400, + }); + }); }); describe('Migrations', () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts index f7a96c2f496d8..cb61f90aec33c 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/index.ts @@ -41,6 +41,7 @@ export default ({ loadTestFile }: FtrProviderContext): void => { loadTestFile(require.resolve('./update_rules_bulk')); loadTestFile(require.resolve('./patch_rules_bulk')); loadTestFile(require.resolve('./perform_bulk_action')); + loadTestFile(require.resolve('./perform_bulk_action_dry_run')); loadTestFile(require.resolve('./patch_rules')); loadTestFile(require.resolve('./read_privileges')); loadTestFile(require.resolve('./open_close_signals')); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action_dry_run.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action_dry_run.ts new file mode 100644 index 0000000000000..429b34f3f0a54 --- /dev/null +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action_dry_run.ts @@ -0,0 +1,242 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from 'expect'; + +import { + DETECTION_ENGINE_RULES_BULK_ACTION, + DETECTION_ENGINE_RULES_URL, +} from '@kbn/security-solution-plugin/common/constants'; +import { + BulkAction, + BulkActionEditType, +} from '@kbn/security-solution-plugin/common/detection_engine/schemas/common/schemas'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { + createRule, + createSignalsIndex, + deleteAllAlerts, + deleteSignalsIndex, + getSimpleRule, + installPrePackagedRules, + getSimpleMlRule, +} from '../../utils'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + const log = getService('log'); + + const postDryRunBulkAction = () => + supertest + .post(DETECTION_ENGINE_RULES_BULK_ACTION) + .set('kbn-xsrf', 'true') + .query({ dry_run: true }); + + const fetchRule = (ruleId: string) => + supertest.get(`${DETECTION_ENGINE_RULES_URL}?rule_id=${ruleId}`).set('kbn-xsrf', 'true'); + + const findRules = () => + supertest.get(`${DETECTION_ENGINE_RULES_URL}/_find`).set('kbn-xsrf', 'true'); + + describe('perform_bulk_action dry_run', () => { + beforeEach(async () => { + await createSignalsIndex(supertest, log); + }); + + afterEach(async () => { + await deleteSignalsIndex(supertest, log); + await deleteAllAlerts(supertest, log); + }); + + it('should not support export action', async () => { + await createRule(supertest, log, getSimpleRule()); + + const { body } = await postDryRunBulkAction().send({ action: BulkAction.export }).expect(400); + + expect(body).toEqual({ + message: "Export action doesn't support dry_run mode", + status_code: 400, + }); + }); + + it('should handle delete action', async () => { + const ruleId = 'ruleId'; + const testRule = getSimpleRule(ruleId); + await createRule(supertest, log, testRule); + + const { body } = await postDryRunBulkAction().send({ action: BulkAction.delete }).expect(200); + + expect(body.attributes.summary).toEqual({ failed: 0, succeeded: 1, total: 1 }); + // dry_run mode shouldn't return any rules in results + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + // Check that rule wasn't deleted + await fetchRule(ruleId).expect(200); + }); + + it('should handle enable action', async () => { + const ruleId = 'ruleId'; + await createRule(supertest, log, getSimpleRule(ruleId)); + + const { body } = await postDryRunBulkAction().send({ action: BulkAction.enable }).expect(200); + + expect(body.attributes.summary).toEqual({ failed: 0, succeeded: 1, total: 1 }); + // dry_run mode shouldn't return any rules in results + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + // Check that the updates have not been persisted + const { body: ruleBody } = await fetchRule(ruleId).expect(200); + expect(ruleBody.enabled).toBe(false); + }); + + it('should handle disable action', async () => { + const ruleId = 'ruleId'; + await createRule(supertest, log, getSimpleRule(ruleId, true)); + + const { body } = await postDryRunBulkAction() + .send({ action: BulkAction.disable }) + .expect(200); + + expect(body.attributes.summary).toEqual({ failed: 0, succeeded: 1, total: 1 }); + // dry_run mode shouldn't return any rules in results + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + // Check that the updates have not been persisted + const { body: ruleBody } = await fetchRule(ruleId).expect(200); + expect(ruleBody.enabled).toBe(true); + }); + + it('should handle duplicate action', async () => { + const ruleId = 'ruleId'; + const ruleToDuplicate = getSimpleRule(ruleId); + await createRule(supertest, log, ruleToDuplicate); + + const { body } = await postDryRunBulkAction() + .send({ action: BulkAction.disable }) + .expect(200); + + expect(body.attributes.summary).toEqual({ failed: 0, succeeded: 1, total: 1 }); + // dry_run mode shouldn't return any rules in results + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + // Check that the rule wasn't duplicated + const { body: rulesResponse } = await findRules().expect(200); + + expect(rulesResponse.total).toBe(1); + }); + + describe('edit action', () => { + it('should handle edit action', async () => { + const ruleId = 'ruleId'; + const tags = ['tag1', 'tag2']; + await createRule(supertest, log, { ...getSimpleRule(ruleId), tags }); + + const { body } = await postDryRunBulkAction() + .send({ + action: BulkAction.edit, + [BulkAction.edit]: [ + { + type: BulkActionEditType.set_tags, + value: ['reset-tag'], + }, + ], + }) + .expect(200); + + expect(body.attributes.summary).toEqual({ failed: 0, succeeded: 1, total: 1 }); + // dry_run mode shouldn't return any rules in results + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + // Check that the updates have not been persisted + const { body: ruleBody } = await fetchRule(ruleId).expect(200); + expect(ruleBody.tags).toEqual(tags); + }); + + it('should validate immutable rule edit', async () => { + await installPrePackagedRules(supertest, log); + const { body: findBody } = await findRules() + .query({ per_page: 1, filter: 'alert.attributes.params.immutable: true' }) + .send() + .expect(200); + + const immutableRule = findBody.data[0]; + + const { body } = await postDryRunBulkAction() + .send({ + ids: [immutableRule.id], + action: BulkAction.edit, + [BulkAction.edit]: [ + { + type: BulkActionEditType.set_tags, + value: ['reset-tag'], + }, + ], + }) + .expect(500); + + expect(body.attributes.summary).toEqual({ failed: 1, succeeded: 0, total: 1 }); + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + expect(body.attributes.errors).toHaveLength(1); + expect(body.attributes.errors[0]).toEqual({ + err_code: 'IMMUTABLE', + message: "Elastic rule can't be edited", + status_code: 500, + rules: [ + { + id: immutableRule.id, + name: immutableRule.name, + }, + ], + }); + }); + + describe('validate updating index pattern for machine learning rule', () => { + const actions = [ + BulkActionEditType.add_index_patterns, + BulkActionEditType.set_index_patterns, + BulkActionEditType.delete_index_patterns, + ]; + + actions.forEach((editAction) => { + it(`should return error if ${editAction} action is applied to machine learning rule`, async () => { + const mlRule = await createRule(supertest, log, getSimpleMlRule()); + + const { body } = await postDryRunBulkAction() + .send({ + ids: [mlRule.id], + action: BulkAction.edit, + [BulkAction.edit]: [ + { + type: editAction, + value: [], + }, + ], + }) + .expect(500); + + expect(body.attributes.summary).toEqual({ failed: 1, succeeded: 0, total: 1 }); + expect(body.attributes.results).toEqual({ updated: [], created: [], deleted: [] }); + + expect(body.attributes.errors).toHaveLength(1); + expect(body.attributes.errors[0]).toEqual({ + err_code: 'MACHINE_LEARNING_INDEX_PATTERN', + message: "Machine learning rule doesn't have index patterns", + status_code: 500, + rules: [ + { + id: mlRule.id, + name: mlRule.name, + }, + ], + }); + }); + }); + }); + }); + }); +}; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword.ts index 1e004c259e441..e73a942ab69d5 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword.ts @@ -593,5 +593,173 @@ export default ({ getService }: FtrProviderContext) => { expect(hits).to.eql(['word four', 'word one', 'word three', 'word two']); }); }); + + describe('"matches wildcard" operator', () => { + it('should return 0 alerts if wildcard matches all words', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + // Filter out all 4 words + value: 'word *', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([]); + }); + + it('should return 1 alert if wildcard exceptions match one, two, and three', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + value: 'word one', + }, + ], + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + // Filter out both "word two" and "word three" + value: 'word t*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 1, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word four']); + }); + + it('should return 3 alerts if one is set as an exception', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + // Without * or ? in the value, it should work the same as the "is" operator + value: 'word one', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 3, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word four', 'word three', 'word two']); + }); + + it('should return 4 alerts if the wildcard matches nothing', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + value: 'word a*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 4, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word four', 'word one', 'word three', 'word two']); + }); + }); + + describe('"does not match wildcard" operator', () => { + it('should return 4 results if excluded wildcard matches all 4 words', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + // Filter out everything except things matching 'word *' + value: 'word *', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 4, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word four', 'word one', 'word three', 'word two']); + }); + + it('should filter in 2 keywords if using a wildcard exception', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + // Filter out everything except things matching 'word t*' + value: 'word t*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 2, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word three', 'word two']); + }); + + it('should return 1 alert if "word one" is excluded', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + // Without * or ? in the value, it should work the same as the "is not" operator + value: 'word one', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 1, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql(['word one']); + }); + + it('should return 0 alerts if it cannot find what it is excluding', async () => { + const rule = getRuleForSignalTesting(['keyword']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + value: 'word a*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([]); + }); + }); }); }; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword_array.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword_array.ts index b43cc818ec01d..3aff8c152a9a6 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword_array.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group8/exception_operators_data_types/keyword_array.ts @@ -633,5 +633,134 @@ export default ({ getService }: FtrProviderContext) => { ]); }); }); + + describe('"matches wildcard" operator', () => { + it('should filter 1 single keyword if it is set as an exception', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + value: 'word o*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 3, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([ + [], + ['word eight', 'word nine', 'word ten'], + ['word five', null, 'word six', 'word seven'], + ]); + }); + + it('should filter 2 keyword if both are set as exceptions', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + value: 'word t*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 2, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([[], ['word five', null, 'word six', 'word seven']]); + }); + + it('should filter 3 keyword if all 3 are set as exceptions', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'included', + type: 'wildcard', + value: 'word *', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 1, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits.flat(Number.MAX_SAFE_INTEGER)).to.eql([]); + }); + }); + + describe('"does not match wildcard" operator', () => { + it('should filter 1 single keyword if it is set as an exception', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + value: 'word o*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 1, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([['word one', 'word two', 'word three', 'word four']]); + }); + + it('should filter 2 keyword if both are set as exceptions', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + value: 'word t*', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 2, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([ + ['word eight', 'word nine', 'word ten'], + ['word one', 'word two', 'word three', 'word four'], + ]); + }); + + it('should filter 3 keyword if all 3 are set as exceptions', async () => { + const rule = getRuleForSignalTesting(['keyword_as_array']); + const { id } = await createRuleWithExceptionEntries(supertest, log, rule, [ + [ + { + field: 'keyword', + operator: 'excluded', + type: 'wildcard', + value: 'word *', + }, + ], + ]); + await waitForRuleSuccessOrStatus(supertest, log, id); + await waitForSignalsToBePresent(supertest, log, 3, [id]); + const signalsOpen = await getSignalsById(supertest, log, id); + const hits = signalsOpen.hits.hits.map((hit) => hit._source?.keyword).sort(); + expect(hits).to.eql([ + ['word eight', 'word nine', 'word ten'], + ['word five', null, 'word six', 'word seven'], + ['word one', 'word two', 'word three', 'word four'], + ]); + }); + }); }); }; diff --git a/x-pack/test/examples/config.ts b/x-pack/test/examples/config.ts index fe01c4ecf0e44..3f6c1c920acad 100644 --- a/x-pack/test/examples/config.ts +++ b/x-pack/test/examples/config.ts @@ -39,6 +39,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('./embedded_lens'), require.resolve('./reporting_examples'), require.resolve('./screenshotting'), + require.resolve('./triggers_actions_ui_examples'), ], kbnTestServer: { diff --git a/x-pack/test/examples/triggers_actions_ui_examples/index.ts b/x-pack/test/examples/triggers_actions_ui_examples/index.ts new file mode 100644 index 0000000000000..299b9c06c7154 --- /dev/null +++ b/x-pack/test/examples/triggers_actions_ui_examples/index.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default ({ loadTestFile, getService }: FtrProviderContext) => { + describe('Triggers Actions UI Example', function () { + loadTestFile(require.resolve('./rule_status_dropdown')); + loadTestFile(require.resolve('./rule_tag_filter')); + loadTestFile(require.resolve('./rule_status_filter')); + loadTestFile(require.resolve('./rule_tag_badge')); + loadTestFile(require.resolve('./rule_event_log_list')); + loadTestFile(require.resolve('./rules_list')); + }); +}; diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_event_log_list.ts b/x-pack/test/examples/triggers_actions_ui_examples/rule_event_log_list.ts similarity index 77% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_event_log_list.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rule_event_log_list.ts index 003e7c24545f2..2a2832e21aa75 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_event_log_list.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rule_event_log_list.ts @@ -6,20 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); describe('Rule event log list', function () { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rule_event_log_list'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_dropdown.ts b/x-pack/test/examples/triggers_actions_ui_examples/rule_status_dropdown.ts similarity index 84% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_dropdown.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rule_status_dropdown.ts index b594d88a25689..9cbf5556260e4 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_dropdown.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rule_status_dropdown.ts @@ -6,22 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); - // const retry = getService('retry'); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); - // const find = getService('find'); describe('Rule status dropdown', function () { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rule_status_dropdown'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_filter.ts b/x-pack/test/examples/triggers_actions_ui_examples/rule_status_filter.ts similarity index 82% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_filter.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rule_status_filter.ts index 591aee70f375c..9129dcf2e8570 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_status_filter.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rule_status_filter.ts @@ -6,21 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); - // FLAKY: https://github.com/elastic/kibana/issues/132736 - describe.skip('Rule status filter', () => { + describe('Rule status filter', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rule_status_filter'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_badge.ts b/x-pack/test/examples/triggers_actions_ui_examples/rule_tag_badge.ts similarity index 77% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_badge.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rule_tag_badge.ts index a5fd0aaef4128..81fef57bcca6d 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_badge.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rule_tag_badge.ts @@ -6,21 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); - // Failing: See https://github.com/elastic/kibana/issues/132739 - describe.skip('Rule tag badge', () => { + describe('Rule tag badge', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rule_tag_badge'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_filter.ts b/x-pack/test/examples/triggers_actions_ui_examples/rule_tag_filter.ts similarity index 77% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_filter.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rule_tag_filter.ts index 15ea8fc302622..0deac01653106 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rule_tag_filter.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rule_tag_filter.ts @@ -6,20 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); describe('Rule tag filter', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rule_tag_filter'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list.ts b/x-pack/test/examples/triggers_actions_ui_examples/rules_list.ts similarity index 77% rename from x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list.ts rename to x-pack/test/examples/triggers_actions_ui_examples/rules_list.ts index 30baba0caaa08..e9952892174d6 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list.ts +++ b/x-pack/test/examples/triggers_actions_ui_examples/rules_list.ts @@ -6,20 +6,18 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../test/functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); + const PageObjects = getPageObjects(['common']); const esArchiver = getService('esArchiver'); describe('Rules list', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); - await PageObjects.common.navigateToUrlWithBrowserHistory( - 'triggersActions', - '/__components_sandbox' - ); + await PageObjects.common.navigateToApp('triggersActionsUiExample/rules_list'); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); diff --git a/x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts b/x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts index 16ea3eb2b0b62..2de75be2e50b0 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts @@ -126,6 +126,45 @@ export default function (providerContext: FtrProviderContext) { }) .expect(403); }); + + it('should not update tags of hosted agent', async () => { + // move agent2 to policy2 to keep it regular + await supertest.put(`/api/fleet/agents/agent2/reassign`).set('kbn-xsrf', 'xxx').send({ + policy_id: 'policy2', + }); + // update enrolled policy to hosted + await supertest.put(`/api/fleet/agent_policies/policy1`).set('kbn-xsrf', 'xxxx').send({ + name: 'Test policy', + namespace: 'default', + is_managed: true, + }); + + // attempt to update tags of agent in hosted agent policy + const { body } = await supertest + .post(`/api/fleet/agents/bulk_update_agent_tags`) + .set('kbn-xsrf', 'xxx') + .send({ + tagsToAdd: ['newTag'], + agents: ['agent1', 'agent2'], + }) + .expect(200); + + expect(body).to.eql({ + agent1: { + success: false, + error: `Cannot modify tags on a hosted agent in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`, + }, + agent2: { success: true }, + }); + + const [agent1data, agent2data] = await Promise.all([ + supertest.get(`/api/fleet/agents/agent1`), + supertest.get(`/api/fleet/agents/agent2`), + ]); + + expect(agent1data.body.item.tags.includes('newTag')).to.be(false); + expect(agent2data.body.item.tags.includes('newTag')).to.be(true); + }); }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/agents/upgrade.ts b/x-pack/test/fleet_api_integration/apis/agents/upgrade.ts index 0499843415e64..03ef3c533dbab 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/upgrade.ts @@ -400,7 +400,7 @@ export default function (providerContext: FtrProviderContext) { expect(typeof agent2data.body.item.upgrade_started_at).to.be('undefined'); }); - it('should create a .fleet-actions document with the agents, version, and upgrade window', async () => { + it('should create a .fleet-actions document with the agents, version, and upgrade window when rollout_duration_seconds passed', async () => { await es.update({ id: 'agent1', refresh: 'wait_for', @@ -449,6 +449,55 @@ export default function (providerContext: FtrProviderContext) { expect(action.agents).contain('agent1'); expect(action.agents).contain('agent2'); }); + it('should create a .fleet-actions document with the agents, version, and start_time if start_time passed', async () => { + await es.update({ + id: 'agent1', + refresh: 'wait_for', + index: AGENTS_INDEX, + body: { + doc: { + local_metadata: { elastic: { agent: { upgradeable: true, version: '0.0.0' } } }, + }, + }, + }); + await es.update({ + id: 'agent2', + refresh: 'wait_for', + index: AGENTS_INDEX, + body: { + doc: { + local_metadata: { elastic: { agent: { upgradeable: true, version: '0.0.0' } } }, + }, + }, + }); + await supertest + .post(`/api/fleet/agents/bulk_upgrade`) + .set('kbn-xsrf', 'xxx') + .send({ + version: fleetServerVersion, + agents: ['agent1', 'agent2'], + start_time: '2022-07-14T08:54:46.987Z', + }) + .expect(200); + + const actionsRes = await es.search({ + index: '.fleet-actions', + body: { + sort: [{ '@timestamp': { order: 'desc' } }], + }, + }); + + const action: any = actionsRes.hits.hits[0]._source; + + expect(action).to.have.keys( + 'agents', + 'expiration', + 'start_time', + 'minimum_execution_duration' + ); + expect(action.agents).contain('agent1'); + expect(action.agents).contain('agent2'); + }); it('should allow to upgrade multiple upgradeable agents by kuery', async () => { await es.update({ diff --git a/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts b/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts index 34b7e14d26a1a..17ec741a73c30 100644 --- a/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts +++ b/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.saveDashboard(DASHBOARD_NAME); }); - describe('panel titles - by value', () => { + describe('by value', () => { it('new panel by value has empty title', async () => { await PageObjects.lens.createAndAddLensFromDashboard({}); const newPanelTitle = (await PageObjects.dashboard.getPanelTitles())[0]; @@ -103,7 +103,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('panel titles - by reference', () => { + describe('by reference', () => { it('linking a by value panel with a custom title to the library will overwrite the custom title with the library title', async () => { await dashboardPanelActions.setCustomPanelTitle(CUSTOM_TITLE); await dashboardPanelActions.saveToLibrary(LIBRARY_TITLE_FOR_CUSTOM_TESTS); diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts index 5703b3872d32f..e25920ab7bb0a 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts @@ -130,20 +130,23 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); describe('space with Visualize disabled', () => { + const customSpace = 'custom_space'; before(async () => { // we need to load the following in every situation as deleting // a space deletes all of the associated saved objects - await esArchiver.load('x-pack/test/functional/es_archives/spaces/disabled_features'); await spacesService.create({ - id: 'custom_space', - name: 'custom_space', + id: customSpace, + name: customSpace, disabledFeatures: ['visualize'], }); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/custom_space', + { space: customSpace } + ); }); after(async () => { - await spacesService.delete('custom_space'); - await esArchiver.unload('x-pack/test/functional/es_archives/spaces/disabled_features'); + await spacesService.delete(customSpace); }); it('Does not show the "visualize" field button', async () => { diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts index 50bf465425f54..2bddf0a7d9512 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts @@ -268,8 +268,7 @@ export default function ({ getService }: FtrProviderContext) { }); for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/132399 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { before(async () => { await ml.navigation.navigateToMl(); await ml.navigation.navigateToDataFrameAnalytics(); diff --git a/x-pack/test/functional/apps/visualize/hybrid_visualization.ts b/x-pack/test/functional/apps/visualize/hybrid_visualization.ts index 38af8ab61cf93..223d4cd571dc1 100644 --- a/x-pack/test/functional/apps/visualize/hybrid_visualization.ts +++ b/x-pack/test/functional/apps/visualize/hybrid_visualization.ts @@ -11,18 +11,25 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'visChart']); const inspector = getService('inspector'); + const kibanaServer = getService('kibanaServer'); describe('hybrid index pattern', () => { before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/hybrid/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/hybrid_dataview.json' + ); await esArchiver.load('x-pack/test/functional/es_archives/hybrid/logstash'); await esArchiver.load('x-pack/test/functional/es_archives/hybrid/rollup'); }); after(async () => { - await esArchiver.unload('x-pack/test/functional/es_archives/hybrid/kibana'); + await kibanaServer.importExport.unload( + 'x-pack/test/functional/fixtures/kbn_archiver/hybrid_dataview.json' + ); await esArchiver.unload('x-pack/test/functional/es_archives/hybrid/logstash'); await esArchiver.unload('x-pack/test/functional/es_archives/hybrid/rollup'); + await kibanaServer.savedObjects.cleanStandardList(); await PageObjects.common.unsetTime(); }); diff --git a/x-pack/test/functional/es_archives/hybrid/kibana/data.json.gz b/x-pack/test/functional/es_archives/hybrid/kibana/data.json.gz deleted file mode 100644 index a0d7ab8eb49cf..0000000000000 Binary files a/x-pack/test/functional/es_archives/hybrid/kibana/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/hybrid/kibana/mappings.json b/x-pack/test/functional/es_archives/hybrid/kibana/mappings.json deleted file mode 100644 index af4ee5ed1e46f..0000000000000 --- a/x-pack/test/functional/es_archives/hybrid/kibana/mappings.json +++ /dev/null @@ -1,1029 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": { - } - }, - "index": ".kibana_1", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "action": "ecc01e367a369542bc2b15dae1fb1773", - "action_task_params": "a9d49f184ee89641044be0ca2950fa3a", - "alert": "8d6004ab7d09d887a873861a35c32838", - "apm-telemetry": "07ee1939fa4302c62ddc052ec03fed90", - "canvas-element": "7390014e1091044523666d97247392fc", - "canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231", - "config": "87aca8fdb053154f11383fce3dbf3edf", - "dashboard": "d00f614b29a80360e1190193fd333bab", - "file-upload-telemetry": "0ed4d3e1983d1217a30982630897092e", - "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", - "index-pattern": "66eccb05066c5a89924f48a9e9736499", - "infrastructure-ui-source": "ddc0ecb18383f6b26101a2fadb2dab0c", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "maps-telemetry": "a4229f8b16a6820c6d724b7e0c1f729d", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9", - "namespace": "2f4316de49999235636386fe51dc06c1", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "181661168bbadd1eff5902361e2a0d5c", - "server": "ec97f1c5da1a19609a60874e5af1100c", - "siem-ui-timeline": "1f6f0860ad7bc0dba3e42467ca40470d", - "siem-ui-timeline-note": "8874706eedc49059d4cf0f5094559084", - "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29", - "space": "25de8c2deec044392922989cfcf24c54", - "telemetry": "e1c8bc94e443aefd9458932cc0697a4d", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "upgrade-assistant-reindex-operation": "a53a20fe086b72c9a86da3cc12dad8a6", - "upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "visualization": "52d7a13ad68a150c4525b292d23e12cc" - } - }, - "dynamic": "strict", - "properties": { - "action": { - "properties": { - "actionTypeId": { - "type": "keyword" - }, - "config": { - "enabled": false, - "type": "object" - }, - "description": { - "type": "text" - }, - "secrets": { - "type": "binary" - } - } - }, - "action_task_params": { - "properties": { - "actionId": { - "type": "keyword" - }, - "apiKey": { - "type": "binary" - }, - "params": { - "enabled": false, - "type": "object" - } - } - }, - "alert": { - "properties": { - "actions": { - "properties": { - "actionRef": { - "type": "keyword" - }, - "group": { - "type": "keyword" - }, - "params": { - "enabled": false, - "type": "object" - } - }, - "type": "nested" - }, - "alertTypeId": { - "type": "keyword" - }, - "params": { - "enabled": false, - "type": "object" - }, - "apiKey": { - "type": "binary" - }, - "createdBy": { - "type": "keyword" - }, - "enabled": { - "type": "boolean" - }, - "interval": { - "type": "keyword" - }, - "scheduledTaskId": { - "type": "keyword" - }, - "updatedBy": { - "type": "keyword" - } - } - }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "dotnet": { - "null_value": 0, - "type": "long" - }, - "go": { - "null_value": 0, - "type": "long" - }, - "java": { - "null_value": 0, - "type": "long" - }, - "js-base": { - "null_value": 0, - "type": "long" - }, - "nodejs": { - "null_value": 0, - "type": "long" - }, - "python": { - "null_value": 0, - "type": "long" - }, - "ruby": { - "null_value": 0, - "type": "long" - }, - "rum-js": { - "null_value": 0, - "type": "long" - } - } - } - } - }, - "canvas-element": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "content": { - "type": "text" - }, - "help": { - "type": "text" - }, - "image": { - "type": "text" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "defaultIndex": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "file-upload-telemetry": { - "properties": { - "filesUploadedTotalCount": { - "type": "long" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "infrastructure-ui-source": { - "properties": { - "description": { - "type": "text" - }, - "fields": { - "properties": { - "container": { - "type": "keyword" - }, - "host": { - "type": "keyword" - }, - "pod": { - "type": "keyword" - }, - "tiebreaker": { - "type": "keyword" - }, - "timestamp": { - "type": "keyword" - } - } - }, - "logAlias": { - "type": "keyword" - }, - "logColumns": { - "properties": { - "fieldColumn": { - "properties": { - "field": { - "type": "keyword" - }, - "id": { - "type": "keyword" - } - } - }, - "messageColumn": { - "properties": { - "id": { - "type": "keyword" - } - } - }, - "timestampColumn": { - "properties": { - "id": { - "type": "keyword" - } - } - } - }, - "type": "nested" - }, - "metricAlias": { - "type": "keyword" - }, - "name": { - "type": "text" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "map": { - "properties": { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description": { - "type": "text" - }, - "layerListJSON": { - "type": "text" - }, - "mapStateJSON": { - "type": "text" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "maps-telemetry": { - "properties": { - "attributesPerMap": { - "properties": { - "dataSourcesCount": { - "properties": { - "avg": { - "type": "long" - }, - "max": { - "type": "long" - }, - "min": { - "type": "long" - } - } - }, - "emsVectorLayersCount": { - "dynamic": "true", - "type": "object" - }, - "layerTypesCount": { - "dynamic": "true", - "type": "object" - }, - "layersCount": { - "properties": { - "avg": { - "type": "long" - }, - "max": { - "type": "long" - }, - "min": { - "type": "long" - } - } - } - } - }, - "mapsTotalCount": { - "type": "long" - }, - "timeCaptured": { - "type": "date" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "space": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "visualization": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "ml-telemetry": { - "properties": { - "file_data_visualizer": { - "properties": { - "index_creation_count": { - "type": "long" - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "sample-data-telemetry": { - "properties": { - "installCount": { - "type": "long" - }, - "unInstallCount": { - "type": "long" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "siem-ui-timeline": { - "properties": { - "columns": { - "properties": { - "aggregatable": { - "type": "boolean" - }, - "category": { - "type": "keyword" - }, - "columnHeaderType": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "example": { - "type": "text" - }, - "id": { - "type": "keyword" - }, - "indexes": { - "type": "keyword" - }, - "name": { - "type": "text" - }, - "placeholder": { - "type": "text" - }, - "searchable": { - "type": "boolean" - }, - "type": { - "type": "keyword" - } - } - }, - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "dataProviders": { - "properties": { - "and": { - "properties": { - "enabled": { - "type": "boolean" - }, - "excluded": { - "type": "boolean" - }, - "id": { - "type": "keyword" - }, - "kqlQuery": { - "type": "text" - }, - "name": { - "type": "text" - }, - "queryMatch": { - "properties": { - "displayField": { - "type": "text" - }, - "displayValue": { - "type": "text" - }, - "field": { - "type": "text" - }, - "operator": { - "type": "text" - }, - "value": { - "type": "text" - } - } - } - } - }, - "enabled": { - "type": "boolean" - }, - "excluded": { - "type": "boolean" - }, - "id": { - "type": "keyword" - }, - "kqlQuery": { - "type": "text" - }, - "name": { - "type": "text" - }, - "queryMatch": { - "properties": { - "displayField": { - "type": "text" - }, - "displayValue": { - "type": "text" - }, - "field": { - "type": "text" - }, - "operator": { - "type": "text" - }, - "value": { - "type": "text" - } - } - } - } - }, - "dateRange": { - "properties": { - "end": { - "type": "date" - }, - "start": { - "type": "date" - } - } - }, - "description": { - "type": "text" - }, - "favorite": { - "properties": { - "favoriteDate": { - "type": "date" - }, - "fullName": { - "type": "text" - }, - "keySearch": { - "type": "text" - }, - "userName": { - "type": "text" - } - } - }, - "kqlMode": { - "type": "keyword" - }, - "kqlQuery": { - "properties": { - "filterQuery": { - "properties": { - "kuery": { - "properties": { - "expression": { - "type": "text" - }, - "kind": { - "type": "keyword" - } - } - }, - "serializedQuery": { - "type": "text" - } - } - } - } - }, - "sort": { - "properties": { - "columnId": { - "type": "keyword" - }, - "sortDirection": { - "type": "keyword" - } - } - }, - "title": { - "type": "text" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "siem-ui-timeline-note": { - "properties": { - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "eventId": { - "type": "keyword" - }, - "note": { - "type": "text" - }, - "timelineId": { - "type": "keyword" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "siem-ui-timeline-pinned-event": { - "properties": { - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "eventId": { - "type": "keyword" - }, - "timelineId": { - "type": "keyword" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "upgrade-assistant-reindex-operation": { - "dynamic": "true", - "properties": { - "indexName": { - "type": "keyword" - }, - "status": { - "type": "integer" - } - } - }, - "upgrade-assistant-telemetry": { - "properties": { - "features": { - "properties": { - "deprecation_logging": { - "properties": { - "enabled": { - "null_value": true, - "type": "boolean" - } - } - } - } - }, - "ui_open": { - "properties": { - "cluster": { - "null_value": 0, - "type": "long" - }, - "indices": { - "null_value": 0, - "type": "long" - }, - "overview": { - "null_value": 0, - "type": "long" - } - } - }, - "ui_reindex": { - "properties": { - "close": { - "null_value": 0, - "type": "long" - }, - "open": { - "null_value": 0, - "type": "long" - }, - "start": { - "null_value": 0, - "type": "long" - }, - "stop": { - "null_value": 0, - "type": "long" - } - } - } - } - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchRefName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1" - } - } - } -} diff --git a/x-pack/test/functional/es_archives/spaces/disabled_features/data.json b/x-pack/test/functional/es_archives/spaces/disabled_features/data.json deleted file mode 100644 index 0826c7dcf164b..0000000000000 --- a/x-pack/test/functional/es_archives/spaces/disabled_features/data.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "space:default", - "source": { - "space": { - "name": "Default", - "description": "This is the default space!", - "disabledFeatures": [], - "_reserved": true - }, - "type": "space", - "migrationVersion": { - "space": "6.6.0" - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "index-pattern:logstash-*", - "source": { - "index-pattern": { - "title": "logstash-*", - "timeFieldName": "@timestamp", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - }, - "type": "index-pattern", - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:index-pattern:logstash-*", - "source": { - "namespace": "custom_space", - "index-pattern": { - "title": "logstash-*", - "timeFieldName": "@timestamp", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - }, - "type": "index-pattern", - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:visualization:75c3e060-1e7c-11e9-8488-65449e65d0ed", - "source": { - "namespace": "custom_space", - "visualization": { - "title": "A Pie", - "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "visualization", - "updated_at": "2019-01-22T19:32:31.206Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "type": "doc", - "id": "custom_space:dashboard:i-exist", - "source": { - "namespace": "custom_space", - "dashboard": { - "title": "A Dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"75c3e060-1e7c-11e9-8488-65449e65d0ed\",\"embeddableConfig\":{}}]", - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "version": 1, - "timeRestore": false, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - } - }, - "type": "dashboard", - "updated_at": "2019-01-22T19:32:47.232Z" - } - } -} diff --git a/x-pack/test/functional/es_archives/spaces/disabled_features/mappings.json b/x-pack/test/functional/es_archives/spaces/disabled_features/mappings.json deleted file mode 100644 index 5bda0101c653a..0000000000000 --- a/x-pack/test/functional/es_archives/spaces/disabled_features/mappings.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "map" : { - "properties" : { - "bounds": { - "dynamic": false, - "properties": {} - }, - "description" : { - "type" : "text" - }, - "layerListJSON" : { - "type" : "text" - }, - "mapStateJSON" : { - "type" : "text" - }, - "title" : { - "type" : "text" - }, - "uiStateJSON" : { - "type" : "text" - }, - "version" : { - "type" : "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "spaceId": { - "type": "keyword" - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/x-pack/test/functional/fixtures/kbn_archiver/hybrid_dataview.json b/x-pack/test/functional/fixtures/kbn_archiver/hybrid_dataview.json new file mode 100644 index 0000000000000..fafb911f32ec2 --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/hybrid_dataview.json @@ -0,0 +1,138 @@ +{ + "attributes": { + "fields": "[{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"geo.dest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "rollup_logstash*", + "type": "rollup", + "typeMeta": "{\"params\":{\"rollup_index\":\"rollup_logstash\"},\"aggs\":{\"terms\":{\"geo.dest\":{\"agg\":\"terms\"},\"extension.keyword\":{\"agg\":\"terms\"},\"geo.src\":{\"agg\":\"terms\"},\"machine.os.keyword\":{\"agg\":\"terms\"}},\"date_histogram\":{\"@timestamp\":{\"agg\":\"date_histogram\",\"fixed_interval\":\"20m\",\"delay\":\"10m\",\"time_zone\":\"UTC\"}},\"avg\":{\"memory\":{\"agg\":\"avg\"},\"bytes\":{\"agg\":\"avg\"}},\"max\":{\"memory\":{\"agg\":\"max\"}},\"min\":{\"memory\":{\"agg\":\"min\"}},\"sum\":{\"memory\":{\"agg\":\"sum\"}},\"value_count\":{\"memory\":{\"agg\":\"value_count\"}},\"histogram\":{\"machine.ram\":{\"agg\":\"histogram\",\"interval\":5}}}}" + }, + "coreMigrationVersion": "8.4.0", + "id": "049ca1a0-c373-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-08-20T17:50:38.798Z", + "version": "WzE3LDJd" +} + +{ + "attributes": { + "fields": "[{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"geo.dest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "*logstash*", + "type": "rollup", + "typeMeta": "{\"params\":{\"rollup_index\":\"rollup_logstash\"},\"aggs\":{\"terms\":{\"geo.dest\":{\"agg\":\"terms\"},\"extension.keyword\":{\"agg\":\"terms\"},\"geo.src\":{\"agg\":\"terms\"},\"machine.os.keyword\":{\"agg\":\"terms\"}},\"date_histogram\":{\"@timestamp\":{\"agg\":\"date_histogram\",\"fixed_interval\":\"20m\",\"delay\":\"10m\",\"time_zone\":\"UTC\"}},\"avg\":{\"memory\":{\"agg\":\"avg\"},\"bytes\":{\"agg\":\"avg\"}},\"max\":{\"memory\":{\"agg\":\"max\"}},\"min\":{\"memory\":{\"agg\":\"min\"}},\"sum\":{\"memory\":{\"agg\":\"sum\"}},\"value_count\":{\"memory\":{\"agg\":\"value_count\"}},\"histogram\":{\"machine.ram\":{\"agg\":\"histogram\",\"interval\":5}}}}" + }, + "coreMigrationVersion": "8.4.0", + "id": "3d570800-c373-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-08-20T17:52:14.175Z", + "version": "WzE2LDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "hybrid_histogram_line_chart", + "uiStateJSON": "{\"vis\":{\"legendOpen\":true}}", + "version": 1, + "visState": "{\"title\":\"hybrid_histogram_line_chart\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"circlesRadius\":1}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{},\"dimensions\":{\"x\":{\"accessor\":0,\"format\":{\"id\":\"date\",\"params\":{\"pattern\":\"YYYY-MM-DD HH:mm\"}},\"params\":{\"date\":true,\"interval\":\"PT6H40M\",\"format\":\"YYYY-MM-DD HH:mm\",\"bounds\":{\"min\":\"2019-08-19T01:55:07.240Z\",\"max\":\"2019-08-22T23:09:36.205Z\"}},\"aggType\":\"date_histogram\"},\"y\":[{\"accessor\":2,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}],\"series\":[{\"accessor\":1,\"format\":{\"id\":\"terms\",\"params\":{\"id\":\"string\",\"otherBucketLabel\":\"Other\",\"missingBucketLabel\":\"Missing\"}},\"params\":{},\"aggType\":\"terms\"}]},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"linear\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2019-08-19T01:55:07.240Z\",\"to\":\"2019-08-22T23:09:36.205Z\"},\"useNormalizedEsInterval\":false,\"interval\":\"480m\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"extension.keyword\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "2f8a0d70-c374-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "3d570800-c373-11e9-9d0b-e919aba203a4", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-08-21T21:58:10.400Z", + "version": "WzI1LDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rollup_histogram_line_chart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rollup_histogram_line_chart\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max memory\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Max memory\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"circlesRadius\":1}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{},\"dimensions\":{\"x\":{\"accessor\":0,\"format\":{\"id\":\"date\",\"params\":{\"pattern\":\"HH:mm\"}},\"params\":{\"date\":true,\"interval\":\"PT30M\",\"format\":\"HH:mm\",\"bounds\":{\"min\":\"2019-08-19T05:43:14.214Z\",\"max\":\"2019-08-22T09:51:59.095Z\"}},\"aggType\":\"date_histogram\"},\"y\":[{\"accessor\":1,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}]},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"linear\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"memory\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2019-08-19T05:43:14.214Z\",\"to\":\"2019-08-22T09:51:59.095Z\"},\"useNormalizedEsInterval\":false,\"interval\":\"20m\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"extension.keyword\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "ba4ee9e0-c373-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "049ca1a0-c373-11e9-9d0b-e919aba203a4", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-08-20T17:55:42.590Z", + "version": "WzE1LDJd" +} + +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@message\"}}},{\"name\":\"@tags\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@tags\"}}},{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"agent\"}}},{\"name\":\"bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"extension\"}}},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"headings\"}}},{\"name\":\"host\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"host\"}}},{\"name\":\"id\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"index\"}}},{\"name\":\"ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links\"}}},{\"name\":\"longValues\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"longValues.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"longValues\"}}},{\"name\":\"longValuesWithSpaces\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"longValuesWithSpaces.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"longValuesWithSpaces\"}}},{\"name\":\"machine.os\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"machine.os\"}}},{\"name\":\"machine.ram\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:section\"}}},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.article:tag\"}}},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:description\"}}},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image\"}}},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:height\"}}},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:image:width\"}}},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:site_name\"}}},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:title\"}}},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:type\"}}},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.og:url\"}}},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:card\"}}},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:description\"}}},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:image\"}}},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:site\"}}},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.twitter:title\"}}},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"relatedContent.url\"}}},{\"name\":\"request\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"request\"}}},{\"name\":\"response\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"response\"}}},{\"name\":\"spaces\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"spaces\"}}},{\"name\":\"thisisaverylongfieldnamethatevendoesnotcontainanyspaceswhyitcouldpotentiallybreakouruiinseveralplaces\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"thisisaverylongfieldnamethatevendoesnotcontainanyspaceswhyitcouldpotentiallybreakouruiinseveralplaces.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"thisisaverylongfieldnamethatevendoesnotcontainanyspaceswhyitcouldpotentiallybreakouruiinseveralplaces\"}}},{\"name\":\"url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"url\"}}},{\"name\":\"utc_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"xss\"}}}]", + "timeFieldName": "@timestamp", + "title": "logstash*" + }, + "coreMigrationVersion": "8.4.0", + "id": "c2a4fed0-c36f-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-08-20T17:27:20.783Z", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rollup_histogram_line_chart_machine_os", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rollup_histogram_line_chart_machine_os\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max memory\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Max memory\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"circlesRadius\":1}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{},\"dimensions\":{\"x\":{\"accessor\":0,\"format\":{\"id\":\"date\",\"params\":{\"pattern\":\"HH:mm\"}},\"params\":{\"date\":true,\"interval\":\"PT30M\",\"format\":\"HH:mm\",\"bounds\":{\"min\":\"2019-08-19T05:43:14.214Z\",\"max\":\"2019-08-22T09:51:59.095Z\"}},\"aggType\":\"date_histogram\"},\"y\":[{\"accessor\":2,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"max\"}],\"series\":[{\"accessor\":1,\"format\":{\"id\":\"terms\",\"params\":{\"id\":\"string\",\"otherBucketLabel\":\"Other\",\"missingBucketLabel\":\"Missing\"}},\"params\":{},\"aggType\":\"terms\"}]},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"linear\",\"legendSize\":\"auto\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"memory\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2019-08-19T05:43:14.214Z\",\"to\":\"2019-08-22T09:51:59.095Z\"},\"useNormalizedEsInterval\":false,\"interval\":\"20m\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"machine.os.keyword\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}" + }, + "coreMigrationVersion": "8.4.0", + "id": "e4fbe6c0-c373-11e9-9d0b-e919aba203a4", + "migrationVersion": { + "visualization": "8.3.0" + }, + "references": [ + { + "id": "049ca1a0-c373-11e9-9d0b-e919aba203a4", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-08-20T17:56:54.188Z", + "version": "WzE0LDJd" +} \ No newline at end of file diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index e28fe8f8da8e3..c440c25784290 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -512,10 +512,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont }, async enableTimeShift() { - await testSubjects.click('indexPattern-advanced-popover'); - await retry.try(async () => { - await testSubjects.click('indexPattern-time-shift-enable'); - }); + await testSubjects.click('indexPattern-advanced-accordion'); }, async setTimeShift(shift: string) { @@ -523,9 +520,9 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont }, async enableFilter() { - await testSubjects.click('indexPattern-advanced-popover'); + await testSubjects.click('indexPattern-advanced-accordion'); await retry.try(async () => { - await testSubjects.click('indexPattern-filter-by-enable'); + await testSubjects.click('indexPattern-filters-existingFilterTrigger'); }); }, diff --git a/x-pack/test/functional/services/cases/index.ts b/x-pack/test/functional/services/cases/index.ts index 886750c4ebfab..28e5fe1a6a326 100644 --- a/x-pack/test/functional/services/cases/index.ts +++ b/x-pack/test/functional/services/cases/index.ts @@ -11,6 +11,7 @@ import { CasesCommonServiceProvider } from './common'; import { CasesCreateViewServiceProvider } from './create'; import { CasesTableServiceProvider } from './list'; import { CasesNavigationProvider } from './navigation'; +import { CasesSingleViewServiceProvider } from './single_case_view'; export function CasesServiceProvider(context: FtrProviderContext) { return { @@ -19,5 +20,6 @@ export function CasesServiceProvider(context: FtrProviderContext) { casesTable: CasesTableServiceProvider(context), create: CasesCreateViewServiceProvider(context), navigation: CasesNavigationProvider(context), + singleCase: CasesSingleViewServiceProvider(context), }; } diff --git a/x-pack/test/functional/services/cases/single_case_view.ts b/x-pack/test/functional/services/cases/single_case_view.ts new file mode 100644 index 0000000000000..83dbb6388fed1 --- /dev/null +++ b/x-pack/test/functional/services/cases/single_case_view.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function CasesSingleViewServiceProvider({ getService, getPageObject }: FtrProviderContext) { + const common = getPageObject('common'); + const testSubjects = getService('testSubjects'); + const header = getPageObject('header'); + + return { + async deleteCase() { + await common.clickAndValidate('property-actions-ellipses', 'property-actions-trash'); + await common.clickAndValidate('property-actions-trash', 'confirmModalConfirmButton'); + await testSubjects.click('confirmModalConfirmButton'); + await header.waitUntilLoadingHasFinished(); + }, + }; +} diff --git a/x-pack/test/functional/services/ml/common_ui.ts b/x-pack/test/functional/services/ml/common_ui.ts index d4ad5d863eac1..9149f73c05456 100644 --- a/x-pack/test/functional/services/ml/common_ui.ts +++ b/x-pack/test/functional/services/ml/common_ui.ts @@ -340,5 +340,21 @@ export function MachineLearningCommonUIProvider({ async waitForRefreshButtonEnabled() { await testSubjects.waitForEnabled('~mlRefreshPageButton'); }, + + async assertOneOfExists(subjectsToCheck: string[], timeout: number = 0) { + const singleSubjectTimeout = 500; + // make sure that the overall timeout is not too short + const overallTimeout = Math.max(timeout, subjectsToCheck.length * singleSubjectTimeout * 5); + + await retry.tryForTime(overallTimeout, async () => { + for (const testSubj of subjectsToCheck) { + const subjExists = await testSubjects.exists(testSubj, { timeout: singleSubjectTimeout }); + if (subjExists) return; // stop ckecking once we found an existing element + } + throw new Error( + `Expected one element of the following list to exist: ${JSON.stringify(subjectsToCheck)}` + ); + }); + }, }; } diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts index f6e10fa02bce5..1eeb43741af48 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts @@ -13,10 +13,11 @@ import type { MlCommonUI } from './common_ui'; import type { MlCommonDataGrid } from './common_data_grid'; export function MachineLearningDataFrameAnalyticsResultsProvider( - { getService }: FtrProviderContext, + { getPageObject, getService }: FtrProviderContext, mlCommonUI: MlCommonUI, commonDataGrid: MlCommonDataGrid ) { + const headerPage = getPageObject('header'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); @@ -190,7 +191,15 @@ export function MachineLearningDataFrameAnalyticsResultsProvider( async assertTotalFeatureImportanceEvaluatePanelExists() { await testSubjects.existOrFail('mlDFExpandableSection-FeatureImportanceSummary'); await this.scrollFeatureImportanceIntoView(); - await testSubjects.existOrFail('mlTotalFeatureImportanceChart', { timeout: 30 * 1000 }); + + // Depending on the analytics result, there's either the feature + // importance chart or a callout about uniform data. Since we're not + // testing the quality of analytics here, we're fine with both panel + // contents. + await mlCommonUI.assertOneOfExists( + ['mlTotalFeatureImportanceChart', 'mlNoTotalFeatureImportanceCallout'], + 30 * 1000 + ); }, async assertFeatureImportanceDecisionPathElementsExists() { @@ -364,6 +373,7 @@ export function MachineLearningDataFrameAnalyticsResultsProvider( }, async expandContentSection(sectionId: string, shouldExpand: boolean) { + await headerPage.waitUntilLoadingHasFinished(); const contentSubj = `mlDFExpandableSection-${sectionId}-content`; const expandableContentExists = await testSubjects.exists(contentSubj, { timeout: 1000 }); diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts index e2d3977fabea0..2dcd26caac193 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts @@ -21,7 +21,11 @@ export type AnalyticsTableRowDetails = Record<'jobDetails', ExpectedSectionTable export type MlDFAJobTable = ProvidedType<typeof MachineLearningDataFrameAnalyticsTableProvider>; -export function MachineLearningDataFrameAnalyticsTableProvider({ getService }: FtrProviderContext) { +export function MachineLearningDataFrameAnalyticsTableProvider({ + getPageObject, + getService, +}: FtrProviderContext) { + const headerPage = getPageObject('header'); const find = getService('find'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); @@ -170,6 +174,7 @@ export function MachineLearningDataFrameAnalyticsTableProvider({ getService }: F timeout: 5 * 1000, }); }); + await headerPage.waitUntilLoadingHasFinished(); } public async openMapView(analyticsId: string) { diff --git a/x-pack/test/functional/services/ml/data_visualizer_index_pattern_management.ts b/x-pack/test/functional/services/ml/data_visualizer_index_pattern_management.ts index e4761c3647065..8ec908c41d3e7 100644 --- a/x-pack/test/functional/services/ml/data_visualizer_index_pattern_management.ts +++ b/x-pack/test/functional/services/ml/data_visualizer_index_pattern_management.ts @@ -22,15 +22,17 @@ export function MachineLearningDataVisualizerIndexPatternManagementProvider( async assertIndexPatternManagementButtonExists() { await testSubjects.existOrFail('dataVisualizerDataViewanagementButton'); }, + async assertIndexPatternManagementMenuExists() { await testSubjects.existOrFail('dataVisualizerDataViewManagementMenu'); }, + async assertIndexPatternFieldEditorExists() { - await testSubjects.existOrFail('indexPatternFieldEditorForm'); + await testSubjects.existOrFail('indexPatternFieldEditorForm', { timeout: 5000 }); }, async assertIndexPatternFieldEditorNotExist() { - await testSubjects.missingOrFail('indexPatternFieldEditorForm'); + await testSubjects.missingOrFail('indexPatternFieldEditorForm', { timeout: 5000 }); }, async clickIndexPatternManagementButton() { @@ -39,6 +41,7 @@ export function MachineLearningDataVisualizerIndexPatternManagementProvider( await this.assertIndexPatternManagementMenuExists(); }); }, + async clickAddIndexPatternFieldAction() { await retry.tryForTime(5000, async () => { await this.assertIndexPatternManagementMenuExists(); @@ -74,7 +77,7 @@ export function MachineLearningDataVisualizerIndexPatternManagementProvider( }, async addRuntimeField(name: string, script: string, fieldType: string) { - await retry.tryForTime(5000, async () => { + await retry.tryForTime(15 * 1000, async () => { await this.clickIndexPatternManagementButton(); await this.clickAddIndexPatternFieldAction(); diff --git a/x-pack/test/functional/services/ml/job_table.ts b/x-pack/test/functional/services/ml/job_table.ts index cc06c186a3cc8..a9e307aeaf587 100644 --- a/x-pack/test/functional/services/ml/job_table.ts +++ b/x-pack/test/functional/services/ml/job_table.ts @@ -41,10 +41,11 @@ export interface OtherUrlConfig { } export function MachineLearningJobTableProvider( - { getService }: FtrProviderContext, + { getPageObject, getService }: FtrProviderContext, mlCommonUI: MlCommonUI, customUrls: MlCustomUrls ) { + const headerPage = getPageObject('header'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); @@ -606,6 +607,7 @@ export function MachineLearningJobTableProvider( // click Custom URLs tab await testSubjects.click('mlEditJobFlyout-customUrls'); await this.ensureEditCustomUrlTabOpen(); + await headerPage.waitUntilLoadingHasFinished(); } public async ensureEditCustomUrlTabOpen() { diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/common/index.ts b/x-pack/test/functional_with_es_ssl/apps/cases/common/index.ts new file mode 100644 index 0000000000000..e24bf42d35e6a --- /dev/null +++ b/x-pack/test/functional_with_es_ssl/apps/cases/common/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './roles'; +export * from './users'; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts b/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts new file mode 100644 index 0000000000000..f06c8745d6df6 --- /dev/null +++ b/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Role } from '../../../../cases_api_integration/common/lib/authentication/types'; + +/** + * Roles for Cases in the stack + */ + +export const casesReadDelete: Role = { + name: 'cases_read_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['minimal_read', 'cases_delete'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const casesNoDelete: Role = { + name: 'cases_no_delete', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['minimal_all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const casesAll: Role = { + name: 'cases_all_role', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCases: ['all'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const roles = [casesReadDelete, casesNoDelete, casesAll]; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts b/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts new file mode 100644 index 0000000000000..282072dbb8dce --- /dev/null +++ b/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { User } from '../../../../cases_api_integration/common/lib/authentication/types'; +import { casesAll, casesNoDelete, casesReadDelete } from './roles'; + +/** + * Users for Cases in the Stack + */ + +export const casesReadDeleteUser: User = { + username: 'cases_read_delete_user', + password: 'password', + roles: [casesReadDelete.name], +}; + +export const casesNoDeleteUser: User = { + username: 'cases_no_delete_user', + password: 'password', + roles: [casesNoDelete.name], +}; + +export const casesAllUser: User = { + username: 'cases_all_user', + password: 'password', + roles: [casesAll.name], +}; + +export const users = [casesReadDeleteUser, casesNoDeleteUser, casesAllUser]; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/deletion.ts b/x-pack/test/functional_with_es_ssl/apps/cases/deletion.ts new file mode 100644 index 0000000000000..8fd032a8e1b7a --- /dev/null +++ b/x-pack/test/functional_with_es_ssl/apps/cases/deletion.ts @@ -0,0 +1,123 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; +import { users, roles, casesReadDeleteUser, casesAllUser, casesNoDeleteUser } from './common'; +import { + createUsersAndRoles, + deleteUsersAndRoles, +} from '../../../cases_api_integration/common/lib/authentication'; + +export default ({ getPageObjects, getService }: FtrProviderContext) => { + const PageObjects = getPageObjects(['security', 'header']); + const testSubjects = getService('testSubjects'); + const cases = getService('cases'); + + describe('cases deletion sub privilege', () => { + before(async () => { + await createUsersAndRoles(getService, users, roles); + await PageObjects.security.forceLogout(); + }); + + after(async () => { + await deleteUsersAndRoles(getService, users, roles); + await cases.api.deleteAllCases(); + await PageObjects.security.forceLogout(); + }); + + describe('create two cases', () => { + beforeEach(async () => { + await cases.api.createNthRandomCases(2); + }); + + afterEach(async () => { + await cases.api.deleteAllCases(); + }); + + for (const user of [casesReadDeleteUser, casesAllUser]) { + describe(`logging in with user ${user.username}`, () => { + before(async () => { + await PageObjects.security.login(user.username, user.password); + }); + + beforeEach(async () => { + await navigateToCasesAndWaitToLoad(getService); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + describe('single case view', () => { + beforeEach(async () => { + await cases.casesTable.goToFirstListedCase(); + }); + + it(`User ${user.username} can delete a case while on a specific case page`, async () => { + await cases.singleCase.deleteCase(); + await cases.casesTable.validateCasesTableHasNthRows(1); + }); + }); + + describe('all cases list page', () => { + it(`User ${user.username} can bulk delete cases`, async () => { + await cases.casesTable.selectAndDeleteAllCases(); + await cases.casesTable.waitForTableToFinishLoading(); + await cases.casesTable.validateCasesTableHasNthRows(0); + }); + + it(`User ${user.username} can delete a case using the trash icon in the table row`, async () => { + await cases.casesTable.deleteFirstListedCase(); + }); + }); + }); + } + + for (const user of [casesNoDeleteUser]) { + describe(`logging in with user ${user.username}`, () => { + before(async () => { + await PageObjects.security.login(user.username, user.password); + }); + + beforeEach(async () => { + await navigateToCasesAndWaitToLoad(getService); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + describe('single case view', () => { + beforeEach(async () => { + await cases.casesTable.goToFirstListedCase(); + }); + + it(`User ${user.username} cannot delete a case while on a specific case page`, async () => { + await testSubjects.missingOrFail('case-view-actions'); + }); + }); + + describe('all cases list page', () => { + it(`User ${user.username} cannot delete cases using bulk actions or individual row trash icon`, async () => { + await testSubjects.missingOrFail('case-table-bulk-actions'); + await testSubjects.missingOrFail('checkboxSelectAll'); + await testSubjects.missingOrFail('action-delete'); + }); + }); + }); + } + }); + }); +}; + +const navigateToCasesAndWaitToLoad = async (getService: FtrProviderContext['getService']) => { + const cases = getService('cases'); + + await cases.navigation.navigateToApp(); + await cases.casesTable.waitForCasesToBeListed(); + await cases.casesTable.waitForTableToFinishLoading(); +}; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/index.ts b/x-pack/test/functional_with_es_ssl/apps/cases/index.ts index 7462b8355b7e3..405361b054d16 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/index.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/index.ts @@ -14,5 +14,6 @@ export default ({ loadTestFile }: FtrProviderContext) => { loadTestFile(require.resolve('./list_view')); loadTestFile(require.resolve('./configure')); loadTestFile(require.resolve('./attachment_framework')); + loadTestFile(require.resolve('./deletion')); }); }; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts b/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts index 42d5d5074e18d..223127125e66d 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts @@ -12,7 +12,6 @@ import { CaseSeverity } from '@kbn/cases-plugin/common/api'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObject, getService }: FtrProviderContext) => { - const common = getPageObject('common'); const header = getPageObject('header'); const testSubjects = getService('testSubjects'); const find = getService('find'); @@ -182,10 +181,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); it('deletes the case successfully', async () => { - await common.clickAndValidate('property-actions-ellipses', 'property-actions-trash'); - await common.clickAndValidate('property-actions-trash', 'confirmModalConfirmButton'); - await testSubjects.click('confirmModalConfirmButton'); - await header.waitUntilLoadingHasFinished(); + await cases.singleCase.deleteCase(); await cases.casesTable.validateCasesTableHasNthRows(0); }); }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/index.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/index.ts index 832cf6c7a9078..33e6c239d3225 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/index.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/index.ts @@ -15,11 +15,5 @@ export default ({ loadTestFile, getService }: FtrProviderContext) => { loadTestFile(require.resolve('./details')); loadTestFile(require.resolve('./connectors')); loadTestFile(require.resolve('./alerts_table')); - loadTestFile(require.resolve('./rule_status_dropdown')); - loadTestFile(require.resolve('./rule_tag_filter')); - loadTestFile(require.resolve('./rule_status_filter')); - loadTestFile(require.resolve('./rule_tag_badge')); - loadTestFile(require.resolve('./rule_event_log_list')); - loadTestFile(require.resolve('./rules_list')); }); }; diff --git a/x-pack/test/functional_with_es_ssl/config.ts b/x-pack/test/functional_with_es_ssl/config.ts index 4ff76dbed91e5..1d7e935931611 100644 --- a/x-pack/test/functional_with_es_ssl/config.ts +++ b/x-pack/test/functional_with_es_ssl/config.ts @@ -76,7 +76,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--plugin-path=${join(__dirname, 'fixtures', 'plugins', 'cases')}`, `--xpack.trigger_actions_ui.enableExperimental=${JSON.stringify([ 'internalAlertsTable', - 'internalShareableComponentsSandbox', 'ruleTagFilter', 'ruleStatusFilter', ])}`, diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/attachments/external_reference.ts b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/attachments/external_reference.ts new file mode 100644 index 0000000000000..a54f586b4c3e3 --- /dev/null +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/attachments/external_reference.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ExternalReferenceAttachmentType } from '@kbn/cases-plugin/server/attachment_framework/types'; + +export const getExternalReferenceAttachment = (): ExternalReferenceAttachmentType => ({ + id: '.test', +}); diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/plugin.ts b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/plugin.ts index fd86aa7300eb1..df760a036b01e 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/plugin.ts +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/server/plugin.ts @@ -7,6 +7,7 @@ import { PluginSetupContract as CasesSetup } from '@kbn/cases-plugin/server/types'; import { Plugin, CoreSetup } from '@kbn/core/server'; +import { getExternalReferenceAttachment } from './attachments/external_reference'; import { getPersistableStateAttachmentServer } from './attachments/persistable_state'; export interface CasesExamplePublicSetupDeps { @@ -15,6 +16,7 @@ export interface CasesExamplePublicSetupDeps { export class CasesFixturePlugin implements Plugin<void, void, CasesExamplePublicSetupDeps> { public setup(core: CoreSetup, { cases }: CasesExamplePublicSetupDeps) { + cases.attachmentFramework.registerExternalReference(getExternalReferenceAttachment()); cases.attachmentFramework.registerPersistableState(getPersistableStateAttachmentServer()); } diff --git a/x-pack/test/observability_functional/apps/observability/pages/rule_details_page.ts b/x-pack/test/observability_functional/apps/observability/pages/rule_details_page.ts index 2b5f0d82e4d1a..3538736499927 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/rule_details_page.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/rule_details_page.ts @@ -141,27 +141,35 @@ export default ({ getService }: FtrProviderContext) => { before(async () => { await observability.alerts.common.navigateToRuleDetailsByRuleId(logThresholdRuleId); }); - it('should show the more (...) button if user has permissions', async () => { + it('should show the actions button if user has permissions', async () => { await retry.waitFor( - 'More button to be visible', - async () => await testSubjects.exists('moreButton') + 'Actions button to be visible', + async () => await testSubjects.exists('actions') ); }); - it('should shows the rule edit and delete button if user has permissions', async () => { - await testSubjects.click('moreButton'); + it('should show the rule edit and delete button if user has permissions', async () => { + await testSubjects.click('actions'); + await testSubjects.existOrFail('editRuleButton'); await testSubjects.existOrFail('deleteRuleButton'); }); - it('should not let user edit/delete the rule if he has no permissions', async () => { + it('should close actions popover correctly', async () => { + await testSubjects.click('actions'); + + // popover should be closed + await testSubjects.missingOrFail('editRuleButton'); + }); + + it('should not show the actions button if user has no permissions', async () => { await observability.users.setTestUserRole( observability.users.defineBasicObservabilityRole({ logs: ['read'], }) ); await observability.alerts.common.navigateToRuleDetailsByRuleId(logThresholdRuleId); - await testSubjects.missingOrFail('moreButton'); + await testSubjects.missingOrFail('actions'); }); }); }); diff --git a/x-pack/test/reporting_functional/reporting_and_timeout/index.ts b/x-pack/test/reporting_functional/reporting_and_timeout/index.ts index 9e06e18072846..38880a1b29757 100644 --- a/x-pack/test/reporting_functional/reporting_and_timeout/index.ts +++ b/x-pack/test/reporting_functional/reporting_and_timeout/index.ts @@ -52,8 +52,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // allow minor visual differences: https://github.com/elastic/kibana/issues/135309#issuecomment-1169095186 expect(await compareImages.checkIfPngsMatch(pngSessionFilePath, baselineAPng)).to.be.lessThan( - 0.011 - ); + 0.015 + ); // this factor of difference allows passing whether or not the page has loaded things like the loading graphics and titlebars }); }); } diff --git a/yarn.lock b/yarn.lock index 83f4084c5dbc6..03d0d3695ab27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1429,10 +1429,10 @@ dependencies: object-hash "^1.3.0" -"@elastic/charts@46.12.0": - version "46.12.0" - resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-46.12.0.tgz#95c5ba2d4eff75b52fb294b867fb7b147da3383a" - integrity sha512-YIILkL3CXSoBMBiwj1N6FJTWMB9PpKi1bfMZVJCGHb23+J3LiiAqsQYsZbm7L28ziH3s0RveRomRcfVo38NvMg== +"@elastic/charts@46.13.0": + version "46.13.0" + resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-46.13.0.tgz#6000de23944f264c8ac2bb0a8728fac1eb8c3b2f" + integrity sha512-v3qGpARn8stI5v6aSUaQE3tEYdZLmGgA//oU4BSLemmKUaBpaK5ZOYwjoBGdqzo52F7gqM7/O1QepdfxS/CBRw== dependencies: "@popperjs/core" "^2.4.0" bezier-easing "^2.1.0" @@ -3163,6 +3163,30 @@ version "0.0.0" uid "" +"@kbn/core-elasticsearch-client-server-internal@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-internal": + version "0.0.0" + uid "" + +"@kbn/core-elasticsearch-client-server-mocks@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-mocks": + version "0.0.0" + uid "" + +"@kbn/core-elasticsearch-client-server@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server": + version "0.0.0" + uid "" + +"@kbn/core-elasticsearch-server-internal@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-internal": + version "0.0.0" + uid "" + +"@kbn/core-elasticsearch-server-mocks@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-mocks": + version "0.0.0" + uid "" + +"@kbn/core-elasticsearch-server@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server": + version "0.0.0" + uid "" + "@kbn/core-environment-server-internal@link:bazel-bin/packages/core/environment/core-environment-server-internal": version "0.0.0" uid "" @@ -3283,6 +3307,14 @@ version "0.0.0" uid "" +"@kbn/core-integrations-browser-internal@link:bazel-bin/packages/core/integrations/core-integrations-browser-internal": + version "0.0.0" + uid "" + +"@kbn/core-integrations-browser-mocks@link:bazel-bin/packages/core/integrations/core-integrations-browser-mocks": + version "0.0.0" + uid "" + "@kbn/core-logging-server-internal@link:bazel-bin/packages/core/logging/core-logging-server-internal": version "0.0.0" uid "" @@ -3407,6 +3439,10 @@ version "0.0.0" uid "" +"@kbn/eslint-plugin-disable@link:bazel-bin/packages/kbn-eslint-plugin-disable": + version "0.0.0" + uid "" + "@kbn/eslint-plugin-eslint@link:bazel-bin/packages/kbn-eslint-plugin-eslint": version "0.0.0" uid "" @@ -3527,10 +3563,6 @@ version "0.0.0" uid "" -"@kbn/pm@link:packages/kbn-pm": - version "0.0.0" - uid "" - "@kbn/react-field@link:bazel-bin/packages/kbn-react-field": version "0.0.0" uid "" @@ -3659,6 +3691,10 @@ version "0.0.0" uid "" +"@kbn/some-dev-log@link:bazel-bin/packages/kbn-some-dev-log": + version "0.0.0" + uid "" + "@kbn/sort-package-json@link:bazel-bin/packages/kbn-sort-package-json": version "0.0.0" uid "" @@ -3755,6 +3791,10 @@ version "0.0.0" uid "" +"@kbn/yarn-lock-validator@link:bazel-bin/packages/kbn-yarn-lock-validator": + version "0.0.0" + uid "" + "@loaders.gl/core@2.3.1", "@loaders.gl/core@^2.3.1": version "2.3.1" resolved "https://registry.yarnpkg.com/@loaders.gl/core/-/core-2.3.1.tgz#147037e17b014528dce00187aac0ec6ccb05938b" @@ -4181,22 +4221,29 @@ jsonwebtoken "^8.3.0" lru-cache "^5.1.1" -"@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4": +"@octokit/auth-token@^2.4.0": version "2.4.4" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56" integrity sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q== dependencies: "@octokit/types" "^6.0.0" -"@octokit/core@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" - integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== +"@octokit/auth-token@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.0.tgz#6f22c5fc56445c496628488ba6810131558fa4a9" + integrity sha512-MDNFUBcJIptB9At7HiV7VCvU3NcL4GnfCQaP8C5lrxWrRPMJBnemYtehaKSOlaM7AYxeRyj9etenu8LVpSpVaQ== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^4.0.0": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.0.4.tgz#335d9b377691e3264ce57a9e5a1f6cda783e5838" + integrity sha512-sUpR/hc4Gc7K34o60bWC7WUH6Q7T6ftZ2dUmepSyJr9PRF76/qqkWjE2SOEzCqLA5W83SaISymwKtxks+96hPQ== dependencies: - "@octokit/auth-token" "^2.4.4" - "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.6.0" - "@octokit/request-error" "^2.0.5" + "@octokit/auth-token" "^3.0.0" + "@octokit/graphql" "^5.0.0" + "@octokit/request" "^6.0.0" + "@octokit/request-error" "^3.0.0" "@octokit/types" "^6.0.3" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" @@ -4220,13 +4267,22 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.5.8": - version "4.5.8" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.8.tgz#d42373633c3015d0eafce64a8ce196be167fdd9b" - integrity sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA== +"@octokit/endpoint@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.0.tgz#be758a1236d68d6bbb505e686dd50881c327a519" + integrity sha512-Kz/mIkOTjs9rV50hf/JK9pIDl4aGwAtT8pry6Rpy+hVXkAPhXanNQRxMoq6AeRgDCZR6t/A1zKniY2V1YhrzlQ== dependencies: - "@octokit/request" "^5.3.0" - "@octokit/types" "^6.0.0" + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.0.tgz#2cc6eb3bf8e0278656df1a7d0ca0d7591599e3b3" + integrity sha512-1ZZ8tX4lUEcLPvHagfIVu5S2xpHYXAmgN0+95eAOPoaVPzCfUXJtA5vASafcpWcO86ze0Pzn30TAx72aB2aguQ== + dependencies: + "@octokit/request" "^6.0.0" + "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" "@octokit/openapi-types@^11.2.0": @@ -4234,6 +4290,11 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== +"@octokit/openapi-types@^12.10.0": + version "12.10.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.10.1.tgz#57b5cc6c7b4e55d8642c93d06401fb1af4839899" + integrity sha512-P+SukKanjFY0ZhsK6wSVnQmxTP2eVPPE8OPSNuxaMYtgVzwJZgfGdwlYjf4RlRU4vLEw4ts2fsE2icG4nZ5ddQ== + "@octokit/openapi-types@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.2.0.tgz#123e0438a0bc718ccdac3b5a2e69b3dd00daa85b" @@ -4246,12 +4307,12 @@ dependencies: "@octokit/types" "^2.0.1" -"@octokit/plugin-paginate-rest@^2.16.8": - version "2.17.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" - integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== +"@octokit/plugin-paginate-rest@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.0.0.tgz#df779de686aeb21b5e776e4318defc33b0418566" + integrity sha512-fvw0Q5IXnn60D32sKeLIxgXCEZ7BTSAjJd8cFAE6QU5qUp0xo7LjFUjjX1J5D7HgN355CN4EXE4+Q1/96JaNUA== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "^6.39.0" "@octokit/plugin-request-log@^1.0.0": version "1.0.2" @@ -4271,12 +4332,12 @@ "@octokit/types" "^2.0.1" deprecation "^2.3.1" -"@octokit/plugin-rest-endpoint-methods@^5.12.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" - integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== +"@octokit/plugin-rest-endpoint-methods@^6.0.0": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.1.tgz#8c67e5dd3963505bf458ff9f5b0d2bc71d1b2f00" + integrity sha512-u0+4nEVCPL5dsXibKR9qNJU2T0NBnVhmvlPxNjPzt7wp2QfFAbI+dyxIltSP7NOm6KWkXyYG9YLsUKi8D6uohw== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "6.40.0" deprecation "^2.3.1" "@octokit/plugin-retry@^2.2.0": @@ -4295,7 +4356,7 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": +"@octokit/request-error@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== @@ -4304,6 +4365,15 @@ deprecation "^2.0.0" once "^1.4.0" +"@octokit/request-error@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.0.tgz#f527d178f115a3b62d76ce4804dd5bdbc0270a81" + integrity sha512-WBtpzm9lR8z4IHIMtOqr6XwfkGvMOOILNLxsWvDwtzm/n7f5AWuqJTXQXdDtOvPfTDrH4TPhEvW2qMlR4JFA2w== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + "@octokit/request@2.4.2", "@octokit/request@^2.1.2", "@octokit/request@^2.4.2": version "2.4.2" resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.4.2.tgz#87c36e820dd1e43b1629f4f35c95b00cd456320b" @@ -4316,7 +4386,7 @@ once "^1.4.0" universal-user-agent "^2.0.1" -"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.6.0": +"@octokit/request@^5.2.0": version "5.6.2" resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.2.tgz#1aa74d5da7b9e04ac60ef232edd9a7438dcf32d8" integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== @@ -4328,6 +4398,18 @@ node-fetch "^2.6.1" universal-user-agent "^6.0.0" +"@octokit/request@^6.0.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.0.tgz#9c25606df84e6f2ccbcc2c58e1d35438e20b688b" + integrity sha512-7IAmHnaezZrgUqtRShMlByJK33MT9ZDnMRgZjnRrRV9a/jzzFwKGz0vxhFU6i7VMLraYcQ1qmcAOin37Kryq+Q== + dependencies: + "@octokit/endpoint" "^7.0.0" + "@octokit/request-error" "^3.0.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.7" + universal-user-agent "^6.0.0" + "@octokit/rest@^16.23.2": version "16.23.2" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.23.2.tgz#975e84610427c4ab6c41bec77c24aed9b7563db4" @@ -4368,15 +4450,22 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.12.0": - version "18.12.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" - integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== +"@octokit/rest@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.3.tgz#b9a4e8dc8d53e030d611c053153ee6045f080f02" + integrity sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ== dependencies: - "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/core" "^4.0.0" + "@octokit/plugin-paginate-rest" "^3.0.0" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + "@octokit/plugin-rest-endpoint-methods" "^6.0.0" + +"@octokit/types@6.40.0", "@octokit/types@^6.39.0": + version "6.40.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.40.0.tgz#f2e665196d419e19bb4265603cf904a820505d0e" + integrity sha512-MFZOU5r8SwgJWDMhrLUSvyJPtVsqA6VnbVI3TNbsmw+Jnvrktzvq2fYES/6RiJA/5Ykdwq4mJmtlYUfW7CGjmw== + dependencies: + "@octokit/openapi-types" "^12.10.0" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": version "2.16.2" @@ -4400,7 +4489,7 @@ "@octokit/openapi-types" "^2.2.0" "@types/node" ">= 8" -"@octokit/types@^6.16.1", "@octokit/types@^6.34.0": +"@octokit/types@^6.16.1": version "6.34.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== @@ -6094,11 +6183,6 @@ resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.1.tgz#9b880d0ce9b1f209b5e0bd6d9caa38209db34024" integrity sha512-BZIU34bSYye0j/BFcPraiDZ5ka6MJADjcDVELGf7glr9K+iE8NYVjFslJFVWzskSxkLLyCrSPScE82/UUoBSvg== -"@types/cmd-shim@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/cmd-shim/-/cmd-shim-2.0.0.tgz#c3d81d3c2a51af3c65c19b4f1d493a75abf07a5c" - integrity sha512-WuV5bOQTGxqzewPnJbrDe51I5mnX2wTRYy+PduRuIvSuBWZlxDYD6Qt/f1m5sezxx1yyE9+1wHJ/0sRuNIoFaQ== - "@types/color-convert@*", "@types/color-convert@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/color-convert/-/color-convert-2.0.0.tgz#8f5ee6b9e863dcbee5703f5a517ffb13d3ea4e22" @@ -6834,6 +6918,30 @@ version "0.0.0" uid "" +"@types/kbn__core-elasticsearch-client-server-internal@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-elasticsearch-client-server-mocks@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server-mocks/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-elasticsearch-client-server@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-client-server/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-elasticsearch-server-internal@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-elasticsearch-server-mocks@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server-mocks/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-elasticsearch-server@link:bazel-bin/packages/core/elasticsearch/core-elasticsearch-server/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__core-environment-server-internal@link:bazel-bin/packages/core/environment/core-environment-server-internal/npm_module_types": version "0.0.0" uid "" @@ -6954,6 +7062,14 @@ version "0.0.0" uid "" +"@types/kbn__core-integrations-browser-internal@link:bazel-bin/packages/core/integrations/core-integrations-browser-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-integrations-browser-mocks@link:bazel-bin/packages/core/integrations/core-integrations-browser-mocks/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__core-logging-server-internal@link:bazel-bin/packages/core/logging/core-logging-server-internal/npm_module_types": version "0.0.0" uid "" @@ -7078,6 +7194,10 @@ version "0.0.0" uid "" +"@types/kbn__eslint-plugin-disable@link:bazel-bin/packages/kbn-eslint-plugin-disable/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__eslint-plugin-imports@link:bazel-bin/packages/kbn-eslint-plugin-imports/npm_module_types": version "0.0.0" uid "" @@ -7318,6 +7438,10 @@ version "0.0.0" uid "" +"@types/kbn__some-dev-log@link:bazel-bin/packages/kbn-some-dev-log/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__sort-package-json@link:bazel-bin/packages/kbn-sort-package-json/npm_module_types": version "0.0.0" uid "" @@ -7390,6 +7514,10 @@ version "0.0.0" uid "" +"@types/kbn__yarn-lock-validator@link:bazel-bin/packages/kbn-yarn-lock-validator/npm_module_types": + version "0.0.0" + uid "" + "@types/keyv@*": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -7521,7 +7649,7 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== -"@types/minimatch@*", "@types/minimatch@^3.0.3": +"@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== @@ -7574,13 +7702,6 @@ resolved "https://registry.yarnpkg.com/@types/mustache/-/mustache-0.8.31.tgz#7c86cbf74f7733f9e3bdc28817623927eb386616" integrity sha512-72flCZJkEJHPwhmpHgg4a0ZBLssMhg5NB0yltRblRlZMo4py3B/u/d7icevc4EeN9MPQUo/dPtuVOoVy9ih6cQ== -"@types/ncp@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/ncp/-/ncp-2.0.1.tgz#749432511f6ad747d04e98837b18cca9045567fb" - integrity sha512-TeiJ7uvv/92ugSqZ0v9l0eNXzutlki0aK+R1K5bfA5SYUil46ITlxLW4iNTCf55P4L5weCmaOdtxGeGWvudwPg== - dependencies: - "@types/node" "*" - "@types/nock@^10.0.3": version "10.0.3" resolved "https://registry.yarnpkg.com/@types/nock/-/nock-10.0.3.tgz#dab1d18ffbccfbf2db811dab9584304eeb6e1c4c" @@ -7622,7 +7743,7 @@ dependencies: "@types/node" "*" -"@types/normalize-package-data@*", "@types/normalize-package-data@^2.4.0": +"@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== @@ -7936,13 +8057,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/read-pkg@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/read-pkg/-/read-pkg-4.0.0.tgz#773457698f405b53a73471538e76e433e04cb786" - integrity sha512-mnQ7ukQhFGkbErwioo+ahHhkdIhw/llqW97ijWi6l3JYKXAokElLZxlEOtlYYmPKLUJxRKhplOa514n2TyVxjg== - dependencies: - "@types/normalize-package-data" "*" - "@types/recompose@^0.30.6": version "0.30.6" resolved "https://registry.yarnpkg.com/@types/recompose/-/recompose-0.30.6.tgz#f6ffae2008b84df916ed6633751f9287f344ea3e" @@ -8089,13 +8203,6 @@ dependencies: strip-ansi "*" -"@types/strong-log-transformer@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/strong-log-transformer/-/strong-log-transformer-1.0.0.tgz#47b0c9fe1f0c997ed4239746e633e8e36fc836ac" - integrity sha512-ljpD7pfMwsQuzpnXxAb3xAkD/eM3jm3T5GdVcwZISpuPZRg1qwpitjzl6Du4mIl7Eeaqu89uyIgOnZadZTy5Xg== - dependencies: - "@types/node" "*" - "@types/styled-components@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.0.tgz#24d3412ba5395aa06e14fbc93c52f9454cebd0d6" @@ -8287,11 +8394,6 @@ anymatch "^3.0.0" source-map "^0.6.0" -"@types/write-pkg@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/write-pkg/-/write-pkg-3.1.0.tgz#f58767f4fb9a6a3ad8e95d3e9cd1f2d026ceab26" - integrity sha512-JRGsPEPCrYqTXU0Cr+Yu7esPBE2yvH7ucOHr+JuBy0F59kglPvO5gkmtyEvf3P6dASSkScvy/XQ6SC1QEBFDuA== - "@types/ws@*": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" @@ -9305,11 +9407,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-differ@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" - integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== - array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" @@ -9663,18 +9760,17 @@ attr-accept@^2.2.2: resolved "https://registry.yarnpkg.com/attr-accept/-/attr-accept-2.2.2.tgz#646613809660110749e92f2c10833b70968d929b" integrity sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg== -autoprefixer@^9.7.4: - version "9.8.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.5.tgz#2c225de229ddafe1d1424c02791d0c3e10ccccaa" - integrity sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg== +autoprefixer@^10.4.7: + version "10.4.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.7.tgz#1db8d195f41a52ca5069b7593be167618edbbedf" + integrity sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA== dependencies: - browserslist "^4.12.0" - caniuse-lite "^1.0.30001097" - colorette "^1.2.0" + browserslist "^4.20.3" + caniuse-lite "^1.0.30001335" + fraction.js "^4.2.0" normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.32" - postcss-value-parser "^4.1.0" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" autoprefixer@^9.8.6: version "9.8.6" @@ -10013,12 +10109,12 @@ bach@^1.0.0: async-settle "^1.0.0" now-and-later "^2.0.0" -backport@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/backport/-/backport-8.8.0.tgz#eb01e1b4f2c713aad8ceae700ae71748e8f5cf8e" - integrity sha512-m+qr3ydtZADJLUDe3Gd8iFjhMS74IcuVH1QzGlZ7N2KPEC1j/zN+XEDCzofbOlA6T+dKPEagXEOFtBqLAgqkcA== +backport@^8.9.2: + version "8.9.2" + resolved "https://registry.yarnpkg.com/backport/-/backport-8.9.2.tgz#cf0ec69428f9e86c20e1898dd77e8f6c12bf5afa" + integrity sha512-0ghVAwSssE0mamADGnsOybWn7RroKLSf9r4uU1IpAlxxa2zkRecfnGuSfEa5L1tQjh7lJwI/2i01JR6154r+qg== dependencies: - "@octokit/rest" "^18.12.0" + "@octokit/rest" "^19.0.3" axios "^0.27.2" dedent "^0.7.0" del "^6.1.1" @@ -10034,7 +10130,7 @@ backport@^8.8.0: strip-json-comments "^3.1.1" terminal-link "^2.1.1" utility-types "^3.10.0" - winston "^3.7.2" + winston "^3.8.1" yargs "^17.5.1" yargs-parser "^21.0.1" @@ -10543,16 +10639,15 @@ browserify@^17.0.0: vm-browserify "^1.0.0" xtend "^4.0.0" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.17.5, browserslist@^4.17.6, browserslist@^4.19.1: - version "4.19.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.17.5, browserslist@^4.17.6, browserslist@^4.19.1, browserslist@^4.20.3: + version "4.21.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.0.tgz#7ab19572361a140ecd1e023e2c1ed95edda0cefe" + integrity sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA== dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" + caniuse-lite "^1.0.30001358" + electron-to-chromium "^1.4.164" + node-releases "^2.0.5" + update-browserslist-db "^1.0.0" bser@^2.0.0: version "2.0.0" @@ -10735,17 +10830,17 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" -cacheable-request@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" - integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== dependencies: clone-response "^1.0.2" get-stream "^5.1.0" http-cache-semantics "^4.0.0" keyv "^4.0.0" lowercase-keys "^2.0.0" - normalize-url "^4.1.0" + normalize-url "^6.0.1" responselike "^2.0.0" cached-path-relative@^1.0.0, cached-path-relative@^1.0.2: @@ -10872,10 +10967,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001097, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001286: - version "1.0.30001335" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz" - integrity sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001358: + version "1.0.30001359" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001359.tgz#a1c1cbe1c2da9e689638813618b4219acbd4925e" + integrity sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw== canvg@^3.0.9: version "3.0.9" @@ -11344,14 +11439,6 @@ clsx@^1.0.1, clsx@^1.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== -cmd-shim@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.1.0.tgz#e59a08d4248dda3bb502044083a4db4ac890579a" - integrity sha512-A5C0Cyf2H8sKsHqX0tvIWRXw5/PK++3Dc0lDbsugr90nOECLLuSPahVQBG8pgmgiXgm/TzBWMqI2rWdZwHduAw== - dependencies: - graceful-fs "^4.1.2" - mkdirp "~0.5.0" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -11479,7 +11566,7 @@ color@^4.2.1, color@^4.2.3: color-convert "^2.0.1" color-string "^1.9.0" -colorette@^1.2.0, colorette@^1.2.1, colorette@^1.2.2: +colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== @@ -11777,11 +11864,16 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= -cookie@0.4.0, cookie@^0.4.0: +cookie@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + cookiejar@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.1.tgz#41ad57b1b555951ec171412a81942b1e8200d34a" @@ -11867,10 +11959,10 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.9: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== -core-js@^3.0.4, core-js@^3.22.8, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: - version "3.22.8" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.8.tgz#23f860b1fe60797cc4f704d76c93fea8a2f60631" - integrity sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA== +core-js@^3.0.4, core-js@^3.23.5, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: + version "3.23.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.5.tgz#1f82b0de5eece800827a2f59d597509c67650475" + integrity sha512-7Vh11tujtAZy82da4duVreQysIoO2EvVrur7y6IzZkH1IHPSekuDi8Vuw1+YKjkbfWLRD7Nc9ICQ/sIUDutcyg== core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -11885,16 +11977,6 @@ cors@^2.8.4: object-assign "^4" vary "^1" -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - require-from-string "^2.0.1" - cosmiconfig@^5.0.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -13348,11 +13430,6 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= - detect-indent@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" @@ -13640,7 +13717,7 @@ domhandler@^3.0.0: dependencies: domelementtype "^2.0.1" -domhandler@^4.0.0, domhandler@^4.0, domhandler@^4.2.0, domhandler@^4.2.2: +domhandler@^4.0, domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.2.2: version "4.3.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.0.tgz#16c658c626cf966967e306f966b431f77d4a5626" integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g== @@ -13764,11 +13841,6 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= - duplexer@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -13850,10 +13922,10 @@ elastic-apm-http-client@11.0.1: semver "^6.3.0" stream-chopper "^3.0.1" -elastic-apm-node@^3.36.0: - version "3.36.0" - resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.36.0.tgz#8f2cb5eac1653eb8abc88e32851a57fc32fb1064" - integrity sha512-4BDfLjfBHDQbXOyj8Ef//w31Cpvzh8z/tofNDPRDUsqpp/Nkt7KFNmHKgVCMxYi9e3Sd/2Mj+K4CoIuSriW9+Q== +elastic-apm-node@^3.37.0: + version "3.37.0" + resolved "https://registry.yarnpkg.com/elastic-apm-node/-/elastic-apm-node-3.37.0.tgz#475cdd38f6c51992952fa00e9be86f01c0e03eb5" + integrity sha512-WjfhMXK3l3aMO/vOSD4LFn9ActPrujOqjQUO4vEFQu5+HGNJIYW+zT4Mqvq0dIZAsdaat0NX/dzzAkBHaQu21Q== dependencies: "@elastic/ecs-pino-format" "^1.2.0" "@opentelemetry/api" "^1.1.0" @@ -13861,7 +13933,7 @@ elastic-apm-node@^3.36.0: async-cache "^1.1.0" async-value-promise "^1.1.1" basic-auth "^2.0.1" - cookie "^0.4.0" + cookie "^0.5.0" core-util-is "^1.0.2" elastic-apm-http-client "11.0.1" end-of-stream "^1.4.4" @@ -13897,10 +13969,10 @@ elasticsearch@^16.4.0: chalk "^1.0.0" lodash "^4.17.10" -electron-to-chromium@^1.4.17: - version "1.4.66" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.66.tgz#d7453d363dcd7b06ed1757adcde34d724e27b367" - integrity sha512-f1RXFMsvwufWLwYUxTiP7HmjprKXrqEWHiQkjAYa9DJeVIlZk5v8gBGcaV+FhtXLly6C1OTVzQY+2UQrACiLlg== +electron-to-chromium@^1.4.164: + version "1.4.172" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.172.tgz#87335795a3dc19e7b6dd5af291038477d81dc6b1" + integrity sha512-yDoFfTJnqBAB6hSiPvzmsBJSrjOXJtHSJoqJdI/zSIh7DYupYnIOHt/bbPw/WE31BJjNTybDdNAs21gCMnTh0Q== elegant-spinner@^1.0.1: version "1.0.1" @@ -15060,13 +15132,14 @@ faker@^5.1.0: resolved "https://registry.yarnpkg.com/faker/-/faker-5.1.0.tgz#e10fa1dec4502551aee0eb771617a7e7b94692e8" integrity sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw== -fancy-log@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" - integrity sha1-9BEl49hPLn2JpD0G2VjI94vha+E= +fancy-log@^1.3.2, fancy-log@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" + integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== dependencies: ansi-gray "^0.1.1" color-support "^1.1.3" + parse-node-version "^1.0.0" time-stamp "^1.0.0" fast-deep-equal@^2.0.1, fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3, fast-deep-equal@~3.1.3: @@ -15697,6 +15770,11 @@ fp-ts@^2.3.1: resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.8.6.tgz#1a0e6c3f29f5b0fbfa3120f034ea266aa73c811b" integrity sha512-fGGpKf/Jy3UT4s16oM+hr/8F5QXFcZ+20NAvaZXH5Y5jsiLPMDCaNqffXq0z1Kr6ZUJj0346cH9tq+cI2SoJ4w== +fraction.js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" + integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -15906,14 +15984,14 @@ gaze@^1.0.0: dependencies: globule "^1.0.0" -geckodriver@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/geckodriver/-/geckodriver-3.0.1.tgz#ded3512f3c6ddc490139b9d5e8fd6925d41c5631" - integrity sha512-cHmbNFqt4eelymsuVt7B5nh+qYGpPCltM7rd+k+CBaTvxGGr4j6STeOYahXMNdSeUbCVhqP345OuqWnvHYAz4Q== +geckodriver@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/geckodriver/-/geckodriver-3.0.2.tgz#6bd69166a24859c5edbc6ece9868339378b6c97b" + integrity sha512-GHOQzQnTeZOJdcdEXLuzmcRwkbHuei1VivXkn2BLyleKiT6lTvl0T7vm+d0wvr/EZC7jr0m1u1pBHSfqtuFuNQ== dependencies: adm-zip "0.5.9" bluebird "3.7.2" - got "11.8.2" + got "11.8.5" https-proxy-agent "5.0.0" tar "6.1.11" @@ -16388,17 +16466,17 @@ google-protobuf@^3.6.1: resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.19.4.tgz#8d32c3e34be9250956f28c0fb90955d13f311888" integrity sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg== -got@11.8.2, got@^11.8.2: - version "11.8.2" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.2.tgz#7abb3959ea28c31f3576f1576c1effce23f33599" - integrity sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ== +got@11.8.5, got@^11.8.2: + version "11.8.5" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" + integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== dependencies: "@sindresorhus/is" "^4.0.0" "@szmarczak/http-timer" "^4.0.5" "@types/cacheable-request" "^6.0.1" "@types/responselike" "^1.0.0" cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" + cacheable-request "^7.0.2" decompress-response "^6.0.0" http2-wrapper "^1.0.0-beta.5.2" lowercase-keys "^2.0.0" @@ -16536,15 +16614,14 @@ gulp-gzip@^1.4.2: stream-to-array "^2.3.0" through2 "^2.0.3" -gulp-postcss@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-8.0.0.tgz#8d3772cd4d27bca55ec8cb4c8e576e3bde4dc550" - integrity sha512-Wtl6vH7a+8IS/fU5W9IbOpcaLqKxd5L1DUOzaPmlnCbX1CrG0aWdwVnC3Spn8th0m8D59YbysV5zPUe1n/GJYg== +gulp-postcss@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-9.0.1.tgz#d43caa2f2ce1018f889f7c1296faf82e9928b66f" + integrity sha512-9QUHam5JyXwGUxaaMvoFQVT44tohpEFpM8xBdPfdwTYGM0AItS1iTQz0MpsF8Jroh7GF5Jt2GVPaYgvy8qD2Fw== dependencies: - fancy-log "^1.3.2" + fancy-log "^1.3.3" plugin-error "^1.0.1" - postcss "^7.0.2" - postcss-load-config "^2.0.0" + postcss-load-config "^3.0.0" vinyl-sourcemaps-apply "^0.2.1" gulp-sourcemaps@2.6.5: @@ -17400,13 +17477,6 @@ immer@^9.0.1, immer@^9.0.6: resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73" integrity sha512-G95ivKpy+EvVAnAab4fVa4YGYn24J1SpEktnJX7JJ45Bd7xqME/SCplFzYFmTbrkwZbQ4xJK1xMTUYBkN6pWsQ== -import-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" - integrity sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk= - dependencies: - import-from "^2.1.0" - import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -17423,13 +17493,6 @@ import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" - integrity sha1-M1238qev/VOqpHHUuAId7ja387E= - dependencies: - resolve-from "^3.0.0" - import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -18134,7 +18197,7 @@ is-plain-obj@2.1.0, is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: +is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -19280,7 +19343,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.1, js-yaml@^3.9.0: +js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -19843,6 +19906,11 @@ liftoff@^3.1.0: rechoir "^0.6.2" resolve "^1.1.7" +lilconfig@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" + integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -21104,7 +21172,7 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw== @@ -21343,17 +21411,6 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" -multimatch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" - integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== - dependencies: - "@types/minimatch" "^3.0.3" - array-differ "^3.0.0" - array-union "^2.1.0" - arrify "^2.0.1" - minimatch "^3.0.4" - murmurhash-js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz#b06278e21fc6c37fa5313732b0412bcb6ae15f51" @@ -21420,7 +21477,7 @@ nanoid@3.3.3: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== -nanoid@^3.1.23: +nanoid@^3.1.23, nanoid@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== @@ -21453,11 +21510,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -ncp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" - integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= - ndarray-ops@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/ndarray-ops/-/ndarray-ops-1.2.2.tgz#59e88d2c32a7eebcb1bc690fae141579557a614e" @@ -21705,10 +21757,10 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" - integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-releases@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" + integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== node-sass@7.0.1: version "7.0.1" @@ -21826,6 +21878,11 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + now-and-later@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee" @@ -22684,6 +22741,11 @@ parse-ms@^2.1.0: resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== +parse-node-version@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -23268,23 +23330,13 @@ postcss-less@^3.1.4: dependencies: postcss "^7.0.14" -postcss-load-config@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.0.0.tgz#f1312ddbf5912cd747177083c5ef7a19d62ee484" - integrity sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ== - dependencies: - cosmiconfig "^4.0.0" - import-cwd "^2.0.0" - -postcss-loader@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" - integrity sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA== +postcss-load-config@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.1.tgz#2f53a17f2f543d9e63864460af42efdac0d41f87" + integrity sha512-c/9XYboIbSEUZpiD1UQD0IKiUe8n9WHYV7YFe7X7J+ZwCsEKkUJSFWjS9hBU1RR9THR7jMXst8sxiqP0jjo2mg== dependencies: - loader-utils "^1.1.0" - postcss "^7.0.0" - postcss-load-config "^2.0.0" - schema-utils "^1.0.0" + lilconfig "^2.0.4" + yaml "^1.10.2" postcss-loader@^4.2.0: version "4.3.0" @@ -23487,12 +23539,10 @@ postcss-ordered-values@^4.1.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" -postcss-prefix-selector@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/postcss-prefix-selector/-/postcss-prefix-selector-1.7.2.tgz#3adeed903985734298f19d8f5e0b657f9d90d43c" - integrity sha512-ddmzjWNmGs7E/nyolJ021/Gk6oBLRQLyyXKGV4Mu+Y0gquo+XlXSDP0/Y2J8C/cad/GLyftf2H0XtuDFQZxN3w== - dependencies: - postcss "^7.0.0" +postcss-prefix-selector@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/postcss-prefix-selector/-/postcss-prefix-selector-1.16.0.tgz#ad5b56f9a73a2c090ca7161049632c9d89bcb404" + integrity sha512-rdVMIi7Q4B0XbXqNUEI+Z4E+pueiu/CS5E6vRCQommzdQ/sgsS4dK42U7GX8oJR+TJOtT+Qv3GkNo6iijUMp3Q== postcss-reduce-initial@^4.0.3: version "4.0.3" @@ -23597,21 +23647,12 @@ postcss-value-parser@^3.0.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@^7.0.0, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" +postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.35, postcss@^7.0.36: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: version "7.0.39" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== @@ -23619,6 +23660,15 @@ postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.35, postcss@^7.0.36: picocolors "^0.2.1" source-map "^0.6.1" +postcss@^8.4.14: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + potpack@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.2.tgz#23b99e64eb74f5741ffe7656b5b5c4ddce8dfc14" @@ -24580,11 +24630,6 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67" integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg== -react-lib-adler32@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/react-lib-adler32/-/react-lib-adler32-1.0.3.tgz#63df1aed274eabcc1c5067077ea281ec30888ba7" - integrity sha512-AqFqdt4cP0RPffHNjVHZ7tyIgnoSzNxgFhG8XKMXCtA1dZ72gTPO4iYFwWDKHqvE8sHS14rhltQTdbXU5G4BFA== - react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -24667,10 +24712,10 @@ react-popper@^2.2.4: react-fast-compare "^3.0.1" warning "^4.0.2" -react-query@^3.34.7: - version "3.34.7" - resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.34.7.tgz#e3d71318f510ea354794cd188b351bb57f577cb9" - integrity sha512-Q8+H2DgpoZdGUpwW2Z9WAbSrIE+yOdZiCUokHjlniOOmlcsfqNLgvHF5i7rtuCmlw3hv5OAhtpS7e97/DvgpWw== +react-query@^3.39.1: + version "3.39.1" + resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.39.1.tgz#3876c0fdac7a3b5a84e195534e5fa8fbdd628847" + integrity sha512-qYKT1bavdDiQZbngWZyPotlBVzcBjDYEJg5RQLBa++5Ix5jjfbEYJmHSZRZD+USVHUSvl/ey9Hu+QfF1QAK80A== dependencies: "@babel/runtime" "^7.5.5" broadcast-channel "^3.4.1" @@ -25752,7 +25797,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.1, require-from-string@^2.0.2: +require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -25786,11 +25831,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -requires-regex@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/requires-regex/-/requires-regex-0.3.3.tgz#60309eaabbfd5ca8259e090b8b5a94b2144eb0dd" - integrity sha1-YDCeqrv9XKglngkLi1qUshROsN0= - reselect@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" @@ -26301,10 +26341,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selenium-webdriver@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.3.0.tgz#00526ddeca3c187c8d889cd3f790926b95d5f044" - integrity sha512-9XFr8w95BO7jageR61AtiB83fJNem3fdtOQcUpqIIDHWSxihomyG/yBlL1H4y/shi/dO/Ai3PJMAOG+OW3+JHw== +selenium-webdriver@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.3.1.tgz#5e9c6c4adee65e57776b5bd4c07c59b65b8f056d" + integrity sha512-TjH/ls1WKRQoFEHcqtn6UtwcLnA3yvx08v9cSSFYvyhp8hJWRtbe9ae2I8uXPisEZ2EaGKKoxBZ4EHv0BJM15g== dependencies: jszip "^3.10.0" tmp "^0.2.1" @@ -26835,13 +26875,6 @@ sonic-boom@^2.6.0: dependencies: atomic-sleep "^1.0.0" -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - sort-object-keys@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" @@ -26864,6 +26897,11 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" @@ -27590,22 +27628,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strong-log-transformer@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" - integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== - dependencies: - duplexer "^0.1.1" - minimist "^1.2.0" - through "^2.3.4" - -style-it@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/style-it/-/style-it-2.1.3.tgz#ab6b5e109a1e946d58639f8cd05aa52df7ef1ab1" - integrity sha512-QVpYgFoJXhxiuBEok05YTx0WB4AbGkIiMWuCEPLTjFf3tCeB15eqhqMOjJeIsXqZ8REvgsqVuL2u7eoYg0mXJw== - dependencies: - react-lib-adler32 "^1.0.3" - style-loader@^1.1.3, style-loader@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.3.0.tgz#828b4a3b3b7e7aa5847ce7bae9e874512114249e" @@ -28687,11 +28709,6 @@ type-fest@^0.3.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== -type-fest@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" - integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== - type-fest@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" @@ -29151,13 +29168,6 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unlazy-loader@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/unlazy-loader/-/unlazy-loader-0.1.3.tgz#2efdf05c489da311055586bf3cfca0c541dd8fa5" - integrity sha512-INqQZxgx399Y8Eo5gihKBmlHvvcacaYMXI9HMtb2c6JbZLJkgdf0s/gkxqJbo2pl+rtxzPtmf7tj7vHlRx+K/g== - dependencies: - requires-regex "^0.3.3" - unload@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/unload/-/unload-2.2.0.tgz#ccc88fdcad345faa06a92039ec0f80b488880ef7" @@ -29189,6 +29199,14 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== +update-browserslist-db@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" + integrity sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + update-notifier@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-0.5.0.tgz#07b5dc2066b3627ab3b4f530130f7eddda07a4cc" @@ -30507,10 +30525,10 @@ winston@^3.0.0, winston@^3.3.3: triple-beam "^1.3.0" winston-transport "^4.4.2" -winston@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1" - integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng== +winston@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.8.1.tgz#76f15b3478cde170b780234e0c4cf805c5a7fb57" + integrity sha512-r+6YAiCR4uI3N8eQNOg8k3P3PqwAm20cLKlzVD9E66Ch39+LZC+VH1UKf9JemQj2B3QoUHfKD7Poewn0Pr3Y1w== dependencies: "@dabh/diagnostics" "^2.0.2" async "^3.2.3" @@ -30623,15 +30641,6 @@ write-file-atomic@^1.1.2: imurmurhash "^0.1.4" slide "^1.1.5" -write-file-atomic@^2.4.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" @@ -30642,27 +30651,6 @@ write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write-json-file@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" - integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.15" - make-dir "^2.1.0" - pify "^4.0.1" - sort-keys "^2.0.0" - write-file-atomic "^2.4.2" - -write-pkg@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" - integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== - dependencies: - sort-keys "^2.0.0" - type-fest "^0.4.1" - write-json-file "^3.2.0" - ws@7.4.6, ws@^7.2.3: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" @@ -30826,10 +30814,10 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@20.2.4, yargs-parser@^20.2.3: version "20.2.4"